Hacker News new | ask | show | jobs
by popkkksidhd 12 days ago
No, absolutely not. If you don’t understand the ways in which your code will be used, you need to fix that. Defensive programming is just lazy - and more importantly, it’s taking on massive amounts of technical debt. Some of the worst codebases I’ve ever worked on were heavily defensive. And I mean the product they produced, not my ability to understand it (though over my career I’ve noticed a strong correlation between the two).