this post was submitted on 10 Apr 2024
344 points (97.8% liked)
Programmer Humor
32490 readers
506 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
We had an all hands on deck, world is ending bug one time. Like, basically the entire org got pulled onto it. In our product is a spreadsheet of activities, with dates and durations. Our customers can run a scheduling algorithm to adjust dates based off of durations and activity dependencies and relationships. This is super important. This broke. We have to make sure that activities don't have circular dependencies, or otherwise scheduling will loop infinitely and fail. So, we basically dfs looking for a loop before scheduling, and fail it with a not really helpful error message. That loop checkimg got updated so it could properly provide helpful info in the error message. This change caused most real world schedules to have false positives for loops when checked, ergo, no ability to schedule. I found the cause of the problem but not the dependency structure that caused the issue, and ultimately decided it would be faster, cleaner, and overall better to rewrite the feature myself than to fix the original. So, I wrote the most beautiful damn depth first search of my life! Learned about the bug monday morning, had the fix good to go tuesday night, so that qa could test wednesday thursday for the hotfix merge deadline friday. Two days isn't a lot to cover testing it, but I figure with every tester in the org pretty much available to pound on it itd be good enough. While I was working on the rewrite, other devs and qa were hunting down all the details of what happened to cause the bug, data structure wise, and coming up with good test cases. So, by the time it was ready, they knew what happened and had a much more thorough test plan. Well, it came down from on high that the fix would go into the next major release, not a hotfix, so it didn't actually go out for 3 weeks after the monday the bug came in. Sigh. Well, I had fun writing it, and I consider it the cleanest, most beautiful and elegant code I've ever written. It used a stack of stacks! When I'm feeling shitty and useless at work, I go back and look at it tbh.