Know Your History
Brit Butler
2014/11/12
Brit Butler
2014/11/12
This talk will be a little different...
Know Your Damn History
Let's go back to September '95...
Search engines aren't a thing.
Geocities and AOL still exist.
SSL was invented that February.
No browsers support CSS (1.0) yet.
Web pages can't do anything interesting yet.
Netscape asks Brendan Eich to write Javascript. Why?
Make webpages suck less by adding dynamic behavior.
Current alternative was Java applets. Blech.
Brendan writes the language and its called 'Livescript'.
Marketing christens it 'Javascript' later. Demands syntax changes.
As you may know, I wrote javascript in ten days.
...
The part that is good is not original, and the part that is original is not good.
- 2008, Brendan Eich, Popularity
Engine prototype took ten days in May.
...
The rest of the year was browser integration, mainly what became known as “DOM level 0″...
Sentence fragments here show my PTSD from that sprint. :-/
- 2011, Brendan Eich, New JS Engine Module Owner
Even Javascript is just another program.
This sounds trite but has profound implications.
Which we'll get into in the third section of this talk.
The Best Tech Doesn't Matter
Requirements Will Change
'Can you make it look more like Java?'
How do we control the damage?
Technical Debt is very real.
We all live with it.
So let's talk about Technical Debt.
Wait until you can look at code you wrote 6 months ago.
You will be working on old code more often than writing new code.
This is both blessing and curse.
Some days bugfixing is really nice.
But often, we have to understand the assumptions embedded in code.
Why do changes to one piece of code break things elsewhere?
-- Alan Perlis, Epigrams on Programming
Programs Don't Compose. Even if James says otherwise.
Certainly functions can compose, especially pure ones.
But modules and programs don't, generally speaking.
We can't put photoshop and an audio editor together and get a video editor.
Building larger programs out of a group of small, understandable pieces is what things like recursion and functional programming are built for.
The world isn't like that anymore.
This makes me kind of sad.
Old curriculum was for a world that built things from scratch.
New curriculum is for a world that's all about reuse.
We've really never slowed down since the dot com boom.
But there is good news...
You can understand how computers work!
How CPUs Work
PS: I Love emulation.
See also: JSNES
How PLs Work
Okay, technically a little more complicated. (read: lots)
Most JS implementations are JIT-compiled which is a sort of hybrid technique.
Can talk about this a lot more if folks are interested.
cl-6502 can be thought of as an interpreter for assembly language.
Very dumb/naive though. No AST. No rewriting.
A Magic Trick For Your Entertainment
How do you create arrays in a language with nothing but lexical scoping and first-class functions?
- Stolen from SICP, Chapter 2, Problem 4