How to & How not to
Maël Nison, @arcanis
- Require.js (Almond ?)
- Cat *.js > output.js
- No dependencies !
- Could worth a talk by itself
- Where does the user expects to find components ?
- Always consider the Demeter Law
- "Is it pretty" is a bad question
- "Is it flexible enough" is a good one
- Will your users understand ?
- Don't assume anything
- Usually nice, and always fun to code ... but beware
- Two kind of magic : implementation details and Waza
Some no-no :
- Checking callback argument count
- Defining getters with side-effects
- ... Anything which cannot be deduced
- More important that you could think
- The best JS documentation is the source code
- You no longer write for your eyes
- Be consistent although flexible : readability comes first
Take it with
a pinch of salt !
(also, my new side-project)