Symmetry

One design concept I have come to hold near and dear to my heart, and one that I see often gets overlooked in software is the idea of symmetry. If you look around you, almost every beautiful, functional design out in the world is symmetrical. In software, especially if the software needs to be rushed to meet a deadline, this principle is often overlooked. As a programmer, architect, designer, whatever your role in the software development lifecycle, I urge you to consider symmetry as a core principle of whatever you deliver.

If your code has the idea of…Please add…
openclose
new/createdelete/destroy
minimummaximum
add/increasesubtract/decrease

This list can go on and on. You may be, right now, looking at this list and wondering “Why would anybody only implement one of these columns?” I have asked that very same question so many times I’ve lost count. I am sure I personally have omitted symmetric operations at some point in my career. Assurance from a product manager that it won’t be needed. Running out of time to implement it and it wasn’t asked for anyway. YAGNI (I hate this principle, I am sure there will be a rant in the future). Any of a handful of other reasons that all sound legitimate at the time.

In days gone by any piece of software was practically required to implement these methods because resources were precious. Disk space and memory were very scarce and you could not afford to swallow up these precious resources if you were not using them in a meaninful way. Screen real estate was hard to come by and complex layouts were very difficult to implement. Now screens are huge and compute resources are cheap and near limitless. I might need that user data one day, so I probably shouldn’t delete it. I was assured users wouldn’t push the system in this way, so I probably don’t need to be fastidious in cleaning up my database connections. The reasons are many, and they are seductive. But all of these decisions have a cost. They often result in systems that grow, and grow and grow, essentially at an unrestricted rate. Unrestricted growth goes by many names. One of them is cancer.

Ignore that urge to “just get it done” and take the time to properly finish the task at hand. Implement the methods that are just screaming to be implemented. Your users will thank you. Your bosses will thank you. Ultimately, you will thank you.

Scroll to Top