Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
JavaScript Playbook
Search
Zach
May 22, 2014
Technology
0
97
JavaScript Playbook
Zach
May 22, 2014
Tweet
Share
More Decks by Zach
See All by Zach
You're Not Special Kalx14
theotherzach
0
61
Test Drive a Browser Game With AngularJS
theotherzach
0
310
Lineman.js - Chicago Node.js Package Show & Tell
theotherzach
0
55
Nobody Will Train You But You
theotherzach
1
310
Other Decks in Technology
See All in Technology
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
710
Amplify 🩷 Bedrock 〜生成AI入門〜
minorun365
PRO
8
410
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
330
どうするコスト最適化のトレードオフ
tetsuyaooooo
1
710
競技としてのKaggle、役に立つKaggle
yu4u
6
2.3k
.NET Profiler in 2024.
kkamegawa
2
950
Azure犬駆動開発の記録/GlobalAzureFukuoka2024_20240420
nina01
1
240
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
500
Gradle Build Scanを使ってビルドのことを知ろう potatotips #87
tomorrowkey
2
150
MixIT 2024 - Pulumi : Gérer son infra avec son langage de programmation préféré
ju_hnny5
1
120
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
150
Microsoft for Startups Founders Hub_20240429 update
daikikanemitsu
1
2.4k
Featured
See All Featured
Done Done
chrislema
178
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
It's Worth the Effort
3n
180
27k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
222
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
12
1.5k
Six Lessons from altMBA
skipperchong
22
3k
Code Review Best Practice
trishagee
56
15k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Into the Great Unknown - MozCon
thekraken
14
1k
Transcript
JavaScript Playbook
testdouble.com @TheOtherZach
[email protected]
Who We Code For
3 Masters
User Our Code Needs To Solve Somebody’s Problem
Machine Our Code Needs To Execute Efficiently
Maintainer Future Programmers Must Be Able To Extend And Fix
Our Code
Maintainable code is readable and flexible.
Flexible
“I think we’re in trouble. I don’t think we have
the foggiest idea how to compute very well.” - Dr. Gerald Sussman
Why is maintenance so expensive?
The changeability of your code is unknowable until the change
happens.
But we can make bets.
Modular
Dependencies
Libraries / Frameworks
Your Code
Shared & Mutable State
I/O
Knowledge
Every Dependency Increases Rigidity
Tests Sometimes Enforce Modularity
Anybody Who Tells You They Have This Figured Out Is
Selling Something
Summary: ! flexibility is a function of modularity
Readable
class WestSideStory extends RomeoAndJuliet
The readability of your code is unknowable until the reading
happens.
But we can make bets.
Contextual Overhead
Consistency
Chunk Size
Libraries
Ninja Code
Code is often a pleasure to write. Make Yours Fun
To Read
Summary: ! Optimize For Reading, Not Writing
@TheOtherZach’s Specific Advice
Concat & Min in Production
We Configured Grunt For You: ! Lineman.js ! You’re Welcome
Skip Require.js
Bower < cURL
Style Guide or (Coffee|Clojure|Type)Script
Linting or (Coffee|Clojure|Type)Script
Use Ember for client routing
Learn Angular
Use Your Favorite Backend
jQuery Plugins Are Black Boxes
Learning to test ! will make you better
Invent Your Own Best Practices
testdouble.com @TheOtherZach
[email protected]