this post was submitted on 22 Feb 2025
337 points (99.7% liked)

Software Gore

5550 readers
349 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
 

Someone boo boo'ed the label making

you are viewing a single comment's thread
view the rest of the comments
[–] Irelephant@lemm.ee 48 points 1 day ago (3 children)

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

This outputs "banana"

[–] RogueBanana@lemmy.zip 5 points 11 hours ago (1 children)

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

[–] herrvogel@lemmy.world 13 points 8 hours ago* (last edited 8 hours 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.

[–] kabi@lemm.ee 30 points 23 hours ago (1 children)

*old man yells at javascript*

[–] buddascrayon@lemmy.world 2 points 21 hours ago (1 children)

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 2 points 16 hours 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.

[–] 0x0@lemmy.dbzer0.com 9 points 21 hours ago

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