this post was submitted on 16 Aug 2023
570 points (96.9% liked)

Programmer Humor

33631 readers
324 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

When you come back from vacation
@programmerhumor

you are viewing a single comment's thread
view the rest of the comments
[–] Dasnap@lemmy.world 22 points 2 years ago (3 children)

Me temporarily forgetting the structure of an if statement in Shell.

[–] unagi@feddit.nl 20 points 2 years ago (1 children)

I write shell scripts only very occasionally and have to look this up every time.

[–] exu@feditown.com 6 points 2 years ago

Like this I think

if [1]; then
    echo "hi"
fi
[–] LazaroFilm@lemmy.world 4 points 2 years ago (1 children)

And then there’s stupid Cpp with

if (true) {
  do();
}

Or

if THIS
  do();
endif 
[–] ActuallyRuben@actuallyruben.nl 3 points 2 years ago

What's weird about the C++ one? At least that one is the same in a bunch of languages