60

Someone boo boo'ed the label making

top 27 comments
sorted by: hot top controversial new old
[-] gerryflap@feddit.nl 7 points 1 month ago

Very dangerous. If you buy this, NaN money will be deducted from your bank account and thus your resulting amount of money will also be NaN.

[-] Irelephant@lemm.ee 5 points 1 month ago

document.write(('b' + 'a' + + 'a' + 'a').toLowerCase());

This outputs "banana"

[-] kabi@lemm.ee 8 points 1 month ago

*old man yells at javascript*

[-] buddascrayon@lemmy.world 1 points 1 month ago

Sadly the problem is that the old men are the ones who know how to use the JavaScript and the young men are the ones who have no fucking clue what they're doing anymore.

[-] Eheran@lemmy.world 0 points 1 month ago

People are supposed to understand this kind of "logic"? No wonder everything is full of bugs if code is THAT obscure. You seem to even like it that way.

[-] jerkface@lemmy.ca 2 points 1 month ago

Oh god, no, everyone hates Javascript, the most-used programming language in the world. Paradoxical but true.

[-] lena@gregtech.eu 1 points 1 month ago

Tbh js is pretty pleasant to write with typescript, though is it even considered the same language? It is a superset.

[-] beveradb@lemm.ee 2 points 1 month ago

Watch this talk, it's funny and explains this well; this isn't a good thing in anyone's opinion, it's just a demonstration of one of many unfortunate design choices in the JavaScript programming language: https://www.destroyallsoftware.com/talks/wat

[-] RogueBanana@lemmy.zip 2 points 1 month ago

Could someone explains this to some of us who haven't learnt these cancer yet?

[-] herrvogel@lemmy.world 6 points 1 month ago* (last edited 1 month ago)

Javascript has a tendency to "just work" even when it might be a better idea not to. That is achieved by making assumptions and defaulting to certain pre-defined behaviors where most other languages would just stop. Unless something truly catastrophic happens, JS always tries to find a way to keep the code running. Good or bad, that's by design just how it works.

That is an example of this tendency. Normally the " 'a' + + 'a' " bit should be an error case, because that does not make sense. Where most programming languages would throw and error and stop execution, javascript just soldiers on. It assumes the center bit is an addition of numbers. Except since there's no number there, it automatically injects the value that represents invalid numbers, which is "nan" for "not a number". Then, since that "number" is surrounded by letters, it parses that number into a text value, which is the string "nan" itself. And then finally it adds all the letters together to form a banana.

There are plenty of weird ways to get JS to give you stupid results back. Shit like these are not bugs with the language, it's just JS working as intended. Except the way language works as intended can lead to actual bugs very easily, is the problem.

[-] Eheran@lemmy.world 1 points 1 month ago* (last edited 1 month ago)

Okay thanks for this info. So we got ba and nan and then aa, which is bananaa, not banana?

[-] beveradb@lemm.ee 1 points 1 month ago

Watch this talk, it's funny and explains this well; https://www.destroyallsoftware.com/talks/wat

[-] 0x0@lemmy.dbzer0.com 1 points 1 month ago

Jesus, I thought you made a typo until I tried it. Gotta love those unary operators...

[-] Weezard@lemmy.world 3 points 1 month ago

I watched a video about these the other day some dude on YouTube seems to have hacked together a program to put whatever you want on them you can find the video here if you're interested here

[-] jerkface@lemmy.ca 3 points 1 month ago

Where I live, shopkeepers are obliged to use the posted prices if it advantages the consumer.

[-] dukatos@lemm.ee 2 points 1 month ago
[-] diemartin@sh.itjust.works 1 points 1 month ago

Forget comparing apples to oranges. I'm comparing squash kabochas to numbers (they aren't)

[-] Ledericas@lemm.ee 2 points 1 month ago
[-] Welt@lazysoci.al 2 points 1 month ago
[-] nullPointer@programming.dev 2 points 1 month ago

well... it's true, that is not a number.

[-] HollowNaught@lemmy.world 1 points 1 month ago

Is this some fucked up form of sodium azide I'm too stupid to understand

[-] MonkderVierte@lemmy.ml 1 points 1 month ago

Free squash.

[-] SGforce@lemmy.ca 0 points 1 month ago
[-] idunnololz@lemmy.world 3 points 1 month ago

Careful there! NaNs are contagious like a virus. Whats 1 + NaN? NaN. If you try to buy it your credit will becomes NaN. Then when you try to pay it off your bank balance will be NaN too. It has happened to me. Now I owe NaN to the local mafia and they expect a payment this week or else they are taking my thumbs.

[-] VindictiveJudge@lemmy.world 1 points 1 month ago

Sounds like prions.

[-] fl42v@lemmy.ml 1 points 1 month ago* (last edited 1 month ago)

Not necessarily, they may just take payment in BJs

[-] Shardikprime@lemmy.world -1 points 1 month ago

Finally, gourded Sodium Azide

this post was submitted on 22 Feb 2025
60 points (100.0% liked)

Software Gore

4787 readers
4 users here now

Welcome to /c/SoftwareGore!


This is a community where you can poke fun at nasty software. This community is your go-to destination to look at the most cringe-worthy and facepalm-inducing moments of software gone wrong. Whether it's a user interface that defies all logic, a crash that leaves you in disbelief, silly bugs or glitches that make you go crazy, or an error message that feels like it was written by an unpaid intern, this is the place to see them all!

Remember to read the rules before you make a post or comment!


Community Rules - Click to expand


These rules are subject to change at any time with or without prior notice. (last updated: 7th December 2023 - Introduction of Rule 11 with one sub-rule prohibiting posting of AI content)


  1. This community is a part of the Lemmy.world instance. You must follow its Code of Conduct (https://mastodon.world/about).
  2. Please keep all discussions in English. This makes communication and moderation much easier.
  3. Only post content that's appropriate to this community. Inappropriate posts will be removed.
  4. NSFW content of any kind is not allowed in this community.
  5. Do not create duplicate posts or comments. Such duplicated content will be removed. This also includes spamming.
  6. Do not repost media that has already been posted in the last 30 days. Such reposts will be deleted. Non-original content and reposts from external websites are allowed.
  7. Absolutely no discussion regarding politics are allowed. There are plenty of other places to voice your opinions, but fights regarding your political opinion is the last thing needed in this community.
  8. Keep all discussions civil and lighthearted.
    • Do not promote harmful activities.
    • Don't be a bigot.
    • Hate speech, harassment or discrimination based on one's race, ethnicity, gender, sexuality, religion, beliefs or any other identity is strictly disallowed. Everyone is welcome and encouraged to discuss in this community.
  9. The moderators retain the right to remove any post or comment and ban users/bots that do not necessarily violate these rules if deemed necessary.
  10. At last, use common sense. If you think you shouldn't say something to a person in real life, then don't say it here.
  11. Community specific rules:
    • Posts that contain any AI-related content as the main focus (for example: AI “hallucinations”, repeated words or phrases, different than expected responses, etc.) will be removed. (polled)


You should also check out these awesome communities!


founded 2 years ago
MODERATORS