• TypeScript is duck typing.

    When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.
  • Leave $rootScope alone, use AngularJs Dependency Injection.

    AngularJs brings dependency injection into UI development. It works very well until it is misused. Recently, I was working on an AngularJs project. One interesting thing is that some application settings is attached to $rootScope for convenient consumption. When I saw it, I felt this was so Déjà vu. The $rootScope has essentially become the new "window" object in the browser, where all global variables can be attached to. So I Googled about this and wanted to know whether other people have similar problem, and I found this question in StackOverflow, Global variables in AngularJS. It seems that this is a quite a common problem out there. So I wanted dig into it more.

  • Class in ES6, Typescript, Angular2 and Angular1

    ES6 class

    Class was proposed in ECMAScript 4, which was abandoned, and ES5 does not have Class. Now ES6 is finalized and it has class.

  • Some thoughts on choosing JavaScript Framework

    If you are reading this post, I don't have to tell you, you already know there are tons of JavaScript frameworks out there. Some of the popular ones are shown down here. You may be overwhelmed by so many choices, and you want to choose a "best" framework for you killer app.

  • Maybe the desire to control is the problem

    I love to play tennis. Serve was the biggest weakness in my game. So I practice a lot, and now I am getting better and better in my serve. One of the most important techniques in serving is pronation which I struggled most with until I saw this video, The Serve Pronation Technique And 7 Drills To Learn It. Here is what strike me most in the article.