May 9, 2006
The Ten Commandments of Egoless Programming, as originally established in Jerry Weinberg's book The Psychology of Computer Programming:
- Understand and accept that you will make mistakes. The point is to find them early, before they make it into production. Fortunately, except for the few of us developing rocket guidance software at JPL, mistakes are rarely fatal in our industry, so we can, and should, learn, laugh, and move on.
- You are not your code. Remember that the entire point of a review is to find problems, and problems will be found. Don't take it personally when one is uncovered.
- No matter how much "karate" you know, someone else will always know more. Such an individual can teach you some new moves if you ask. Seek and accept input from others, especially when you think it's not needed.
- Don't rewrite code without consultation. There's a fine line between "fixing code" and "rewriting code." Know the difference, and pursue stylistic changes within the framework of a code review, not as a lone enforcer.
- Treat people who know less than you with respect, deference, and patience. Nontechnical people who deal with developers on a regular basis almost universally hold the opinion that we are prima donnas at best and crybabies at worst. Don't reinforce this stereotype with anger and impatience.
- The only constant in the world is change. Be open to it and accept it with a smile. Look at each change to your requirements, platform, or tool as a new challenge, not as some serious inconvenience to be fought.
- The only true authority stems from knowledge, not from position. Knowledge engenders authority, and authority engenders respect – so if you want respect in an egoless environment, cultivate knowledge.
- Fight for what you believe, but gracefully accept defeat. Understand that sometimes your ideas will be overruled. Even if you do turn out to be right, don't take revenge or say, "I told you so" more than a few times at most, and don't make your dearly departed idea a martyr or rallying cry.
- Don't be "the guy in the room." Don't be the guy coding in the dark office emerging only to buy cola. The guy in the room is out of touch, out of sight, and out of control and has no place in an open, collaborative environment.
- Critique code instead of people – be kind to the coder, not to the code. As much as possible, make all of your comments positive and oriented to improving the code. Relate comments to local standards, program specs, increased performance, etc.
The human principles of software are truly timeless; The Psychology of Computer Programming was written way back in 1971, a year after I was born!
Posted by Jeff Atwood
great stuff as always ..
I can see that I could do better on several of the 10 cmd's.
I know that I am too much "the guy in the room". I am actually a very social person, but when it comes to work, I often find myself with work that nobody in the office can help me with. Because I mostly am the only developer or the other developers work with totally different things.
Its funny, when you study, you think stuff like . "Hope I am good enough programmer", "hope I can fix the stuff they want .. " etc. But when you come out, the biggest problem is more like "are you friend with your boss", "did you remember to send a funny mail to your manager" and stuff like that. Being social often pays more then being a good programmer. Well maybe not so much anymore, but still.. I wish that I had used more of my career learning how to be a good programmer, instead of just learning programming. :)
I live by 3 things:
1) Crush your enemies
2) See them driven before you
3) Hear the lamentation of the women
Or was that Conan? I forget.
Anyway this is a great list. I wish I could be the guy who codes in the dark office. I'm in a cube in the middle of a maelstrom of over caffeinated users. Its like trying to code when your desk in in turn four of the Daytona 500.
If you are fortunate enough to have a drak quiet office I say stay there! I don't get the big push everyone has to socialize at work. I don't believe we are paid to talk about Jack Bauer and his zany antics on last night's 24.
So aside from that one commandment I think the list is pretty good advice!
I agree with all 10. And i also agree PCP is a timeless book.
You sound like you're just got out from school and didn't really worked on good project yet. I hate guys from dark cubicles as I have to fix after them too much or spend my time integrating their "perfected code" at the last moment.
Numbers 1 - 4 are really important for a coder; at least in my line of work doing php and coldfusion programming.
You sound like you're just got out from school and didn't really worked on good project yet. I hate guys from dark cubicles as I have to fix after them too much or spend my time integrating their "perfected code" at the last moment."
My point of view is one of being the only person who does development oat the office. So mingling with people who have no concept of design and development (ie Sales people) is more an exercise in frustation ergo the "stay in the office" slant.
Howver if you're part of a team, and you hide away never to see your team, then yeah...you're mucking it up by being lone wolf.
Thus, for me at least, its hard to make this one a de facto comandment when it comes with a caveat!
I much agree with everything in this list. While every item on the list is important, some have more resonance for me.
You are not your code - I've seen it a few times (not at my current company) where people are threatened when asked to explain or justify the coding or design decisions they have made (not by me specifically, but by their peers in general).
I see exactly the same defensive reaction in people who don't like discussing their spiritual beliefs, political stances, and suchlike. That to be questioned about certain things strikes at something core to them, and is a de-facto personal attack, no matter how diplomatic you are.
Treat people who know less than you with respect, deference, and patience - There is a guy in my department who, for all his extensive knowledge and awesome skills, couldn't explain anything to anyone if his life depended on it.
Hell, its bad enough for me overhearing him trying to explain stuff to people; I dread to think what his listeners are going through.
For my part it helps that before I moved into development I spent years in technical support, where explaining technical things to non-technical people was a significant part of my job.
Don't be "the guy in the room." - While I agree with this (no developer is an island, if you will), the place where the developers work shouldn't be as socially rambunctious as a Sales or Marketing bay. When you are, in effect, paid to think, too much noise and bustle impinges on your ability to work effectively.
I liked reading everyone's comments on "the guy in the room." We just mixed some project managers with coders to see how it works.
Surprise! The biggest complaint is from the project managers, who are now sitting amongst the biggest lot of complainers ever! They can't take all the brooding and negativity.
Does that mean project manager are all sunshine and roses?
But seriously, I'm waiting for the coders to kick us all out. We *are* social and talkative. We do have long spec documents to hammer out, and have classically gone home to work in peace and quiet. The problem is the level before us - Marketing. They come and visit. I'm sure that drives the coders *nuts*.
But, see? I'm talkative myself. It took me four paragraphs to make a one-paragraph point. ;-)
In the open, collaborative environment of lousy coders, the "guy in the room" is King. Hail to the king, baby.
OK, I understand the sentiment, but there are plenty of people who really do have the skills, and they are the guy in the room because they have to self-segregate from the bad programmers and non-programming-related insanity.
I've been known to be the girl in the room from time to time, but I occasionally do some socializing. Problem is that most of the time, I'd rather be "alone with my code" than talking to any one of the hundred morons I work with. Of course, being the only female programmer, I have to occasionally go chat with the "girls" (I use this term loosely, as they're all old enough to be my mother) if for no other reason than to shake that "one of the guys" feeling.
And as for originality, who cares if you posted from someone else's blog, Jeff. You saw, you liked, you passed along. And because of that, I got a nice diversion on a friday afternoon while avoiding the sea of morons ;p
Another command, always keep in mind who your coding for. Who needs to work with it? whose work does it need to make easier? (Whatever you make, it should never make peoples lives harder and if it makes one guys life harder 5 women should get easier lives). I'm currently working with a system that works... but makes my life harder, not easier. Everybody that has to work with it dislikes it. The coders are of the opinion that it works. And whether or not it is clumsy, user education will fix this. It is like giving somebody a cast iron pan for a hammer. Yes it works, but no carpenter uses it as his tool of choice.
Im a rookie programmer.
Just trying to find my way into a degree for Computing and Information Systems.
Luv'd the blog, tis my first visit, but am sure, many more r 2 come.
The Commandments shud make an excellent wall hanging, hope i'm not disturbing any copyright issues.
Can one really speak of the hundred morons one works with and also treat them with respect, deference, and patience?
Can one really speak of the hundred morons one works with and also treat them with respect, deference, and patience?
The comedy, it writes itself! ;)
ok, so this is a good list for *good* programmers...
what about for hacks like me?
it is like amazing like amusing, how timeless these principles are.
maybe Jerry Weinberg's book is worth more than one look.
If you search google video for "Jesus Christ's Commandments" or "More than Ten Commandments" you may like benroe's comments. "It is interesting that so many people concentrate on The Ten Commandments when Jesus actually has much higher requirements. We argue that they should be allowed in courts and schools, and in other public places. What's the deal if they are not? Let Jesus' commandments be in your heart and live them, and nobody will get them out of you. then if you go court, commandments will be there. You go to school and you bring these commandments with you. You go to park, and again commandments will be there. We can live them.
There is one serious oversight in these 10 commandments in my opinion. They ignore one simple fact - everyone has an ego. I readily admit that I have broken all these commandments except #7 - if there is someone who knows more than I do, I will readily defer to that person, even encourage him/her to take my place. The problem is that there are a large number of people in the world who think they are the alpha dog in the room. Now if you are one of these people, someone who is mediocre, the it is very easy to look at the super whiz and regard him/her with contempt. But if you are that person, the one who has to put up with the egos of those who think they know more, constant trying to decide between pursuing truth or assuaging someone's ego, constantly waiting for others to see next week what you saw last month, it gets very, very, very tiring. This is why most geniuses go mad. You wold think that, with all that brainpower, they'd be the richest people on the planet. Not. The people with the real egos drive them crazy, and I would venture to say that such geniuses receive far more dirt than they give. This needs to be noted in the 10 commandments.
One thing that makes me hate IT in general and especially super nerds are egos. Part of the reason I have not enjoyed a couple of jobs are because of assh**es and their egos. What's pathetic about this is that they are really just losers who have nothing better to do but code. They grew up being the nerds in high school, etc.
Fine, I am a developer. But, I do have a life. My life doesn't revolve around a race to see how I can be the most arrogant asswipe on the planet and try to sadly show that I am not only the best programmer but you suck. That kind of attitude has NO place in the professional work environment.
I'm also not a lazy coder though either. I do not have an ego. I am confident enough in myself and I have respect for others who may not be as good YET. When I say I'm not lazy, I do care about design patterns, coding things right the first time, etc. You wouldn't believe how much I'm into that. However, my work doesn't dictate my social behavior nor my life at home. I am still young. But I've had to listen every day at times to the ass next to me tell me about what articles he's read to the entire team only to gloat that he found it first. Big deal. Only tells me that he has no life.
It's cool to share ideas, information, and debate. But when egos start to kick in and that happens more than once a week, people get sick of it. People get sick of hearing you gloat about yourself which is evident in tone.
Why can't developers who are really good at what they do concentrate on helping others understand maybe more complex OOP concepts than sit there and waste their days and nights bragging?
So to those coders out there who think they are God's gift to mankind, and that they can be smart asses, or talk condescending to others on a team...you need to grow up and also get life man.
Egos have really pissed me off, because I'm totally not that way and I just don't get people that are so inconfident they have to constantly check themselves against everyone else on a team just to prove something to themselves and others in an overly obnoxious way.
Go watch a damn football game or something. While sure, code is great, and caring is great, find your limit and shut your mouth and cut your tone and start thinking about helping others by assisting those underdeveloped and underexperienced developers on your team. The world does not revolve around you.
They ignore one simple fact - everyone has an ego
this is totally not true and is a pile of horse sh$$. Ego is when you're a bitch about it. Ego is not confidence, it's over confidence to the point where you are needing it stroked every day or week. That's a loser, and no not everyrone is a loser as you state.
I'm a big fan of #10. Developers wear their brains on their sleeves. Be kind.
Great article! It's time to change the stereotype that the non-developers have.
#5 ("Treat people who know less than you with respect, deference, and patience.") applies not only to non-programmers, but especially also to lesser experienced programmers. Some of the biggest assholes I've ever met were some of my coworkers in my first professional development experiences.