re: Is “Defensive Programming” actually healthy? VIEW POST


I have just started to learn to program. I'm 45 and have an unrelated unrelenting full time job that doesn't require it.

I know just enough that I freaked out a little inside when I saw that code. That will kill someone is what I thought.

I appreciate the example... And hey, aren't you just bring mindful :)


Welcome and congratulations on choosing a wonderful hobby, career, and passion. I love programming! And yes, some software can be really dangerous. I guess it’s bad to apply military-like defensive practices against code that (for instance) makes Alexa tell you a joke. But I do think it makes for a nicer life if you apply defensive programming to all software. I know I don’t get nearly as many production bugs or weekend calls as other devs do. I guess it’s a trade off. But yes, I prefer to be mindful.

Again, welcome and thank you for your comment. 😊

code of conduct - report abuse