A while back I was developing a workflow scheduler. However the run duration kept coming back negative. The runs kept finishing like 15 seconds before they started. Eventually I figured out why; the company had configured a policy to use their custom NTP server, but it was 16.7 seconds off. So my Windows laptop’s time was in the future, but the WSL VM (which ran the program) used another NTP server and was correct. In the end I just added a bodge that made the program request the time from an external server on startup to calculate an offset.
Probably the silliest thing was discovering the hard way that x.5 doesn’t always round up in Python’s round(). Python uses “round to even” so that 1.5 rounds to 2 and 2.5 also rounds to 2.
I lost so many braincells debugging silly shit, that i can’t remember anything about it.
ikr? I was racking my brain for a silly one, because I know I spent hours debugging something ridiculous lately. I think earlier this week? A rookie bug of my own doing, like using the wrong data source in the first step? Or maybe it was a 0 vs. 1 index error? Or was it forgetting to hit save on one of the config files, then wondering why the change wasn’t propagating?
So, so many stupid, basic errors. They all blur together.
I had a system that would fail if you ran it on leap days.
It was used to calibrate equipment, and would generate a calibration certificate after the procedure was completed. One field in the certificate was “calibration due date”, which the program calculated by taking the current date and adding 1 to the year.
Whoever wrote the program had enough foresight to use a datetime library that recognized “Feb 29, 2021” was not a valid date, but not enough foresight to use that library’s date math functions to add 365 days.
The official solution was “just hold off on calibrations until tomorrow and we’ll fix that in the 2.0 calibration machine we’re working on.” The 2.0 machine was already years behind schedule, and I’m not sure it ever got completed after I left that company. I bet the bug still existed on Feb 29, 2024.
On a related note: Falsehoods programmers belive about time
https://gist.github.com/timvisee/fcda9bbdff88d45cc9061606b4b923ca
A [shutter] Coldfusion web application regularly polled an industrial temperature probe for walk-in refrigeration/freezers in warehouses around the world over HTTP. Following an upgrade (CF9 to 10 I think) the temperature calls stopped working.
Using Wireshark I discovered the probes we’re not sending 200 OK, just raw HTML the moment you connected to the port.
I wrote a quick workaround wrapper in python that turned into a permanent solution until those probes we’re replaced.
Back in the unit 5 days, I remember a weird touch bug on my input controller. Only my wife was able to trigger it and after some testing, it turned out unity wasn’t pulling the screen fast enough to register when her finger left the screen and when it touched it again. I made a fix for it and kept it in since.
I’ve told this story before but we were supporting a custom ATS for a customer where we had this perfect storm happen.
- We had a bug in it that we sorted out eventually, where sometimes when you fed it input that contained weird characters, it would cause the name of a function or variable to get echoed in the nearby output. So if you had a variable called $debug_page or a function called $send_to_processing, and you input say some Arabic characters (this customer had many job applicants who were native Arabic speakers) you might get output that was the output you wanted + that string so
Searching... 10 applicants found debug_pageorApplicant: Mohammad Al-Saud send_to_processing.- We had this developer who named things in lolcat speak. So a function might be called $ICanHaz($applicant) or $LongStringIsLong($string).
So we got an email from the customer saying they had a VERY offended job applicant and what had happened. They had clicked the reject button on someone, which triggered the system to send an automatic rejection form letter to the applicant. This applicant had some Arabic character in their last name, which triggered the bug.
And the reject applicant function had been written by this guy. So that poor applicant got an email that said
Dear Applicant
We have reviewed your application and while we thought you have an excellent background unfortunately we decided you are not a good fit for our company at this time… blah blah blah etc…
YouCanHazNoJobKThanksBai
I can’t imagine anyone over the age of 25 using lolcat naming conventions
He wasn’t over 25.
Not a month goes by that I don’t regret introducing my wider analytics team to RegEx.
Twas an uuid collision.
Happens a lot in my line of work due to artists copy and pasting what they shouldn’t. Always fun how the related bugs manifest.
It wasn’t dirt on my monitor, it was a weird unicode character
I spent a disturbing amount of time figuring out why I didn’t get a video output.
I had not configured DP on the monitor.
I just turned everything off and on again trying to figure out why a display wasn’t working yesterday. It was on the wrong input selection.
I was the one who swapped the input source.
3rd line support for a global IT brand you have heard of, on the kind of security product that people don’t like to mess with too much once it’s installed on their servers.
Bug had been in the tracker over 3 years when I joined, and had defeated anyone who tried it. Segfault that happened to only one customer, unpredictably, and only once or twice a year, and nobody could reproduce it.
After a few weeks of tracing the compiled code line-by-line I found a race condition in the teardown of an object. That’s not the silly part.
I wrote the patch for the version of the code the customer was running and was hailed as a mighty hero and everyone on the bus clapped etc. Then I went to forward-port the patch to the newer versions of the program and… it was already fixed there. Some fucken doofus had either fixed the bug without realizing, or, fixed it and just skipped the standard backporting process that would normally patch all the other versions that were still in support.
Forgot to save. You ever spend 45 minutes looking for a bug you already fixed?
Back in the day not saving means you might lose your work during a crash. So ctrl-s after every change became habit even years into auto saving editors.
Or variations of this caused by a makefile not having correct dependencies set up, eg it points to dependent source files but not the headers so header updates get ignored during compiles. Made me add a “make clean” step to the debug process of “change that should have fixed the issue appears to be doing nothing at all” issues, or even just defaulting to rebuilding everything because test times can take hours or even days to get to the issue, so I don’t want to waste that much time only to find out it’s still running the old version.
Yep. Last time I used MS Visual Studio it was still all too eager to run an older binary, and I lot plenty of time debugging a binary that doesn’t reflect the current code. And, even more recently, when testing requires you to remember to run separate routines to upload to a testing server and restart a service, it is really easy to forget to do that when you are bouncing between the code and the browser console to figure out what to change.
ECU (the computer in your car) only came online on the bus at every 3rd restart. No memory was written, yet the bastard somehow knew it anyway.
Turns out the transciever’s enable pin was left unconfigured and supposedly some charge accumulated during two startups to set it.
Love this
My system didnt boot for obscure reasons
Found out something had caused my nix store (packages) to explode in size. Chrooting didnt work as it was filled to the last byte. Deleted some files, then chrooted in and did a cleanup
One time I was struggling to understand why a code branch I wrote was being unexpectedly taken, and I found that I had written something like
if pet == 'cat' || 'dog'. Since'dog'was a string, the condition was always true. I laughed out loud at myself.A static type system can be used to make this type of error occur at compile-time rather than runtime. But, not everyone wants to make that tradeoff and some even like the semantics applied to that kind of expression.
||often gets tasked with handlingnull/undefinedin JS, e.g.







