"Beneffectance" is the name of a cognitive bias that suggests a person will readily claim responsibility for positive outcomes, yet reluctantly admit having a part in negative ones. In other words: "Something good happened? Yes, that's because of me! Wait, something bad? No, of course I wasn't involved."
Among the many biases we all carry, specifically identifying and maintaining an awareness of beneffectance in my life has helped me become a more effective programmer. Give me a few minutes and I'll explain how.
How many times have you found yourself rooting out a bug and been convinced that the problem must originate in a coworker's code, the framework you are using, or perhaps even in the core language?
At this point, we bombard Google with the error message(s) or a specific description of what we are experiencing. Maybe we go to Github and comb through the framework issue list, eager to find something that validates our suspicion that the bug is them, not me.
Based on my experience I can confirm: this approach is not effective.
More recently I've turned that pattern backwards and started by assuming that I'm the problem. Something I've done has caused the bug (a PEBKAC, if you will).
Think about if for a second - in the case of me writing code, what is the least vetted/flexed code in the system?
Is it the core language? Of course not. Likely hundreds of thousands of other programmers are writing in the same language as me.
Could it be the framework then? It's more likely that than the core language, but if you are using a reputable framework, then tens of thousands (or more) programmers have taken it through its paces.
That leaves me.
My code has been in existence for the least amount of time, received the smallest amount of outside exertion, and is the result of one mind, yet it seems like it is perfect! I mean, I wrote it, so it must be, right?
Coming to grips with beneffectance has helped me identify and fix bugs much faster by reducing the potential sources of the problem. Instead of having myriad factors to rule out, I just have to backtrack my own work.
I can confirm, the grand majority of the time, it's not you, it's me.