Blog

  • Home /
  • Blog /
  • Three Qualities that Every Piece of Code Should Have ...

Three Qualities that Every Piece of Code Should Have ...

July 28, 2008
  1. It should solve a problem and thus it must be valuable to its users. In short, it should do what it must do and simply work.
  2. It should be very easy to change. Every piece of code is subject to change, so it should be darn easy to alter its behavior without complete rewrites. Some piece of software that is difficult to change should be fixed, even though it works correctly.
  3. It should unmistakably communicate its intent to the developers who need to maintain it. If this is not the case, then it should be fixed, even though it works correctly.

Most software I've seen throughout my career as a developer only satisfies  the first category. Heck, I've even seen a lot of code that doesn't even has any of these qualities. 

The second item is something that almost every business implicitly demands, but that is also never added to the requirements.

As for the the third quality, most developers think that its all about writing code but they are wrong. Its all about reading the code. This is why I believe in fluent interfaces and DSL's (and by DSL, I mean the one-and-only language DSL and not the inferior graphical DSL as popularized by Microsoft).

Are there some additional qualities that I missed?

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. 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. 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.

Contact information

(+32) 496 38 00 82

infonull@nullprincipal-itnull.be