Skip to content

Instantly share code, notes, and snippets.

@manjula-dube
Forked from threepointone/alternative.md
Created January 26, 2017 14:35
Show Gist options
  • Save manjula-dube/52bc15f23b442b69849eca6ef9dcae4c to your computer and use it in GitHub Desktop.
Save manjula-dube/52bc15f23b442b69849eca6ef9dcae4c to your computer and use it in GitHub Desktop.
list of things that don't do what they say they do

(also know as lies and/or alternative facts)

js

  • setImmediate - doesn't set anything immediately, waits for a tick before executing
  • setTimeout(fn, n) - never sets the timeout to exactly n
  • Math.random() - computers cannot generate random numbers
  • Promise - is a lie when rejected
  • Array.reduce - accumulates, does not reduce (via @sbmadhav)
  • const - isn't constant, can be mutated (via adamwknox)
  • typeof NaN === 'number' 🙄 (via @delapouite)
  • continue - stops execution of current block (via @vdanchenkov)

react

  • setState - doesn't set, but enqueues a state change
  • createElement - creates a description of the actual element
  • instance::render() - doesn't actually render
  • componentWillMount - component might not mount
  • react (!) - doesn't react immediately, schedules changes instead

misc

  • babel - speaks only one language (though understands many)
  • rxjs - rx implies prescription, not subscription
  • javascript - isn't a scripting language for java, or related to java in any way.
  • isomorphic - is a word used to compare two different, but similar structures; not to say that one structure works in multiple places (via @gaearon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment