DEV Community

Cover image for What are the golden rules of programming?
Christopher Glikpo
Christopher Glikpo

Posted on

What are the golden rules of programming?

  1. Make sure you understand the problem you’re trying to solve.
  2. Prioritize clarity and correctness. Performance is less important, and cleverness is to be avoided.
  3. If your code needs comments to be understood, it’s over-complicated.
  4. Always comment your code, or at least your modules.
  5. Extensibility and reusability are over-rated.
  6. Don’t innovate security. Use well-established security libraries.
  7. If you haven’t tested it, it probably doesn’t work.
  8. If you have time to ‘go back and fix it later’ you’ve got bigger problems in your job.
  9. Integrated Development Environments (like VisualStudio) and the internet (e.g. StackOverflow) are the best friends a coder could ever have.
  10. printf is the world’s simplest debugger.

If you want to learn more about Web Development, feel free to follow me on Youtube!

Top comments (1)

Collapse
 
yourmdsarfaraj profile image
MD Sarfaraj

Well written.
A developer needs to follow:

  1. The habit of source code reading
  2. Practice
  3. Follow the standards
  4. Communication
  5. Documention
  6. Community
  7. Eager to learn