KISS原则
- 什么是KISS原则,为什么要遵守KISS原则
- 最简单的好处就是遵循这个原则能够使你的代码足够简洁,逻辑清晰。
原文如下:https://people.apache.org/~fhanik/kiss.html
What does KISS stand for?
The KISS is an abbreviation of Keep It Stupid Simple or Keep It Simple, Stupid
What does that mean?
This principle has been a key, and a huge success in my years of software engineering. A common problem among software engineers and developers today is that they tend to over complicate problems.
Typically when a developer is faced with a problem, they break it down into smaller pieces that they think they understand and then try to implement the solution in code. I would say 8 or 9 out of 10 developers make the mistake that they don’t break down the problem into small enough or understandable enough pieces. This results in very complex implementations of even the most simple problems, another side effect is spagetthi code, something we tought only BASIC would do with its goto statements, but in Java this results in classes with 500-1000 lines of code, methods that each have several hundreds of lines.
This code clutter is a result of the developer realizing exception cases to his original solution while he is typing in code. These exception cases would have solved if the developer had broken down the problem further.
How will I benefit from KISS
- You will be able to solve mor