Jiaji's Blog

gitignore Magic

Apr 3, 2015

.gitignore file looks simple. However, if I ask you the question:

What’s the difference between log/* and log/?

I bet most people cannot tell correctly.

I came across this question when I did a .gitignore file clean-up in my project. It took me a while to understand the difference and I find it super easy to be forgotten. After looking up the manual and doing experiments several times, I decide to write this post. Hope it can help those who think about this question as well.

Why my node program won't exit?!

Feb 23, 2015

上周碰到一个很有意思的问题,同事找我来跑一个node的程序,结果跑完了最后一个step,但是程序没有退出。

这对刚从同步编程世界转过来的同学来说简直是不可思议的事情。刚开始我也以为是程序的bug,如果不是bug的话有可能是在等待某个callback,但一直没有触发,同事也不明白是为什么,正好我刚入职就让我investigate一下。之前虽然写过一些node的程序,但是都是小打小弄,所以刚开始没什么头绪。

Older Newer