Sometimes I look at code that I've written that has been in production for years and it's so transparently wrong I can hardly believe I wrote it. I'm looking at how I persist group DMs to the local database right now and it's wrong on like 3 levels. Incredible.

Reply to this note

Please Login to reply.

Discussion

I was just talking to some people I used to work with almost a decade ago.

The system they maintain still has a piece of my logic in it, which is one of the most embarrassing things I ever did.

I made every mistake you could make, I think, in the way that I outlined it, in the way that it works... in the lack of any sensible comments.

To this day, I'm not 100% sure why it works. And yet, it's still there.

I suppose for it running fall asleep for nearly a decade says something?

I think what it ends up saying loudest though is "nobody touch this thing! It can't be understood, and it's absolutely critical!"

Reminds me of some classic stories from https://thedailywtf.com/

I wrote systems which run for more then 15 years without any modifications other then security patching. critical systems.

the code is ugly, sometimes clearly contains bugs I can't now unsee, but hey... it works 🤣

You didn’t write it wrong. You wrote it with the vision you had at the time. Fresh eyes don’t lie. They just show you how far your threat model has evolved.

Yeah, it's definitely a result of shoving an edge case into a different paradigm

True. Keep pushing the boundaries, that’s where real clarity lives.

Man that’s how I look at code from 3 weeks ago šŸ˜…

šŸ˜‚

The solution is simple: don't look at the code.

Wrote Perl scripts 20 years ago. A mess. Were 15 years in production without any major issues. Solved a problem.

I guess I should have written my app in perl