Introducing dependency injection into existing systems

A while ago I was faced with an interesting challenge: I was busy introducing dependency injection into an existing system. Almost every method call inside this system was a static call, so every class was hard coded to their dependencies. But, I might be going a little bit too fast here. What is dependency injection? […]

Unit testing legacy applications

There are a lot of legacy applications out there without unit-tests. It would be very nice to have them, especially when you’re asked to fix a bug there. So, how can you start unit testing legacy applications? Lets start with a simple mantra. Test one unit at a time. These are unit-tests after all. There […]

Migrating from Prototype to jQuery

When it comes to javascript, there is one discussion that is very old: to use jQuery or to use prototype? Opponents of jQuery will tell you that it’s really weird that jQuery has a function called inArray, that instead of a boolean value returns the index where the element was found, and -1 if it’s […]

To rewrite or to refactor?

There once existed a application that was written in PHP before there were any decent frameworks available. For the backend of it (a large batch job) there was a decent architecture, but a horrible implementation. For the web interface, there was only the horrible implementation part. Since there were some open feature requests for the […]