Home

You Should be Embarrassed by Old Code

Looking at old code can be an uncomfortable, embarrassing, or infuriating experience. And that's a good thing.

If you've been writing code long enough, you know the feeling of looking at old code. It's embarrassing.

(I wrapped a 20-line method in an if statement instead of using an exit clause? WTF!? What a loser!)

This feeling of embarrassment of old cold—of frustration with your past self for the decisions you made—is absolutely crucial to your development as a developer. The uncomfortable feeling that comes with looking at old code—or, worse, having to work with it—means you're getting better at writing code.

With a little help from my friend, the transitive property, that means that if you look at old code and you don't mind it—or worse, you think it's good—one of these conditions must be true:

  1. You are amazing. You can't get any better.
  2. You had a moment of brilliance and wrote better code than you were accustomed to writing at that particular time.
  3. You haven't written much code since that time, or took a big break somewhere in there and lost steam in getting better.
  4. You aren't getting any better.

In reality, there's always room to be a better developer if you give it the time and attention it requires.

So, take comfort in the uncomfortable feeling of looking at old code. It means the code you're writing today is better.

Let's Connect

Keep Reading

Design your stack for the new developer

The Jamstack approach will help you onboard developers more quickly, and increase your overall efficiency. Ample's Sean Davis will tell you how.

Jun 21, 2019

The Spinneret: Issue #13

How much JavaScript is too much JavaScript? The landscape of web development is changing rapidly. If we don't stop to look around once in awhile, we might miss it.

Oct 29, 2021

Solving Problems with a Wedding Ring

It took me years to solve a problem that, in the end, was as simple as taking a ring off my finger. Learn what I learned from that problem-solving process.

Apr 16, 2019