Your SlideShare is downloading. ×
0
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Better Code through TDD
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Better Code through TDD

309

Published on

The talk I gave about be

The talk I gave about be

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
309
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Better Code through TDDWolfram KriesingCTO, uxebu@wolframkriesingFreitag, 12. April 13
  • 2. http://140byt.esWarming up: shorten please! Freitag, 12. April 13
  • 3. Try it out!Browsernode.jsFreitag, 12. April 13
  • 4. uxebu100%TechnologyCompany- since 2008- remote teamFreitag, 12. April 13
  • 5. TDD using JasmineFreitag, 12. April 13
  • 6. Why TDD?• Better tool than Debugging• Verifies Refactoring• SustainableFreitag, 12. April 13
  • 7. Jasmine• JavaScript quasi standard• For nodejs+browser (server+client)• Built-in Spies• Custom Matchers make awesome errors!!!http://pivotal.github.com/jasmine/Freitag, 12. April 13
  • 8. Jasmine - MatchersFreitag, 12. April 13
  • 9. Jasmine - Matchers, watch out!Freitag, 12. April 13
  • 10. Matchers - toContain, notFreitag, 12. April 13
  • 11. Custom Matchers - toBeInstanceOfFreitag, 12. April 13
  • 12. Custom Matchers - toBeInstanceOfFreitag, 12. April 13
  • 13. Custom MatchersFreitag, 12. April 13
  • 14. Spies• Decoupled Testing• Fast Tests (Removes waits, Removes timings)• Better Architecture• Async TestingFreitag, 12. April 13
  • 15. SpiesFreitag, 12. April 13
  • 16. SpiesFreitag, 12. April 13
  • 17. SpiesFreitag, 12. April 13
  • 18. TDD is just the start...Freitag, 12. April 13
  • 19. Our ProcessRepoDevCIFlowdockAll DevsFreitag, 12. April 13
  • 20. CI - Continuous Integration• All projects• Automated Test runs (multiple browsers/devices)• Build• Code coverage• On Linux!Freitag, 12. April 13
  • 21. CI - Continuous Integrationhttp://siliconforks.com/jscoverage/Freitag, 12. April 13
  • 22. CI - Continuous IntegrationFreitag, 12. April 13
  • 23. Embedded Jasmine Test RunnerTestResultTest PlatformsFreitag, 12. April 13
  • 24. Better code?Freitag, 12. April 13
  • 25. The problemFreitag, 12. April 13
  • 26. S3UploadHTML5 files to Amazon S3 (bucket)Freitag, 12. April 13
  • 27. Assetsindex.htmlmovie.jsFreitag, 12. April 13
  • 28. • it‘s a prototype ....... +1• is actually async (ignored) ......... -1• runs all uploads in parallel ........ +1• no error handling ........ -1• NEEDS WORKFreitag, 12. April 13
  • 29. • still a prototype ....... +1• is actually async ......... +1• does NOT run uploads in parallel ........ -1• partly error handling ........ 0• NEEDS WORKFreitag, 12. April 13
  • 30. Freitag, 12. April 13
  • 31. HTTP PUThard codedhiddenS3Uploader!!!!!Freitag, 12. April 13
  • 32. • S3Uploader.js• uploads from a buffer• needs to take S3 configFreitag, 12. April 13
  • 33. TDD please....Freitag, 12. April 13
  • 34. Freitag, 12. April 13
  • 35. Freitag, 12. April 13
  • 36. S3Put.jsupload fromfilenameupload frombufferS3Uploader.js HTTP PUTFreitag, 12. April 13
  • 37. Freitag, 12. April 13
  • 38. S3UploaderFreitag, 12. April 13
  • 39. S3Put.jsupload fromfilenameupload frombufferS3Uploader.js HTTP PUT:-(Freitag, 12. April 13
  • 40. Uploader.jsS3Put.jsfrom filenameupload frombufferS3Uploader.jsHTTP PUTfrom bufferFreitag, 12. April 13
  • 41. ClassMethodsFreitag, 12. April 13
  • 42. All tests green? Refactor!Freitag, 12. April 13
  • 43. Freitag, 12. April 13
  • 44. S3Put.jsupload frombufferS3Uploader.jsHTTP PUTUploader.jsfrom filenamefrom bufferFreitag, 12. April 13
  • 45. S3Put.jsupload frombufferS3Uploader.jsHTTP PUTUploader.jsfrom filenamefrom bufferFileUploader.jsfrom filenamefrom bufferFreitag, 12. April 13
  • 46. Looking at the big picture again ...Freitag, 12. April 13
  • 47. • is actually async ......... +1• runs all uploads in parallel ........ -1• error handling ........ 0• NEEDS WORKFreitag, 12. April 13
  • 48. FileUploader.uploadFromFilesNamesFreitag, 12. April 13
  • 49. Freitag, 12. April 13
  • 50. • is actually async ......... +1• runs all uploads in parallel ........ +1• error handling ........ +1• upload multiple files :)New requirementFreitag, 12. April 13
  • 51. Freitag, 12. April 13
  • 52. FileUploader.jsS3Put.jsfrom filenameupload frombufferS3Uploader.jsHTTP PUTfrom bufferfrom filenamesFreitag, 12. April 13
  • 53. • Get to know what you really need• Just as much as necessary• It‘s a proof of concept• Reveals the APIPrototypingFreitag, 12. April 13
  • 54. • Let the architecture come by itself• Don‘t turn off the brain• Have clear interfaces - so you can mock them• Use explicit names and the API modules evolveTDDFreitag, 12. April 13
  • 55. Thank you@wolframkriesingWolfram Kriesing, CTOuxebuFreitag, 12. April 13

×