Transcript
Page 1: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

The Secret Assumptionof Agile

1

Fred [email protected]@fgeorge52

Page 2: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Agile is Productive

2

Traditional

12 Months

$28 / Hour

$2,000,000

Agile

8 Months.............3 Months5 Months8 Months

$87 / Hour

$1,100,0006x

Page 3: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

How?

3

1. Code That Can Change2. Lean Management3. Processing Power

Page 4: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

“Objects are only good for programs that change.”Rick DeNatale, IBM1988

4

Page 5: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Stories Assume Easy Change

5

Page 6: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Typical Program

6

public void foo( ) {........................

}

How many lines?

2.3 lines / method25 lines / class

Smalltalk:1.1 lines / method

Page 7: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Replacement Application

7

Old

Java

Oracle DB

Web UI

72 Classes

New

1400 Classes

Java

Oracle DB

Web UI

Page 8: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Tasking Cycle

8

TaskDesign

TestCode

Integrate

Ship

Page 9: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Task Cycle Case Study

9

TaskDesign

TestCode

Integrate1,000,000 Lines of J2EE Code50 Programmers4000 TestsCycle Time?

2-4 Hours

Page 10: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Tasking Cycle

10

TaskDesign

TestCode

Integrate

15 Minutes

15 Minutes

Page 11: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Simple Design

1. Works

2. Communicates

3. No duplicate code

4. Least classes and methods

Applies to Application and Tests

12

Page 12: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

RefactoringMartin Fowler

13

Page 13: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Tasking Cycle

14

TaskDesign

TestCode

Integrate

SimpleDesign

Refactoring

Page 14: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Refactoring to PatternsJoshua Kerievsky

15

Page 15: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Refactoring

IntroducePatterns

Refactoring

Tasking Cycle

16

TaskDesign

TestCode

Integrate

Page 16: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Case Study: Complexity

Cyclomatic Complexity

100 is Bad

“...never seen less than 5” - Senior Architect

Cyclomatic Complexity: 1.8

9 week test: 1 bug, fixed within 2 hours

17

Page 17: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George 18

Path to Proficiency

Workin

g

Experience

Training

Page 18: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Product Requests (London)

19

23 Stories15 Days

28 Stories12 Days

Class5 Days

Payback:11 Days

Page 19: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

OO Boot Camp

20

“...teaches you to think like a programmer...”

Page 20: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George 21

“15 minutes after the class started, I realized I knew nothing about programming.”Lead Designer, Consulting Firm, commenting to CIO of a large US manufacturer.

Page 21: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

OO Boot Camp

22

History: Since 1995

Over 1000 Students; 3 countries

Java, VB, C#, Ruby

Socratic Method (Question - Answer - Question)

60%+ Lab

Pair Programming

Test First (15 Minute Cycle)

Students Present Solutions

Page 22: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Master

Journeyman

Apprentice

23

Page 23: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George 24

Master

Journeyman

Apprentice

2-6 Months

2 Years - Never

Page 24: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Part 1: PrinciplesEncapsulation

Object Relationships

Inheritance

Delegation

Polymorphism

Collaborating Objects

Interfaces

Coding Patterns

Refactoring

Recursion

25

40-50 Hours

Page 25: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Part 2: Design PatternsRationale

Patterns vs. Principles

Observer Pattern

Iterator Pattern

Mediator Pattern

Composite Pattern

Visitor Pattern

Builder Pattern

Concerts

Survey of Patterns

26

40-50 Hours

Page 26: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Suspicious Statements

case - Almost always wrong

else - Mostly wrong

if - Suspicious

Unless guard clause at start of method

Substitute Design Patterns for all these

27

Page 27: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Suspicious Methods

getters - Violates Encapsulation

setters - Worse: violates Encapsulation and Object integrity

Methods with 2 or more levels of indenting

28

Page 28: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Suspicious Classes

Classes with names ending in -er or -or

Special naming conventions for Interfaces

Interface with a single implementing Class

Classes with more than 2 instance variables

29

Page 29: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Results

30

Dropouts

Journeymen

Predictors

Retention

Support

20%

20%

Architecture, Design, Multiple Languages

Must be used within a month

Journeymen, Masters

Page 30: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Maintenance

31

Old

Java

Oracle DB

Web UI

72 Classes

New

1400 Classes

Java

Oracle DB

Web UI

Page 31: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Transition Plan

32

No Documentation

No Training

No Time

No Problem!

Page 32: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Training -- OO Boot Camp

33

First class 1 October

9-12 students / class

Include project managers and QA

4 classes so far

Page 33: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Implementation

34

Start development on 15 October

Ruby used (never used before 1 October)

No stories - just business problem

First page ready for review by end of November

Page 34: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Currently...

35

5 Tables running

Each Table has it’s own business problem

Only developers

Speaker designated

Processes are varying, particularly metrics

Page 35: Secret Assumption of Agile

Copyright © 2009-2013 by Fred George

Questions?

36


Recommended