Wednesday, February 27, 2019

What are the Golden Rules of Programming?

In this post i am sharing the best Rules of Programming. The following are the Golden Rules


  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.
  11. Don’t quickly agree to the timelines given by your PM. He wants you to deliver it yesterday. Take your time to understand the problem and factor the time for design , testing, code reviews, changes, documentation etc .
  12. Spent time designing the solution. Create Data Models , Data flow diagrams etc. This will help you to think as well.
  13. See if you can utilize a existing system. Why spent time and money on creating something new. You need to socialize your design to get those ideas.
  14. Get your design reviewed. Remember any changes in design phase are so much easier.
  15. Always keep an open mind and don’t hesitate to throw away your code and start fresh if you feel so.
  16. Don't shy away from getting help if you need.
  17. Always use libraries or tested code. Don’t try to write lot of low level code, if you don't have to.
  18. Think about performance at the design time itself. You don't want to create a system and then worry about making too many changes write before delivering to QA.
  19. Do lots of unit testing. Put lots of debugging messages in your code. Keep an eye on error logs and fix any issues before pointed to by QA.
  20. Don't book your Vacation right after production release :-)



No comments:

Post a Comment

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...