Logo
What's a programmer's favorite place? The foo bar!
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • 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

Condition-checking Memes

Posts tagged with Condition-checking

Loop Logic: The Cliff Of Execution

Programming Algorithms Debugging
6 months ago 392.5K views 1 shares
Loop Logic: The Cliff Of Execution
The eternal battle between while-do and do-while loops played out through Road Runner and Wile E. Coyote! On the left, Road Runner safely checks the condition (!edge) before running, saving himself from the cliff. Meanwhile, poor Coyote executes run() first and only checks (!edge) after he's already airborne. And that's why you always validate before executing, folks! The difference between falling and living another day is literally one line of code.

The Edge Case Cliff Disaster

Programming Debugging Algorithms Javascript
9 months ago 424.7K views 1 shares
The Edge Case Cliff Disaster
The classic Road Runner vs. Wile E. Coyote scenario reimagined as a programming loop disaster! On the left, Road Runner's code uses a proper while (not edge) { run(); } loop that will terminate when reaching the cliff edge. Meanwhile, poor Coyote is using a do { run(); } while (not edge); loop—checking the condition after execution. He's already run off the cliff because his condition check comes too late! The fundamental difference between pre-test and post-test loops perfectly illustrated through cartoon physics. The variable edge isn't even defined until it's too late, and by then gravity.js has already been imported!

Today's picks

It's AI Fault

It's AI Fault

Programming
2.0M views 10 days ago
Pros: Negative Temperature
Cons: Negative Display

Pros: Negative Temperature Cons: Negative Display

Programming
100.1K views 6 months ago
If fire, else

If fire, else

Programming
68.9K views 3 years ago