What factors contribute to programmers making frequent mistakes? Are there specific habits or practices that tend to lead to errors in code?
Follow the DEVteam for more discussions and online camaraderie!

For further actions, you may consider blocking this person and/or reporting abuse
Top comments (11)
There are infinite thing that can cause errors, but some of the most common are ...
hp
instead ofheightOfPerson
, for example)... and more.
Tee hee, had to chuckle a little as part of me thinks that one source of errors is in fact the misapplication of ideas, like "infinite" (there most certainly is not an infinite source of errors I can assure you, not even almost).
Let me continue with fairly more complex, but yet not uncommon reasons!
A few things that come to mind:
And finally, the bane of my existence...
I'm tempted to take a step back and suggest the only real source of errors is human nature. The rest is detail including the details of trying reduce the likelihood and impact of errors and we have many methods for that, with a cost/benefit function that follows the standard Pareto curve (or 80/20 rule). When it's important, like a plane's control system, an x-ray machine, a banks back end) we can produce as good as failure free performance (as the curve is assymptotic and perfection an unattainable myth we can only ever push hard against the limits at great expense).
Where the consequences of errors are low and other features take priority (literally features or time to market for example) errors will be part of the product.
Blindly trusting tests, linters, and code assistance leads to coding mistakes?
There must be many reasons, but what comes to mind is, for example:
1) Unrealistic deadlines that can't be moved
2) Developer Burnout
3) Middle management
Usually come all together leading to failure.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.