Dependency Injection and the YAGNI principle

April 13, 2014

One of my new personal projects involves writing an application using Node.js and MongoDB. It's going to have a RESTful interface for the services, and MongoDB as the database (I haven't decided about what I'm going to use for the front-end, but Angular.js is a strong contender). I had looked at using to build it, but after playing with it for a while, it seemed to bring in too many things I wouldn't end up needing, so I decided to build it all from scratch using Restify for the RESTful services.

I'm writing it in an


Beautiful Code

October 02, 2012

Programmers often talk about code being “beautiful”, but often writing “pretty” code is disparaged as being a luxury that can't be afforded under tight schedules. The result is really ugly code that ends up being difficult to maintain, but most people don't seem to see the correlation between “beauty” and “maintainability”.

Experience has shown me that beautiful code and maintainable code, if not identical, are closely related. The reason, I believe, is very simple: coding is expression. What I mean by this is that, for any given problem that is trying to be solved by code, there are usually many,