SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme...

30
SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software Engineering- Panama City [email protected] [email protected] 850-522-2091 850-522-2023 Ex 182 Florida State University Computer Science

Transcript of SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme...

Page 1: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 1

SEA Side Software Engineering Annotations

Annotation 1: Extreme Programming

Professor Sara StoecklinDirector of Software Engineering- Panama City

[email protected]

[email protected]

850-522-2091

850-522-2023 Ex 182

Florida State University

Computer Science

               

Page 2: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 2

Extreme Programming

• Definition:– An agile (lightweight) team process to create

software rapidly that is extremely reliable, efficient, and well-factored. - (marketing)

– A deliberate and disciplined approach to software development that emphasizes team work to improve the process through utilization of refactoring, patterns, and good testing.

Page 3: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 3

Extreme Programming (XP)

• History:

– Many of the practices were created and tested as part of the Chrysler C3 project, which was a very successful software development project for a payroll system.

– About six years old and has proved to be a cost effective process for development of software.

Page 4: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 4

Why Not XP

• Lightweight – does not scale– Meant for small projects 2-15 people, 1 to 2 years.

Most are less than 6 people and less than one year projects.

• Not academically Proven– Statistics and successes are not tested by an

independent group. Lot of hype.

• Easy systems – Anyone can develop a small system what about a 5

year system with 300 database tables, 500 screens, 4000 reports and 1500 transactions. What about an operating system such as MVS or Windows XP?

Page 5: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 5

Why XP

• Promotes Good Software Engineering Principles– Patterns, refactoring, cohesion, coupling,

encapsulation, polymorphism, and inheritance.

• Allows the personal software process to mature– Allows a finely tuned software development process to

emerge within an organization.

• Promotes Good Testing Principles– Defines a method for testing, promotes testing as

completely, encourages good unit testing.

Page 6: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 6

What are the XP Practices

• There are 12 simple practices which rely on the synergy between them. These practices support each other by covering the weakness of one with the strength of others

• Five are basic XP principles

• Seven are process techniques

Page 7: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 7

Twelve XP Practices

• Five Basic XP Principles–Small Releases

–40-hour work week

–On-site customer

–Collective Ownership

–Coding Standards

Page 8: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 8

Twelve XP Practices

• Five Basic XP Principles– Small Releases

» Everything released to the customer should be as small as possible

» Put simple system to work as quickly as possible

» Release new versions on a very short development cycle

» Helps to reduce schedule slips since short release cycles limit scope for each release

» Release planning meeting discover these small units of functional behavior.

Page 9: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 9

Twelve XP Practices

• Five Basic XP Principles– 40-hour work week

» Never work overtime, go home at 5:00, have a nice week-end

» Rested programmers have more courage and make fewer mistakes

» Rested staff keeps them happy causing more chance of having stable teams.

» Rested staff more able to handle intense inter-personal interaction of the team

» Use the release planning meeting to plan the 40 hour week releases

Page 10: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 10

Twelve XP Practices

• Five Basic XP Principles– On-site customer

» A real customer is available on site.

» Answers questions, resolve disputes, set small scale priorities, and provide test .

» Customer participates in release planning meetings to define the small incremental RELEASES.

» Customer participates in writing USER STORIES

» Customer participates in testing RELEASES with the USER STORIES

Page 11: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 11

Twelve XP Practices

• Five Basic XP Principles– Collective Ownership

» Anyone can change the code and anyone who sees an opportunity to add value to any portion of the code is required to do it at any time.

» Everyone improves product

» Fix bugs – define tests to test bugs

» Refactor Mercilessly

» Create unit test for each unit developed

» Frequent integration of new code

Page 12: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 12

Twelve XP Practices

• Five Basic XP Principles–Coding Standards

» Everybody defines the class naming standards, variable naming standards, class names, variable names.

» Standards are set or evolve for the team.

Page 13: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 13

Twelve XP Practices

• Seven Process Techniques–The Planning Game–Metaphor–Simple Design–Pair Programming–Refactoring–Continuous Integration–Testing

Page 14: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 14

Twelve XP Practices

• Seven Process Techniques– The Planning Game

» Customer and Developer participate in writing USER STORIES (other names - lightweight use cases, process narratives, scenarios). CRC cards helpful.

» Each story transforms into one or more releases on a release plan.

» Customer and Developer write, estimate stories, schedule by priority or risk with the team owning the schedule.

» If the project velocity gets too high then we limit the scope of this release. If the load factor of a story gets to high then we split the story.

» Customer writes the acceptance test cases for these USER STORIES

Page 15: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 15

Twelve XP Practices

• Seven Process Techniques–Metaphor

» Start development with just a metaphor not a detailed architectural plan

» Be consistant with names, find common ground, find common domain patterns, solutions

» Uniformity simplifies coding.

Page 16: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 16

Twelve XP Practices

• Seven Process Techniques– Simple Design

» The right design for the system at any moment is the one that had not duplication, runs all the tests, does everything needed, upholds constraints.

» Start with small simple designs

» A simple design takes less time to finish than a complex one.

» Never add functinality before it is scheduled.

» Simple designs are easier to maintain.

» Refactor out complexity

» Do spike solutions (risk first)

Page 17: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 17

Twelve XP Practices• Seven Process Techniques

–Pair Programming» Master feedback loop to ensure that the

XP programming practices stay in place.

» Reduces overall project risk.

» Two people working side by side to produce quality code – one thinks, one drives.

Page 18: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 18

Twelve XP Practices• Seven Process Techniques

– Pair Programming» Thinker

• Is this approach going to work• What are some test cases to test this code• Is there some way to simplify the code• Is there some pattern we should be using• Is there duplicated code• Is there some refactoring technique to use• Is there some other solution

» Driver • Keys in solutions• Aids thinker

Page 19: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 19

Twelve XP Practices

• Seven Process Techniques– Pair Programming

» Does not cost twice as much.• Aids in jelling programming assignment• Encourages testing• Encourages thinking• Encourages not leaving bad code

» Pair new programmer with old-timer.» Rules:

• can’t go off and do things separately• Both must be able to see the monitor• Take turns driving• No lone rangers• Trust your partner

Page 20: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 20

Twelve XP Practices

• Seven Process Techniques–Refactoring

» Remove duplication

» Improve communications

» Add flexibility

» Simplify» Refactor for patterns (design, application, analysis)

» Refactor for good design

» Keep code clean

Page 21: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 21

Twelve XP Practices

• Seven Process Techniques–Continuous Integration

» Build, integrate and test daily according to the iteration planning and release scheduling

• Load current release• Load changes• Run tests

» Take iteration deadlines seriously» Measure progress with standup

meetings

Page 22: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 22

Twelve XP Practices

• Seven Process Techniques–Testing

» Types• Functional testing – black box

• Unit tests – programmer written with method by method

• Acceptance tests - customer written for stories

• Parallel tests – test to assure system works as old system

• Stress test – simulate worst case load

• Monkey test – test behavior of nonsensical input

Page 23: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 23

Twelve XP Practices

• Seven Process Techniques–Testing

» Unit tests • Cornerstone of XP – code it first• Need a unit test framework

– http: www.XProgramming.com • Harder it is to write the test- more you need it• Enables collective code ownership• Junit testing becoming standard• Enables refactoring and frequent integration• Safety net of regression and validation tests

Page 24: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 24

Twelve XP Practices

• Seven Process Techniques–Testing

» Unit tests • Rhythm for unit testing

• Loop iteratively

– Write a little code

– Write the code for testing this code

– Test written code with code for testing

– Correct code or test for code

Page 25: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 25

Twelve XP Practices

• Seven Process Techniques–Testing

» Acceptance Tests • Created from user stories

• Black box system tests

• Used in regression tests

• Should be automated so they can be ran often

• Improve the quality of the system

Page 26: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 26

The XP Process

Build User Stories

Define Architectural Spikes

Conduct Release Planning

Build Iteration

Conduct Acceptance

Testing

requirements

metaphor

new velocity

estimating

release plan

bugs

next iteration

release

Defines user requirements

Controls Scope

ImprovesQuality

Page 27: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 27

Getting Started

• How do I start using XP– A new project

– Collect user stories

– Conduct spike solutions

– Schedule release planning meeting

– Plan iterations

– Start iterative development

– Try automated unit tests

– Try automated acceptance testing

Page 28: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 28

Web-Sites

• http://www.extremeprogramming.org

• http://www.junit.org

• http://www.instantiations.com/jfactor/

• http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap

• http://www.xpuniverse.com/home

Page 29: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 29

Summary

• Remember – XP is lightweight – does not scale– Meant for small projects 2-15 people, 1 to 2 years. Most

are less than 6 people and less than one year projects.

• Promotes Good Software Engineering Principles– Patterns, refactoring, cohesion, coupling, encapsulation,

polymorphism, and inheritance.

• Allows the personal software process to mature– Allows a finely tuned software development process to

emerge within an organization.

• Promotes Good Testing Principles– Defines a method for testing, promotes testing as

completely, encourages good unit testing.

Page 30: SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Annotation 1: Extreme Programming Professor Sara Stoecklin Director of Software.

SEA Side – Extreme Programming 30

Computing Degrees at FSU-Panama City

Math&ScienceBusiness

Math&EEGeneral

Information System Degrees Scientific Degrees

Management Information Systems (BS)

Information Studies (Web – BS,MS)

Computer Science (MS, Web-BS)

Computer Engineering (BS, Web-MS)

Systems Analysis IT Management Computer Consulting Application Programming

Web Development Network Management Information Systems Management of Information

Services Social Informatics Information and Communication

Technologies

Embedded Systems Image Processing Electronics and Electromagnetics Signals and Systems Communications Microprocessors Computer Architecture

Operating Systems Systems Programming Applications Programming Database Administration Systems Administration

. Degree Programs http://www.pc.fsu.edu/degreeplansheets/default.asp

. Advisor Jeanne Dexter – [email protected]

. Advisor Alan Stromberg [email protected] . Advisor Kamran Imen [email protected]

. Advisor Sara Stoecklin [email protected]