Funny
EN
Representative Line: Honorable Conjunctions
['Remy Porter']
The Daily WTF
(user?.betaMode || !user?.betaMode) && (specialRuleCode())My suspicion is at some point, the specialRuleCode was only supposed to run if the user was signed up for beta features.
At some point, it left beta and was supposed to run for all users.
I imagine the requirement was "it should also run if the user is not in the beta," and thus it was implemented exactly that way.
user?.betaMode && specialRuleCode is so much more concise than an if statement!"
It makes me think the original line started in-house by a "clever" developer, and the third party added the || portion in just the dumbest way to implement the requirement given to them.