• Ingen resultater fundet

Software Engineering I (02161) Week 8 Assoc. Prof. Hubert Baumeister

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Software Engineering I (02161) Week 8 Assoc. Prof. Hubert Baumeister"

Copied!
58
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Software Engineering I (02161)

Week 8

Assoc. Prof. Hubert Baumeister

DTU Compute Technical University of Denmark

Spring 2013

(2)

Contents

Software Development Process (cont.) From Requirements to Design: CRC Cards Version control

(3)

Resource Triangle: Waterfall

(4)

Resource Triangle: Agile

Functionality

Time

A DTI A DTI

R A DTI

R A DTI

R

A DTI R

A DTI

R

F 1 F 2 F 3a

F 8 F 4 F 5 F 6

A DTI R

1. Iteration

(5)

Agile processes

I Agile software development methods

I Extreme Programming

I Scrum

I Lean Software Development

I Kanban

I Common characteristic

I Short iterations: Each iteration produces a software increment

= Small batch sizes

Ideal batch size: one (single piece flow)

I Driven by user stories/Backlog items/smallest marketable feature/. . .

(6)

eXtreme Programming (XP)

Kent Beck, Extreme Programming 2nd ed.

(7)

Sit-together

Kent Beck, Extreme Programming 2nd ed.

(8)

Scrum

Working increment of the software

Sprint Backlog Sprint

Product Backlog

30 days 24 h

file:///Users/huba/Desktop/Scrum_process.svg

1 of 1 /18.3.13 24:16

Wikipedia

(9)

Burn Down Charts

Wikipedia

(10)

Lean Software Development

I Lean Production:

I Reduce the amount ofwaste

I Generateflow

I Waste: resources used with does not produce value for the customer

I time needed to fix bugs

I time to change the system because it does not fit the customers requirements

I time waiting for approval

I . . .

(11)

Cycle time

Cycle time

Time it takes to go throuh the process one time

cycle time= number of features feature implemantion rate Batch size=number of features in an iteration

(12)

Cycle time: Waterfall

I Software: 250 features, 50 weeks,

feature implementation rate = 5 features/week cycle time= number of features

feature implemantion rate

I Waterfall: cycle time = 250 / 5 = 50 weeks

→ 1 cycle

I Question: How to reduce the cycle time?

Get feedback from the process

(13)

Reducing the cycle time

I Software: 250 features, 50 weeks,

feature implementation rate = 5 features/week cycle time= number of features

feature implemantion rate

I Agile: cycle time = 1 / 5 = 8 hours

→ 250 cycles

→ Process improvement: incease in features / week

(14)

Generating flow using Pull and Kanban

WIP = Work in Progress Limit

1 3 2

4

A T I

Work Item D Done

Queue WIP Queue WIP Queue WIP Queue WIP

8 7

9 10 5

6

Blah Composite

Leaf4Assembly 2 3

3 3 3 3

(15)

Flow through Pull with Kanban

I Process controlling: local rules

I Load balancing: Kanban cards andWork in Progress (WIP) limits

I Integration in other processes: e.g. Scrum + Kanban = Scrumban

Figure from David Andersonwww.agilemanagement.net

(16)

Online Tool

I www.targetprocess.com: Electronic Kanban board useful for your project

(17)

Contents

Software Development Process (cont.) From Requirements to Design: CRC Cards Version control

(18)

From Requirements to Design

Design process

1 Glossary/architecture: possible classes, attributes, and operations

2 Take one use case scenario / user story a) Devisea testfor the scenario

b) Realizethat scenario by adding new classes, attributes, associations, and operations so that youdesigncan execute that scenario

c) implement

3 Repeat step 2 with the other use case scenarios / user stories

(19)

Introduction CRC Cards

I Class Responsibility Collaboration

I Developed in the 80’s

I Used to

I Analyse a problem domain

I Discover object-oriented design

I Teach object-oriented design

I Object-oriented design:

I Objects have state and behaviour

I Objects delegate responsibilities

I ”Think objects”

(20)

CRC Card Template

A larger example

I http://c2.com/doc/crc/draw.html

(21)

Process

I Basic: Simulate the execution of use case scenarios / user stories

I Steps

1. Brainstorm classes/objects/components

2. Assign classes/objects/components to persons (group up to 6 people)

4. Execute the scenarios one by one

a) add new classes/objects/components as needed b) add new responsibilities

c) delegate to other classes / persons

(22)

Library Example: Use Case Diagram

User

LibrarySystem

check out book

return book

search for book

(23)

Library Example: Detailed Use Case Check Out Book

I Name: Check Out Book

I Description: The user checks out a book from the library

I Actor: User

I Main scenario:

1 A user presents a book for check-out at the check-out counter

2 The system registers the loan

I Alternative scenarios:

I The user already has 5 books borrowed 2a The system denies the loan

I The user has one overdue book 2b The system denies the loan

(24)

Example II

I Set of initial CRC cards: Librarien, Borrower, Book

I Use caseCheck out bookmain scenario (user story)

I ”What happens when Barbara Stewart, who has no accrued fines and one outstanding book, not overdue, checks out a book entitled Effective C++ Strategies+?”

(25)

Library Example: CRC cards

(26)

Library Example: CRC cards

(27)

Library Example: CRC cards

(28)

Library Example: CRC cards

(29)

Library Example: CRC cards

(30)

Library Example: CRC cards

(31)

Library Example: CRC cards

(32)

Library Example: CRC cards

(33)

Library Example: CRC cards

(34)

Library Example: CRC cards

(35)

Library Example: CRC cards

(36)

Library Example: CRC cards

(37)

Library Example: CRC cards

(38)

Library Example: CRC cards

(39)

Library Example: CRC cards

(40)

Library Example: All CRC cards

(41)

Process: Next Steps

I Review the result

I Group cards

I Check cards

I Refactor

I Transfer the result

I Implement the design test-driven

I UML model

(42)

Example: Class Diagram (so far)

0..1 * Borrower

canBorrow

Book isOverdue

checkOut(b:Borrower) calculateDueDate Librarien

checkOutBook(b:Book)

Date compare(d:Date)

* *

0..1 dueDate

I Process: Agile software development

I Take a user story (according to plan)

I Create an automatic acceptance test

I Design the behaviour of the user story using CRC cards

I Implement the the design test-driven

(43)

Contents

Software Development Process (cont.) From Requirements to Design: CRC Cards Version control

(44)

What is version control

Version Control

I Stores and mangages versions documents (e.g. .java files)

I Manages concurrent work on documents

I Manages different software release versions

I Various systems: CVS, svn, git, . . .

(45)

CVS

I Concurrent Versions System

I One central repository

I Command line tools, IDE support

I Files have a tree of versions: branching

I Release: File versions having sametag

I Versions: diffs(differences) to previous versions

(46)

Creating a repository

http://repos.gbar.dtu.dk

(47)

Creating a repository

(48)

Creating a repository

(49)

Creating a repository

(50)

Create a project and share it

I Menu: Team→share project andcreate a new repository location

(51)

Checking out a project

I CVS Repository Exploring perspective

(52)

Package Explorer Team Menu Project

(53)

Steps in Developing a Program using CVS

1 Create Repository

2 Create a project andsharethe project 3 For all the programming tasks in aniteration

3.1 Run tests; Update project; run tests; fix tests 3.2 Work on the implementation so that all tests run 3.3 Commit your changes

3.3.1 Updatethe project; run tests

3.3.2 Fixall compile time errors and allbrokentests;

3.3.3 Commityour changes

4 Tag you files for majorproject milestones Important: Commit only if all tests pass

(54)

Committing changes

I Fails if someone else committed the file before

I If fail→update, merge, commit

(55)

Update a project

I Gets newest version of the file

I If conflicts

textfiles aremerged

other files areoverwritten

I based onlines

I successful merge

I unsuccessful merge

(56)

Unsuccessful merge

I Samelines have been changed

public Address() {

// TODO Auto-generated constructor stub }

<<<<<<< Address.java

public String getStrasse() { // Local change

=======

public String getGade() { // Committed change

>>>>>>> 1.2

return street;

}

(57)

Package Explorer Compare With Menu

(58)

Compare result: Compare with latest from HEAD

Referencer

RELATEREDE DOKUMENTER

Scenario: User borrows book but has already more than 10 books Given the user has borrowed 10 books. And a user is registered with the library And a book is in

I new velocity: story points of finished user stories per iteration. → What can be done in the

Scenario: Buy a fruit with enough money Given the vending machine has fruits. When the user enters enough money for a fruit And the user selects

Travel Agency functional requirements: System use cases Part I: manage trip.. Travel Agency functional requirements: System use cases Part II:

Recommended (but not mandatory) Design process 1 Create glossary, use cases, and domain model 2 Create user stories based on use case scenarios. 3 Create a set of initial classes

Software Testing (JUnit, Test Driven Development, Systematic Tests, Code Coverage). System Modelling (mainly based on

Software Testing (JUnit, Test Driven Development, Systematic Tests, Code Coverage). System Modelling (mainly based on

Scenario: User borrows book more than 10 books Given a registered user has borrowed 10 books When the user borrows another book. Then the book is not borrowed by