Slide 1

Slide 1 text

Treating JavaScript Like a Real Language Or: What Zelda taught me about Front End Engineering

Slide 2

Slide 2 text

Matt Steele •@mattdsteele •http://matthew-steele.com

Slide 3

Slide 3 text

JavaScript is Fraught With Peril

Slide 4

Slide 4 text

Anti-Patterns Everywhere

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

The browser is the most hostile software engineering environment imaginable. - Douglas Crockford

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Its famous difficulty demanded so much, not just from my hands but from my entire ragged nervous system, even from my temper, my character. It never explained itself and so conjured, via ingenious online components, a community as helpful and treacherous as any group of humans. Tevis Thompson http://tevisthompson.com/saving-zelda/

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

To win at JavaScript, we have to treat it like a real language.

Slide 13

Slide 13 text

Learn the language Use appropriate tooling Unit test Use build tools

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Learn the Language

Slide 16

Slide 16 text

“JavaScript is the only language that I’m aware of that people feel they don’t need to learn before they start using it.” Douglas Crockford

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

js-assessment

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Code Katas

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Tools

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

As an engineer, there is a short list of tools that you must be rabid about. Rabid. Foaming at the mouth crazy. Rands http://www.randsinrepose.com/archives/2009/11/02/ the_foamy_rules_for_rabid_tools.html

Slide 26

Slide 26 text

Learn your editor

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Emmet (zen coding)

Slide 29

Slide 29 text

Arguments over style are pointless. There should be a style guide, and you should follow it. Rebecca Murphy https://github.com/rwldrn/idiomatic.js/

Slide 30

Slide 30 text

“use strict”;

Slide 31

Slide 31 text

;

Slide 32

Slide 32 text

jsHint Your First Unit Test

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

http://nicknisi.com/blog/blog/2012/11/12/lint-javascript-on-commit/

Slide 35

Slide 35 text

Watch other people’s workflow

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Testing

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

⌘+R

Slide 40

Slide 40 text

Lincoln

Slide 41

Slide 41 text

Omaha

Slide 42

Slide 42 text

Jasmine

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Use a Build Tool

Slide 47

Slide 47 text

•Run tests •Apply linting •Concatenate & Minify •Compile •Remove debugging statements •Precompile templates

Slide 48

Slide 48 text

http://gruntjs.com/

Slide 49

Slide 49 text

•CSS linting •Compress images •auto-watching •Create documentation •Download & maintain dependencies

Slide 50

Slide 50 text

http://yeoman.io/

Slide 51

Slide 51 text

http://jenkins-ci.org Continuous Integration

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

CoffeeScript