General Musing

blaze your trail

Deprecating Despair #programming

leave a comment »

Deprecating Despair

I was looking over the PlanCast events for the week and saw this item. (see my comments below)
One of the biggest unaddressed problems we’ve encountered as an engineering team is: despair.
Despair is when you are fixing a bug and you happen upon the ghetto of your code base. Ill maintained, written a long time ago, duct taped together to just barely work. You go in and are immediately crippled by the state of affairs. The poor code causes you to seize up, incapacitated. How do you go forward?The business still needs the bug fixed. So you carefully tiptoe in, make your fix, and try to leave without touching anything else, fearing any reason to return.
How can you avoid this? How can your code base instill hope? A hope that is the premise of responsible activity, not an empty optimism that the future will necessarily be better than the past.
I can tell you how to get out of this mess, start writing Unit Tests. Unit testing is your friend in this situation. Write testcases for the current code, this may take a long time, once you have done this – and only then – you can start modifying the ghetto of your codebase. The unit tests will help you understand the code, and will give you the possibility to recognize the parts you can easily refactor without breaking too much.
There is no problem with refactoring the same piece of code multiple times as you go along. Deprecating or refactoring the code you just wrote means that you have learned something.
Deprecating Despair – Improving Your Application and Staying Positive
One of the biggest unaddressed problems we’ve encountered as an engineering team is: despair. Despair is when you are fixing a bug and you happen…

View or comment on Daniël Crompton’s post »

Written by Daniël W. Crompton (webhat)

May 17, 2012 at 10:05 am

Posted in Uncategorized

Please 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: