Some realizations come slowly, but some hit you like a freight train. I had one of those this week while working on the latest change to the PAE system we've worked so hard on. It was a good change, one I was happy to implement and am sure the customers will want and use.

So why was I so down?

I couldn't place the source of my worry. I love my job; I get to teach and learn every day. So what was this black cloud of trepidation that was now haunting me?

There was no warning, and suddenly that freight train collided with me. I realized that I was writing yet another codebase that would slowly, surely, inevitably, fall into obsolescence. It wouldn't happen tomorrow, but it would happen.

There's no avoiding it, I realized, everything I write is doomed to fade away.

This thought had me reeling. What good was my code doing if its only fate was to be used and discarded like some child's toy? How can I make a difference to my field, my company, my career if nothing I write will ever last long enough to show to my children when they are old enough to understand what it means? Is everything I do destined to decay and be replaced (or, in management speak, "rewritten")?

Of course, nothing lasts forever. I know this. But software isn't even on the same time scale. Bridges, buildings, other "typical" engineering produces results that can last for tens, even hundreds of years. Software is lucky to last for five years before becoming obsolete, and often the time frame is much shorter than that. Everything I write, everything I design, will become useless within my lifetime. I get to watch all of my projects, the totality of my development career, fall into oblivion.

This can't be all I'm good for, I thought. There must be something more to this field than writing disposable methods and replaceable applications. I matter, dammit! So my code should matter too! It should last, be useful, be important forever! After all, I made it, so it will be perfect. Right?

Right?!

All software is destined to become obsolete and be replaced by something bigger, better, more powerful. This is its ultimate fate.

The ideas behind the code we write may survive the test of time, but the code itself will not. Our work, the applications and websites we pour our sweat and tears and time into, none of them will matter in the grand scheme of things. Nothing we program will have any lasting, usable impact on future generations of developers (unless you get lucky or are really, really good).

That sucks. A lot. I mean, if everything I write is going to die (in a manner of speaking) why bother writing it in the first place? What difference could it possibly make? It's pointless.

I found myself needing to get away from my desk and take a walk. I hurried through the office, down the stairs, and out onto the roof of the adjacent parking garage. The desert sun beat down on me, hot but refreshing, as I gathered my thoughts.

A short time later, I'd thought it through. All software has a time limit, an inexorable march to obsolescence that not even the greatest programmer alive could halt. The countdown starts the moment you declare the application starts being used.

But you know what? I was overthinking the entire damn thing. It all boiled down to one simple statement: It's just code.

If you were expecting some earth-shattering conclusion, I apologise for disappointing you. I was let down as well. But, really, programming is only what I do, it's not who I am. I am not my code.

I returned to my desk, ready to keep chugging along. Sure, the code I write will eventually become old, creaky, just plain bad, and will be replaced. And that's OK, because ultimately it's just code. Nothing more.

Now the only trick left is to remember that when I'm rewriting my own projects in five years. And five years after that, and five years after that...