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
BidiAgent と Nova 2 Sonic から考える音声 AI について
yama3133
2
100
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
5
2.2k
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
170
Agent Skillsがハーネスの垣根を超える日
gotalab555
6
4.6k
20251222_サンフランシスコサバイバル術
ponponmikankan
2
140
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
490
Knowledge Work の AI Backend
kworkdev
PRO
0
290
Redshift認可、アップデートでどう変わった?
handy
1
100
7,000万ユーザーの信頼を守る「TimeTree」のオブザーバビリティ実践 ( Datadog Live Tokyo )
bell033
1
100
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
400
AI with TiDD
shiraji
1
310
Bedrock AgentCore Memoryの新機能 (Episode) を試してみた / try Bedrock AgentCore Memory Episodic functionarity
hoshi7_n
2
2k
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
Into the Great Unknown - MozCon
thekraken
40
2.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
760
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
37
Paper Plane
katiecoart
PRO
0
44k
Speed Design
sergeychernyshev
33
1.4k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
32
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Building an army of robots
kneath
306
46k
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