RSS

Muzzling an Angry Dog

22 Dec

I’ve been setting aside as much time as possible recently to read Michael Feather‘s Working Effectively with Legacy Code. A large amount of our code-base for one product is very much in this court and now, unfortunately, needs dealing with. Luckily, though, the more I refactor this type of code the more I realise how much I enjoy it.

I was explaining some of the governing principals to a colleague today…

  • “First you have to get your legacy code into a test harness, then you can safely alter it.”
  • “OK.”
  • “However, you’ll need to alter it before you can do that.”
  • “Huh?”

I have come to the conclusion that Working with Legacy code does not so much involved harnesses as muzzles. It is akin to Muzzling an Angry Dog. First, you have to sneak up to it, from behind, without making any noise or disturbing it’s environment. Then, once the muzzle is safely on you can relax and poke it as much as you like. From now on, our estimates will have a ‘Dog Muzzling’ factor added to them.

[And, no, I do not condone taunting any dog, angry or otherwise.]

Advertisements
 
Leave a comment

Posted by on December 22, 2009 in Programming

 

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: