KISS (Keep It Simple, Stupid)

The KISS principle is a reminder that simplicity should be a key goal. If you can solve a problem with a 50-line script versus a complex 500-line solution, KISS favors the 50-line solution because each line of code has the potential to cause an error.

Why is simplicity so important? Software has to be understood by humans. A simple design is much easier to maintain: new team members can get up to speed faster, bugs are easier to localize, and modifications cause fewer ripple effects.

The KISS principle encourages developers to resist “clever” code that does too much at once, and to avoid architecting solutions that address future problems at the cost of current complexity.

  • KISS primarily refers to avoiding complexity in solution designs. A solution that satisfies the requirement and is simple in design is better than a complex one.
  • Simple code is easier and faster to understand and debug. It's even easier to understand and fix if you're your own future self. Smarter code may look impressive at first, but it often masks problems.
  • The code solution should be as simple as possible. Anything that adds complexity unnecessarily is counter to the KISS Principle.
添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论