JavaScript Code KataStefan Scheidt & Bastian Söhnchen    OPITZ CONSULTING GmbH
Mission                                          MärkteWir entwickeln gemeinsam mit allen                Branchenübergrei...
Part ICode Katas
Whats our goal?
Quality
Value
Satisfaction
Professionalism
What do we need?
Knowledge
Practice ...
... Practice ...
... Practice!
Code Katasinternalize basic coding practices  to use them without thinking
Write clean code
Write tests first
Refactor your code
"Red – Green – Refactor"
Know your tools
Program in pairs
proper, well, fast
Part II      Test-DrivenJavaScript Development
Hello Jasmine!
Hello Jasmine!describe("parseFloat", function() {      it("should return undefined for undefined", function () {          ...
Hello Jasmine!describe("parseFloat", function() {      it("should return undefined for undefined", function () {          ...
Hello Jasmine!describe("parseFloat", function() {      it("should return undefined for undefined", function () {          ...
Hello Jasmine!describe("parseFloat", function() {      it("should return undefined for undefined", function () {          ...
Hello Jasmine!  expect(x).toEqual(y);    expect(x).toBe(y); expect(x).toBeDefined();expect(x).toBeUndefined(); expect(x).t...
Hello Jasmine!
Demo: Prime Factor Kata
Part IIIPractice
Prime Factors
Word Wrap
Game of Life
Traditional archery at Japanfest             by johntrainor (http://www.flickr.com/photos/trainor/2902023575/)            ...
The best days are not planned   Marcus Hansson (http://www.flickr.com/photos/marcus_hansson/)                             ...
Rallying at Dusk Thomas Faivre-Duboz (http://www.flickr.com/photos/tfa/)                          Progressby kevin dooley ...
The End ...  stefan.scheidt@opitz-consulting.com            (@stefanscheidt)bastian.soehnchen@opitz-consulting.com
Upcoming SlideShare
Loading in …5
×

JavaScript Code Kata Workshop – JavaScript Conference 2012 – OPITZ CONSULTING – Stefan Scheidt, Bastian Soehnchen

1,828 views

Published on

http://www.opitz-consulting.com/go/3-4-11
JavaScript ist eine sehr dynamische Sprache und verhält sich zudem je nach Browser unterschiedlich. Daher sind automatisierte Tests nahezu unerlässlich.

In dieser Hands-On-Session vermittelten OPITZ CONSULTING Senior Architect und Java-Experte Stefan Scheidt und Consultant Bastian Söhnchen im Rahmen der JavaScript Conference am 27.02.2012 in Düsseldorf die Grundlagen testgetriebener Entwicklung mit JavaScript am Beispiel von Jasmine und JsTestDriver.

Anschließend hatten die Teilnehmer die Gelegenheit, das Gelernte im Rahmen einiger vorbereiteter einfacher Programmierübungen, sogenannter Code Katas, auf dem eigenen Notebook zu üben. Dafür gaben die Referenten auch eine kurze Einführung zu der Bedeutung und dem Nutzen von Code Katas. Grundlegende JavaScript-Kenntnisse wurden in diesem Workshop vorausgesetzt.

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

  • Be the first to like this

No Downloads
Views
Total views
1,828
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JavaScript Code Kata Workshop – JavaScript Conference 2012 – OPITZ CONSULTING – Stefan Scheidt, Bastian Soehnchen

  1. 1. JavaScript Code KataStefan Scheidt & Bastian Söhnchen OPITZ CONSULTING GmbH
  2. 2. Mission MärkteWir entwickeln gemeinsam mit allen  BranchenübergreifendBranchen Lösungen, die dazu führen, dass  Über 600 Kundensich diese Organisationen besser entwickeln 29%als ihr Wettbewerb. 29% Handel / Logistik / Dienstleistungen Industrie / Versorger /Unsere Dienstleistung erfolgt Telekommunikationpartnerschaftlich und ist auf eine langjährige 42%Zusammenarbeit angelegt. Öffentliche Auftraggeber / Banken und Versicherungen / Vereine und VerbändeLeistungsangebot Eckdaten Business IT Alignment  Gründung 1990 Business Information Management  400 Mitarbeiter Business Process Management  8 Standorte Anwendungsentwicklung SOA und System-Integration IT-Infrastruktur-Management © OPITZ CONSULTING GmbH 2012 Seite 2
  3. 3. Part ICode Katas
  4. 4. Whats our goal?
  5. 5. Quality
  6. 6. Value
  7. 7. Satisfaction
  8. 8. Professionalism
  9. 9. What do we need?
  10. 10. Knowledge
  11. 11. Practice ...
  12. 12. ... Practice ...
  13. 13. ... Practice!
  14. 14. Code Katasinternalize basic coding practices to use them without thinking
  15. 15. Write clean code
  16. 16. Write tests first
  17. 17. Refactor your code
  18. 18. "Red – Green – Refactor"
  19. 19. Know your tools
  20. 20. Program in pairs
  21. 21. proper, well, fast
  22. 22. Part II Test-DrivenJavaScript Development
  23. 23. Hello Jasmine!
  24. 24. Hello Jasmine!describe("parseFloat", function() { it("should return undefined for undefined", function () { expect(util.parseFloat(undefined)).toBeUndefined(); }); it("should return 0 for empty string", function () { expect(util.parseFloat()).toEqual(0); }); it("should return number for number strings", function () { expect(util.parseFloat(1.5)).toEqual(1.5); }); // ...});
  25. 25. Hello Jasmine!describe("parseFloat", function() { it("should return undefined for undefined", function () { expect(util.parseFloat(undefined)).toBeUndefined(); }); it("should return 0 for empty string", function () { expect(util.parseFloat()).toEqual(0); }); it("should return number for number strings", function () { expect(util.parseFloat(1.5)).toEqual(1.5); }); // ...});
  26. 26. Hello Jasmine!describe("parseFloat", function() { it("should return undefined for undefined", function () { expect(util.parseFloat(undefined)).toBeUndefined(); }); it("should return 0 for empty string", function () { expect(util.parseFloat()).toEqual(0); }); it("should return number for number strings", function () { expect(util.parseFloat(1.5)).toEqual(1.5); }); // ...});
  27. 27. Hello Jasmine!describe("parseFloat", function() { it("should return undefined for undefined", function () { expect(util.parseFloat(undefined)).toBeUndefined(); }); it("should return 0 for empty string", function () { expect(util.parseFloat()).toEqual(0); }); it("should return number for number strings", function () { expect(util.parseFloat(1.5)).toEqual(1.5); }); // ...});
  28. 28. Hello Jasmine! expect(x).toEqual(y); expect(x).toBe(y); expect(x).toBeDefined();expect(x).toBeUndefined(); expect(x).toBeTruthy(); expect(x).toBeFalsy(); ...
  29. 29. Hello Jasmine!
  30. 30. Demo: Prime Factor Kata
  31. 31. Part IIIPractice
  32. 32. Prime Factors
  33. 33. Word Wrap
  34. 34. Game of Life
  35. 35. Traditional archery at Japanfest by johntrainor (http://www.flickr.com/photos/trainor/2902023575/) Scottish Furniture Makers ExhibitJordanhill School D&T Dept (http://www.flickr.com/photos/designandtechnologydepartment/) The Jewel of Simplicity Alyssa L. Miller (http://www.flickr.com/photos/alyssafilmmaker/) Eiqmal - Sedapnyer emrank (http://www.flickr.com/photos/emrank/) DSC06071 Andy G (http://www.flickr.com/photos/andyg/) Fresh sinigang ingredients 2/365 by Nikkorz (http://www.flickr.com/photos/nikkorz/)
  36. 36. The best days are not planned Marcus Hansson (http://www.flickr.com/photos/marcus_hansson/) karate training Genista (http://www.flickr.com/photos/genista/) Orto – Vegetable GardenSalvadonica, Chianti, Tuscany (http://www.flickr.com/photos/salvadonica/) Making tin soldiers 3 Andrei! (http://www.flickr.com/photos/andrein/) Roofer Velo Steve (http://www.flickr.com/photos/juniorvelo/) Red Light – Green Light MoToMo (http://www.flickr.com/photos/90155419@N00/) Craftsman Robert S. Donovan (http://www.flickr.com/photos/booleansplit/)
  37. 37. Rallying at Dusk Thomas Faivre-Duboz (http://www.flickr.com/photos/tfa/) Progressby kevin dooley (http://www.flickr.com/photos/pagedooley/) Smiley Keyboard ~Prescott (http://www.flickr.com/photos/ppym1/) 310/365 Revision Week: Number Theorystuartpilbrow (http://www.flickr.com/photos/stuartpilbrow/) loose words popofatticus (http://www.flickr.com/photos/barretthall/) Replacement DolfinDans (http://www.flickr.com/photos/dolfindans/) Studies for „That‘s Life“ Ben Sisto (http://www.flickr.com/photos/bensisto/)
  38. 38. The End ... stefan.scheidt@opitz-consulting.com (@stefanscheidt)bastian.soehnchen@opitz-consulting.com

×