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

Welcome to CAMDUG Dojo Day

  • Upload
    talib

  • View
    20

  • Download
    0

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: 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

Page 2: Welcome to CAMDUG Dojo Day

Welcome! What is Software Craftsmanship? What is Test-Driven Development (TDD)?

Introduction

Page 3: Welcome to CAMDUG Dojo Day

Pair Programming Aim for one assertion per test Give your tests fully descriptive names

TestThat_Foo_ShouldReturnBar_WhenBazIsFalse

Session Basics

Method Name

Expectation

Condition

Page 4: Welcome to CAMDUG Dojo Day

{Roman Numerals2 paired iterations

Introduction to TDD

Page 5: Welcome to CAMDUG Dojo Day

Roman Numerals Kata

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

Page 6: Welcome to CAMDUG Dojo Day

{Minefield kata2 paired iterations

Cementing your knowledge

Page 7: Welcome to CAMDUG Dojo Day

Minefield kata

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.

Page 8: Welcome to CAMDUG Dojo Day

Minefield kata

Example input4 3*.....*.....

Example output*21112*10111

Page 9: Welcome to CAMDUG Dojo Day

{Thanks to our sponsor Red Gatehttp://j.mp/rickyleeks

Lunch

Page 10: Welcome to CAMDUG Dojo Day

{Bank accounts1 paired iteration

TDD in the real world

Page 11: Welcome to CAMDUG Dojo Day

Write a system to model a bank account Implement these three basic behaviours:

Deposit Withdraw Check balance

Bank account

Page 12: Welcome to CAMDUG Dojo Day

{Bank account kata1 paired iterationNew rules http://j.mp/objectcalisthenics

An objective work-out

Page 13: Welcome to CAMDUG Dojo Day

Object calisthenics

1. One level of indentation per method

2. Don’t use the ELSE keyword

3. Wrap all primitives and Strings

4. First class collections

5. One dot per line6. Don’t abbreviate7. Keep all entities small8. No classes with more

than two instance variables

9. No getters/setters/properties

Page 14: Welcome to CAMDUG Dojo Day

{Thank you for coming!Please join us at The Flying Pig

Close