Know Your History

Brit Butler


This talk will be a little different...

3 Core Points and an overarching theme...

Know Your Damn History

Whence the Web?

Whence the Web?

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.

Whence the Web?

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.

Whence the Web?

What might Brendan have said about JS in 2008?

Whence the Web?

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

Whence the Web?

What can we take away from that?

Whence the Web?

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.

Whence the Web?

The Best Tech Doesn't Matter

Whence the Web?

Requirements Will Change

'Can you make it look more like Java?'

How do we control the damage?

Whence the Web?

Technical Debt is very real.

We all live with it.

We're Programmer Archaeologists

So let's talk about Technical Debt.

We're Programmer Archaeologists

Wait until you can look at code you wrote 6 months ago.

We're Programmer Archaeologists

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.

We're Programmer Archaeologists

Why do changes to one piece of code break things elsewhere?

We're Programmer Archaeologists

Every program is part of some other program and rarely fits.

-- Alan Perlis, Epigrams on Programming

We're Programmer Archaeologists

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.

We're Programmer Archaeologists

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.

- Gerald Sussman, 2009

We're Programmer Archaeologists

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...

There Is No Magic

You can understand how computers work!

There Is No Magic

How CPUs Work

  1. Read a variable (technically a 'register') called the program counter.

  2. Program Counter holds the location of the code to run next.

  3. Run that code. That code updates the program counter.

  4. Start over from the top. Do this forever.

There Is No Magic

Case Study - cl-6502/famiclom

PS: I Love emulation.

See also: JSNES

There Is No Magic

How PLs Work

  1. Compiled: Translate language X into language Y that something else can run.
  2. Interpreted: Read Language X line by line and execute it directly.

Okay, technically a little more complicated. (read: lots)

Most JS implementations are JIT-compiled which is a sort of hybrid technique.

There Is No Magic

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.

There Is No Magic

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



Thanks y'all. <3