this post was submitted on 11 Sep 2025
856 points (99.7% liked)
Programmer Humor
26372 readers
1101 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How old was the oldest bug that you discovered that you also wrote? Mine was six years old, a null pointer dereference that worked fine on the original architecture but caused a reset when moving to Cortex-M.
Had a 3 year old one this week. A loop that builds a list of messages to send to a queue for another service to consume then it calls BatchPublish.
Only Batch Publish was inside the loop so instead of sending n messages, it sends 1+2+3... +n
We never noticed before because n was never more then 100 and the consuming service is idempotent so the duplicate messages don't cause issues. I think it's (n(n-1))/2. So n=100 is 4950. That's only 4 minutes work. Also that code only runs at 1am.
Recently n has been hitting 1000 which produces 499500 messages and it takes a few hours to clear and triggers an alarm for delayed processing.