Before you get out your fly-swatters and bug bait, lemme clarify what a 50-year bug is. Tis not a bug that lives to 50 years old. (Now I’m not a bugologist, so I can’t be sure that bugs don’t live that long.)
No, I’m talking about computer software bugs. These are the bugs that are extremely rare. The ones that happen on average ‘every 50 years’. Good luck debugging one of those SOBs.
I found a bug a few days ago that happened in some code I wrote, but only once in every 50-100 years of simulated execution time. It was pretty cool. I was simulating seasons of a soccer league, and it would crash after running for quite a few seasons. It took a while to track down the culprit. I assumed it was a problem with the way I was storing stats or extracting stats. After all, that’s where the crash happened.
At the end of every simulated season, my program would advance the calendar by one year. What I forgot to do, and the core of the bug, was reset the month. So if the first season started in February and ended in June the next year’s season would start in June. That worked fine for a while, until the playoffs were eventually scheduled to start on January 1st. The program would attempt to get the standings for the calendar year to set playoff seedings, and would crash because the regular season has happened the previous year. Ooops.
I’d like to say I learned something from this experience, but I didn’t.