This is a great guide especially point number two. I practice this all the time and don’t know why more developers practice number two.
Actually I do, and the reason why you often see a 1000 line piece of code is because most developers equate work with quantity. They also put their egos in their code and so to have a file with only 10 lines don’t cut it. Not to mention anyone can understand a 10 liner so we can’t have that. Lastly, some are unsecured and believes this is good job security. I once worked at a company where the code is so convoluted and complicated, they had trouble finding employees and if they do find ppl that pass their criteria, they won’t stay long. Who wants to read thru such mess? But the lead developer accomplished what he set up to accomplish which is he gets to keep his job since he’s the only person who understands the code.
Point number two is a really serious problem that I often encounter and rarely do I come across code that is clear and simple. Not only is such code easier to maintain but performance would even be faster as well.