{ welcome to camdug dojo day thank you to our hosts, granta design (we’re hiring!) sorry for the...

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

Post on 22-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

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

Thank you to our hosts, Granta Design (We’re hiring!)Sorry for the lack of internet

Page 2: { 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

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

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 Thank you to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet

{Roman Numerals2 paired iterations

Introduction to TDD

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

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 Thank you to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet

{Minefield kata2 paired iterations

Cementing your knowledge

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

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 Thank you to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet

Minefield kata

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

Example output*21112*10111

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

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

Lunch

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

{Bank accounts1 paired iteration

TDD in the real world

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

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 Thank you to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet

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

An objective work-out

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

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 to our hosts, Granta Design (We’re hiring!) Sorry for the lack of internet

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

Close