View
201
Download
0
Category
Preview:
Citation preview
TDD with Google Spreadsheets
@WolframKriesing, uxebu
{who: „Wolfram Kriesing“,what: „uxebu Co-Founder“,since: „2008“,does: „web apps since 1999“,
url: „http://uxebu.com“,twitter: „@WolframKriesing“
}
{what: „ES6 learning by doing“,
when: „new kata every day“,
url: „http://ES6katas.org“,twitter: „@es6katas“
}
{what: „ready to use TDD env“,
why: „practice, practice, practice“,
url: „http://TDDbin.com“,twitter: „@tddbin“
}
{what: „TDD, pairing, clean code“,
when: „every 3 months“,next: „5th September 2015“,
url: „http://jsCodeRetreat.com“,twitter: „@jsCodeRetreat“
}
TDD?
IHADTO
ITOX!
e x p l a i n
ITOX!TO AKID
SIM PLI
CITY
…img baby steps on stairs…
Photo by t0msk - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/11904001@N00
baby steps
http://cache.lego.com/bigdownloads/buildinginstructions/6098577.pdf
GOALSPROXIMAL
http://www.entrepreneur.com/article/245767
but scientists prefer the much stuffier term
http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf
http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf
http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf
USCOF
FUSCOon
what?
TESTF R A M EWORKS?
expect().toBe()
expect().to.be()
assert.equal()
Jasmine image…
mocha image…
many others, doh, quint, jsunit, tap, …
TEST
u n d e r d a h o o d
FRA
MEWORK
undefined
AssertionError: 1 == 2 at repl:1:9 at REPLServer.self.eval (repl.js:110:21) at Interface.<anonymous> (repl.js:239:12) at Interface.EventEmitter.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.EventEmitter.emit (events.js:98:17) at emitKey (readline.js:1095:12)
> assert.equal(1,2)
$ node> assert.equal(1,1)
assert.js:92 throw new assert.AssertionError({ ^AssertionError: 1 == 2 at Object.<anonymous> (/Users/cain/tmp/fail.js:1:81) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3
> cat fail.jsrequire('assert').equal(1,2);console.log('failed?');
> node fail.js
KIND OF TEST
STYLE
https://www.goodreads.com/quotes/tag/learning
reduce it to the core
=
focus
I fear not the man who has practiced 10.000 kicks once but I fear the man who has practiced one kick 10.000 times.
THE TASK
https://github.com/search?utf8=✓&q=roman+numerals
https://github.com/search?l=JavaScript&q=roman+numerals&type=Repositories&utf8=✓
https://github.com/marcusholmgren/RomanNumerals/blob/master/spec/romanConverterSpec.coffee
https://github.com/Ginkko/roman/blob/master/spec/specs.js
https://github.com/Bryukh-Checkio-Tasks/checkio-task-roman-numerals/blob/master/verification/tests.py
https://github.com/davidbaldwin/roman/blob/master/src/_roman_test.js
Noise
polluting our intent
noise pollution the programming language
Let’s remove it!
Language noise++
Language noise++
FRA
MEWORK
Photo by Great Beyond - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/26104563@N00 Created with Haiku Deck
lots of work done
?
good naming!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Completely Missing - #1 result close to test
Completely Missing - #2 ugly stack traces
Completely Missing - #3 context switch needed
Photo by @Doug88888 - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/29468339@N02
Completely Missing
• result beside test
• ugly stack traces
• context switch necessary
Noise
covers
and
blurs
N O W
LET’S CODE
EX AMP LES
Take aways
• think less complex
• fast feedback rocks
• baby steps
make a test fit in a cell
write less code
uxebu.com/workshop
@WolframKriesing
Recommended