The KISS Principle
Yes, I know. Kiss is a rock band, but did you know that KISS is an important programming principle whose acronym stands for “Keep it simple, stupid”?
There are variations of this acronym that was created to look less offensive and not seem to be calling someone stupid, so other variations of KISS would be Keep it Simple and Stupid, Keep it Simple and Straightforward, Keep it Short and Simple, among others. But what matters is that all these variations mean the same thing, keeping your project as simple as possible, meaning stupidly simple.
KISS is not just a programming principle, it is a philosophy that believes in the genius of making things as simple as possible while avoiding all unnecessary complexity. We know that not everything can be totally simple, some systems will be complicated, and we can’t avoid that, but through KISS we can eliminate all unnecessary complexity. This concept can apply to several strategies and segments, such as software development, marketing, advertising, branding, and content.
“Keep it simple” finds its origins in similar concepts, such as Occam’s Razor and quotes by Leonardo da Vinci and Mies Van Der Rohe who said, respectively, that “simplicity is the ultimate sophistication” and that “less is more” This term first appeared in the US Navy in 1960 — the phrase “Keep it simple, stupid” is credited to engineer Kelly Johnson, who was the principal engineer at the Lockheed Skunk Works. Johnson told Lockheed designers that his designs should be simple enough to be repaired by a man in a combat situation with just a few basic mechanical training and simple tools. If their products were not simple and easy to understand, they would not only cost lives but would quickly become obsolete in combat conditions and therefore worthless.
Modern programming languages and frameworks and APIs have powerful ways to create sophisticated solutions to various types of problems. Sometimes developers can be tempted to write smart solutions that use all these complex features, so we can put unnecessary complexity into our code when we want to add cool and advanced features early on in the project, for example, and it is quite common among beginning programmers. Could you say you never did something like that?
By the way, avoiding adding unnecessary stuff reminds another principle, YAGNI, but that’s a subject for another article.
Another good thing about KISS is that, unlike complex code, simple code is easier to maintain. Also, by writing simpler code, for example, the programmer will be less prone to errors, and simple code is easier to test.
Simplicity has an even greater advantage when the person who maintains the software is not the same person who originally wrote it. Simple programs are easier to maintain because the maintainer needs less time to understand them, so the likelihood of long-term defects is much lower. Furthermore, this professional maintainer does not need to be fully familiar with the sophisticated features of the programming language, meaning less wasted resources.
“Any fool can write code that a computer understands. Good programmers write code that humans can understand” — Martin Fowler.