Extreme Programming Adam Cogan Database Architect ssw.com.au

Preview:

Citation preview

Extreme ProgrammingExtreme Programming

Adam CoganDatabase Architectssw.com.au

About AdamAbout Adam• Chief Architect for www.ssw.com.au - experience with:

– internal corporate development and

– generic off-the-shelf databases

– Clients: Enterasys Networks, Cisco, Microsoft…

• Run Teams of Developers

• President .NET User Group, Sydney

• Speaker for Microsoft Roadshows, Dev Conn, VSLive

• Microsoft Regional Director, Australia

• Email: AdamCogan@ssw.com.au

ToToFromFrom

There Are Different WaysThere Are Different Ways

• The Waterfall Approach– Determine requirements– Set schedule– Testing– Develop in one big step

• Agile approaches– Extreme Programming (XP)– RUP

AgendaAgenda• The Main Problem• The Solution• Implementing XP

• Give estimates to customers• Over promise• Surf the net too much• Don’t give the customer value• Too slow• Under deliver• Over charge

Session Prerequisites (Current Problems)Session Prerequisites (Current Problems)

The Main ProblemThe Main Problem

…is Risk. Examples being:1. Schedule Slip – the day comes 6 months

to go2. Project Cancelled – numerous slips mean

nothing in production (bugger it)3. System goes sour – some years later4. Defect Rate – so high it isn’t used 5. Business Misunderstood6. Business Changes 7. False Feature Rich8. Staff Turnover

Waterfall vs XPWaterfall vs XP

Enter XP…Enter XP…

Extreme Programming (XP) is a software development discipline

• Address Risk• Very Productive• Produces High Quality Software• Lot of Fun to Execute

Like driving your car…

Basic Practices of XP…Basic Practices of XP…1. Planning – writing all the cards2. Short Releases3. Metaphor4. Simple Design5. Testing6. Refactoring7. Pair Programming8. Collective Ownership9. Continuous Integration10. 40 Hour Week11. On-site Customer12. Coding Standards

XP Addresses RiskXP Addresses Risk

Let look at the same examples…

XP Addresses RiskXP Addresses Risk

• Schedule Slip – the day comes with 6 months to go

2. Short Releases1. Planning – writing all the cardsIt’s the big day –It’s the big day –

January 1st!January 1st!

XP Addresses RiskXP Addresses Risk

Project Cancelled – numerous slips mean nothing in production2. Short Releases11. On-site CustomerNearly there.. 1 Nearly there.. 1

month to gomonth to goGoing well… 2 Going well… 2 weeks to go weeks to go

XP Addresses RiskXP Addresses Risk

System goes sour – some years later 4. Simple Design5. Testing6. Refactoring12. Coding Standards

I asked for 1 fix I asked for 1 fix and now there are and now there are 3 new problems!3 new problems!

1 week for a 1 week for a simple change… simple change…

you can’t be you can’t be serious!serious!

XP Addresses RiskXP Addresses Risk

Defect Rate – so high it isn’t used5. Testing9. Continuous IntegrationThis system is a This system is a

failure – there are failure – there are too many bugs!too many bugs!

XP Addresses RiskXP Addresses Risk

Business Misunderstood3. Metaphor11. On-site customerI asked for a “clam I asked for a “clam

steamer” – this is no steamer” – this is no “clam steamer”!“clam steamer”!

XP Addresses RiskXP Addresses Risk

Business Changes1. Planning2. Short releasesWe’re going to give We’re going to give

you Sally now you Sally now because we need because we need

John…John…

XP Addresses RiskXP Addresses Risk

False Feature Rich1. Planning2. Short releasesWhy do we have Why do we have

nice rich textboxes nice rich textboxes here, but we can’t here, but we can’t print an invoice?print an invoice?

XP Addresses RiskXP Addresses Risk

Staff Turnover7. Pair Programming

8. Collective Ownership10. 40 Hour Week

Greg’s leaving… Greg’s leaving… There’s no way this There’s no way this

project will be finished project will be finished on time nowon time now

An Entrepreneur’s Experiences with An Entrepreneur’s Experiences with XPXP

11 Planning – writing cards * 11 Short Releases11 Metaphor11 Simple Design11 Testing – using nUnit *6. Refactoring11 Pair Programming8. Collective Ownership9. Continuous Integration111 40 Hour Week111 On-site Customer12. Coding Standards

* Let’s see 3 XP essentials…

Tool 1: Short ReleasesTool 1: Short Releases• Let’s see how a release is put

together…

• XP Style– XP Cards– Becomes a Pile

• SSW Style– Using Emails – SSW eXtreme Emails!

Development Process (Using XP Cards)Development Process (Using XP Cards)

The Development Process (Using SSW eXtreme Emails!)The Development Process (Using SSW eXtreme Emails!)

We need a status We need a status update!update!

Tool 2: Microsoft WordTool 2: Microsoft Word

Your specification should include:• Your UI• Database design• Business rules (aka Unit Tests)

Tool 3: TestingTool 3: TestingUnit Testing in .NET • Divide projects into

– UI– Business– Unit Tests

Unit Testing ToolsUnit Testing ToolsUnit Testing in .NET • NUnit http://nunit.sourceforge.net • HarnessIt

www.unitedbinary.com/HarnessIt.aspx

• Ladybug www.sethlivingston.com/ladybug

Note: We are only talking about Object Testing aka Middle-Tier

The Coding and Testing Process (Using NUnit)The Coding and Testing Process (Using NUnit)

1. Write Code2. Write Tests3. References4. Set Start Project5. Run

For More Information…For More Information…Microsoft Access: Upgrading and Migrating to SQL Server and .NET -

Course Resourceswww.ssw.com.au/ssw/Events/2004AccessToSQLServerAndNET/Resources.aspxwww.xprogramming.com www.refactoring.com

“Extreme Programming Explained” by Kent BeckNUnit www.nunit.org

SSW eXtreme Emails! www.ssw.com.au/extremeemails

SummarySummary• The Basic Problem• The Solution• Implementing XP

– How to make a release plan– How to capture business rules– How translate to business tier– How you make your test case– How to setup NUnit in .NET

• Try it….

Recommended