Tags
Aristotle, Ayn Rand, Bertrand Russell, Hugo Grotius, justice, Karl Marx, technology, United States
I’m really enjoying my new job at the intersection of academia and technology, and it’s made me want to improve my technology skills. So I’m now preparing for a Master’s degree in computer science, learning to program in modern computer languages. I’ve been trying to think about how to be a good programmer, and looking up some advice on the web. Of course people’s assessments of good programmers are widely different, but there’s one surprising claim that comes up quite a lot: a good programmer is a lazy programmer.
This is the point where programming becomes philosophically interesting. It’s not a new rhetorical move to take something usually considered a vice and call it a virtue, of course. Ayn Rand – a philosophical hero to many programmers, I might note – entitled one of her essays (and essay collections) The Virtue of Selfishness. On the topic at hand, Bertrand Russell spoke many decades before In Praise of Idleness. But while the move is not original, it is nevertheless effective. It almost forces us to start doing philosophically, to start thinking about big questions and ultimate ends, because we can no longer assume what we took for granted – that selfishness or laziness is a vice. Even if we reaffirm our original view, it is not quite the same now that we have allowed it to be called into question.
I especially like the move of giving an ostensible vice the name of virtue because it helps highlight what I find one of the most crucial ethical themes of all: the Aristotelian mean, the idea that virtue is a matter of occupying the right middle ground between two vicious extremes. We’re directed toward the vices because they each have some good in them; the badness of one vice lies in the fact that we ignore the good in its opposite. I find justice as good an example as any: we need to take the interests of others into account, but also need to stand up for ourselves. Hugo Grotius had criticized the idea of justice as a mean because he thought there was nothing wrong with asking for too little. But I think part of Rand’s widespread appeal is that she recognizes there is something wrong with excessive self-sacrifice, with meekness and submissiveness – though I would argue she then finds herself stuck at the opposite extreme.
Now to the topic at hand: laziness. It is a commonplace to view hard work or industriousness as a virtue. And there’s a truth to that view, in that hard work is associated with the genuine virtue of self-discipline or temperance, of being able to put aside the desires of the moment and think toward the longer term. But hard work is not an end in itself, especially not work for pay, alienated work. An old quip says “Nobody ever died wishing they’d spent more time at the office.” Yet too often we treat paid work as if it is its own end, and as a result we work too hard. This is especially the case in the United States, where it is common even for highly skilled workers, workers in high demand, to be allowed only two weeks of vacation a year – and sometimes, shockingly to me, they don’t even use those two weeks. The US is also the land of convenience, of 24-hour stores and frozen pizza, which allow one to save a great deal of time; the problem is that that very saved time tends to get funneled back into more paid work.
I’ve discussed this much before; it is the key reason I am not a right-winger. And again, Russell overall said it better than I have. I mention it to show one way in which laziness, or at least something often called laziness, can be a virtue: the proper recognition that we have worked enough, that it is time to play.
The computer programmer’s virtuous laziness is related, but slightly different. What has struck me about computer science in my limited studies to date is how deeply devoted it is to efficiency. The study of data structures and algorithms – the theoretical underpinnings that make computer science different from mere programming – is all about making a computer accomplish tasks using as few of its resources as possible. But good programmers take this a step further. Good programmers are lazy because they try to make a computer accomplish tasks using as few of their own resources as possible. Rather than writing code multiple times to accomplish different but similar tasks, they create a data structure and algorithm that allows them to turn it all into one task, written once, that performs the task in different ways. The same or more results with less time and effort put in: that’s the programmer’s goal. “Work smarter, not harder.”
Or so one might hope. The software industry can be notorious for its long hours, especially in the game industry where many work 70-hour weeks or more. Here the programmer’s so-called laziness really is anything but. She has the exact opposite of Russell’s virtue of idleness; the irony is that she trains herself so that she could have that virtue. The programmer’s laziness turns out to be simply a variant on the basic problem of convenience. A good programmer doesn’t want to do repetitive tasks, so she programs in a way that saves time. That’s lazy, and it’s good. But what is that time then used for? A properly lazy programmer would be able to say: “I have accomplished a task that a less skilled programmer would have taken more than a 40-hour week to do, and I have done it in 20 hours. Now that I have done more than everything my employer expected for the week, I will go home and enjoy the fruits of my labours.” But the culture of the software industry rarely allows for this. Instead, the effect of the good programmer winds up being like that of the washing machine: work saved is merely an occasion for more work. Marx would not be surprised.
Thill said:
Neither work nor leisure is an intrinsic good.
Efficiency is also not an intrinsic good. The American war machine is efficient in killing and destruction, but there is nothing intrinsically good in this efficiency.
It all depends on the uses to which work, leisure, and efficiency are put.
This raises the all-important question of philosophy: Which ends, or purposes, or goals, are good and worthy of pursuit by means of efficient and intense work?
It is also worth noting that, particularly in societies with a dominant spectator sports culture, physical inactivity is mistakenly taken as a paradigm of laziness.
But I could be sitting quietly in a chair with closed eyes and engaging in intense and valuable mental activity or effort, e.g., attentively listening to a Bach prelude and figuring out its enthralling complexities.
Thill said:
“This raises the all-important question of philosophy: Which ends, or purposes, or goals, are good and worthy of pursuit by means of efficient and intense work?”
Are there ends, purposes, or goals which are great goods, but which require the highest form of inaction or inactivity for their attainment, e.g., Zazen or “Just Sitting”?
Thill said:
“Are there ends, purposes, or goals which are great goods, but which require the highest form of inaction or inactivity for their attainment, e.g., Zazen or “Just Sitting”?”
Well, if I am “just sitting” in order to have “Satori”, or “insight”, or whatever it is, then it is an action or activity and a far cry from “the highest form of inaction or inactivity”.
The notion that any intentional action can count as “inaction” is incoherent.
Thill said:
“I could be sitting quietly in a chair with closed eyes…”
FYI: These chairs are found in every classroom in American colleges and universities. LOL
Jeff said:
Thought-provoking post. But how do we reconcile it with this:
http://calnewport.com/blog/2012/03/15/being-very-good-at-anything-involves-being-somewhat-addicted-hard-truth-on-the-sheer-difficulty-of-making-an-impact/
Amod Lele said:
Welcome, Jeff! Good contrasting point. I think it fits with what Ryan says below about people who have trouble tearing themselves away – and with what I’ve said myself above about overwork in the industry. But in my recent forays into programming I’ve really begun to see how both are possible at the same time. There is a real satisfaction that comes from making code elegant – which usually means making it run in a way that will be easier to use and save you work in the long run. At the same time, the work of making that code elegant can often be time-consuming – and addictive, keeping you at your computer at the expense of other priorities. In those respects the programmer’s laziness is a paradox of sorts – as I think is inevitably entailed by an attempt to take an ostensible vice and call it a virtue. That’s the power of the Aristotelian mean, for me: it points out just how difficult it is to find the right, virtuous spot. It’s much easier to land at an extreme.
Zerotarian said:
Have you encountered the three cardinal virtues of a (Perl) programmer — laziness, impatience, and hubris? (What, no preview for comments? I hope that comes out as a link…)
I remember my grandmother, a math professor, telling me something similar about mathematicians — they’re lazy in that they prefer to derive an elegant generalization once that they can re-use to save time later. Same basic idea.
Amod Lele said:
Yeah, that was among the sources I read that described laziness as a virtue for programmers. (And the link came out fine.) Not as sure how the hubris and especially the impatience stack up, but they’re food for thought as well.
Ryan said:
Amod, “laziness” has multiple connotations in the software development world. As you point out, there’s a strong emphasis on writing one routine that does multiple tasks, rather than writing a separate block of code for each task. “Laziness” is also tied up with the assumption that you’re going to throw out a lot of work during a project as the design goals evolve, so you might as well not write anything too sophisticated (and error-prone) in the early stages.
Of course, it’s worth mentioning that efficiency in regards to the programmer’s time rarely survives an acute conflict with efficiency in regard to computer resources. For example, if the game you’re working on is slow or hogs memory, you’ll be throwing away those elegant, all-purpose routines you wrote earlier.
I think that the culture of overwork in the software industry has complex causes. One root is an innate tendency of programmers themselves, who usually are OCD-ish people who love problem-solving and have trouble tearing themselves away from the computer. As a group, they’re also notoriously bad at estimating how long a task will take, because their pride makes it difficult for them to admit that they might make mistakes, fail to anticipate something, or get stuck on a bug (even though these problems happen to the best). Combine that with youth, competitiveness (in technical matters), passivity (in social matters), the nature of high-risk business ventures, and you have recipe for destructive overwork.
Not all software development is like that, though. Less “glamorous” businesses have a harder time recruiting talented people, and squander that talent less.
I’m not sure that Ayn Rand is really a widespread hero in programmer culture. Certainly, the creative hacker ethic promotes a libertarian streak, lack of mysticism, and identification with the independent visionary Randian protagonist, but it also distrusts big business and sees open-source collaboration as being more effective at solving problems than the paradigm in which ideas are private property. I think most people who are passionate about creating software find her ideas interesting to talk about, but consider them to be flawed in the real world.
Amod Lele said:
Yeah, I’d agree with most of this. Ideally, I think, in the long run I’d continue doing programming (or other computer-science) work within academia – the stodginess of the institution becomes an advantage for the reasons you mention, that they don’t attract the programmers who work 80-hour weeks.
Re Rand, I made sure to say “many” programmers rather than “most”, for just the reasons you mention. I’ve always had the sense that most programmers lean far more left-libertarian as you note, especially these days with IP becoming such a big issue, but I think it’s safe to assert as well that Randians are way overrepresented among computer programmers as compared to the general population.
Ryan said:
Yeah, that seems to be true. Rand’s obsession with logic and reason is no doubt a gateway to her ideas, and programmers are more likely than the general population to read one of her lengthy books in the first place.
Ethan Mills said:
Finally, a virtue I can identify with! My grandmother used to say that someone who tried to carry all the groceries in one trip rather than making more than one trip was carrying a “lazy person’s load.” But I always thought I was just being efficient.
Amod Lele said:
That pretty much sums it up!
Pingback: Two concepts of hypocrisy | Love of All Wisdom