I was listening to a pod cast a while back and the speaker said something that always kind of rubs me the wrong way. He said:
I do XYZ because I'm lazy.
Now, if you didn't know what XYZ was, you might assume that it is something to indicate laziness such as:
I never change my bed sheets because I'm lazy.
or something like:
I only use Cliff's Notes because I'm lazy.
Whenever you hear the term, "because I'm lazy", it's never a positive thing, and it probably shouldn't be; after all, lazy is not a quality that many people strive for. The problem that I have is that when this phrase is used in a technology presentation, 99% of the time, it's used to qualify a most excellent virtue. I can't tell you how many times I've heard something like:
I write highly optimized code because I'm lazy.
or something like:
I keep my applications very DRY because I'm lazy.
I like to create highly cohesive code that can be easily reused because I'm lazy.
These are the most insane statements that I have ever heard. Somewhere along the line, things went horribly wrong in the IT industry, and people decided that "well thought out" == Lazy.
Now, I know that these kinds of statements are not said with conviction. I know that software architects don't write organized code out of a desire to be lazy. So, let's stop saying things like that. Let's preach best practices as a virtue, not as the byproduct of a shortcoming.
I suspect that this is sometimes said to help introduce novice programmers to the idea of writing complex code. If you tell a novice that this is a best practice, then perhaps, anything short of that feels like failure. So, by telling them that this best practice is done out of laziness, perhaps it seems less intimidating to the uninitiated.
And, I know that in the grand scheme of things, this is a really insignificant conversation, but I guess it struck a chord with me. In a way, it reminds me of when I started working out. In high school, I gradually started phasing out my sporting activities and phasing in my lifting activities. At the time, no one could accept the idea of lifting weights just for the sake of lifting weights; you would only lift to get bigger / faster / strong for a sport like Football or Baseball. As such, I often found myself having to make up excuses for lifting. "Oh, I'm doing leg press to help my Snowboarding", or, "Yeah, I'm working my arms to improve my tennis." It's like I had to justify lifting to myself by justifying it to other people. It wasn't until I got a little older and a little more confident that I could just tell people that I lift weights because it's awesome and it makes me feel good.
Now, maybe I am reading into things too much, but to me, excusing weight lifting and excusing best coding practices feels like the same thing. And I say, No more! From now on, whenever I hear someone say that they write clean code, or use CSS, or create cohesive objects, I would love to hear that it's done out of a passion for programming and a desire to do the "right thing" and never hear that it is done out of a desire to be lazy. Don't be lazy, be proud.
End rant :)
Looking For A New Job?
- 7 Year Lead Programmer with MSSQL expertise to assist in live website at Atprime Media Services
- .Net Developer at LendingUSA
- ColdFusion Application Developer / Portland Oregon at DealerPeak
- Web Applications Developer at University of California, Davis
I think the "because I'm lazy" part could be translated into "because when a change request comes, the less code I have to modify, the better."
I've been wanting to write a post about "the best programmers are lazy programmers" for a little while now. I imagine it would have drawn your ire =) .
I probably still will - and a little sooner now that you've done this one, or I may talk myself out of it.
Good points - I have no disagreements, except that I think that I seriously do some things because I'm lazy. But it's not a byproduct of laziness - it's not like "I'm lazy, therefore something wonderful happens." It's more like "If I delay instant gratification for my laziness and refactor this duplicate code into a single, reusable method now, then I will have much less to worry about later."
Sort of invest 5 minutes now for the hours it will save you later on.
I didn't realize it was such a common thing to say you were motivated by laziness in the tech world. Realizing it is makes me reconsider that post I mentioned above.
"I know that software architects don't write organized code out of a desire to be lazy."
Rubbish. They are lazy. Who would want to write shoddy code quickly that's going to give you a maintenance headache later down the line? You could spend 5 days writing crappy code that costs you 5 months more time later, or 20 days writing awesome code now that costs you negligible time in the future. Which would you choose? The lazy software architects would choose option b. That's exactly why they're so damn good.
Most programmers are lazy. They're also impatient. Because of these two traits, they're very often incredibly smug/proud.
After some time passed to do some thinking, I wrote this down in an email to Ben, so I thought I'd share it here:
Looking back over the title just now it really hit home - don't be lazy, be proud. That and the line before the restatement of the title at the end - "would love to hear that it's done out of a passion for programming and a desire to do the "right thing" and never hear that it is done out of a desire to be lazy" has certainly changed my mind .
Now I'm thinking I may still write the post, but subtitle it with "Or so I thought." Thanks for the ideas!
Perhaps I'll have some time in the next couple of weeks to explore several of the angles - that would be my goal. Is it achievable? Time will tell.
"I know that software architects don't write organized code out of a desire to be lazy."
Yes we do. Absolutely.
This article from 2005 addresses the concept of the lazy programmer:
Why Good Programmers Are Lazy and Dumb
We don't want to deal with bugs, so we do our best to make sure our code does everything it needs to do before we release it.
During our Site Rewrite project, we spent an enormous amount of time up front on the architecture of our shared objects. Once we got to the top of the hill, everything snowballed and we ran through the last stages of development rather quickly.
Old site = bugs reported every day.
New site = 1st bug report: "the font's too small"
We only get a handful of bug reports a month now and many of them end up being data issues.
Without having to fix bugs every day, we get to spend more time developing new features, as well as learning new technologies.
@George, thanks for the link.
I understand what people are referring to when they claim to be 'Lazy'. It is said with reverence, almost like a badge of honor. Taken in context, it represents a programmer who is thinking forward and making decisions that will create the best software with the least amount of rote effort.
That being said, I agree with Ben. Lazy has an inherent negative connotation. Why paint yourself with a negative word that just happens to have a secret meaning in certain geeky circles.
I bet the first person to proclaim 'I am a good programmer because I am Lazy' did it with the intent to shock, or to appear a little counter-culture. We all like a little rebellious streak, don't we?
Just don't expect it to look good on you when your prospective clients or bosses google you and find out how 'Lazy' you are. You will look like a slovenly idiot only doing the minumum. Expect to get passed over for a 'hard working' programmer.
I am all for being an efficient programmer. I am also all for reducing future maintenance by making forward looking decisions now. I am all for organizing my code in a nice, neat optimized fashion.
I am not, by any definition, Lazy.
i agree with dan.
it's much more work up front to write "good" code (good being a) it runs, b) it's easily maintanable).
why do i want it to be easily maintainable? not because i'm lazy. it's because maintenance is rarely "fun".
developing new apps is fun. learning new tools (or new ways to use an existing tool) is fun.
going back to an app that i wrote 2 years ago trying to figure out what the %!#$ i was thinking that particular day when i wrote this particular piece of code that sucks worse than getting kicked in the nads is decidedly not fun.
going back to a well architected application and maintaining it isn't fun either, but it sucks less than a kick in the nads, and i'd take that any day. so yeah, i try and put more effort in up front to build it the best that i can.
i disagree that any of us are lazy. if you're reading this blog, chances are that you are not lazy. you're probably pretty passionate about what you do and you're interested in learning better ways to do it. you read blogs (and likely write blogs) to help better yourself. i'd bet that you read more programming related books than you do fiction. over the past year, you probably took the time to learn something new (whether it be new features of CF8 or jQuery or a framework or a new language...)
if you were lazy, you wouldn't be reading this at all. sorry folks. you may be a lot of things... but lazy you ain't :)
It's funny, this idea of being "lazy" in order to free up the future time to do so much more stuff. Like Charlie says, nothing lazy about this.
Perhaps we just need to submit a new meaning for the word lazy :)
la·zy [ley-zee] adjective,
1. eager or inclined to write efficient reusable code, especially to avoid excess workloads henceforth.
Lazy = Awesome!
Actually, that probably should be "any workload" rather than "excess workloads" :P
From that one blog entry that Adrian posted... lazy and dumb? Hogwash. In fact, I'd say it's the opposite. The term "lazy", in this case... I hate to say it... is a lazy description.
To more accurately describe this quality, a good programmer will do everything in his/her power to avoid monotony and unnecessary maintenance. A good programmer will want to make sure the code is maintainable and reusable, and has an irrepressible desire to do it right the first time.
A bad programmer will consider bad code job security, and may even leave bugs unfixed so that they can come in and save the day each time they come up. A bad programmer will not plan... they'll just start coding and try to figure it out as they go. Bad programmers program themselves into holes. Bad programmers don't learn from their mistakes. Bad programmers don't learn new things or stay in touch with the community.
And what do you do if you are lazy but you don't code?
Aw, come on. There are so many completely valid and positive ways to understand "good programmers are lazy", it makes me wonder if your boss wasn't standing over your shoulder watching you write this article.
1. Work smart, not hard. This is great advice (unless you're the insufferable twit who says "But why not work smart *and* hard?"). It's about efficiency: wherever there's the choice between between being clever and lazy or dull and indefatigable--choose the former.
2. Why do we (humans) innovate? I'd argue that in almost every case, it's to off-load the boring, rote, laborious efforts onto some bit of technology to free us up for more leisure time. Most of human history has seen us working for a few hours a day for food, and relaxing by the fire with families in the remainder. Why did we invent the dishwasher? To give us more time to relax in front of the TV. It's a perversion of this noble goal to then turn around and use this free time to DO MORE WORK.
3. For a programmer, being lazy entails inventing the technology onto which you can off-load the dull stuff. You write a tool or an automation script so you can get back to solving the interesting problems, which good programmers see less as work and more as play. We program because we love to solve problems. If it's play, then it's more like leisure time. What do we call people who strive for more leisure time?
In essence, I guess I'm arguing that laziness is not a vice. Being dull, unimaginative, and compliant is the real vice.
I think we are on the same page. I don't have any issue with people being more innovative and solving problems more efficiently - I think that's what we're all trying to do. I just get tired of hearing that people do it 'cause their lazy. If they were "lazy", they probably wouldn't be innovative. I am not sure the two can go hand in hand.