An overview to KISS principles.

An overview to KISS principles.

a simple design makes service and maintenance child’s play.

Gulshan Yadav

Published on Nov 24, 2021

3 min read

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

Hey there,

It's the one and only Gulshan, Again with another article.

In this article we will talk about KISS.

Haha, not that one, but in the on where developers writes the code in such a way that the code reviewer will kiss his screen.

Just Kidding!

laughing.gif

So, what is KISS?

Well, KISS is an acronym for Keep It Simple, Stupid or

  • Keep, it simple silly

  • keep it short and simple

  • And many more. Let me know your acronyms in the comments :)

It can be implemented in various phases in life. But in this article we will be sticking with coding practices.

coder's assemble

When trying to solve a specific problem, don't we think, what if I implement this algorithm, it will make me look a smart developer.

But the truth is, If you were writing code for attaining some functionality by trying out various complex stuff, but that same functionality can be implemented easily.

Then your purpose is dump.

Adding that additional complexity with those fancy looking algorithms, will only make the future code reviewer to abuse you.

Ahh, Gulshan, But I don't even realize that I'm writing a complex code.

  • Yeah I get that. When I started to code, I was also in the same shoes as you are right now.

  • Till now, I can't say that, "Ho Ho, I'm the best coder." Sometimes, my teammates tell me that my code sucks.

  • But I'm getting better.

Before starting to write code, I generally imagine there's an angry person. He owns an Armalite AR-15 rifle, and he is going through my code. If He gets mad at my code, then that's bad for me.

You can try out this too, It helps me in writing good comments and following the best practices.

Here's the list of rules to follow while writing your very own code,

  • Don't Repeat Yourself (DRY)

    • If something gets repetitive in your code, then create a function out of it.

    • It will help you later when making some critical changes all over your code.

  • Minimalism

    minimalism refers to the application of minimalist philosophies and principles in the design. Keep it Simple.

  • You aren't gonna need it

    • It is the principle of extreme programming that is intended to improve software quality.

    • This rule states that one should not add functionality until it's necessary. Adding more and more useless functionality won't make your software the best.

    • It will be overwhelming to the user who is trying to use your software.

    depressed user

    Implement things when you need them, never when you foresee that you need them.

So yeah, this is it.

Make your future code reviewer kiss your code by following the best practices now!

cat kissing the laptop with her paws


See you in my next article 😊

Until then,

Keep Learning.

 
Share this