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
GOTOcon 2012: Taming JavaScript with Cloud9 IDE...
Search
zef
May 30, 2012
Technology
1
120
GOTOcon 2012: Taming JavaScript with Cloud9 IDE: a Tale of Tree Hugging
My talk on TreeHugger.js at GOTOcon.
zef
May 30, 2012
Tweet
Share
More Decks by zef
See All by zef
Pick Your Battles
zef
1
150
GeeCON 2012: Coding in the Cloud
zef
2
340
Other Decks in Technology
See All in Technology
Why Organizations Fail: ノーベル経済学賞「国家はなぜ衰退するのか」から考えるアジャイル組織論
kawaguti
PRO
1
120
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.8k
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
260
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
3
210
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
460
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
Agile Leadership Summit Keynote 2026
m_seki
1
650
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
1
2.9k
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
240
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
620
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
110
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
450
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
The Curious Case for Waylosing
cassininazir
0
240
Are puppies a ranking factor?
jonoalderson
1
2.7k
Unsuck your backbone
ammeep
671
58k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
71
Being A Developer After 40
akosma
91
590k
The Pragmatic Product Professional
lauravandoore
37
7.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
97
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
Building the Perfect Custom Keyboard
takai
2
690
Site-Speed That Sticks
csswizardry
13
1.1k
Transcript
Taming JavaScript with Cloud9 IDE: a Tale of Tree Hugging
Zef Hemel (@zef)
None
None
None
.js
browser.js
db.js
server.js
*.js
None
~140,000
Tooling matters
None
JavaScript Developer
None
None
None
HTML CSS JavaScript
HTML5 CSS3 JavaScript Client
HTML5 CSS3 JavaScript Client Node.js Redis Server
HTML5 CSS3 JavaScript Client Node.js Redis Server XMLHttpRequest HTML5 WebSockets
Mozilla Bespin
Mozilla Bespin Canvas
Browser Wars 2.0
DOM
Sidebar
Sidebar
Sidebar
Sidebar
Sidebar
Sidebar
Sidebar
Sidebar
JavaScript C/C++ Closure CoffeeScript Coldfusion C# CSS Groovy HTML Java
JSON LaTeX Lua Markdown OCaml Perl PHP Ruby Scad Scala SCSS SQL SVG Textile XML
None
~240,000
Component Systems Message Queues Decoupling
None
None
None
None
Tooling matters especially for JavaScript
None
Unleash the awesome power of...
tatic
program analysis
None
None
Iterating using undeclared variable
None
Warning: you are in an anonymous inner function with its
own “this” pointer
None
Did you mean “length”?
“The most important thing I have done as a programmer
in recent years is to aggressively pursue static code analysis.” John Carmack
How?
Parse Analyze
Parser Code AST
Abstract Syntax Tree a * 10 Parser Op Var Num
“*” “a” “10”
Zeon UglifyJS Narcissus Esprima language.js
performance (speed/memory) AST datastructure traversal tools
performance (speed/memory) AST datastructure traversal tools JavaScript specific
treehugger.js
“The JQuery of AST analysis.”
treehugger.js
treehugger.js Generic AST Data structure
treehugger.js Generic AST Data structure Generic Traversals
treehugger.js Generic AST Data structure Generic Traversals DSL with Pattern
Matching
treehugger.js Generic AST Data structure Generic Traversals DSL with Pattern
Matching Language- Specific Parsers
treehugger.js Generic AST Data structure Generic Traversals DSL with Pattern
Matching Language- Specific Parsers JavaScript (UglifyJS-based)
treehugger.js Generic AST Data structure Generic Traversals DSL with Pattern
Matching Language- Specific Parsers JavaScript (UglifyJS-based)
a * 10 Op Var Num “*” “a” “10”
Op("*", Var("a"), Num("10")) Op Var Num “*” “a” “10”
Op("*", Var("a"), Num("10")) ATerm Op Var Num “*” “a” “10”
Constructors Lists Strings Var(_) [_, _] "hello" Placeholders x
let’s play
What can you do with it?
Low-level tooling
None
Intelligent code completion
Complex refactoring
Cloud
Big data
What if...
Project 1 Project 2 Project 3 Project 4 Project 5
Project 6
Your (dev) environment matters use static analysis tools
http://c9.io @zef http://github.com/ajaxorg/treehugger