Abstraction, or "Just Wrap It!"
As a user or developer of network software, life is relatively simple today because operating systems and software libraries provide a nice facade to work with. Behind these facades may lie a level of complexity you're not ready or willing to deal with, but thanks to clever design you may never have to. This is called abstraction, where you gain the ability to treat an entire system of seething complexity as a simple box in a diagram, or entity in your mind. Not everyone has the ability to abstract to the level required to deal with such things. Just as the most famous artists have used it to amaze us with their work, the best computer scientists use it to solve complex problems with (sometimes only apparent) simplicity. This is what computer scientists often refer to as elegance.
Therefore, I propose that the transitive of my first rule of design is also true:
Eric's Second Rule: Elegance equals simplicity.
I once worked with a developer who used to talk about a fictional product he dreamed of creating called "Wrap App." This revolutionary tool would offer the ultimate in abstraction and wrap every possible problem in a veil of simplicity. With it, new applications could be created instantly with a click of a button. Awesome vision and goal! It's not the sort of cerebral challenge most developers crave; but from a business point of view it's the brass ring. But even I'll admit, this goal may involve too much simplicity to ever be a reality.
Turn it Inside-Out
Simple and elegant software design should go beyond just the code that makes the system work, it should extend to the user interface as well. This may be obvious for applications with a graphical interface, for which there are ample guidelines to good design, but it also applies to applications with more abstract interfaces: the tools and systems that we use to develop and deploy other software. For instance, why has FTP lasted so long in a world where constant software upgrades are a fact of life? Because it just works, out of the box. This is how all software should be. Don't make installation and configuration an afterthought.
This leads us to my next rule:
Eric's Third Rule: Turn your design inside out.
A good internal design should be turned inside out, and it's usage should be as elegant as it's inner workings. If it's pretty on the inside, it should at least be as pretty on outside. The inverse is true for those whose focus may be on the outside (i.e. graphic artists). If you're a UI designer and also a programmer, try not to sacrifice the elegance of your software's internal design for the sake of quickly iterating the UI. I've seen far too many prototypes (with hacked code never meant to survive) go on to become the actual product. Again, I speak from experience; this is another software crime I'm guilty of.
Although there are countless rules, guidelines, and methodologies to help achieve good software design, the best ones are those that lead to the greatest success. How you measure success may vary: high performance, stability, robustness, scalability, ease of code modification, and so on. But I've found that my three simple high-level rules for software design are always a good start:
- Simplicity equals elegance: strive for the simplest solutions involving fewest "moving pieces".
- Elegance equals simplicity: apply abstraction to simplify even the toughest of problems.
- Turn your design inside-out: make your software simple and elegant to use as well.