← Back to Home
Desarrollo5 min

KISS: The Principle Every Dev Should Mentally Tattoo

C
Camilo Pinzon
April 11, 2025
KISS: The Principle Every Dev Should Mentally Tattoo

Have you ever read code that looked more like a cryptic puzzle than something written by a human? We've all been there. Often, the reason is simple: someone forgot about the KISS principle.



What the heck is KISS?


KISS isn’t just a rock band with face paint (though they rock). In programming, it stands for:


Keep It Simple, Stupid

or if you prefer the kinder version:

Keep It Simple and Straightforward.


The idea is clear: keep things simple. Don’t overcomplicate your life or anyone else’s—including future you, who won’t understand what you wrote 3 months from now.


Why does it matter?


  1. Because simple code is easier to maintain.
  2. It has fewer bugs.
  3. You can update it without fear.
  4. Your future self will thank you—probably with tears of joy.


Learn from the bad examples...


Here are 4 examples of what is definitely NOT KISS!

Example 1: Too many nested functions

function process(data) {
return data.map(x => {
return transform(x).filter(y => {
return y.active === true;
}).reduce((a, b) => a + b.value, 0);
});
}

Readable? Nope. Maintainable? Not at all.


Example 2: Extreme Overengineering

class UserManager {
constructor(db) {
this.db = db;
}

getUserById(id) {
return new Promise((resolve, reject) => {
this.db.query("SELECT * FROM users WHERE id = ?", [id], (err, res) => {
if (err) reject(err);
else resolve(res);
});
});
}
}

Too much for a simple DB call?


Example 3: Useless comments

# This is a function that adds two numbers
def add(a, b):
return a + b

If your code needs this kind of comment... it might not be that clear.


❌ Example 4: Overusing design patterns

Using Factory + Observer + Decorator to render a basic alert? Big no.


So, how do you apply KISS?


  1. Write code future-you can understand.
  2. Don’t abstract just for the sake of it.
  3. Make it work first, then clean it up.
  4. If you can explain it out loud without stuttering—you nailed it.