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