Blog

Discipline

August 15, 2007

Another must-read post by Jeff Atwood on how Discipline Makes Strong Developers. I couldn't agree more. Only discipline on the part of the developers makes code that is concise and easy to maintain. Having an eye for detail is one of the core skills of every developer.

Currently I'm reading the book Inside Windows Communication Foundation by Justin Smith. One of the code examples in his book contains the following piece of code:

// commented out for clarity
// Console.WriteLine("{0}\n", message.ToString());

I'm sorry, but this doesn't clarify anything. On the contrary, I actually found the code sample in question more difficult to read.

At some point in our careers as a developer, we inherit some piece of legacy code. I don't know about you, but I already had my share of legacy code that was sprinkled with lines of code that were commented out for some reason. This proved to me that the last developer who worked on this code-base was simply undisciplined and didn't care about what he was doing. He didn't bother to cleanup his mess after he stopped working on the project. Some would argue that it shows the history of the code that went into production. We have source-control systems for that, people! When I see these kinds of code, the lyrics of It's Time For Violence just cross my mind. 

Again, good code should read like a good book. Good code should invite others to read it. Good code is all about the details. Writing good code that is easy to maintain takes lots and lots of discipline.

If you and your team want to learn more about how to write maintainable unit tests and get the most out of TDD practices, make sure to have look at our trainings and workshops or check out the books section. Feel free to reach out at infonull@nullprincipal-itnull.be.

Profile picture of Jan Van Ryswyck

Jan Van Ryswyck

Thank you for visiting my blog. I’m a professional software developer since Y2K. A blogger since Y2K+5. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. Past organizer of the European Virtual ALT.NET meetings. Thinking and learning about all kinds of technologies since forever.

Comments

About

Thank you for visiting my website. I’m a professional software developer since Y2K. A blogger since Y2K+5. Author of Writing Maintainable Unit Tests. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. Thinking and learning about all kinds of technologies since forever.

Contact information

(+32) 496 38 00 82

infonull@nullprincipal-itnull.be