DYNAMIC LANGUAGES ARE MESSY.1.
COMING TO TERMS
Combine the normal pitfalls with
!
• Immature IDEs and tooling
• Wildly variable module styles
• Best practices that vary monthly
• Similar yet vastly different ecosystems
THE TALENT POOL IS NUTS.2.
COMING TO TERMS
Web Platform Engineers
jQuery Experts
Made a menu fade in once
async wat?
PROGRESS IS STAGGERING.3.
COMING TO TERMS
It’s hard to keep up.
!
Everyone has an opinion.
!
The future doesn’t get here all at once.
REFACTORING JAVASCRIPT IS NOT EASY.4.
COMING TO TERMS
Callback hell is more than just deep nesting.
!
IDEs can’t help much yet.
!
Flexibility is more important here than anywhere.
THE WEB IS HARD!5.
COMING TO TERMS
Web applications are not solved.
!
Even the giants pivot and backtrack.
!
So many solutions just don’t exist yet.
‣ Indentation style
‣ Line length
‣ Quote styles
‣ Naming conventions
‣ Curly brace placement
‣ Directory structure
‣ Everything
GET EVERYONE TOGETHER
ENFORCE
‣ Use community tools
‣ Grunt
‣ Gulp
‣ JSHint
‣ etc
‣ Warnings === errors
‣ Make it hard to be
wrong
DOCUMENT
‣ Treat docs as code
‣ Make it
‣ easy to find
‣ easy to read
‣ easy to update
‣ easy to discuss
‣ Use github!
AGREE
RESPECT
THE COMMUNITY
>90% use last comma
http://sideeffect.kr/popularconvention/#javascript
>80% indent with spaces
>55% use single quotes
https://github.com/Seravo/js-winning-style
https://github.com/rwaldron/idiomatic.js/
Research public style guides
CODE IS NOT JUST LOGIC.
CODE IS AN API.
TREAT IT LIKE ONE.
Recap
PERSEVERANCE
The web has unique value,
it’s not a cheap alternative to native apps.
Embrace the web and JavaScript as your platform.
Create new tools. Automate & visualize everything.
ACCEPTANCE
HONESTY