Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

TDD for Kids - VLCjs (Valencia Spain, July 2015)

773 views

Published on

In order to get hooked by TDD it sometimes seems too much effort to setup things, but that should not be the barrier. Along came Google Spreadsheets and I had a no-setup environment, at least for doing katas and showing of the magic of being rewarded with a red box switching to green once I implemented the right thing. I will tell you the story of how I tried to make TDD as simple as possible and how I ended up with Google Spreadsheets and also how this inspired me to build tddbin.com for use at our JSCodeRetreats. I believe it's the red-green cycle that got them hooked. I did it with students and also kids even a manager asked me "why does not everyone program like that?".
Presented at this event: http://www.meetup.com/de/ValenciaJS/events/223760927/

Published in: Technology
  • Be the first to comment

TDD for Kids - VLCjs (Valencia Spain, July 2015)

  1. 1. http://www.flickr.com/photos/andresrueda/2276197032/
  2. 2. http://www.flickr.com/photos/cmoi/760513848/
  3. 3. http://www.flickr.com/photos/cmoi/760513848/
  4. 4. TDD with for Kids (or with Google Spreadsheets) @WolframKriesing, uxebu
  5. 5. http://www.ecma-international.org/ecma-262/6.0/
  6. 6. { who: „Wolfram Kriesing“, what: „uxebu Co-Founder“, since: „2008“, does: „web apps since 1999“, url: „http://uxebu.com“, twitter: „@WolframKriesing“ }
  7. 7. { what: „ES6 learning by doing“, when: „new kata every day“, url: „http://ES6katas.org“, twitter: „@es6katas“ }
  8. 8. { what: „ready to use TDD env“, why: „practice, practice, practice“, url: „http://TDDbin.com“, twitter: „@tddbin“ }
  9. 9. { what: „TDD, pairing, clean code“, when: „every 3 months“, next: „5th September 2015“, url: „http://jsCodeRetreat.com“, twitter: „@jsCodeRetreat“ }
  10. 10. TDD?
  11. 11. IHAD TO
  12. 12. I TO X!e x p l a i n
  13. 13. I TO X!TO A KID
  14. 14. SIM PLI CITY
  15. 15. …img baby steps on stairs… Photo by t0msk - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/11904001@N00 baby steps
  16. 16. http://cache.lego.com/bigdownloads/buildinginstructions/6098577.pdf
  17. 17. https://www.facebook.com/IFeakingLoveScience
  18. 18. GOALS PROXIMAL http://www.entrepreneur.com/article/245767 but scientists prefer the much stuffier term
  19. 19. http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf
  20. 20. http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf
  21. 21. http://www.uky.edu/~eushe2/Bandura/Bandura1981JPSP.pdf
  22. 22. US COF
  23. 23. F US COon what?
  24. 24. TESTF R A M E WORKS?
  25. 25. expect().toBe() expect().to.be() assert.equal()
  26. 26. Jasmine image…
  27. 27. mocha image…
  28. 28. many others, doh, quint, jsunit, tap, …
  29. 29. TEST u n d e r d a h o o d FRA MEWORK
  30. 30. 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)
  31. 31. 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) > cat fail.js require('assert').equal(1,2); console.log('failed?'); > node fail.js
  32. 32. KIND OF TEST
  33. 33. STYLE
  34. 34. https://www.goodreads.com/quotes/tag/learning
  35. 35. reduce it to the core = focus
  36. 36. 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.
  37. 37. THE TASK
  38. 38. https://github.com/search?utf8=✓&q=roman+numerals
  39. 39. https://github.com/search?utf8=✓&q=roman+numerals
  40. 40. https://github.com/search?l=JavaScript&q=roman+numerals&type=Repositories&utf8=✓
  41. 41. https://github.com/marcusholmgren/RomanNumerals/blob/master/spec/romanConverterSpec.coffee
  42. 42. https://github.com/Ginkko/roman/blob/master/spec/specs.js
  43. 43. https://github.com/Bryukh-Checkio-Tasks/checkio-task-roman-numerals/blob/master/verification/tests.py
  44. 44. https://github.com/davidbaldwin/roman/blob/master/src/_roman_test.js
  45. 45. Noise polluting our intent
  46. 46. noise pollution the programming language
  47. 47. Let’s remove it!
  48. 48. Language noise++
  49. 49. FRA MEWORK
  50. 50. FRA MEWORK
  51. 51. 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
  52. 52. ?
  53. 53. good naming!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  54. 54. Completely Missing - #1 result close to test
  55. 55. Completely Missing - #2 ugly stack traces
  56. 56. Completely Missing - #3 context switch needed Photo by @Doug88888 - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/29468339@N02
  57. 57. Completely Missing • result beside test • ugly stack traces • context switch necessary
  58. 58. Noise covers and blurs
  59. 59. N O W LET’S CODE
  60. 60. EX AMP LES
  61. 61. Take aways • think less complex • fast feedback rocks • baby steps make a test fit in a cell write less code

×