4 ms·
> It's defensive programming. This would necessarily presume applying the same attitude towards the happy path—you're describing something short of that. Or t
by JeffSnazz 3y ago
> It's defensive programming.
This would necessarily presume applying the same attitude towards the happy path—you're describing something short of that.
Or to put it a different way: defensive programming necessarily implies a skepticism that you even are sure what the happy/error paths are!
- reactordev 3y agoOh you definitely apply the same attitude to happy path at the end after scrutinizing the exception/error path options.
- JeffSnazz 3y ago> This is why I am extra vigilant, pendantic and strict when writing or reviewing code that handles exception and error paths. I realize that this is a different person from you, but that's the attitude I am replying to.
- hnrhn 3y agoPerhaps the implication is not "extra vigilant ... [compared to my level of vigilance on the happy path]", but rather "extra vigilant ... [compared to other people I work or have worked with]" The latter is how I read it, because I have definitely worked on teams where the happy path was heavily scrutinised, but error handling was treated as an afterthought, and rarely inspected too closely, leading to anything from error strings copied from another part of the application with names not updated to match the new location to throwing XException but only handling YException, so the XException bubbles up to a much less useful handler.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- JeffSnazz 3y agoI don't tend towards expressing personal comparisons "in public" since they seem both inevitable regardless of the situation and disrespectful to bring up as a topic of interest—not to mention potentially exposing you as incompetent yourself. I guess not everyone else feels the same way. Hell, I'm free now! Everyone I've ever worked with sucks donkey-dick for not coding how I do!
- rimunroe 3y ago> I don't tend towards expressing personal comparisons "in public" since they seem both inevitable regardless of the situation and disrespectful to bring up as a topic of interest—not to mention potentially exposing you as incompetent yourself. I guess not everyone else feels the same way. > Hell, I'm free now! Everyone I've ever worked with sucks donkey-dick for not coding how I do! I read it as "extra vigilant ... [because it's natural for people, including me, to focus on the happy path]". I didn't read it as putting down other people you've worked with, holding yourself up as some paragon, OR potentially exposing yourself as incompetent (I'm really not sure how it would do that anyway?). People tend to focus on the happy path. It's good to be aware of that and try to correct it. It doesn't require or imply thinking poorly of other people.
- JeffSnazz 3y ago> I don't think it's putting down other people you've worked with, holding yourself up as some paragon, OR belittling your own abilities. People tend to focus on the happy path. It's good to be aware of that and try to correct it. It doesn't require or imply thinking poorly of other people. My experience definitely counters your own!
- rimunroe 3y agoCould you elaborate? I've seen this tendency (or an acknowledgement of it) in even the best people I've worked with, ones who are far better programmers than me. I've spent a lot of my career primarily pair programming, so I've had ample opportunity to talk with them about stuff like this explicitly.