When you come back from vacation
@programmerhumor

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

exu
link
fedilink
English
51Y

Like this I think

if [1]; then
    echo "hi"
fi

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

Every. Single. Time.

Now I just skip straight to scripting it in Python.

LazaroFilm
link
fedilink
English
41Y

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

Create a post

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 61 users / day
  • 247 users / week
  • 417 users / month
  • 2.88K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.9K Comments
  • Modlog