323
True crime (lemmy.nz)
you are viewing a single comment's thread
view the rest of the comments
[-] jbrains@sh.itjust.works 10 points 1 year ago

What if role is FILE_NOT_FOUND?!

[-] foxglove@lazysoci.al 15 points 1 year ago

if it's 'FILE_NOT_FOUND' then the string will be read as truthy and you will get 'User is admin' logged.

[-] bjoern_tantau@swg-empire.de 30 points 1 year ago

Ackshually three equal signs check for type as well. So mere truthiness is not enough. It has to be exactly true.

Also, everyone knows FILE_NOT_FOUND isn't a string but a boolean value.

[-] foxglove@lazysoci.al 1 points 1 year ago

yeah, it's funny how my brain collapsed the boolean check into if (role) rather than if (role === true) - that's tricky

what is FILE_NOT_FOUND? I can't find much on it ...

[-] bjoern_tantau@swg-empire.de 4 points 1 year ago

FILE_NOT_FOUND is from an old story on thedailywtf.com. Someone created a boolean enum with TRUE, FALSE and FILE_NOT_FOUND, if I recall correctly. It's been a recurring running joke.

[-] foxglove@lazysoci.al 2 points 1 year ago

thank you for letting me in on the joke ๐Ÿ˜„

and for catching my error!

[-] jbrains@sh.itjust.works 2 points 1 year ago

Welcome! I guess this is your Ten Thousand moment for a mediocre joke for old programmers. ๐Ÿ’ช๐Ÿ‘

[-] foxglove@lazysoci.al 2 points 1 year ago

haha, yes - exactly! At least I got that reference, xkcd is pretty well known, though.

[-] jbrains@sh.itjust.works 2 points 1 year ago

I see that they've gone back to the name "The Daily WTF". For some time, they changed to "Worse than failure" in order to avoid not even the word "fuck". ๐Ÿคท

https://thedailywtf.com/

this post was submitted on 14 Aug 2025
323 points (96.3% liked)

Programmer Humor

33887 readers
1571 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 3 years ago
MODERATORS