CapitolJS Conference 2011 Schedule and Overview
Table of Contents
- 1. Overview
- 2. Schedule
- 2.1. 9:15 AM Douglas Crockford: JavaScript and the Brain
- 2.1.1. Language requires precision
- 2.1.2. Why jslint
- 2.1.3. Reiteration of fall-through
- 2.1.4. Canonization reqiures clarity
- 2.1.5. No space before ( with invocation
- 2.1.6. Don't use forms that can't be distinguished from errors
- 2.1.7. Don't use complicated features when simplier will do
- 2.1.8. Make your programs look like what you do
- 2.1.9. Write in the language you're writing in
- 2.1.10. ++ is hardly optimal when looking at += 1
- 2.1.11. var a = b = 0
- 2.1.12. Style demands you don't use all
- 2.1.13. CoffeeScript
- 2.1.14. Why do language designers add bad parts
- 2.2. 9:45 AM Ben Combee: webOS
- 2.3. 10:30 AM Nicholas Zakas: High Performance JavaScript
- 2.3.1. UI Thread
- 2.3.2. No single JavaScript job should
- 2.3.3. Don't interrupt UI updates with script calls
- 2.3.4. <script defer src=''>
- 2.3.5. <script async src=''>
- 2.3.6. Technique 1: Split execution setTimeout
- 2.3.7. Technique 2: Script Yeilding
- 2.3.8. Technique 3: Web Workers
- 2.3.9. Repsonsive: small UI, small JS, small UI…
- 2.3.10. Handling document.write after page load
- 2.3.11. Recommendation: look at WebKit source
- 2.4. 11:00 AM Mikeal Rogers: node.js module tour
- 2.5. 11:45 AM Jed Schmidt: Code Golf
- 2.6. 1:00 PM Mike Taylor: Event Protocols
- 2.7. 1:30 PM Rebecca Murphey: Mulberry
- 2.8. 2:15 PM Alex Sexton:
- 2.9. 3:15 PM Joe McCann: Improving HTML5 Development with Node
- 2.10. 4:30 PM Pamela Fox: Client-Side APIs
- 2.11. 4:30 PM Progressive Mobile
- 2.12. 5:00 PM Brendan Eich
- 2.12.1. ES6
- 2.12.2. Still have arguments
- 2.12.3. Proxies in V8
- 2.12.4. Membranes
- 2.12.5. Iterators and generators
- 2.12.6. Yeild:*
- 2.12.7. Shallow continuations
- 2.12.8. Need to see a yeild to see if continuation
- 2.12.9. Typed arrays
- 2.12.10. Quasi-literals: supported by back-ticks
- 2.12.11. Functions might only have block labda eval
- 2.12.12. TC39 is a steward for the standard
- 2.13. 7:00 PM Zappos' Closing Party
- 2.1. 9:15 AM Douglas Crockford: JavaScript and the Brain
1. Overview
2. Schedule
2.1. 9:15 AM Douglas Crockford: JavaScript and the Brain
2.1.1. Language requires precision
2.1.2. Why jslint
2.1.3. Reiteration of fall-through
2.1.4. Canonization reqiures clarity
Example: canonization of the bible with constantine required introduction of punctuation and spacing.
2.1.10. ++ is hardly optimal when looking at += 1
x++ vs. ++x ; pre-post increment difference forces a code reviewer to go back and check all code from the author.
2.1.11. var a = b = 0
This actually become a global issue:
b = 0; var a = b;
Example:
function multAssign() { var a = b = 0; console.log('a' + a); console.log('b' + b) } ; multAssign(); console.log('b' + b)
2.1.12. Style demands you don't use all
2.1.13. CoffeeScript
Wished that JavaScript looked more like CoffeeScript but debugging code
2.1.14. Why do language designers add bad parts
Language is an experiment…
JavaScripts combination of lambdas and prototypes worked well.
Not all worked well.
2.2. 9:45 AM Ben Combee: webOS
2.2.1. Architectural discussion
WebKit, Node.js Service Runtime, webOS Services
2.2.2. Enyo
Thisi s for full page applictions. js over html.
2.2.3. Node.js
Used as part of the service bus.
2.3. 10:30 AM Nicholas Zakas: High Performance JavaScript
2.3.1. UI Thread
Paint operations are queued since there could be a number of UI changes queued from the event.
2.3.2. No single JavaScript job should
Per Nielson: .1s is the limit to a user sense of instantaneous.
2.3.3. Don't interrupt UI updates with script calls
Download doesn't block with dynamic load for document.createElement.
2.3.4. <script defer src=''>
Avoid slow load: dynamically, deferred, asycn
Downloaded but not run until all UI is completed.
2.3.5. <script async src=''>
Runs as soon as possible. Order isn't preserved (by design).
2.3.6. Technique 1: Split execution setTimeout
todo = items.concat(); start = +new Date()
2.3.7. Technique 2: Script Yeilding
process.nextTick()
msSetImmediate: // MSIE 10 setImmediate(function(0 {
});
https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html
2.3.8. Technique 3: Web Workers
2.3.10. Handling document.write after page load
Overwrite document.write to handle load…
2.4. 11:00 AM Mikeal Rogers: node.js module tour
2.4.1. Node core doesn't have all features you might reasonably want
This falls to external libraries
2.4.3. npm utilies
% npm explore request 0 master[2708668] 11:10:53
Exploring usr/local/lib/node.npm/request/active/package Type 'exit' or ^D when finished
2.4.4. npm libraries
underscore 216 coffee-script 175 request 141 express 141 connect 130 optimist 127 colors 90 uglify-js 85 socket.io 85 redis 76
2.4.5. optimist
https://github.com/substack/node-optimist
Mentioned as the best options parser.
----------–— 1.js var optimist = require('optimist'); console.log(optimist.argv); ----------–— 1.js
$ node 1.js asdfasdfasd asdf asdf { _: [ 'asdfasdfasd', 'asdf', 'asdf' ], '$0': 'node ./1.js' }
2.4.6. request
Advanced HTTP client.
request.pipe() is a core feature.