Page MenuHomeFeedback Tracker

disableRemoteSensor confusing double negation
New, WishlistPublic

Description

Should be called "enableRemoteSensor", so that when setting it to "false" you will not get a double negation, aka "not disabled" = "not not enabled". Double negation is very bad practice and should be avoided wherever possible!

Details

Legacy ID
2511316632
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Event Timeline

galzohar edited Steps To Reproduce. (Show Details)Sep 8 2015, 10:05 PM
galzohar set Category to Scripting.
galzohar set Reproducibility to Always.
galzohar set Severity to None.
galzohar set Resolution to Open.
galzohar set Legacy ID to 2511316632.May 8 2016, 12:40 PM

I agree with the sentiment, although it's a little problematic since they start off enabled. Though I guess the same is true for enableFatigue and allowDamage. Voted up.

I also think getRemoteSensorsDisabled should just be remoteSensorsDisabled (or enabled if the other command name is changed)

While still on dev it is not too late to change it to

enableRemoteSensors

and

remoteSensorsEnabled

to make it consistent with the rest of the commands

Default doesn't matter. Like you said, it's same as allowDamage and enableFatigue which are default on. Double negation is just outright bad idea.

Curious to know why the reason 2 people have voted this down? It's not exactly a hot topic so the votes themselves aren't obvious. Do you disagree with consistency?