Universal Design Principles

In the absence of design quality measurements, there is no objective way to prove that one design approach is better than another. Still, there are a few universal principles—which seem to apply to any programming language or platform—that point the way.

None of these ideas are my invention. How could they be? They’re all old, worn, well-loved principles. They’re so old you may have lost track of them amidst the incessant drum-beating over new fads. Here’s a reminder.

The Source Code Is the (Final) Design

Continue to sketch UML diagrams. Discuss design over CRC cards. Produce pretty wall charts on giant printers if you want. Abstractions like these are indispensible tools for clarifying a design. Just don’t confuse these artifacts with a completed design. Remember, your design has to work. That’s nonnegotiable. Any design that you can’t turn into software automatically is incomplete.

If you’re an architect or designer and you don’t produce code, it’s programmers who finish your design for you. They’ll fill in the inevitable gaps, and they’ll encounter and solve problems you didn’t anticipate. If you slough this detail work off onto junior staff, the final design could be lower quality than you expected. Get your hands dirty. Follow your design down to the code.

Don’t Repeat Yourself (DRY)

This clever name for a well-known principle comes from Dave Thomas and Andy Hunt. Don’t Repeat Yourself is more than just avoiding cut-and-paste coding. It’s having one cohesive ...

Get The Art of Agile Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.