I have been in my latest hacker post for a couple of years now. I am still maintaining one of the key projects there that I was introduced to on my very first day. Yeah my first day! A new post and I was reading code dating back to the 'Classic ASP' days, migrated to 'ASP.NET Framework 1.1.' It was already about three years old. So the code was big fat and very very hairy. I recalled in my mind someone mentioning that classic phrase "..hit the ground running." In my interview only a month previously. The relevance of that sentence was beginning to dawn on me.
The code violates just about every principle going! particularly DRY (Don't repeat yourself) There are, for example: a total of three Data Layer tiers each of varying complexity and each reflecting the tastes of it's creator. One is abstract, the second is just a light layer that executes in-line SQL and the third (my own contribution) sits somewhere between the two and shows my preference for stored procedures as opposed to concatenated SQL. This... 'thing' is a monster! But, it works it's been out in the wild for half a decade being battered by it's users everyday. It's been down just twice for a handful of hours in the last two years and that was due to network hardware issues not the application.
There are days when I hate the monster and can barely face it, then there are days like today as I bolt on yet another module/feature that I feal in awe of this mighty labyrinth of C# code. I have managed to slowly refactor large parts of this monster's code mop, combing wayward hairs of C# into neat re-usable classes. I read once on Joel Spolskey's blog throwing away code and starting again is something you should never do. My monster stands testament to that ethos.
Friday, 4 January 2008
Subscribe to:
Post Comments (Atom)




0 comments:
Post a Comment