es6 katas - talk given at enterjs

62
Learn ES6 by making failing tests pass ECMAScript 2015

Upload: wolframkriesing

Post on 12-Apr-2017

354 views

Category:

Technology


6 download

TRANSCRIPT

Learn ES6

by making failing tests pass

ECMAScript 2015

ES6Katas.org

@WolframKriesing

Making of

const keyword, block scope

destructuring, array

arrow functions

destructuring, object

template strings

default value

passion

{ what: „ready to use TDD env“,

why: „practice, practice, practice“,

url: „http://TDDbin.com“, twitter: „@tddbin“}

let’s see TDDBin in action

{ what: „TDD, pairing, clean code“,

when: „every 3 months“, next: „September 2016“,

url: „http://jsCodeRetreat.com“, twitter: „@jsCodeRetreat“}

{ what: „ES6 learning by doing“,

when: „new kata every day“,

url: „http://ES6katas.org“, twitter: „@es6katas“}

https://twitter.com/oncletom/status/609461522545385472

http://www.ecma-international.org/ecma-262/6.0/

Photo by tranchis - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/25813335@N00 Created with Haiku Deck

Photo by bogdog Dan - Creative Commons Attribution-NonCommercial License https://www.flickr.com/photos/25689440@N06 Created with Haiku Deck

Photo by aquababe - Creative Commons Attribution-NonCommercial License https://www.flickr.com/photos/25138992@N00 Created with Haiku Deck

Traceur

Photo by Luz Adriana Villa A. - Creative Commons Attribution License https://www.flickr.com/photos/11599314@N00 Created with Haiku Deck

Photo by Hindrik S - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/63991153@N00 Created with Haiku Deck

Photo by droetker0912 - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/58020577@N06 Created with Haiku Deck

Sep

2014long time ago, in tech

https://github.com/uxebu/mocha-sinon-traceur-example

WHY ES6

at all?

https://gist.github.com/wolframkriesing/ab6d82024aec7068382a

ENOUGHreason

but there is looooooots more

YOUREAD

TOO?

Destructuring

Destructuring

#1 Extract value

temporarily used

Destructuring

we want this

no temporary code, yeah!!!

#2 Swap values Destructuring

✓ ✓

#3 Leading commas Destructuring

temporarily used

we want this

no temporary code, yeah!!!

✓ ✓ ✓

baby stepsproximal subgoals

http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf

TDD

#1 Extract value Destructuring

fail

#1 Extract value Destructuring

LIVEcoding

One ES6 kata a day keeps ES5 away

IMPORTS

LET’S

GO LIVE

import iPhones from 'China';

import assert from 'assert';

LIVEcoding

your learning

ES6Katas.org@WolframKriesing