Coding Horror

programming and human factors

Egoless Programming: You Are Not Your Job

The concept of egoless programming, as described by Johanna Rothman:

Twenty-five years ago, Jerry Weinberg published The Psychology of Computer Programming. I discovered the book in 1977, and decided I wanted to work as an egoless software engineer, not as a radio disk jockey.

Egoless programming occurs when a technical peer group uses frequent and often peer reviews to find defects in software under development. The objective is for everyone to find defects, including the author, not to prove the work product has no defects. People exchange work products to review, with the expectation that as authors, they will produce errors, and as reviewers, they will find errors. Everyone ends up learning from their own mistakes and other people's mistakes. That's why it's called egoless programming. My ego is not tied to my "perfect" or "imperfect" work product. My ego is only tied to my attempts to do the best job I know how, and to learn from my mistakes, not the initial result of my work.

It's important to disconnect your idea of self-worth from your job function.

a still from the movie Fight Club

I am reminded of these quotes from the movie Fight Club:

You are not your job. You are not how much money you have in the bank. You are not the shoes you wear. You are not the contents of your wallet.

It's a lot easier to embrace criticism of your work when you don't let your work define who you are.

Unfortunately, the world is full of people who don't give a damn about their work. Those of us who love programming enough to become highly skilled at it tend to have the opposite problem-- we care too much:

In the early years of programming, a program was regarded as the private property of the programmer. One would no more think of reading a colleague's program unbidden than of picking up a love letter and reading it. This is essentially what a program was, a love letter from the programmer to the hardware, full of the intimate details known only to partners in an affair. Consequently, programs became larded with the pet names and verbal shorthand so popular with lovers who live in the blissful abstraction that assumes that theirs is the only existence in the universe. Such programs are unintelligible to those outside the partnership.

That's one of my favorite quotes from Code Complete; it's attributed to Michael Marcotty.

Discussion

Excess Blog Flair

I recently happened upon Tom Raftery's blog. I'm sure Tom's a great guy, but what's up with all the visual noise on his blog?

Bookmark at these sites

I count 24 pieces of flair in the bookmark section alone.

STAN I need to talk about your flair.

JOANNA Really? I have 15 buttons on. I, uh, (shows him)

STAN Well, ok, 15 is minimum, ok?

JOANNA Ok.

STAN Now, it's up to you whether or not you want to just do the bare minimum. Well, like Brian, for example, has 37 pieces of flair. And a terrific smile.

JOANNA Ok. Ok, you want me to wear more?

STAN Look. Joanna.

JOANNA Yeah.

STAN People can get a cheeseburger anywhere, ok? They come to Chotchkie's for the atmosphere and the attitude. That's what the flair's about. It's about fun.

I only recognized a few of these bookmark icons. For reference, here's the complete list of sites represented in that set of 16x16 icon noise:

  • blinkbits
  • blinklist
  • blogmarks
  • connotea
  • del.icio.us
  • de.lirio.us
  • digg
  • fark
  • feedmelinks
  • furl
  • linkagogo
  • ma.gnolia.com
  • newsvine
  • netvouz
  • rawsugar
  • reddit
  • scuttle
  • shadows
  • simpy
  • smarking
  • spurl
  • tailrank
  • wists
  • yahoo

The users of the above social bookmarking sites surely know how to bookmark a site without these "helpful" icons. Everyone else is befuddled by 24 meaningless icons.

And if you were thinking of subscribing to Tom's feed, he has you covered there too:

Feed subscription service buttons

Why do people want their blogs to look like NASCAR vehicles?

Closeup of advertising decals on NASCAR vehicle

Blogs work because they're simple. Adding a bunch of flair just makes them harder to navigate and more difficult to read.

Take Tom Sherman's blog, for example. Great content. But navigating his blog is painful:

  1. I have to click "continue reading" to see the rest of the entry. Why? Are we afraid the main page is going to grow too long and break my scroll bar?
  2. The "websites I've linked to" and "websites I've cited" sections at the bottom aren't particularly helpful. And they obscure the links to browse more entries, which is the most natural thing to do at the bottom of a page, assuming the reader gets that far.
  3. I can only view 15 more entries, then I'm shunted to the monthly archives.
  4. While viewing the monthly archives, I couldn't figure out how to see more than one page.

I'd love to browse the rest of Tom's entries, but he's made it awfully difficult for me to do so.

And then there's Scott Mitchell's blog. Scott's a fantastic writer with a long history in ASP and ASP.NET. But do we really need to see those daily comment statistics and hourly hit statistics along the right side of the page? I'm sure Scott finds them interesting, but they're just noise to me.

Perhaps this is really an argument in favor of RSS-- all of the content with none of the excess flair.

Discussion

Power, Influence, and Copywriting

I often struggle when writing new blog entries. What should I write about? What's the first sentence? What should the title be? When do I end, and what do I end with?

Copyblogger's Copywriting 101 has some excellent writing advice masquerading as marketing advice:

Copywriting skills are an essential element to the new conversational style of marketing. Whether you're looking to sell something or to build traffic by earning links from others, you'll need to tell compelling stories that grab attention and connect with people.

But there's an immediate problem: what the hell is "copy"? Even the word is boring: copy. Who wants to read that?

Good writing is good writing. But good copywriting is marketing.

The second you start thinking in terms of copywriting instead of writing, you've already lost. Forget marketing. Drop the copy. Stick with plain old writing, the kind we've been practicing for the last few thousand years.

Still, copyblogger's writing advice applies to anything you want people to actually read. What are you selling? The topic you're writing about. Net profit? Zero. But you have to sell your topic to communicate effectively in the din of noise that is the internet:

The difference between a tolerable programmer and a great programmer is not how many programming languages they know, and it's not whether they prefer Python or Java. It's whether they can communicate their ideas. By persuading other people, they get leverage. By writing clear comments and technical specs, they let other programmers understand their code, which means other programmers can use and work with their code instead of rewriting it. Absent this, their code is worthless. By writing clear technical documentation for end users, they allow people to figure out what their code is supposed to do, which is the only way those users can see the value in their code. There's a lot of wonderful, useful code buried on sourceforge somewhere that nobody uses because it was created by programmers who don't write very well (or don't write at all), and so nobody knows what they've done and their brilliant code languishes.

I won't hire a programmer unless they can write, and write well, in English. If you can write, wherever you get hired, you'll soon find that you're getting asked to write the specifications and that means you're already leveraging your influence and getting noticed by management.

I posted the same Spolsky quote in a different context on another blog, and Shawn Oster made an interesting comment:

Of course, all of this assumes that you are actually after, as Mr. Spolsky puts it, "power and influence" as a programmer. Me? I just want to do what I love which is to architect and write code.

Power and influence aren't what we're after. They're a side effect, a necessary evil, a form of currency that makes it easier for us to get things done. It's not machiavellian-- although it can seem that way. Power and influence give you the freedom to architect and write code as you see fit.

Power and influence achieved solely on the basis of solid communication skills is a virtue, not a vice. It's the ultimate form of citizen leadership.

Discussion

The Ten Commandments of Egoless Programming

The Ten CommandmentsThe Ten Commandments of Egoless Programming, as originally established in Jerry Weinberg's book The Psychology of Computer Programming:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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!

Discussion

Invisible Formatting Tags are Evil

So I'm merrily editing my document in Word, or the WYSWYG editor of my choice, and I accidentally delete one of the invisible formatting tags embedded in the document. Carnage ensues. Here's an example from Outlook:

Small GIF movie demo of hidden formatting codes

It's enough to drive me absolutely bonkers. And it happens all the time. Not to put too fine a point on it, but the problem with invisible formatting tags is that they're, well, invisible.

I'm not against WYSIWYG editors, but at least give us a way to optionally reveal the formatting tags in the document so I can tell what the heck I'm deleting. You know, before I destroy the formatting in the document. I can't even begin to tell you how many times I've been utterly dumbfounded by the effects of an innocuous edit in Microsoft Word-- just because I happened to overwrite the wrong invisible formatting tag. Thank goodness for my old friend, CTRL+Z, but editing a Word document is a nerve wracking experience not unlike walking through a field of formatting land mines.

I've grown to dislike the rather severe limitations of browser-based WYSIWYG editors like FreeTextBox, too, but at least they allow you to make the formatting tags visible by switching to HTML view.

I like my markup clean, simple, and most of all-- visible. Maybe I'm too old school for my own good, but I now prefer to edit my blog posts in a plain textbox, or possibly in the Visual Studio HTML editor for colorization and intellisense support.

Discussion