Focus on code readability
- Write as few lines as possible.
- Use appropriate naming conventions.
- Segment blocks of code in the same section into paragraphs.
- Use indentation to marks the beginning and end of control structures. ...
- Don't use lengthy functions. ...
- Use the DRY (Don't Repeat Yourself) principle. ...
- Avoid Deep Nesting.
What is the golden rule of coding?
Always copy code.
If you write code always copy names you've created.
What are good coding habits?
One really good programming habit to have is to ensure that you create functions or classes for code that will be reused on occasion. You should never find yourself rewriting code that's being used repeatedly as it adds to code-bloat, making it unnecessarily larger in size and scale.