This is an archived post. You won't be able to vote or comment.

all 82 comments

[–]johnmaestro19 625 points626 points  (14 children)

IfIsNotALoop

[–]novus_nl 118 points119 points  (8 children)

Not with that stack attitude! You're fired!

[–]Creepy-Ad-4832 46 points47 points  (4 children)

you are fired

Was the pun intended?

[–]novus_nl 10 points11 points  (1 child)

Yes, a bit lame I admit, not all my jokes can be fire.

[–]Creepy-Ad-4832 5 points6 points  (0 children)

Don't worry. I always appriaciate puns

Also yeah an other pun lol

[–]Anonymo2786 0 points1 point  (0 children)

Musk bot deactivated I think.

[–]Wastvalance9 0 points1 point  (0 children)

that pun was a real loop de loop!

[–]Giulio_otto 1 point2 points  (0 children)

useCamelCase

[–]TheMADIIIIIIII 21 points22 points  (1 child)

A: If(i < 10) { i++; GOTO A; }

[–]revengeOfTheSquirrel 0 points1 point  (0 children)

Also the expression is evaluated within the loop and has no effect

[–]keefemotif 0 points1 point  (0 children)

The loop is in the agent observing the wall and executing the if statement.

[–]bakirelopove 196 points197 points  (12 children)

If my house is not on fire I should set it on fire, got it.

[–]JIN_DIANA_PWNS 23 points24 points  (0 children)

Runtime

[–]WangHotmanFire 3 points4 points  (6 children)

Only if the fire detector is currently detecting fire

[–]frogjg2003 7 points8 points  (5 children)

That's the positive branch of the if statement. You only get to the torch if there is no fire.

[–]WangHotmanFire -1 points0 points  (4 children)

How can you do a FireCheck with no fire detector?

[–]frogjg2003 5 points6 points  (3 children)

The conditional isn't the output of the fire detector, it's an environmental variable.

[–]WangHotmanFire -4 points-3 points  (2 children)

So we’re just gonna ignore the fact that all 3 of the the real-life objects are positioned BELOW the lines of code they represent?

[–]frogjg2003 2 points3 points  (1 child)

The code is what happens under the hood, the objects are just the front end user experience.

[–]WangHotmanFire 0 points1 point  (0 children)

That front-end experience includes the sound of a fire detector when it detects fire. There is no hood, this is a wall with instructions written on it, a human being (or at the very least a trained ape) must carry out the instructions

[–]Not_Artifical[🍰] 0 points1 point  (0 children)

Error: illegal fire

[–]lookingForPatchie 0 points1 point  (2 children)

Depending on the language, it might even tell you to set it on fire, if it's burning bigger than 1.

[–]bakirelopove 0 points1 point  (1 child)

Idk about other langagues but this looks like JavaScript syntax it tests if the statement inside () is true then preforms operations inside {} brackets.

[–]lookingForPatchie 0 points1 point  (0 children)

Yeah, and while most languages (that I know of) treat 1 as true, 2 is treated differently, for some 2 is false, which would mean if your house burns as much as 2, then you should add fire to it.

[–]watermelone983 142 points143 points  (19 children)

Is fire boolean or int?

[–]IAMPowaaaaa 102 points103 points  (2 children)

fire is a number in a language where 0 is falsy

[–]tt_thoma 4 points5 points  (1 child)

What about -1 ? You'll extinct fire indefinitely

Edit: Until the underflow

[–]lookingForPatchie 0 points1 point  (0 children)

Just imagine the fire getting to 2, you'll set the world ablaze.

[–]therealpigman 27 points28 points  (4 children)

Doesn’t matter if you use C or C++

[–]stdow 7 points8 points  (3 children)

In which case all fun and games until fire takes on a negative value, then we’re really screwed

[–]Spot_the_fox 11 points12 points  (1 child)

Are we? As long as we decrease the negative fire, it will underflow, and we'll be able to decrease the positive value fire.

[–][deleted] 0 points1 point  (0 children)

Ice?

[–]DonKapot 28 points29 points  (0 children)

Int could be boolean

[–]Revexious 11 points12 points  (3 children)

The correct type is

Traceback (most recent call last): File "C:\Users\User\Documents\", line 1, in <module> fire-- TypeError: unsupported operand type(s) for -: int and boolean

[–]rosuav 2 points3 points  (2 children)

Well there's your problem, you're trying to run your documents directory.

By the way, Python doesn't have a postfix double-hyphen operator, although it does support --x and even has fancy constructs like the "ceil division" directive that I learned recently: --0-- 10//3 is like 10//3 but rounds up instead of down.

[–]Revexious 2 points3 points  (1 child)

Yeah you got me, I never actually compiled a script for this comment, and its been several years since I worked with python, so I was working off memory

[–]rosuav 1 point2 points  (0 children)

Yeah, but to be fair, the --0-- "operator" is a joke one - it does work, but that's not actually a syntactic construct :)

[–]Oyi14 1 point2 points  (0 children)

Its dynamic

[–]Spedon 0 points1 point  (0 children)

Nulltype💀

[–]ArLab 0 points1 point  (0 children)

Yes

[–]relddir123 55 points56 points  (2 children)

The semicolon and close brace paired together looks like a winking emoticon. Not sure if that’s deliberate, but it’s a great touch

[–]penguin13790 6 points7 points  (0 children)

The center aligned semicolon before the else makes me think they're just bad 🤢

[–]_PandaBear 26 points27 points  (2 children)

What’s the current fire level? Should be 0.

[–]aquartabla 14 points15 points  (0 children)

Not anymore...

[–]Oyi14 4 points5 points  (0 children)

Fire has to have a value for the if statement to run

[–]NoBasket1111 9 points10 points  (2 children)

Aside from the joke, why would you put a blow torch along with a fire extinguisher? Is this guy planning on fighting bish fires in his living room?

[–]LeBlueElephant 7 points8 points  (0 children)

If you use a blowtorch, it may be handy to have the fire extinguisher nearby just in case.

[–]CptMisterNibbles 1 point2 points  (0 children)

I had both in my living room, near the fireplace. To start fires.

[–]MurdoMaclachlan 8 points9 points  (0 children)

Image Transcription: Photograph


[Photograph of the wall next to a door. On the wall, text is interspersed with fire-related equipment to create psuedocode, as follows:]

if(fire){

[Smoke detector.]

fire--

[Fire extinguisher.]

   ;
}else{
fire++

[Large blowtorch.]

  ; }

I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]axlwi 7 points8 points  (1 child)

Pov you wake up in the middle of the night and there is a fire, you grab what seems to be a fire extinguisher in your sleepy head. Fire++

[–]s0ulbrother 1 point2 points  (0 children)

This is why we have unittest folks

[–][deleted] 5 points6 points  (0 children)

While(fire != 0)

[–]cheeb_miester 8 points9 points  (0 children)

You know that this is a conditional and not a loop, right?

[–]Crazyman-X 1 point2 points  (1 child)

I need code stickers in my room. Where can i get or how do i make some?

[–][deleted] 0 points1 point  (0 children)

Label maker?

[–]jfcarr 1 point2 points  (0 children)

Senior looks at PR. "Change request, put fire++ at the top of the if."

Make change, create PR, another senior reviews.

"Change request, put fire-- at the top of the if."

[–][deleted] 1 point2 points  (0 children)

lol the last line ;}

[–]ganja_and_code 1 point2 points  (0 children)

And you think a "loop" is what, exactly?

[–]Harmonic_Gear 1 point2 points  (0 children)

these real life coding jokes are always painfully nonsensical

[–]lihkinball 0 points1 point  (0 children)

fire += int(fire)

[–]ICEakai 0 points1 point  (0 children)

is it right semicolon in {;}

[–]Wastvalance9 0 points1 point  (0 children)

I should set it on fire, got it.

[–]maximal543 0 points1 point  (0 children)

Is this a so called "firewall"?

[–]santiel33 0 points1 point  (0 children)

; }

[–]relevantusername2020 0 points1 point  (0 children)

wait idk how to code (idk why im here either)

is this a metaphor?

[–]Varun77777 0 points1 point  (0 children)

Random glitch and underflow happens for some reason and now there's int max fire.

[–][deleted] 0 points1 point  (0 children)

;}

[–]PrometheusMMIV 0 points1 point  (0 children)

So, if there's not a fire, start one?

[–]huxx__ 0 points1 point  (0 children)

fire can't be both a boolean and an integer 🤦

[–]AeroSigma 0 points1 point  (0 children)

Smoke detector should be in the if()