Every programmer occasionally, when nobody's home, turns off the lights, pours a glass of scotch, puts on some light German electronica, and opens up a file on their computer. It's a different file for every programmer. Sometimes they wrote it, sometimes they found it and knew they had to save it. They read over the lines, and weep at their beauty, then the tears turn bitter as they remember the rest of the files and the inevitable collapse of all that is good and true in the world.
Peter Welch - Programming Isn't Manual Labor, But It Still Sucks
If you are a professional programmer and have not yet read the Peter Welch blog entry linked above, put this article on hold and go read it. Reading the blog post is, in a word, cathartic.
The realities of professional software development
Reality 1: Good code is not the norm
If you can consistently write good code quickly, you are an exceptional
developer. Note that the previous sentence was not an
OR condition: If you can
write good code slowly, or mediocre code quickly, you are an average developer.
Please, before you progress through the rest of the article, I invite you to self-reflect on your personal interpretation of the word average.
What average means to the perfectionist
I am a recovering perfectionist. If the paragraph above made you feel insecure, scared, or angry because it called you average, know that I understand exactly where you're coming from.
To the perfectionist, average is failure. The perfectionist rewrites the very meaning of the word average as used by everyone else to mean something else entirely.
To the perfectionist, if you produce average work, you either
- didn't care enough
- didn't spend enough time
- didn't do enough research beforehand
- didn't ask people like the perfectionist for help
What average means to the average
Being at peace with the thought of being an average developer means you have overcome the blight of perfectionism.
If you're an average developer, you try your best to apply what you know. Sometimes you don't know the best practices or the best approach, but that's okay, maybe it'll be corrected later. In reality that code will never be reviewed again, but that's okay too.
You work hard during the day. Your actions are based more upon the end result than the process. You'll spend extra time on the serious matters that warrant extra time, such as payment processing. But for your average feature, you're content with average work - and this makes sense!
Why average code is the norm
Features that aren't going to change the world don't need to be powered by code written like the feature was the most critical component of the system.
Since most features of your average application are of average importance, you should expect to see, on average, code of average quality.
Reality 2: Average runs the world, and that's okay
If you are comfortable calling yourself an intermediate level developer, you are completely capable of reading source code produced by open source projects. I invite you to look through the source of a popular project in your language of choice, and I guarantee you these 3 things:
- You will understand more than you thought you would
- You may feel underwhelmed at how simple the code is
- You'll find some code that even you, as just an intermediate developer, could improve by at least a tiny amount.
After exploring the source, would you find the project less useful? Absolutely not! But you will now understand that source code is, on average, written by average people.
The beauty of it all is that when average people work together, they can produce exceptional work.
Reality 3: Results now mean more than maintainability later
Users care about features. Users care about the quality of your code only to the extent that poor code quality hinders your ability to ship features or fix bugs. If your average code empowers users with working features in an acceptable amount of time, you're doing great! Maybe Linus Torvalds or Guido van Rossum would roll their eyes when looking at your code, but unless you're contributing to their projects you really shouldn't care.
The real world can still be fun
At first, the real world of software development seems like a place where things constantly break, people don't try, and no one cares. If you allow yourself to join and accept reality, you'll find that people do in fact try, but they manage to try without worrying too much. People ship features without the constant self-loathing that comes from perfectionism. You'll find peace in doing your best.