this post was submitted on 17 Jun 2023
162 points (100.0% liked)

Programmer Humor

421 readers
3 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] ZILtoid1991@kbin.social 10 points 1 year ago* (last edited 1 year ago) (4 children)
int mostCursedIndentation (const int someVal) @safe {
{}{}if (someVal < 0) {
{}{}{}{}throw new Exception ("Value cannot be negative!");
{}{}}
{}{}return someVal * 5 - 3;
}

[–] vvv@kbin.social 12 points 1 year ago (1 children)

i dont wanna talk about the lua version of this

local function someFunction(arg)
do end local SomeLocal = 40;
do end if arg > SomeLocal then
do end do end SomeLocal = Somelocal + arg
do end elseif arg < SomeLocal then
do end do end arg = arg * 2
do end do end if SomeLocal > arg then
do end do end do end error("oh my god why are you trying to read this")
do end do end end
do end end
do end return SomeLocal
end

someFunction(-0.3000000000000124976137894613978561389741642978623178913786926473891)

[–] cloaker@kbin.social 4 points 1 year ago (1 children)
[–] nevemsenki@kbin.social 4 points 1 year ago

He has already left the chat

[–] gnuswann@programming.dev 4 points 1 year ago

This is the worst

[–] soft_frog@kbin.social 3 points 1 year ago (1 children)

Can you start randomly nest them too?

{{}}{}int foo = bar

[–] ZILtoid1991@kbin.social 5 points 1 year ago

You made it even worse!

[–] jcg@halubilo.social 1 points 1 year ago

Highly readable