this post was submitted on 16 Aug 2023
549 points (96.8% liked)

Programmer Humor

31251 readers
1128 users here now

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

Rules:

founded 4 years ago
MODERATORS
 

When you come back from vacation
@programmerhumor

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 22 points 10 months ago (3 children)

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

[–] [email protected] 19 points 10 months ago (1 children)

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

[–] [email protected] 12 points 10 months ago

Every. Single. Time.

Now I just skip straight to scripting it in Python.

[–] [email protected] 6 points 10 months ago

Like this I think

if [1]; then
    echo "hi"
fi
[–] [email protected] 4 points 10 months ago (1 children)

And then there’s stupid Cpp with

if (true) {
  do();
}

Or

if THIS
  do();
endif 
[–] [email protected] 2 points 10 months ago

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