Logo
rm -rf /: The factory reset button for your computer.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Brace-placement Memes

Posts tagged with Brace-placement

Enough About The If, Let's Discuss Where Is It That You Put The Else

Programming Java Javascript Csharp Typescript
20 days ago 70.1M views 1 shares
Enough About The If, Let's Discuss Where Is It That You Put The Else
Oh, so you thought the great tabs vs spaces debate was intense? Welcome to the real battlefield: brace placement for else statements! Four different developers, four completely different approaches to where the "else" keyword should live in relation to its curly braces. Top left says "closing brace, else, opening brace all on separate lines" like some kind of vertical spacing enthusiast. Top right is giving "same line energy" with the else snuggled between braces. Bottom left puts the else BEFORE the opening brace like a rebel without a cause. And bottom right? That developer woke up and chose chaos by putting else AFTER the closing brace on its own line. The beauty here is that literally ALL of these will compile (in most languages), but your team's code review will turn into a gladiator arena over which one is "correct." Spoiler alert: there is no correct answer, only strongly held opinions and passive-aggressive comments in pull requests.

Today's picks

Where's The Love

Where's The Love

Programming
149.4M views 8 days ago
CafePress Sleep Code Eat Repeat Mug 11 oz (325 ml) Ceramic Coffee Mug

CafePress Sleep Code Eat Repeat Mug 11 oz (325 ml) Ceramic Coffee Mug

Affiliate
$12.99
It Works

It Works

Programming
93.2K views 2 years ago