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/print is the world’s simplest debugger.

Checkout the Python Debugger IPDB.

Explore More Technology Posts

Single-Flight Request Coalescing Explained

Learn how single-flight request coalescing prevents cache stampedes, reduces database queries, and improves Python API performance.

Read More
Design Language vs Design System: Explained

Learn the difference between design language and design system with simple examples, comparisons, and real case studies from top companies.

Read More
Secure Your Web App with OAuth2 and JWT

Learn how to secure your web application using OAuth2 and JWT for robust authentication and authorization.

Read More
Understanding JWT (JSON Web Token)

Learn how JWT (JSON Web Token) works, its benefits, and real-world use cases for secure, stateless authentication in web and mobile apps.

Read More
Navigating the World of Offline UPI Payments: A Step-by-Step Guide

Learn to make UPI payments offline using USSD codes - a simple, secure way to transact without internet. Ideal for areas with poor connectivity.

Read More
ChatGPT vs. Google Bard: Which Large Language Model is Right for You?

ChatGPT and Google Bard are two powerful large language models that can be used for a variety of purposes. This blog post compares the two models and…

Read More