06/27/2016 08:29:00 AM
Larry Wall's three virtues of a great programmer is one of those things that sticks with me because it's clever, counterintuitive, and true. Over the last 20 years of writing software, I've found these virtues to be invaluable. Laziness encourages me to automate to reduce overall effort. Impatience leads me to create software that anticipates a user's needs. Hubris drives me to do these things well (and be confident that I can).
Laziness, Impatience, and Hubris don't seem like virtues, but the nature of programming means they are. However, I think there is something missing some Larry's list...something most people would agree is actually a virtue. I've come to believe that empathy is likely the most essential great virtue, because empathy will not only make you a better programmer, but it can keep you from becoming a terrible person.
Programming can be thought of as "building solutions that usually run on a computer." Empathy makes me a better programmer because it lets me cut out any potential middlemen and speak directly to the people experiencing the problem. As I've pointed out before, the best programmers don't solve problems by writing code if they don't need to. Sometimes, all that's needed to solve a problem is a five minute conversation. But to solve problems that way, you need to actively take steps to empathize with your users and deeply understand the challenges they face.
I'm just going to say this: Being a programmer can make you a jerk. This may not be true for everyone, I know that it has had this effect on me. My wife jokes about "Work Ben", who (to her) is a complete asshole. When we do home improvement projects together, I have to make a special effort to make sure he doesn't show up.
Work Ben is direct, analytical, rational, and pedantic. His jokes are almost universally snarky or sarcastic (the remainder being puns). He embodies the virtues of Laziness, Impatience, and Hubris. He will do things like pull up Google or some source code to double check facts right in front of someone as they are talking. In any other context this would be incredibly insensitive and arrogant, but the other people on my current team not only tolerate this behavior, they expect and appreciate it. We all view it as our collective responsibility to ensure we're not building on false assumptions, so when someone says something you think might not be true, it's your job to figure out if it is and correct them (and the rest of the group) if necessary. On a different team, this behavior might be extremely maladaptive.
This isn't to say I don't like my job. Quite the opposite, in fact. But I recognize that the way my team works is a function of the members of the team, our customers, and the larger environment. This means that not only do I need to be ready to change by behavior if any one those things change, but it also means I need to be very careful about assuming the behavior that works with my team works anywhere else. Given how toxic to human interaction the three original "virtues" are, it's extremely unlikely that anyone will see that behavior as truly virtuous.
Empathy allows my behavior to be a function of the people around me, and not simply my personal assessment of the "best" way to work. Being direct and analytical is good when interacting with computers, but it can be toxic when interacting with some people. It can create a combative work environment that repels programmers who don't feel comfortable working that way. I have no doubt that our industry has lost many talented people because of a lack of empathy, and when that lack of empathy is demonstrated by senior developers like me, it can be especially harmful.
I have many responsibilities as a programmer. Meeting the technical requirements of a project is essential, but so is meeting the human requirements. Actively working to understand the needs and goals of both my users and my coworkers is an essential part of the work that I do. Without empathy, I find that extremely difficult to do.