this post was submitted on 02 Sep 2026
835 points (97.8% liked)

Programmer Humor

33109 readers
65 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] Skullgrid@lemmy.world 20 points 3 days ago (5 children)

come the fuck on

string bigIfTrue(Boolean size)
{
    string toAssign = '';
    if (size == true)
    {
        toAssign = 'big';
    }
    else
    {
        toAssign = 'small';
    }
    return toAssign;
}
[–] bstix@feddit.dk 31 points 3 days ago (1 children)

Bloat. Nobody asked for else.

[–] mcv@lemmy.zip 2 points 2 days ago

Or assignment. Just return.

[–] not@lemmy.dbzer0.com 17 points 3 days ago (1 children)
[–] grrgyle@slrpnk.net 3 points 2 days ago
[–] Hasherm0n@lemmy.world 14 points 3 days ago (2 children)

Where's your interface and factory?

[–] fruitycoder@sh.itjust.works 3 points 2 days ago

This actually gets loaded as a WASM module by a server less API service when a user ask if true return big

[–] Axolotl_cpp@feddit.it 5 points 3 days ago* (last edited 3 days ago)
String bigIfTrue(Boolean size)
{
    if (size == true){ return "big" }
    return "small";
}
[–] OpenStars@discuss.online 1 points 2 days ago (1 children)

So very wrong.

"big" != "Big"

[–] Skullgrid@lemmy.world 2 points 2 days ago* (last edited 2 days ago) (1 children)

shit time to git commit sudoku

[–] OpenStars@discuss.online 2 points 2 days ago

Syntactically correct - the best kind of correct!!