Your Old Crappy Code

If you’re not new to software, you’ve probably come across some old code of yours and thought:

Oh snap! What is this? What was I thinking?

I’ve done it. My friends and colleagues have done. You’ve probably done it as well.

Recently some friends and former co-workers of mine reached out and asked if I’d like to help out part time doing some front-end work. I thought it might be fun to do some contract work on the side and even more fun to work with awesome people I haven’t worked with in about 2.5 years.

Last night, I came across some old JavaScript of mine, here were my reactions:

  1. Nostalgia: Oh hey! I wrote this!
  2. Shame: Wow, this isn’t very good. I can do much better now. How embarrassing to think that I once thought this was production worthy.
  3. Sleep: I actually went to sleep because it was late.
  4. Pride: That code still works fine even though it’s not super pretty. Even better, since I wrote it over 5 years ago, by my calculations it’s been successfully executed over 7 billion times!

I woke up feeling much better about my “not perfect” code. It’s not about beauty, it’s about value. So next time you find that ugly, embarrassing code you wrote 1 year, 5 years, or even further back in time. If it’s still in production and providing value, take some pride in it!

Related:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Chris Missal

Oh hey, I'm a Senior Consultant for Headspring in Austin, TX. I've been working in software professionally since 2006 and I really, really love it. I'm mostly in the Microsoft world, but enjoy building computer things of all sorts (to be vague). When I'm not slinging code, I'm probably out and about slinging discs, bowling balls, or good beer with great friends.
This entry was posted in Continuous Improvement, JavaScript, Reading Code. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • jdn

    Exactly!

  • Dan Keller

    “You are not your code.” – Scott Hanselman

  • http://kijanawoodard.com Kijana Woodard

    Working > Beautiful. Shipped > Perfect.

    Then again, try augmenting the behavior of that old code. ;-D

  • grahamesd

    Being able to look back at your old code and realize that you could do it better now means that you’ve grown as a coder. If you look back at code you wrote a year or two ago and you don’t see something you now could do better means you’re getting lazy or you’re losing touch with your industry. So take a win when you see your crappy old code – it means you’re improving :)

  • Pingback: The Morning Brew - Chris Alcock » The ‘Morning’ Brew #1655

  • Matt

    So true! Recently had the “pleasure” of revisiting a custom e-commerce app I shipped in Dec 2008 which I think was before the official release of MVC 1. Nearly 6 years on it’s still running and no complaints, but god it was awful to look at. But, still working perfectly!

  • Pingback: Knowing When You’ve Wrote Crappy Code | Chad Dotson