Skip to content

Fix it by making it simpler

20070807 (2007 August 07 Tuesday)

When you have to fix some code that is broken. You will sometimes think I am not surprised this is broken, I better not change it to much in case I make it worse. You will then make a change that fixed the bug, maybe it introduces another bug, and makes the code slightly more ugly. Then next week it happens again to someone else (possibly you), and they curses you.  They fix the bug you introduced and add there own and now the code is even harder to understand.

It would be better if the code was less ugly when we have finished.

Therefore, When you fix a bug consider making the code simpler. Consider removing code, removing conditionals, instead of adding.

Even if you add a bug, it should be easier to fix, and you will have a nice warm feeling in your heart, having created something of beauty.

Advertisements
No comments yet

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: