What's brewing
« Cultural Differences | Main | Stress »
Wednesday
Mar302011

Code change shouldn't be horrible

Was having a discussion with a developer and came across a topic about code change. Since he is very new in developing java stuff, now after getting thru the jungle for half a year. He looks back and realize many stupid implementation.

He then told me something he learnt from another developer, who has been writing code for some years that if code works, don't fix it.

I am quite surprised when he mention the rationale. It is the risk that the changes might break what works is inhibiting him from doing changes.

I can't help but "educating" this budding developer at the spot. With unit testing framework so widely available, there is no other reason but laziness or unrealistic timeline that no unit test is written.

Automated build and unit tests are so crucial that it should be conducted across the team as early as possible. Once it is in place, all code changes will need to endure through the bunch of test cases, before it is allowed to get into trunk. It is all the little test case that aggregates help us to build the confidence of code change.


PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>