Presented at WaffleJS meetup. Jan 10, 2018. San Francisco.
Ever encounter some code that looks like new Slider(true /*horizontal*/)? Perhaps you are confused by the semantics exhibited by setState(true, false)? Did you get a headache when trying to unpack double negatives as in filter.caseInsensitive = false? These are typical API blunders often denoted as Boolean Traps. Learn how to recognize such a mistake and also more importantly, how to prevent it from happening!