this post was submitted on 03 Oct 2025
217 points (97.8% liked)

Programmer Humor

38757 readers
9 users here now

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

Rules:

founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] bleistift2@sopuli.xyz 30 points 2 weeks ago (10 children)

Sometimes there’s literally no other way (that I know of). When you’re debugging concurrency issues, stopping all time with a debugger just isn’t an option.

[–] Ephera@lemmy.ml 4 points 2 weeks ago (7 children)

I guess, there's technically nothing which dictates that a debugger has to work by stepping through a program. It could also present you some diagram of variable values changing over time. But yeah, gonna be hard to find a more useful representation than those values being interleaved with your logs, at least for most applications. I have heard of more advanced debuggers being used in gamedev, which makes sense, since logs aren't nearly as useful there.

But yeah, given that most people think of the stepping debuggers, them being the default advice does feel emblematic of our industry still shying away from concurrency.

[–] dumnezero@piefed.social 1 points 2 weeks ago (2 children)

console.log("functionOne", "A", varA, "B", varB, "C", varC);

[–] squeamish_ossifrage@lemmy.today 1 points 2 weeks ago (1 children)

console.log('func', {A, B, C})

[–] dumnezero@piefed.social 1 points 1 week ago

While that works, of course, I avoid doing object construction or other logic beside some string concatenation in JS logs. And those string literals serve a purpose as semantic markers, not just as separators.

load more comments (4 replies)
load more comments (6 replies)