this post was submitted on 16 Aug 2023
569 points (96.7% liked)

Programmer Humor

31792 readers
181 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 21 points 1 year ago (3 children)

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

[–] unagi@feddit.nl 18 points 1 year ago (1 children)

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

[–] exu@feditown.com 5 points 1 year ago

Like this I think

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

And then there’s stupid Cpp with

if (true) {
  do();
}

Or

if THIS
  do();
endif 

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