this post was submitted on 13 Feb 2026
112 points (92.4% liked)

Programmer Humor

29749 readers
2352 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 2 years ago
MODERATORS
 
top 26 comments
sorted by: hot top controversial new old
[–] themaninblack@lemmy.world 14 points 1 day ago

CVE score 9.9 vuln: slide sign halfway in between

[–] Technoworcester@feddit.uk 35 points 1 day ago (3 children)
[–] lefixxx@lemmy.world 4 points 23 hours ago

I can see why there are more pages with reworks

[–] Technoworcester@feddit.uk 34 points 1 day ago (2 children)
[–] Technoworcester@feddit.uk 41 points 1 day ago (2 children)
[–] Technoworcester@feddit.uk 46 points 1 day ago (2 children)
[–] NullPointerException@lemmy.ca 10 points 1 day ago

Fuck. I’m having nightmarish flashbacks looking at this. Hell.

[–] otter@lemmy.dbzer0.com 2 points 1 day ago

Hmm, "atomic office" you say?

[–] Unpigged@lemmy.dbzer0.com 11 points 1 day ago (1 children)

Lemma 1 mentions "definition of phi", but the phi is never defined. Wtf.

[–] NeatNit@discuss.tchncs.de 8 points 1 day ago (1 children)

OP posted the two pages in the wrong order, so you (and I) saw page 2 before page 1.

[–] Technoworcester@feddit.uk 5 points 1 day ago* (last edited 1 day ago)

Oops. Sorry.

[–] panda_abyss@lemmy.ca 6 points 1 day ago (1 children)

It did bother me there was no fall through.

[–] otter@lemmy.dbzer0.com 0 points 1 day ago (1 children)
[–] panda_abyss@lemmy.ca 6 points 1 day ago (1 children)

There’s no fall through case, it’s ambiguous what the room state should be

[–] otter@lemmy.dbzer0.com 1 points 1 day ago

Oh, yes, sorry. Quick read. 🖖🏼

[–] TomMasz@lemmy.world 1 points 1 day ago
[–] cypherpunks@lemmy.ml 17 points 1 day ago (2 children)

TypeError: unsupported operand type(s) for &: 'str' and 'str'

[–] joyjoy@lemmy.zip 4 points 1 day ago

comparison chaining strikes again!

[–] lengau@midwest.social 2 points 1 day ago (1 children)

Idk it works for me.

Also "8:00:00" > "10:00:00"

[–] cypherpunks@lemmy.ml 4 points 21 hours ago* (last edited 21 hours ago) (1 children)

Idk it works for me.

I don't think there is any possible value for the sign variable which would make that if statement do anything other than raise a TypeError.

Also "8:00:00" > "10:00:00"

but "08:00:00" < "10:00:00". comparing timestamps as strings is weird but actually works, as long as the hour is zero-padded :)

the problem with this code is that & (bitwise AND) has higher operator precedence than > and == do, so it is first trying to bitwise AND "10:00:00" with sign (which i'm assuming would also be a string) and that will always raise a TypeError.

to do what the author appears to have intended to do, they would either need use parenthesis around both comparisons to actually bitwise AND their results, or (better) to use the boolean AND operator (and) instead of &.

The boolean and operator is the right tool for the job, and since it is lower precedence it also wouldn't require that any parenthesis be added here.

[–] lengau@midwest.social 2 points 20 hours ago

Heh you're right, I didn't catch the bitwise and, so I thought you were making a TypeError joke about comparing strings. Fixing the and though (which I did naturally when I typed it into my interpreter to double-check), we get the issue that they are just using a string for the time rather than a time object. "Too early" is also a valid entry that gets us an available office.

[–] webghost0101@sopuli.xyz 12 points 1 day ago (3 children)

I once wrote down a food recept in code style because it seemed like the most structured way to do so.

[–] xtools@programming.dev 3 points 23 hours ago

cooklang might be of interest for you then

[–] Klear@quokk.au 6 points 1 day ago
[–] Technoworcester@feddit.uk 5 points 1 day ago

Seems reasonable to me.

[–] otter@lemmy.dbzer0.com 2 points 1 day ago* (last edited 1 day ago)

Anyone else pause on the ! for "...to use" vs the . of "...in use"?