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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
AWS Network Firewall Proxyを触ってみた
nagisa53
1
240
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
360
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
0
110
Tebiki Engineering Team Deck
tebiki
0
24k
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
650
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
17k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
120
Agent Skils
dip_tech
PRO
0
120
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
Featured
See All Featured
New Earth Scene 8
popppiees
1
1.5k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
Everyday Curiosity
cassininazir
0
130
Tell your own story through comics
letsgokoyo
1
810
The Pragmatic Product Professional
lauravandoore
37
7.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
A Tale of Four Properties
chriscoyier
162
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Optimizing for Happiness
mojombo
379
71k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
What does AI have to do with Human Rights?
axbom
PRO
0
2k
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