1108
submitted 8 months ago by willya@lemmyf.uk to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] e0qdk@kbin.social 112 points 8 months ago

Rule 9 from Agans's Debugging: If you didn't fix it, it ain't fixed

Intermittent problems are the worst...

[-] marcos@lemmy.world 34 points 8 months ago

The problem is, how do you fix it if you can't make it break?

The worst thing is when somebody comes to you saying "yeah, I had this problem yesterday, but it's working now".

[-] neshura@bookwormstory.social 21 points 8 months ago

this is a case for excessive logging man

likely won't help you actually fix the issue because miraculously you didn't log the three variables you actually need but it'll make you feel better in the meantime

[-] kameecoding@lemmy.world 8 points 8 months ago* (last edited 8 months ago)

and gives you some headroom in improving performance since it's being choked by the excessive logging

[-] ryannathans@aussie.zone 1 points 8 months ago

You should have a unit test you can run until failure

[-] folkrav@lemmy.world 6 points 8 months ago

Fully agree, but they're usually kind of annoying to track regardless. On the opposite side, sometimes even getting it to trigger on purpose to be able to add a regression test can be pretty tricky, depending on the cause. Timing or time/date based stuff is a common culprit...

[-] ryannathans@aussie.zone 5 points 8 months ago* (last edited 8 months ago)

Don't tell me about time and date, I am still recovering from some moron that used datetime.now() for some unit test data setup and sometimes two records (which needed to have the same time) had very slightly varying time which caused all sorts of intermittent test failures that were very tricky to nail down. Database triggers were failing causing failures in all sorts of tests in a random fashion

this post was submitted on 11 Oct 2023
1108 points (98.1% liked)

Programmer Humor

31229 readers
58 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS