Timeline for Developer insists if statements shouldn't have negated conditions, and should always have an else block
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 14, 2017 at 11:21 | comment | added | Peter M | @Sanchises The statements are not contradictory as you have taken them out of context. The first statements is in the context that two opposing binary measurements of a ternary state can not be interchanged via binary negation. The second statement is in the context that only partial knowledge of a ternary state may be sufficient for an application to correctly work. As for the doors, the OPs question referenced doors being open and closed. I am just pointing out an obvious assumption that can influence the how data is treated. | |
| Jun 14, 2017 at 8:41 | comment | added | Sanchises | "From my point of view the assumption is being made here that the door state is a binary state when in fact it is at least a ternary state:" and "You enable the operation of the oven based on the door being closed or not closed. You do not care how open the door is." contradict each other. Also, I don't think the question is about doors and sensors at all. | |
| Jun 13, 2017 at 17:36 | history | edited | Peter M | CC BY-SA 3.0 | deleted 2 characters in body |
| Jun 13, 2017 at 17:31 | history | answered | Peter M | CC BY-SA 3.0 |