K.I.S.S. Software Design Principle

Introduction

 
In this article we will discuss a software design principle, known as KISS. We will start with the introduction of the acronym. After that, we will discuss in details about the KISS principle and its usage in software. I have also tried to explain this with example steps which I follow while working on software.
 
 

K.I.S.S. Definition: KEEP IT SIMPLE STUPID

 
As described in the heading, KISS design pattern here stands for KEEP IT SIMPLE STUPID.
 
This principle simply indicates that the simplest solution or path should be taken in a situation. This principle can be applied to any scenario, including many business activities, such as planning, management, and development. We will discuss this in terms of software design and development.
 
A common problem among software engineers and developers is that we tend to over complicate problems. Actually we live in complicated world. As we are working on different projects in development, some projects are very simple and some projects are difficult. So while working on even simple projects we choose to follow the difficult path which we followed in complicated projects.
 
 
Wherever possible, complexity should be avoided in a system—as simplicity guarantees the greatest levels of user acceptance and interaction. The objective of any process/design should to deliver the simplest possible outcome.
 

Explained by brilliant people

 
The quotes from famous people, listed below, will give us more encouragement to follow this principle. Let’s read what people are saying.
 
"Everything should be made as simple as possible, but not simpler." - Albert Einstein
“Less is more” - Ludwig Mies Van Der Rohe’s
“Make Simple Tasks Simple!” - Bjarne Stroustrup’s
“It seems that perfection is not reached when there is nothing left to add but when there is nothing left to take away.”
“The simplest solution is most likely the correct solution”
 
 
If we go through each one of these quotes and contemplate on these individually then we can get a more clear idea about the concept and its benefits.
 

While Coding or doing development

 
These are few of the points which I follow while doing software development or design.
  • Don’t use complex logic if it can be done simply. For instance, if we want to use logging in the project. One approach is to write your own logic to create the log file, then write the content in the log file, manage different log levels etc. Another simple way is to use some already built Nuget package/Dll in you project (e.g Serilog) which have these logics already written. Just use it without adding complexity in you project.
  • Don't be afraid to throw away code. While refactoring the code always remove unwanted code.
  • Solve the problem, then code it. First of all spend time to understand the problem and how it can be solved. Only after that jump to solve it. Break down your tasks into sub tasks and solve one by one by keeping them simple.
  • Sometimes we use fancy features of the technology just to use them, we should not use them until required.
 

Summary

 
In this article, we discussed the K.I.S.S principle and learned that the basic meaning of this principle is that we should simplify the design of a product and success is achieved when a design is at its maximum simplicity. However, it is also important not to make things so simple that they compromise the functionality of the final design – users will live with a little complexity if it enhances their overall experience.