I have already mentioned the first rule for learning how to program: you must write programs (and test them) and not simply read about programming. Now, I am about to tell you the second rule which is one of the best-kept secret for writing good computer programs.
Rule # 2
Write your computer programs to make them easy for people to read and understand.
That’s right, write your computer programs so that other people, just like you, would find them easy to read on their own, and figure out what they do. Yes, computer languages are designed to allow you to communicate with computers, just as human languages have evolved to allow humans to communicate with each other. But computer languages, which are much simpler than human languages, are often used by programmers to share their work with other programmers.