Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.66 KB

keep-it-simple.md

File metadata and controls

27 lines (15 loc) · 1.66 KB

Keep it simple

The path to being a great programmer usually looks like this:

  • Juniors write simple code that doesn't work.
  • Mediors write complicated code that works.
  • Seniors write simple code that works.

Cooking

When you start learning to cook, you start with a few basic ingredients. Salt, pepper and some meat. You can cook a decent meal but it's nothing fancy. It feeds you, but you wouldn't serve it to anyone else.

Then you start experimenting with more ingredients. Your dishes become more complicated and often fail, but sometimes they are very delicious. You start to understand which ingredients should be used when. But you're still using too much ingredients.

Then you have a great understanding of most ingredients. When someone asks you to cook a dish, you immediately know which ingredients to use, and more importantly, which ones do not add anything.

Don't try to impress others

Mediors try to impress others by writing very complicated code, to show their smartness and throw everything they know in there.

Seniors impress others by writing such simple code that everyone thinks "Duh, why didn't I think of that". But they were not trying to impress. They just did the least they needed to do to get the job done.

The only difference between a medior and senior is that seniors know when to write simple code (almost always) and when to write hard code (when optimizing for billions of customers on a single Pentium 4 with a dial-up connection).

And don't forget, simple is not easy. It's darn hard.

N.B. I never use KISS because I never know whether it means 'Keep It Simple, Stupid' or 'Keep It Stupid Simple'. 'Keep it simple' is much more simple imo.