293
submitted 1 year ago* (last edited 1 year ago) by alphacyberranger@lemmy.world to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] Button777777@lemmy.world 7 points 1 year ago* (last edited 1 year ago)

It blows my mind how often i see people using temp logs for debugging when breakpoints exist

[-] deegeese@sopuli.xyz 15 points 1 year ago

When the issue is only seen after hours of runtime, logging is more practical.

[-] Chreutz@lemmy.world 7 points 1 year ago

I recently had an issue that happens on one out of between ten thousand and a hundred thousand interactions between two embedded processors. Thank god for logging!

[-] o11c@programming.dev 6 points 1 year ago

Even logging can sometimes be enough to hide the heisgenbug.

Logging to a file descriptor can sometimes be avoided by logging to memory (which for crash-safety includes the possibility of an mmap'ed file, since the kernel will just take care of them as long as the whole system doesn't go down). But logging from every thread to a single section of memory can also be problematic (even without mutexes, atomics can be expensive and certainly have side-effects) - sometimes you need a separate per-thread log, and combine in the log-reader tool.

load more comments (1 replies)
load more comments (2 replies)
load more comments (3 replies)
this post was submitted on 10 Sep 2023
293 points (94.3% liked)

Programmer Humor

19165 readers
399 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

founded 1 year ago
MODERATORS