Twelve Principles

Last year I went on what can be called an “extended rant”, describing what I believe are Twelve Principles of Good Software Design.

I’ve abstracted the posts in the order they are intended to be read here.

Twelve Principles of Good Software Design: An Introduction.

I started my series of posts about my 12 principles of good software design in part as a criticism of the various software practices I’ve seen while writing software, and in part as a prescription for a possible answer to help developers write better code.

I know this sounds arrogant. But after nearly 28 years of writing software, I’ve seen quite a bit. I’ve seen a software team where developers were encouraged to “refactor” their code, which featured what should have been three or four methods turned into a 20-class library, with layers on layers of layers of “refactoring” piled on top. (My refactoring? Spending a week understanding the code, then rewriting it into a single four method class.)

12 Principles of Good Software Design.

… With that said, here are 12 principles for good idioms–good ways to reorganize or simplify your code. (With all due respect to Dieter Rams’ ten principles for good design.)

  1. An idiom should make your code simpler.
  2. An idiom should make your code concise.
  3. An idiom should make the intent of your code clear.
  4. An idiom should make your code easier to read.
  5. An idiom should be unobtrusive and not clever.
  6. An idiom should help isolate functionality into well defined components.
  7. An idiom should stick to language features which make code obvious.
  8. An idiom should keep related functionality together in the same place.
  9. An idiom should be debuggable.
  10. An idiom should not require extraordinary steps to compile or break the existing development tool set.
  11. An idiom should only implement the functionality needed.
  12. An idiom should allow a new developer to understand the code.

The 12 Principles of Good Software Design: Conclusions


At some point I intend to rewrite this in the form of a book, because I still think it needs to be said.

Leave a comment