Laura Savino gave a wonderful talk at CocoaConf in Seattle about about getting physically angry at bad code and how that’s not a good thing. That struck me particularly hard because I too get irrationally angry when I see bad code. If I’m lucky a long walk around the track at work is enough to calm down, but more often than not it seems like my whole day is shot and I go home grumpy.
I spent a lot of time last week reflecting on why I get so angry. Half the time it’s not code that I’m ever going to see again or have to maintain. Why am I upset? I didn’t get upset at the terrible code my fellow students wrote in the CS397 capstone class in college when I was grading. What changed in the last 10 years?
For me I think my intense irrational anger came when I rotated into my last group at my previous job. Up to that point everyone I had worked with before was either good at what they do, or at least still trying to learn and improve. What changed in my last group is that I discovered a new type of programmer. Ones with don’t-give-a-fuck-itis. They typically had 20-30 years of experience with the company, and were really just trying to hold onto a paycheck until the next round of layoffs would hopefully give them a chance at early retirement. I saw the absolute crap that DGAFites produced, and it was maddening.
Because I knew their grade level and the company’s pay scales, I generally knew about what they were supposed to be making. I was furious that these people were getting paid 2x-3x more than me to make mistakes a student would point out as obvious. Or claim a new technology they were investigating isn’t panning out while I watch one sit and read slashdot all day.
I stayed in that group for nearly six years. Over time my specific rage toward those people and the system that enabled their behavior translated to anger at bad code in general, regardless of the source. This is a problem. I’m supposed to be a senior engineer now at a company that hires mostly recent grads. When you’re new, making mistakes IS learning. It’s my job to mentor them. Show them not only what is wrong when they screw up, but why it’s a mistake in a supportive way. It’s my job to make sure they don’t end up the 30 year-old burn out with anger management issues. Step one is empathising with the newbies. I need to remember what it’s like to try something new and fail miserably. AFAIK no one at my current employer is just hanging on until pension time, and even if they were the pay gap between myself and them is much smaller. Anger at bad code is completely irrational and improper, and I musn’t see its author as a bad person who should feel bad for sucking, but just another human trying to grow and do better. As Daniel Steinberg said in his opening keynote, I need to try and Be Nice.