Re:Ask HN: What habits make a programmer great?
by ryandrake on Friday July 07, 2017 @11:15AM
(#14718961)
Thanks for the reply. Yep, this is a topic that reasonable people can disagree about. I suppose I could add "if there's no loss of user data, recover from the error silently and continue on with the program". An example of #2 would be a network connection failure that can be retried without consequence to business logic.
I think that defensive programming is the worst way of dealing with errors. You are now silently diverging from your business requirements by making up data.