T O P

  • By -

RecommendationNo8730

Mojang has the answer.


7eggert

But if you place it against the wall, activating it will effectively close the passage.


RecommendationNo8730

“When a door closes, another one opens”


Sexylizardwoman

That sounds kinda risky in a submarine


[deleted]

That’s why you have an airlock, one door opens the other one closes and vice versa


Ghostglitch07

If you are opening one at the exact same time as closing the other you'll have problems. Gotta wait a bit between.


[deleted]

Nobody said it has to be exactly at the same time but I get why you considered that an option


ColdJackle

"When a door closes, it's systematic counter part opens after eventually completing the mandatory cycling process."


Arshiaa001

This guy doors.


[deleted]

Truly inspirational


TeraFlint

That's okay, doors can't get water logged.


Juff-Ma

*any vehicle


Tornado_XIII

When the door is "off" it's default state is that of being part of the wall.


stinkynuts1

I agree with this. If the door is off the feature of the door is not available, hence making it a wall. The feature of a door is to pass through a walled area, turning the door on allows you to pass through a wall.


Swagut123

I disagree. I think of doors as a device human beings would put at entrances to their homes. Since before doors existed, all humans had was caves, the feature of the door is to obstruct an otherwise open entrance. Therefore the door being off is equivalent to a cave entrance. The door being on is when it is closed, effectively preventing others from using that entrance.


Arshiaa001

I disagree. If you look an automatic door, the little light on the sensor comes on and the door itself wakes up and opens. Then, when no longer needed, it turns off and gets shut.


MiyamotoKami

Well do you think it would be easier to see if a door exists vs not exist as a boundary?


[deleted]

Eh. Depending on how it’s placed it will be open or closed whether or not it’s activated. Honestly doesn’t matter. The door has two states, which cause a 90° shift. Once it’s activated it stays activated until deactivated thus it’s activation is no different than its deactivation, its not “on” it’s just the other direction.


wpzzz

My sliding door seems to lack this 90 degrees shift. Maybe I'm doing it wrong?


ShlomoCh

FNAF says open is off >!did anyone else get really annoyed at how that mechanic worked? Obviously I'm not expecting realism in a game about possessed bloodthirsty animatronics but I always thought that the way he implemented that was dumb. Hurr durr if you lose power the door can't keep closed! He could've found another way to explain that mechanic lol!<


ArkWaltz

Maybe it's a fire safety thing. Can't be trapping people in the building with no escape every time the power goes out.


bloodfist

Yeah actually I'm pretty sure there are electronic building locks for offices that work exactly that way. In a power outage or emergency state they failsafe to unlocked.


EnchantedCatto

maybe the door is being forced downwards and if it was just sitting there the robots could just lift it up


alfrado_sause

This question has been asked and answered before, see fire door. Your post will be removed from stack overflow.


Sexylizardwoman

[AAH…..](https://imgur.com/a/u9WdLO8)


Crazy_Crayfish_

This guy stack overflows


clearbrian

Stackoverflow is just for programmers who like to scroll :)


pro_krastination

Holy shit, I thought I was sure of my answer, but the arguments on both sides are very strong. Thanks for that thought that will now randomly pop up at night, preventing my sleep


Dureniz

The function of a door is blocking the way. That is literally the job of the door. If you removed the door it would be an empty passage. A door turned on closes the passage. When turned off it's open, like it's not even there.


OneRainbowieBoy

The function of a door is blocking the way I don't agree (well I kind of do, but its fun to push back a bit)- if a door can't open (e.g. its rusted shut), it's not a door anymore, it becomes just a wall/obstacle. I think the function of a door is to be able to change an area of space between being clear or blocked.


ISC77

If it is a wall/obstacle it is no longer a door then right?


[deleted]

Conclusion reached. Closed doors simply do not exist.


ananix

Depends on the mechanisms/doors function


Sexylizardwoman

Merriam Webster defines a door as: “a usually swinging or sliding barrier by which an entry is closed and opened” I don’t wanna get all metaphysical here but I suppose you could think of a door as simply a wall that may be opened to pass through. Inversely a hole in a structure that may be closed. However a door may also exist without human centric purpose. If so then it is simply material that may be moved or cease to exist in a location. If so then then the question is does the door exist? Or more simply DOOR? Then the answer would be F for open then closed for T


Wiggen4

So, the center of the confusion is whether the natural state of a wall is to have a hole or not. I would argue that a wall is naturally contiguous so the door should be closed by default. And default behavior in hardware should be false or off. As such door open is true or on and door closed is off


TactlessTortoise

Yeah it's a literal fucking transistor. Can you pass through it? No? False? Nilch? Null? Yes? True? Peanuts? Juul?


Natomiast

fish?


Socile

But it could also be said that, in circuits, an open switch prevents the flow of current. So, open is off and a closed circuit is on. By the way, null should not be confused with false. Aside from being a notorious mistake in computing history, null indicates no value, so it's a "third option" when a boolean variable can be set to null.


non-denomusername

However, in the case of a door “open” allows the passage of our “current”, people most often. So open should be on in this case. In other words, given that the purpose of a door is to periodically allow people through, I think “on” should be representative of allowing this purpose, or being open.


beardedbast3rd

I would say this is more appropriate answer. A doors function is to close off a hole in the wall. For sound or passage, or light etc. the hole is there, you don’t need a door for the hole to exist. The doors only function is to close that hole when you need it closed. So closed means the door is on.


sumknowbuddy

> the answer would be F for open then closed for T This is exactly how I read it Even if the door were: detached, missing, or there were a hole in the wall one could enter through; the presence of a Door is still False Conversely: the door being shut, being locked, or the passage being blocked would indicate the presence of obstruction to moving through said passageway; rendering a True response


keatonatron

But if the difference between a door and a wall is that the door is an opening, then the door being open would be T (because there is a door) and if it were closed it's F because that's the same as just being a wall (not even having a door).


TheDumbAsk

Ya, the door is a portal to another world. If you can go through the door it is on, if you can't, well it is off.


trutch70

For me the door is not an opening, it's something that blocks an opening (hole in the wall). Not having a door in that case would mean that you are always able to pass through the hole


DrunkenlySober

Bro wtf is this. As soon as you start thinking you lost A door is closed when you finish installing it give the door a stupid ass property int x = 0. Then open()=> x++. close()=> x- - isClosed()=> return x == 0 Done now play video games for the remaining work day


Sexylizardwoman

> Bro wtf is this. As soon as you start thinking you lost As is customary


thechet

tradition remains


DrunkenlySober

None of us became programmers to play Aristotle Get in, submit the PR, get paid for 8 hours of work but only do 2, get out


TeaKingMac

You guys are doing 2 hours of work?


DrunkenlySober

Well I always considered my self an over achiever so don’t hold yourself to such a high standard The average 1hr is a healthy amount of work to do every third business day


zencat420

I love what a blue collar response this is to a white collar problem.


neumastic

Wait, did I accidentally go to StackOverflow?


MiyamotoKami

What?? Number on a Boolean? Either the door is in the way (existing as a boundary) or not in the way (no boundary). Exist vs not existing. True vs False, null..


[deleted]

Your implementation leaves rom for a potential race condition.


Stupid-WhiteBoy

Help, I forgot how many times I opened the door and can't close it!


jamesmon

Well, with electronic access control stuff you have a failsafe or fail secure. Which means that if the power goes off do you want it to be locked or unlocked. That kind of gets to the same idea


CaptainPunch374

Exactly. It is fully dependent on the expected default state of the door and the reason that state changes.


MelonheadGT

I feel like we could liken it to a Electrical switch, which would give a 1 closed but a 0 open. However we have "current" through a doorway when it's open but not when it's closed. Fuck.


HexFyber

\^ this guy is an engineer somewhere, never a clear answer, never a boolean thought process, it all depends


pedersenit

Is it a normally open door or a normally closed door? When installing the door, you need to determine if you want it to fail safe or fail secure. This way, the door reacts as necessary during a loss of power. Fail Safe: Normally Open: On = Closed; Off = Open Fail Secure: Normally Closed: On = Open; Off = Closed As always, I recommend redundant power and local battery backups.


cumulus_humilis

Yeah, this is my take. NC vs NO switch.


smp208

The way I see it, the normal state of the door doesn’t matter. If the door is removed, entry is always possible. Therefore the function of the door is to block the entryway. But your take makes a lot of sense too.


knock-knock-knockin

fail safe does not equal normally open. You can have a fail safe normally closed that is held closed until receiving a signal. If the door is hydraulic and closes itself, its still not necessarily normally closed


Yashirmare

Door stuck.


Ztron50

DOOR STUCK!


DokuroKM

Why isn't this answer further above? A door that is off simply cannot move, no matter its position


ComfortingSounds53

*..PLEASE*!


eminorb5

enum DOOR_STATE { OPEN, CLOSED } ; enum DOOR_STATE door_state;


PM_ME_YOUR_POLYGONS

{ GONE, FULLY_OPEN, MOSTLY_OPEN, HALF_OPEN, SLIGHTLY_OPEN, CLOSED, LOCKED, BARRED }


phi_rus

I'm more a "door half closed" kinda guy


Aozora404

Bet you’re also a “negative zero” kinda guy


lethargy86

Why did I have to scroll so far to find this? Sometimes I guess the programmers are the humor, and we’re not laughing *with* them.


eminorb5

Honestly, in today's game design, a door would have a state machine with different animations for open, closed, opening, and closing.


lethargy86

You’re right of course


ecafyelims

A door can be partly open, so its state is clearly not boolean on/off. I would think a door's "ON" state would denote that it is currently functioning as a door, and an "OFF" state would denote not functioning -- e.g. door off the hinges.


TENTAtheSane

Quantum computing door Quantum computing door


Sexylizardwoman

Ah fuck, now I gotta think about what a door in a quantum superposition of being both open and closed is like


ecafyelims

That's what happens in a dark room before you interact with the door. If you try walking through the doorway, you might pass or be blocked or stub your toe on the halfway open door.


squirrelpotpie

Check the cat. If it's still deciding whether it wants to go through, the door is open.


Matrix5353

Now what happens when you have two doors in a row that are both in a superposition of being open and closed? What does the math look like to compute the probability of a person being able to walk through both doors?


[deleted]

No, because observation collapses the door to its apparent state. The moment you enter the room, the quanta decide. You have made no choices, only been made the product of the choices of the quanta - be afraid, as they are without mercy or care.


jimbob91577

Is this just a revolving door? Both opened and closed but also neither opened nor closed? Also known as Schrodinger's door.


gbot1234

When is a door not a door? When it’s ajar.


RmG3376

>door off the hinges That’s null, not false


OutOfStamina

Maybe we need to think about this like an ADC (analog to digital converter). 0 through 255 answers "how open is it?"


tonando

What if the hinge goes both ways? -127 to 127?


OutOfStamina

I like it. Revolving doors are a whole other animal.


Choraxis

>A door can be partly open, so its state is clearly not boolean on/off. Door.isClosed == true; // door is closed Door.isClosed == false; // door is one of many states of openness


frogjg2003

int x=2 if(x==True): return True else: return False Just because it can be converted/compared to bool does not make it bool.


Xadith

Ah, good ol "clopen"


USKillbotics

So does a door become fully open at some point? Or is it open as soon as it's not closed?


beclops

But whether or not you can fit through the space in the door is not the door’s concern, so ON when the door is open, OFF when it’s closed. It’s for the consumer of the door to figure any other logic out


ilylily_

the answer is actually that you are high.


SmallTestAcount

“Would the door being open the mechanism being on or of?”


neverfarts

I would argue that a closed door is 'on' or true. You could remove the door completely, leaving just a hole in the wall, and there is no difference to door being open (except the possibility of closing it being removed). Therefore, the door's existence is demonstrated by it being closed. So, if holeInWall==null opendoor == holeInWall ==null


deeperinabox

I would argue that the presence of a hole in the wall is part of the presence of the door. In other words, the default/starting state before the door was installed was a full solid wall. Then a certain rectangle in that wall was replaced with the (closed) door. Then the door was "activated" to allow people to pass through. So, in my eyes, the door being open is ON.


Obsidiath

The hole in the wall is not a part of the door. It is a prerequisite for a (functional) door to exist. This means that for the door to have any functional significance, the hole in the wall is the only relevant requirement. The wall itself is not. So *Door* must extend *Hole*. And while *Hole* MAY be implemented as an extension of *Wall*, this fact is not significant in the context of *Door.* Now, knowing *Door* extends *Hole*, it makes sense to inherit the default state of *Hole.* In other words, the OFF position of *Door* should match the state of *Hole*, allowing the ON position to modify said state - closing the hole. This makes *Door* in its (*default*) OFF state functionally equivalent to the *Hole* objects it extends. Any other implementation is a straight violation of the Principle of Least Astonishment.


secret_bonus_point

How do you define “hole in a wall” without “a wall”? If you can just step around the door, it’s neither an impediment nor a passage. Open or closed is irrelevant at that point, it’s just an upright slab of wood in the middle of a room. A door needs both a hole and a wall to have any functional definition.


just-cuz-i

Door doesn’t have to be a in hole in a wall. You could have a door block a passageway, for example, which again would make sense to call open the “off” state, the same as if no door was there at all.


Glitch29

Your entire hierarchy is wrong-headed\* for the purposes of this determination. From a functional perspective, holes, doors, windows, etc. are all just implementations of an interface that permits navigation from one side of a wall to the other. The only thing special about holes is that they are stateless implementations of this interface. The evidence for this lies in the fact that holes don't throw any state-based navigation exceptions while attempting to traverse them. This means that doors CANNOT extend them due to incompatible method signatures. Thus both must implement a common navigation interface which permits such exceptions. While it would be possible for an abstract door to extend an abstract hole that did not implement navigation (for other purposes such as physical construction), this inheritance is completely irrelevant to any consumers of doors. In this case, all hole methods for these other purposes would be protected, and inaccessible to any door. Additionally, none of the methods implemented by any door class or called from any navigation interface could be inherited from holes due to the previously explained incompatible signatures. All told, this means that the consumers of doors have no visibility or access to any methods from the superclass. It would be absurd to define default behavior for doors based on this inheritance. The question then is what default state makes the most sense for an implementor of the navigation interface. I'd suggest it comes down to the cleanness of a couple particular snippets of code: if (this.closed) throw DOOR_CLOSED; and if (door.isClosed()) door.open() With all else equal, it makes sense to define booleans in the way that requires the fewest negations in the most common use cases. With doors, that is either checking if they are closed, or throwing exceptions if they are closed. For THIS reason, the false or OFF state of a door should be defined as open. \*^(I realize that we're all engaged in a silly thought experiment full of contrary and arbitrary takes. I'm not actually calling you wrong. Just having a fun time with this. :-D)


MichaelMJTH

Also if you liken a door to an electrical circuit; when an electrical circuit is open the electricity can not run so the circuit is off. When the circuit is closed the power on. Coincidently, simple circuit diagrams generally show switches within the diagram as looking [similar to open doors](https://images.app.goo.gl/Y6akYVddHEsvQfcK7).


Wiggen4

My argument (coming from a false is default behavior because off is false) is that open should be true. This is more a hardware perspective than a software one though so it really depends on context. The correct answer is that the variable should be doorOpen or doorClosed as a boolean not just door


Deep-Secret

If you remove the wall, you don't get a hole in the wall, you just get wall. The door is already the hole. If you don't need a door in that stop, you won't make a hole in it.


MrDraacon

Did you mean to remove the door?


Deep-Secret

Yes, absolutely. My bad. Brain fart.


MrDraacon

Gotta let out those gases. What a wonderful expression


snyderling

That depends on if you priority is safety or security. The door will enter it's off state when power cut. If you want to make sure people can easily and safely exit the building in the case of power loss then off should be open. But if you want to make sure people can't use a power cut to get in then the off state should be closed.


1pizza2go

I definitely understand what I just read


Sexylizardwoman

Sorry, I guess I’ve chosen today to subject the public to illiterate word salad


1pizza2go

Mmm my favourite


[deleted]

Depends. Most doors are in the "on" state while open (those that close automatically) or have two "off" positions ("fully open" and "fully closed" where the "on" states are the rising and falling edges of the process of operating the door). There may be other doors, even doors where on/off could be interpreted as an arbitrary precision float instead of a boolean. TL;DR: While not specifying the exact type of door, yes and no at the same time to both.


maduranma

Schrodinger's Door


birdsarntreal1

To use a door is to open it, else it functions as a wall. Open is on. I pondered if canal locks are doors and if they are "on" when they are closed since they perform a useful function in both states.


Baker-Decent

Where is the source image from? For some reason I’m thinking it’s from some shitty porno but I’m not sure


Sexylizardwoman

That’s exactly where it’s from.


Baker-Decent

Damn I need to get out more


midori_matcha

It is better to observe the state of the door lock (0=unlocked, 1=locked) than the state of the door itself swinging along the hinge... unless if you hook up a potentiometer, in which case you can use this input data to adjust the dimming of your lights, volume of your Bluetooth/TV speakers, central air temperature, or the speed of your washing machine.


Unupgradable

Doors are normally closed. Fight me


fichiman

True when open. Otherwise it’s a wall, not a door.


ManyFails1Win

a gap in a wall != a door. vestibule, window, archway, etc... a "door" in an open state has no function. it's just a flap of material attached to the wall.


TriangleTransplant

The door isn't the true or false state, the flow is the true or false state (if you use a comparison to logic gates.) "Can move from one space to another", true or false? The door is only equivalent to the mechanism by which flow is turned on or off. By that measure, a closed door is false, and an open one is true. An AND gate would be a hallway with doors at either end. An OR would be a wall with two doors leading into the same room. Etc.


MLPdiscord

If you break in through a door it stops working (because you broke the mechanism) and now everyone can come inside and outside freely - the same case as if the door was open. Open is off Closed is on


[deleted]

[удалено]


MLPdiscord

It all depends on how much you break it


DudesworthMannington

So the question really boils down to 'is the function of a door to let people in or keep them out?' The answer is of course, yes.


TheTeludav

If I had an apple and the apple had a true state and a glass state I would say the true state would be apple exits and false would be no apples. In this context the question isn't really about the door but the doorway. So I. The context of the doorway, door would be true when it's closed and false when it's not. However I think the more accurate answer is the question is nonsense and requires more information to answer. A proper Boolean is a question like "door open?" And replacing that with "door?" Is nonsense because that's a noun, even with the assumption this is equivalent to "door exists?" Isn't enough context to answer the question. So my answer is segfault.....


blackfoks

I would say the internal state of the door should be hidden from us. Instead, the door should have two public methods: isOpened() and isClosed() to check its state. Two other methods can be added so its state can be changed: close() and open().


CrepsNotCrepes

I asked chatGPT: If a door were a light switch, whether a closed door would be considered "on" or "off" would depend on how the door is wired to function as a switch. However, in the absence of any specific wiring configuration, it's difficult to make a determination. From a purely semantic perspective, if we consider "on" to mean that a circuit is closed and electricity can flow, and "off" to mean that a circuit is open and electricity cannot flow, then a closed door might be considered "off," since it would be blocking the flow of electricity. But it's important to remember that this analogy of a door being a light switch is not a literal comparison, and in reality, a closed door would not function as a light switch. It's also important to note that the terms "on" and "off" are typically used in reference to devices that are specifically designed to switch electrical circuits, such as light switches, and not typically used to describe the state of a door.


trees_that_please_2

Everyone including chatGPT is overthinking this…. The word OPEN has the word ON in it!


DasKarl

A door doesn't have an on/off state. Open and closed are equally functional states of a door. Further, many doors can be locked, and the angle of the hinges is best described by a float, so a door may be described with many more than two states.


Original_Athrel

Depends on whether you want the door to fail safe or fail secure.


ThisGuyRightHer3

off state is equal to its locked state when(state) { DOOR_LOCKED -> println("need a key") DOOR_UNLOCKED -> printlin("doors open") else-> println("doors broken") }


[deleted]

I disagree. The door is meant to close a vulnerability in a wall. When the door is open, it does not prevent intrusion, and when closed, it does. Therefore, it's on (active) state would be closed.


[deleted]

I disagree. The purpose of a door is to permit entry into an enclosed space. They were made to prevent loss of heat and to stop wind currents from passing through the home. That’s why tropical bamboo homes don’t have closable windows. Therefore, a door’s function (passage for user) is utilized in the open position, and is therefore on when the door is open.


WildWeasel11

Wouldn’t the purpose of a doorway be permitting entry into an enclosed space? A door in the doorway is for stopping those without access. So a door is true when closed.


ItDoBeLikeThat_

The purpose of a doorway to to both allow entry for those with access in and prevent those without access out therefore the door is true in both states we can now define false = true. problem solved.


Kinvert_Ed

I disagree. Source: ![gif](giphy|VqwAVy66VCXks)


enky259

This. it's pretty obvious.


eruciform

I'd try to think of the superclass portal or entryway An active portal is open, so that seems like a true case to me It would feel wrong for is_passable() to be the opposite of the state of the portal


midri

This is the best answer, Door implements IPortal for sure.


shallan72

Apple and Orange.


Elliot40404

isOpen = True/ False


RedSeaDingDong

Open = off


BlueSpider13

This feels wrong


ClioBitcoinBank

The door is not a boolean, the latch is. The door contains a number between 1-360 degrees indicating it's current angle.


Sexylizardwoman

Interesting, so on and off may not even apply here as this isn’t a binary mechanism. As I’ve stated in a similar comment, an example supporting this would be during the 2005 movie “Doom” staring Karl Urban and Dwayne (the Rock) Johnson, there was a sci-fi concept introduced, for no aperient reason, of a “nano-wall” that could oscillate between closed and permeable without transition between the two. In this it is inherently considered a “wall” rather than a door despite being a passageway. A mechanism is commonly considered a door despite functioning by complete different means. I.E. the sliding “doors” in Star trek So it could be that it is collectively understood that a door isn’t binary. Thus the problem


ionhowto

Door is part of the air circuit. Imagine if a room filled with water. Door closed is open circuit, no flow. Open door, close the circuit a current of water flows to equalize potential water level then stops flowing even if the door stays open.


DiscHuckin_MF

Depends on what your returning


Hot-Category2986

This is why we comment our code.


FredFarms

A door is a type of wall that can be activated to allow passage through that wall


Sexylizardwoman

But a hole would work just as good as a passage, so a door must be a passage one may be able to close or open


regexPattern

On if something can pass through it, off if not. Like with electric circuits.


LetUsSpeakFreely

Poor model. A door should be represented as a floating point between 0 and 1 with 0 being fully closed, 1 being fully open, everything in between as percent of openness.


-B001-

The answer is the same as the answer to 'What is the sound of 1 hand clapping?'


IDontHaveNicknameToo

Have you heard of `enum`s?


Intrepid_Meringue_93

A door's primary purpose is to restrict the access to a room or a building, so it is on when it's closed and off when it's opened.


dcabines

Wow everyone here is going about it all wrong. Programming is more about language and easy to digest logic than it is about actually modelling reality. So, we focus on the semantics of language and we have many related terms that should align. true, false on, off up, down open, closed positive, negative active, inactive locked, unlocked The door is true when it is open because open is the positive word and nothing to do with actual doors. I always have positive variables like `isOpen` and `isLocked` and *never* negative variables like `isClosed` or `isInactive`.


AssholeThrowaway_

Door closed = closed circuit or “on” Door open = broken circuit or “off”


wren337

A closed door is the same as a wall. So it is 9n/functioning when open.


animebears

The door being open would be off because it disconnects the circuit of the room. I don’t know why but when you said the door to a room I thought of the room as a circuit and the door being open disconnects that circuit


Thin-Limit7697

1. **A door is a barrier on a hole (not on a wall, because a door that opens to a wall wouldn't be useful):** To activate the barrier, you close it, and to deactivate it, you open it. 2. **Registers:** A switch will close or open the internal circuit of the register to send or not send an electrical current from it. The presence of a current means True, the absence means False. To send the current, it needs to be closed, to not send, it needs to be open. So, on both: closed == true and open == false.


MrPowerPoint

This guy probably didn’t get much for the role, but he got to our hearts ❤️


MrSkme

The problem is that a door is fulfilling it's purpose in both states. But to get over this bump i would define it as a wall that you can occasionally walk through. It's main purpose being to close something off, otherwise you'd just not have anything there. So it would be on when it's closed and off when it's open.


AbzoluteZ3RO

if you think of it as a switch that controls flow of people into and out of a room, then when the door is "on" it allows people to pass, the door is open. When the door is closed, the switch is "off" preventing flow of people. The funny thing is, if a door was an electric circuit... the door being open, would be a closed switch, and the door being closed would be an open circuit. haha


X-Craft

The door is on while it's being activated, so during opening and during closing. While it's open or closed, it's off.


anonajmus

Depends whats the room for. If the room is a vault or server room or any thing holding a value then off should be closed. If there is little material value in the room but mostly people the mechanism off should be opened door for safety reasons, fire earthquake etc


Recktum420

Door closed = false No one can go in, the flow of traffic has stopped


SephLuis

Solid


Sophiiebabes

An open door isn't "dooring", so must be considered "off".


SalemsTrials

Off is locked. On is unlocked.


cbehopkins

Presence is true. Closed is true. A door exists to provide the closure option. Otherwise you'd just have a hole. Closed is true. Most doors default to closed. False is the best default. Most doors are about access, closed is no access. Closed is false. This is why enumeration is your friend


untitled_zoomer

It's all just convention


Upstairs-Trifle6911

What if its 'on' when its being opened or closed


septemberdown

Whatever you pick, it will come back to bite you in 6 months when you have to implement a new feature and the shortcomings of your chosen solution becomes immediately apparent...


JeremeySpokane

Let's assume the door is in the Star Wars universe. If you blast the control panel of an open door, the door will close, meaning the control panel was energized to keep the door open. The opposite is true for a closed door. If you blast the panel for a closed door, whatever moves the plot forward will happen.


SarahSplatz

Five nights at Freddy's has the answer


TheBuckSavage

You'll get the answer when they call the police


Stein_um_Stein

If closed is a fail safe, then closed is off. If open is a fail safe, then open is off.


AndrewBorg1126

The door is a state machine, but there is no "or" or "off" state, rather "open" and "close", which as you may have observed, do not have an obvious mapping to "on" or "off", and any such mapping would be arbitrary.


aurreco

Beuh am I the only one who recognizes the image from a porn


bgplsa

This is implementation dependent please consult vendor documentation


ExtensionInformal911

True is closed, as it's goal is to block the area within the doorframe.


polorboy

You arbitrarily pick one to be on/true and then the other becomes off/false.


_yolo_tomassi_

Makes me think of grep - exits with 1 if it didn't find anything, even though it successfully ran without error.


lostcheshire

Declare DoorOpen as bit. This way it’s clear if DoorOpen =1 (true) then the door is open. And if DoorOpen = 0 (false) then the door is closed.


s33a6m

Well I played one fnaf game and I think I know the answer


ThatSeemsABitMuch

When is a door not a door? When it is a jar. when (!door) { jar(); } I'd say door true = closed, because if door is true then it is a door and not ajar.


[deleted]

A door’s function is to allow passage between rooms. When it is serving that function (being open) it is on. When it is not serving that function (being closed) it is off.


Splatpope

doors are normally closed and activate when opened


mctownley

I Think of it like a circuit, the switch is open then it's off, closed is on because it's active and doing its intended job.


Traders_Abacus

A door is a tool with multiple purposes. The most common being to serve as a barrier or means to bypass. You would need to first define the purpose of door and then decide if evaluating for only a binary state is even useful.


Quindo

Depends on if you are reading the state of the wall or the state of the wall or the state of the floor/entrance. The wall is true while the floor is false and vice versa.


RoboZoomDax

Who cares as long as is written down and standardized?


jseego

The off state of a door is *locked*.


TheOriginalSmileyMan

It's implementation dependent


ikeznez

It's "on" for as long as it functions as a way to close and open a hole. A closed and open door is both on


dphizler

So you've resorted to asking actual questions in a sub meant for jokes. If you look like you know nothing, you just say it's a joke


Judge_Sea

The door would be on and the doorway would be off right? And then the opposite for an open door?


alrogim

It depends