I haven't spoken much about programming, my experience engineering, etc. Today I'd like to!
Having 10-50 bugs per 1,000 lines of code is considered “good”. Hardware rates are much lower (since hardware defects cause electrical shorts, fire, combustion, are carried on a person physically, etc.). Software is typically e-commerce heavy (involving financial transactions) and not typically life-threatening. Still, I was surprised to find the listed rates as industry standards.
Engineers should carefully define each possible worst case scenario that might arise from people using one's code:
I don’t think the above process happens enough. As a result, it's often unclear what the effects are if a subsystem or system fails.
Lately, there's been a lot of high-profile news surrounding aircraft systems that have gone haywire and resulted in people being injured or killed.
Strategies like the preceding might help to save lives and improve overall engineering quality at many firms.
No code I've written, nor any coworker of mine has ever written, has resulted in loss of life, injury, or irreversible financial loss as a result of a defect or error.
I personally stay away from aircraft, vehicle, weapon, and/or life support systems (or similar such systems) so that my Failure Threat Level never exceeds Three.
As a result the worst that could happen and could have happened from my code is Failure Threat Level Four (per the classifications above).
I’ve had four production bugs (one CSS, one HTML, one SMS, and one memory leak on a public beta) that were deployed live on customer-facing resources. (Although I've also introduced a few bugs that were caught in QA testing.)
Three were fully functional but had some UI anomaly. All were corrected with no permanent loss of money, time, or anything else to our users. No immediate costs or harm occurred (being relatively minor bugs).
Four live-production software engineering bugs in 5+ years of engineering. And, all four were code-reviewed and tested by others. Still, I'm disappointed those happened!
According to the Failure Threat Level above, these issues would have Failure Threat Level Five (reversible but functional cosmetic defect) and Failure Threat Level Four (loss of time to fix a memory leak).
By contrast, the average number of bugs introduced is right around 10–50 / 1,000 Lines of Code. Anecdotally, I think that bug defect rate is true - even the best engineers would have maybe 1-2 bugs / 1,000 Lines of Code introduced into production after Quality Assurance testing and review.
You have to bring it and typically 2-4x your salary and benefits.
Most FAANG companies generate at least $125,000 in profit per employee (after salaries, benefits, etc.). Walmart generates about $6,000. (Clearly, very different business models.)
Despite certain cultural stereotypes, it's difficult to say that software developers don't work their asses off!
I once made a code change in about 15-45 minutes that saved our 300,000+ users about 5 minutes each: