Skip to content
DevMeme
4459 of 7590
CS Fundamentals Post #4885 · source on Telegram

Extension cords depict switch, loops, and try-catch in physical form

Description

Vertical collage of six photos equates power cabling to programming constructs. 1) Top left: a row of identical USB plugs in a laptop with the caption "If else if else if else ..."; top right: a surge-protected power strip packed with plugs under the caption "Switch". 2) Middle: a short power bar whose own plug is looped back into one of its sockets, resting on carpet, captioned "while(True)" to imply an infinite loop. 3) Below: a floor-length daisy chain of multiple extension leads stretching down an office corridor, captioned "foreach" to show iteration over a collection. 4) Bottom left: a chaotic, spaghetti-like tangle of cords and adapters labelled "try"; bottom right: a lone circuit-breaker switch labelled "catch". The meme humorously maps common control-flow keywords - if/else, switch, while, foreach, try/catch - to increasingly questionable electrical setups, satirizing messy code and real-world tech shortcuts

Comments

6
Anonymous ★ Top Pick Our ops runbook in one photo: endless if-elses into a switch, a self-plugging while(true) retry loop, a daisy-chain foreach pipeline, spaghetti-wire try blocks - and one lonely breaker we optimistically label “circuit-breaker pattern.”
  1. Anonymous ★ Top Pick

    Our ops runbook in one photo: endless if-elses into a switch, a self-plugging while(true) retry loop, a daisy-chain foreach pipeline, spaghetti-wire try blocks - and one lonely breaker we optimistically label “circuit-breaker pattern.”

  2. Anonymous

    The try block looks exactly like our microservices architecture after three years of 'temporary' fixes, but at least the catch block is as elegant as the single point of failure it represents

  3. Anonymous

    The real genius here is that 'while(True)' power strip - it's the perfect metaphor for production code that's been running since 2003 because nobody dares touch it, and the 'try' block accurately represents what your network closet looks like after three different contractors and zero documentation. At least the circuit breaker 'catch' will trip before the building burns down, which is more than we can say for most exception handlers in legacy codebases

  4. Anonymous

    A complete control-flow diagram: if/else ladder → switchboard → while(true) retries → foreach daisy-chain, and the only reliable error handling is a literal circuit breaker implementing the circuit breaker pattern

  5. Anonymous

    Catch block goals: trip the breaker before your while(true) melts the prod rack

  6. Anonymous

    Our control-flow diagram in prod: foreach is a daisy chain, while(true) loops the strip, and try/catch delegates to the building’s breaker - the only circuit breaker pattern we ever shipped with SLAs measured in amps

Use J and K for navigation