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
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog