Home > .NET, Blogging, General Software Development, Software Development, TDD, Test Driven Development > Writing "good" code: How do you understand code?

Writing "good" code: How do you understand code?

John Morales has a great post on understanding complexity and how to think about difficult concepts.

I think John hits on a key concept in the idea of “good code” while I realize it wasn’t the main focus ofhis post: good code is simple for everyone (the team in question) to understand. I think this falls in nicely with our typical #1 goal on projects – writing maintainable code.

I always smile when I hear the saying “if it is was hard to write, it should be hard to read” and nothing could be further from the truth.

Remember the three purposes of code according to Bob Martin:

  • Perform the job (in other words, actually work)
  • Be maintainable
  • Clearly communicate its intent

Communicating clearly typically means simplicityfor the intended audience.

In many ways, writing good code is like teaching. A good teacher will keep the message clear and simple and appropriate for their audience. In tackling a difficult programming task – our job is to bring the right metaphors for the system and team, then present it in a clear manner that we will easily understand in 6 months and the most junior person on the team could maintain (sometimes a tall order but who said things were easy) and therein lies OUR challenge.

Nicepost John! 🙂

Jonathan Cogley is the CEO and founder of Thycotic Software, a .NET consulting company and ISV in Washington DC. Our product,Secret Server, is a secure web-based solution for teams to secure their passwords. Where do you keep your passwords or do you use the same one everywhere (snicker)?

  1. http://
    March 19, 2007 at 4:29 pm

    Jonathan, I am unable to get to Johns post. This page is not loading:http://cs.thycotic.net/blogs/john_morales/archive/2007/03/09/Its-all-relative.aspx

  2. Jonathan Cogley
    March 19, 2007 at 11:54 pm

    Hmmm … the link is working for me. Wonder if it was just down when you tried?

  1. No trackbacks 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: