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