DEV Community

Cover image for The K.I.S.S Principle in Programming
Kwerenachi Utosu
Kwerenachi Utosu

Posted on

The K.I.S.S Principle in Programming

KISS is an acronym which means Keep It Simple Stupid. I don't like to use the word Stupid because I know my readers aren't stupid, that’s why I choose to translate it to Keep It Super Simple.🙂

KISS is an important term in programming because it puts in your subconscious that every process you’re creating should be as simple as possible and also equally as efficient.

When we say ‘Simple’, what do we mean?

Simple in this context doesn’t necessarily mean easy, It simply means producing the same results or a better result with less effort or complexity.

In the concept of KISS, we neither want just less nor more, we simply wish to have only as much as is required.

If you’re building a product that moves an object from point A to point B, then do that as efficiently as possible, while having simplicity at the back of your mind.

Alt Text

Keep Simple Tasks Simple!

The KISS principle can also be applied in Artificial Intelligence and Machine Learning. When building a simple Artificial intelligent system, you may not necessarily need to create a machine learning model, if an If Statement can do the job efficiently.

In the programming context, there are a few points to note whenever we want to reduce complexity.

  • Ensure your variable names describes the variable it holds properly.
  • Ensure your method names translates to the purpose of that method.
  • Write comments within your method where necessary.
  • Ensure your classes has a single responsibility.
  • Avoid global states and behaviors like as much as you can.
  • Delete instances, methods or redundant processes within the code base that are not in use.

We should try to reduce complexity, while maintaining an efficient system. The British computer scientist, M. A Jackson actually wrote that,

Programmers often take refuge in an understandable, but disastrous, inclination towards complexity and ingenuity in their work.

Why is the KISS principle important in programming?

  1. One major challenge Developers face is working on an existing code base. But when the KISS principle is applied it tackles that issue.

  2. The KISS principle facilitates continuity when needed and gives room for other people to understand the process.

  3. Simpler processes allow for greater efficiency in automated testing. It is easier to test a simple system than a complex one.

Finally, we should strive to reduce complexity as much as we can, make our coding process very transparent, efficient and secure.

Alt Text

For me, KISS brings to mind and indestructible glass box, where all the processes can be clearly seen but is also very secure.

On a lighter note, If you’re in a business meeting and you been cornered with some hard business questions that you barely understand but you’re expected to know, give Complex Technological Answers! 😂, Otherwise keep it simple always!. 😉

Adios.🙂

Latest comments (9)

Collapse
 
michaeltharrington profile image
Michael Tharrington

Great first post! 😀

Collapse
 
kwereutosu profile image
Kwerenachi Utosu

Thanks Micheal

Collapse
 
ziadab profile image
Ziad Abouelfarah • Edited

Actually It mean to me keep it simple and short

Collapse
 
kwereutosu profile image
Kwerenachi Utosu

Lol thanks

Collapse
 
alainvanhout profile image
Alain Van Hout

The original is in fact en.m.wikipedia.org/wiki/KISS_princ..., though many people prefer to replace the part that's seen as an insult.

Collapse
 
kwereutosu profile image
Kwerenachi Utosu

Nice, thank you 👍🏼

Collapse
 
ziadab profile image
Ziad Abouelfarah

Actually I got inspired from a rock band called KISS

Thread Thread
 
alainvanhout profile image
Alain Van Hout

😝😁🤘

Thread Thread
 
ziadab profile image
Ziad Abouelfarah

That the spirit we need 🖤