Skip to content

Old code, fear of change, and the poetry of rebuilding

I knew this guy in 2010 who was still writing asp code. He knew the platform had been obsolete for years. He knew he would be unemployable unless he retooled. But change petrified him. The whole idea of learning something entirely new shook him in ways I'll never fully understand.

I kinda get it, when you learn a language or a tool set, you invest your time and money in your ability to make that thing. But, what's the point of getting into something like this in the first place if you're going to draw the line at what challenges you're willing to consider?

And yeah, it does suck when the forces that be decide that whatever toolset you're using isn't going to be used in the market anymore. I hated it when they decided there would be no more enterprise perl apps, I hated it when vb was obsolete, I hated giving up flash.

It all seems so horribly arbitrary. And there is this feeling like you're not really in control, but instead subject to the whims of faceless corporations that control your fate from a million miles away. It's a real feeling. But that's the deal. That's what you sign up for.

Treating skills as an investment

What helped me was looking at my skillset like an investment portfolio. It takes me W months to learn X skill, which will yield Y in wages and revenue over Z timeframe. And everything I pick up reduces the amount of time the next thing will take me. Easy.

The other thing I've always done is build all the weird and interesting skill combinations that people are always hiring for, but nobody actually has. I'm that person. I'm a pretty little coding unicorn. I can do pretty much anything if it's interesting. Boredom is my kryptonite.

But, the longer I do this, the more I'm convinced that I'm a unique kind of masochist, and there aren't really a lot of people with my mental and emotional makeup working in the field. There are a lot of guys like David, though. I can't imagine how they get there, but they exist!

Reading the old code

Anyway, the reason I'm thinking about all this is because I'm looking at a fuck ton of 23 year old asp code. Actively written over this period, by a whole bunch of Davids. Guys just like him. You can tell. The quality of the code is awful, even when you account for what it is.

The only way you can possibly get code like this is fear and/or ignorance. Y'know, for something that's designed to be read by machines... it's crazy how much emotion comes through, even when you're not trying for it. Every app has this kind of beating heart, I think.

I couldn't sleep, and I don't feel like doing art this morning. So I thought I would take a look as I write my happy little code processor, that's going to wipe the whole thing away. My approach to doing it is kinda interesting.

Preserve the workflow, rethink the implementation

Rather than writing out a straight code converter, which would give me bad modern code for bad older code, I'm starting by cataloging what's there. The meaty bits. The database and API stuffs. And I'm making sure the modern code copies the workflow, but not necessarily a 1:1 port.

It's gonna take them five years to do end to end testing on this beast, lol. But that is decidedly not my problem. At least right now, as I do the fun part over coffee at 5am. There's a kind of poetry here, I think. But it doesn't rhyme.