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

Programmer Humor

33288 readers
654 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 2 weeks 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 32 points 2 weeks ago (1 children)

Bloat. Nobody asked for else.

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

Or assignment. Just return.

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

Where's your interface and factory?

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

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

[–] Skullgrid@lemmy.world 0 points 2 weeks ago (1 children)

hey, this is for fun and pseudocode.

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

So very wrong.

"big" != "Big"

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

shit time to git commit sudoku

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

Syntactically correct - the best kind of correct!!