Slide 1

Slide 1 text

Pair Programming and Test Driven Development BarCampCHS Saturday, October 22, 11

Slide 2

Slide 2 text

WHOAMI • Tom Wilson • President/Founder Jack Russell Software • [email protected] • @jackhq - twitter.com • twilson63 - github.com Saturday, October 22, 11

Slide 3

Slide 3 text

Programming is Hard Saturday, October 22, 11

Slide 4

Slide 4 text

What is pair programming? Saturday, October 22, 11

Slide 5

Slide 5 text

Saturday, October 22, 11

Slide 6

Slide 6 text

Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the driver, types in code while the other, the observer (or navigator[1]), reviews each line of code as it is typed in. The two programmers switch roles frequently. --Wikipedia Saturday, October 22, 11

Slide 7

Slide 7 text

Cost & Benefits Saturday, October 22, 11

Slide 8

Slide 8 text

Saturday, October 22, 11

Slide 9

Slide 9 text

• Pair Speed Advantage • Pair Defect Advantage Saturday, October 22, 11

Slide 10

Slide 10 text

The potential speed and defect advantage of Pair Programming are usually explained as follows. Pair programming allows developers to share their ideas im- mediately. This allows to get down to solutions more quickly and also helps to eliminate defects early. In addition, Pair Programming leads to an ongoing review of the program code by the second -- Frank Padberg and Matthias Muller Saturday, October 22, 11

Slide 11

Slide 11 text

There are 10 types of people in the world - those who know binary Saturday, October 22, 11

Slide 12

Slide 12 text

There are 10 types of people in the world - those who know binary and those who have friends Saturday, October 22, 11

Slide 13

Slide 13 text

Conclusion Saturday, October 22, 11

Slide 14

Slide 14 text

Given that a short time to market is decisive for the success of a project, adding developers to form programmer pairs can speed up the project and increase its business value despite the increased person- nel cost. This is due to the fact that programmer pairs can be expected to have a higher productivity and code quality as compared to single programmers. Saturday, October 22, 11

Slide 15

Slide 15 text

Saturday, October 22, 11

Slide 16

Slide 16 text

2 Brains + 1 Problem = Solid Solution Saturday, October 22, 11

Slide 17

Slide 17 text

What about the developers? Saturday, October 22, 11

Slide 18

Slide 18 text

I can’t imagine not pair programming every day. -- JRS Developers Saturday, October 22, 11

Slide 19

Slide 19 text

Did you hear about the Coder that got stuck in his shower for a week? Saturday, October 22, 11

Slide 20

Slide 20 text

The instructions on his shampoo said: Lather, rinse, repeat. Saturday, October 22, 11

Slide 21

Slide 21 text

If at first you don't succeed; call it version 1.0 Saturday, October 22, 11

Slide 22

Slide 22 text

What is Test Driven Development? Saturday, October 22, 11

Slide 23

Slide 23 text

Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new code to acceptable standards. Kent Beck, who is credited with having developed or 'rediscovered' the technique, stated in 2003 that TDD encourages simple designs and inspires confidence.[1] Saturday, October 22, 11

Slide 24

Slide 24 text

Benefits Saturday, October 22, 11

Slide 25

Slide 25 text

Test-driven development offers more than just simple validation of correctness, but can also drive the design of a program. -- Wikipedia Saturday, October 22, 11

Slide 26

Slide 26 text

Programmers using pure TDD on new ("greenfield") projects report they only rarely feel the need to invoke a debugger. -- Wikipedia Saturday, October 22, 11

Slide 27

Slide 27 text

TDD can lead to more modularized, flexible, and extensible code. -- Wikipedia Saturday, October 22, 11

Slide 28

Slide 28 text

How many programmers does it take to change a light bulb? Saturday, October 22, 11

Slide 29

Slide 29 text

None. It's a hardware problem. Saturday, October 22, 11

Slide 30

Slide 30 text

Costs Saturday, October 22, 11

Slide 31

Slide 31 text

Test-driven development is difficult to use in situations where full functional tests are required to determine success or failure. -- Wikipedia Saturday, October 22, 11

Slide 32

Slide 32 text

The tests may therefore share the same blind spots with the code -- Wikipedia Saturday, October 22, 11

Slide 33

Slide 33 text

The tests themselves become part of the maintenance overhead of a project. -- Wikipedia Saturday, October 22, 11

Slide 34

Slide 34 text

Windows: Just another pane in the glass Saturday, October 22, 11

Slide 35

Slide 35 text

My Experience Saturday, October 22, 11

Slide 36

Slide 36 text

First Major Prj • 3 years of Development • 15 Developers • 90 hour work weeks • No Tests and lots of meetings! Saturday, October 22, 11

Slide 37

Slide 37 text

Second Major Prj • 10 - 12 Developers • 2 years - Parallel Release • Better Organized Architecture • No Tests • Lots of Meetings! • Lots of QA and Debugging! Saturday, October 22, 11

Slide 38

Slide 38 text

JRS Last Big Prj • 3 Dev Teams (6 Developers) • Less 6 mos to Beta • Few Meetings • Ship Code Everyday • Over 70% Code Coverage Saturday, October 22, 11

Slide 39

Slide 39 text

Why? Saturday, October 22, 11

Slide 40

Slide 40 text

Code is Art! Saturday, October 22, 11

Slide 41

Slide 41 text

Confident Code! Saturday, October 22, 11

Slide 42

Slide 42 text

Pair Programming + TDD = Quality Saturday, October 22, 11

Slide 43

Slide 43 text

Writing code for the future reader! Saturday, October 22, 11

Slide 44

Slide 44 text

Failure is not an option. It comes bundled with your Microsoft product. Saturday, October 22, 11

Slide 45

Slide 45 text

Research Saturday, October 22, 11

Slide 46

Slide 46 text

ScreenCasts Saturday, October 22, 11

Slide 47

Slide 47 text

Saturday, October 22, 11

Slide 48

Slide 48 text

Thank You http://www.charlestonruby.org/ http://charlestonjs.org Questions Saturday, October 22, 11