Skip to main content


Showing posts from October, 2011

The Best Code is Written Twice

Recently myself and two colleges completed a new feature in an afternoon's programming session. Despite this we ended up binning the feature after all agreeing it was horribly complicated and in turn would cause far more problems down the road than it would solve.We decided to rewrite the feature again, but applying all the lessons we had learned from the first attempt. A recent blog post by royvanrijn on this very topic made me appreciate what we had done. He points out that the best code occurs from several attempts, and unlike what people may expect, the repeat attempts need not take the same amount of time to deliver as the initial attempt.The second time you write the code, it'll only take a fraction of the time it took initially.This principle of repeating a task made me think of when I was decorating my old bedroom. I helped partake in the difficult task of wallpapering the ceiling. Prior to this I had experience wallpap…

Smalltalk Conversion mapped to C#

Lately the team has been making some rather drastic changes and re-designs to our codebase in an attempt to minimise friction to change. In other words, we've identified areas that are painful or tedious to work in and have hopefully rectified them by re-writing the code. The proof of this should be felt as we begin adding new features, the newly improved code is certainly faster and more optimised.Regardless, one area that remains troublesome in my opinion is object mapping (or the correct term of conversion) code. While I've not personally been involved with this reworking of the codebase, I have recently just finished reading Kent Beck's - Smalltalk Best Practice Patterns. Many of the developers I follow on Twitter have been blogging about this book and I figured it was time to give it a go. After all it gets massive praise whether or not you use Smalltalk. While reading this book a few key points regarding object conver…