1 / 14

Welcome to CAMDUG Dojo Day

Welcome to CAMDUG Dojo Day. Thank you to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet. Welcome! What is Software Craftsmanship? What is Test-Driven Development (TDD)?. Introduction. Pair Programming Aim for one assertion per test

talib
Télécharger la présentation

Welcome to CAMDUG Dojo Day

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to CAMDUG Dojo Day Thank you to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet

  2. Welcome! • What is Software Craftsmanship? • What is Test-Driven Development (TDD)? Introduction

  3. Pair Programming • Aim for one assertion per test • Give your tests fully descriptive names • TestThat_Foo_ShouldReturnBar_WhenBazIsFalse Method Name Condition Expectation Session Basics

  4. Introduction to TDD Roman Numerals 2 paired iterations

  5. Given a positive integer number determine its Roman numeral representation. • You cannot write numerals like IM for 999 • I can be subtracted from V and X only; X can be subtracted from L and C only; C can be subtracted from D and M only • V, L and D can never be subtracted • I = 1 • V = 5 • X = 10 • L = 50 • C = 100 • D = 500 • M = 1000 Roman Numerals Kata

  6. Cementing your knowledge Minefield kata 2 paired iterations

  7. Write a program to output a hint-field where each square is a * for a mine or the number of adjacent mine-squares if the square does not contain a mine. Minefield kata

  8. Example input4 3*.....*..... • Example output*21112*10111 Minefield kata

  9. Lunch Thanks to our sponsor Red Gate http://j.mp/rickyleeks

  10. TDD in the real world Bank accounts 1 paired iteration

  11. Write a system to model a bank account • Implement these three basic behaviours: • Deposit • Withdraw • Check balance Bank account

  12. An objective work-out Bank account kata 1 paired iteration New rules http://j.mp/objectcalisthenics

  13. One level of indentation per method • Don’t use the ELSE keyword • Wrap all primitives and Strings • First class collections • One dot per line • Don’t abbreviate • Keep all entities small • No classes with more than two instance variables • No getters/setters/properties Object calisthenics

  14. Close Thank you for coming! Please join us at The Flying Pig

More Related