code quality - How to be a zero-bug programmer? - Programmers Stack Exchange
"Zero-bug programmer" is an oxymoron, like a silent singer, but past 60 or so years of programming has produced some distilled bits of wisdoms, which will make you a better programmer, such as:
- Be humble -- you are and will be making mistakes. Repeatedly.
- Be fully aware of the limited size of your skull. Approach task with full humility, and avoid clever tricks like the plague. [Edsger Dijkstra]
- Fight combinatorial explosion
- Get rid of mutable state (where ever possible). Yes, learn functional programming.
- Reduce number of possible code paths
- Understand (the magnitude of) the size of the input & output spaces (of your functions), and try to reduce them in order to get ever closer to 100% test coverage
- Always assume your code is not working -- prove it otherwise!
Read full article from code quality - How to be a zero-bug programmer? - Programmers Stack Exchange
No comments:
Post a Comment