Live data from Hacker News

I’ve made a conscious effort to stop apologizing for bugs in my code

blog.danslimmon.com

131–140 of 194 posts

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#131

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

> It is not about shame, it is about responsibility.

Assigning personal attributes (responsible/irresponsible) like this is a sub-optimal strategy for improving human performance. It conflates what a person does with who they are. What a person does is malleable, and their performance can be improved with teaching, practice, better techniques, etc. Experienced teachers understand this and avoid turning a discussion about correctness into a discussion about character, as it's counter-productive, and reinforces the narrative that performance is based on innate character, not on hard work.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#132
I am in complete disagreement with this sentiment!

If you're using my code and hit a bug, I am, genuinely, sorry. The goal state is craft software that works properly. That is not an unreasonable goal!

Of course, mistakes will happen, but you should be sorry, and you should think about what would have avoided it (better programming methodology? better testing?).

Aim to create high-quality software that delights its users!

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#133

Earlier quoted context omitted.

> Would you accept such nonsense from your plumber, or your dentist, or your electrician? This would be a reasonable comparison if 90% of software developers could reliably produce bug-free code. This would be a (maybe less) reasonable comparison if 75% of software developers could reliably produce bug-free code. This would be a middling comparison if 50% of software developers could reliably produce bug-free code. T…

Everybody makes mistakes, but that's no reason to never apologize.

Look, if I genuinely screwed something up, sure, I'll apologize and either way I'll fix it. But if I didn't test some corner case because the software takes 30 minutes to build, another 30 minutes to start up, and can't be run without a live database and crashes with an out of memory error after it runs for more than 30 more minutes and no time has ever been allocated to improving the code quality because that's "low priority to the business" and the fix was one of the 20 I had assigned to me in this two-week "sprint", then I don't owe anybody an apology. If you think you can find somebody better, be my guest.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#134
post #96

> Through this lens, apologizing for bugs may seem innocuous. But it contributes to a bunch of cultural anti-patterns: > * If you’re a more senior engineer on your team, the effects of these anti-patterns are magnified: people see you apologizing for bugs, so they think that they should be striving to write bug-free code. Imagine writing this. Imagine actually sitting down at your keyboard and writing down that peopl…

Doh, of course no programmer intentionally writes buggy code, yet there isn't a single programmer in the world who doesn't write buggy code (and everybody who claims to write 'bug-free code' is either very inexperienced or a goddam liar). The point is to not have a "shame culture" for writing bugs, because they are normal part of the workflow. Instead focus on efficiently identifying and fixing bugs (efficient debugg…

Of course we have to accept that bugs will be written. But that doesn't mean we shouldn't feel bad about writing bugs! Feeling bad is an excellent motivator to write fewer bugs!

John Carmack put this better than i can [1]:

> Left to themselves, most people have a tremendous ability to ignore their flaws, and it hampers their growth. A bit of shame is often a positive motivation. I am ashamed of a lot of code I wrote last year. I have reasons why it is the way it is, some of which are defensible, but some are just “WTF was I thinking?” If you don’t have nagging bits of guilt about your recent body of work, it might well be a benefit for someone to point out problems in terms that break through your defenses.

[1] https://www.wanzafran.com/posts/2020/shame-and-code/

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#135
post #134

Earlier quoted context omitted.

Doh, of course no programmer intentionally writes buggy code, yet there isn't a single programmer in the world who doesn't write buggy code (and everybody who claims to write 'bug-free code' is either very inexperienced or a goddam liar). The point is to not have a "shame culture" for writing bugs, because they are normal part of the workflow. Instead focus on efficiently identifying and fixing bugs (efficient debugg…

Of course we have to accept that bugs will be written. But that doesn't mean we shouldn't feel bad about writing bugs! Feeling bad is an excellent motivator to write fewer bugs! John Carmack put this better than i can [1]: > Left to themselves, most people have a tremendous ability to ignore their flaws, and it hampers their growth. A bit of shame is often a positive motivation. I am ashamed of a lot of code I wrote…

I wouldn't call it "feeling bad", but "feeling responsible" for your own bugs. No finger pointing and blame games, just sit down and fix your own bugs, try to not run into the same problem next time, and inform your team mates about what the reason for the bug was and how the fix looks like.

But there's no need for a "formal apology" to your team either. The user might deserve an apology by the PR department, but this shouldn't single out the actual developer who wrote the bug.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#136

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

> If I make an off-by-one error, I could have done better.

"I did not do X, therefore I could have done X" seems clearly false. How do you know you could have done better? And if you could, why didn't you? And if you actually didn't, what does it usefully mean to say you "could have"?

You "could have" done better but didn't, does that imply you didn't want to do better? Is that what you want to communicate - you wanted your code to be worse - because that isn't in your favour either. You wanted to do better and didn't do better, that's back to implying you wanted to but weren't able to, i.e. you couldn't.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#137
Switch from apologizing, to thanking the person that found the issue. Profoundly different effect.

One is all-about-you. The other is a team-building action, recognizing the folks who normally get a lot of grief(denial; accusations; ignoring their input). Testers respond amazingly when they're heard and treated seriously.

It is so profound, let me tell you an anecdote. My test lead had gone to a conference (they have them!) He was in a bar at the end of the evening, shooting the breeze about all the type-A developers they have to deal with, with a group of attendees.

He told the group "I have a guy in my company, I find a bug, he thanks me! Then works closely to categorize and then fix it. No complaining; no yelling. He just says Thank You! and gets on with it. Says I saved him embarrassment if the bug had gone any further, and saved the company money."

Another guy in the group, from a different company in a different state, said "I know who you're talking about. I'll write his name on this napkin, you tell me if I'm right". He wrote my name and passed it over.

They had never met; never working the same companies at all. Were in different places in their careers.

But I had worked with both of them. One of them, 8 years before. But still, still I was the only developer either of them had ever dealt with, that responded positively to a bug report.

Think about it, and then go thank your tester.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#138
post #112

> It reinforces the idea that any one person or piece of code can be blamed for a given failure. Short of malice, this is never the case. If I make an off-by-one error, where, other than me, did it come from? > It gives the impression that, when you wrote the code, you should have written it better. This is a counterfactual that rarely holds up to examination. If I make an off-by-one error, I could have done better.…

> About the only thing that annoys me at work is people trying to deny responsibility for their actions (or lack of them.) Someone once said "There is a difference between 10 years of experience and 1 year of experience 10 times". The best developers I know always take responsibility and try to do better.

The point being made is how bugs invoke an automatic admission of guilt in developers, and absence of which shouldn't be seen as not taking responsibility, especially when tranches and layers in the system (built over the years, say) could have made the entire debugging and development process cumbersome, uneasy, unconventional, unyielding, dense, exhausting, and frustrating.

Taking responsibility might involve any among:

- documenting the behaviour for future maintainers.

- writing tests.

- identifying and pushing the management to fix technical debts.

- digging up the root-cause to fix deeper flaws, if any.

- advocating for saner development and deployment practices.

- ...

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#139
Maybe as a Canadian we've eroded the stigma with apologizing. Saying you're sorry is not about taking blame or responsibility; this attitude is what stops an overly litigious society from saying "sorry".

It's an empathetic response that says "I am putting myself in a different context and trying to understand how it feels". This makes it perfectly appropriate to say "I am sorry" a lot more than we do: when learning about a friend's bad-luck circumstances, a customer's poor experience or adding a bug to your code.

Re: I’ve made a conscious effort to stop apologizing for bugs in my code

#140
post #126

Earlier quoted context omitted.

> We should all aspire to do better. aspiring to do better does not mean aspiring to write bug free code. One is a nearly impossible goal (not over time but certainly at first and certainly when balanced by other constraints) > About the only thing that annoys me at work is people trying to deny responsibility for their actions (or lack of them.) There's a difference between denying responsibility and apologizing. Wh…

I think there is also a difference between apologising while feeling guilt or shame, and apologising and acknowledging that you’ve inconvenienced someone without any of the guilt or shame attached.

apologising as you promote is a forward-looking, positive construct; it acknowledges a sub-optimal situation and implies you are now going to correct it.

maybe git-blame s/b renamed git-sorry

Post reply on HN