this post was submitted on 15 Nov 2023
222 points (97.8% liked)

Programmer Humor

19463 readers
15 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 35 points 11 months ago* (last edited 11 months ago) (1 children)

If you think that's good, then you're gonna love this "simplified" real code posted as a real issue on one of my Github repos.

Edit: updated link to address the stack-trace comment

[–] [email protected] 10 points 11 months ago* (last edited 11 months ago) (1 children)

That's not actual code though, it looks like some kind of trace. Notice the filenames at the end of each line.

The actual solution the issue opener there might be looking for is to disable C++ parsing, since it's not actually C++ code, it's just some text they pasted into VSCode and they're wondering why their editor can't handle it.

[–] [email protected] 2 points 11 months ago

Without thinking about it much, my understanding was that each line of the stack trace referred to a real line, even though the block as a whole wasn't a program.

But! because of this comment I went and checked the lines of those stack traces. And in fact, they're not real lines, just the C++ type expansion.

That said I've got a another half as bad example that is real so Ive edited the comment to point to that example instead.