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
Terraform Cloudで始めるおひとりさまOrganizationsのすゝめ
handy
2
210
Microsoft の SSE の現在地
skmkzyk
0
240
3月のAWSアップデートを5分間でざっくりと!
kubomasataka
0
140
OPENLOGI Company Profile
hr01
0
63k
Aspire をカスタマイズしよう & Aspire 9.2
nenonaninu
0
320
CodePipelineのアクション統合から学ぶAWS CDKの抽象化技術 / codepipeline-actions-cdk-abstraction
gotok365
5
330
GraphQLを活用したリアーキテクチャに対応するSLI/Oの再設計
coconala_engineer
0
130
watsonx.data上のベクトル・データベース Milvusを見てみよう/20250418-milvus-dojo
mayumihirano
0
180
OpenLane-V2ベンチマークと代表的な手法
kzykmyzw
0
130
バクラクの認証基盤の成長と現在地 / bakuraku-authn-platform
convto
4
840
Web Intelligence and Visual Media Analytics
weblyzard
PRO
1
5.9k
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
130
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Faster Mobile Websites
deanohume
306
31k
A Tale of Four Properties
chriscoyier
158
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
BBQ
matthewcrist
88
9.6k
The Pragmatic Product Professional
lauravandoore
33
6.6k
Side Projects
sachag
453
42k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.3k
Facilitating Awesome Meetings
lara
54
6.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
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