CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous...

Post on 03-Mar-2021

1 views 0 download

Transcript of CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous...

CS 4500Software Development

[Overview of UML and Pair Programming]

Ferdinand Vesely

September 13, 2019

F. Vesely CS 4500 September 13, 2019 1 / 16

Recall

1. Analyze the problem/requirements/scope2. Gather use cases3. Identify components and interactions4. Plan and build a minimal prototype5. Iteratively re�ne the prototype / add use cases

F. Vesely CS 4500 September 13, 2019 2 / 16

Communication

• Emphasized in this course• Shared understanding• Common language to communicate ideas

F. Vesely CS 4500 September 13, 2019 3 / 16

Visual• Faster to process• E�cient• Helps focus process

F. Vesely CS 4500 September 13, 2019 4 / 16

Uni�ed Modelling Language

• standardized (OMG, ISO), general-purpose visualmodelling language• developed in late 1990s• overseen by the Object Management Group• huge – spec is over 700 pages• associated with object-oriented methods• latest standard 2.5.1 from 2017

F. Vesely CS 4500 September 13, 2019 5 / 16

UML Diagrams

13 diagram types across 3 categories1. Structural

Ï models structure of systems

2. BehavioralÏ express behavior of systems

3. InteractionÏ express data and control �ow

F. Vesely CS 4500 September 13, 2019 6 / 16

Use Case Diagrams

Actor

Use Case

Actor – person or other system

F. Vesely CS 4500 September 13, 2019 7 / 16

Use Case Diagrams

Inventory Manager

Check status of goods

Re-order Customer

Pay for purchase

F. Vesely CS 4500 September 13, 2019 8 / 16

Sequence Diagrams• models �ow of data or control between components, subsystems,actors

present card

Customer

confirmpayment

acknowledgetransfer

Card terminal Bank

check

acknowledgefunds

F. Vesely CS 4500 September 13, 2019 9 / 16

Component Diagrams

• models components and their interfaces

InventoryProductPrice

Cash Register

Storage

ProductState

F. Vesely CS 4500 September 13, 2019 10 / 16

Other Diagram Types

• Structural:Ï class diagram, package diagram, object diagram, composite structurediagram, deployment diagram

• Behavioral:Ï activity diagram, state machine diagram

• Interaction:Ï communication diagram, interaction overview, timing diagram

F. Vesely CS 4500 September 13, 2019 11 / 16

UML Summary

• Standard language – aids communication• If you are using diagrams as part of design, might as well takeinspiration or use standardized ones1.->Not required though

• Plenty of tutorials available• Interesting use: code generation from diagrams

F. Vesely CS 4500 September 13, 2019 12 / 16

Pair Programming (Recap)

• 2 programmers, one keyboard / pencil / mouse• jointly produce one artifact – code, design• working “as one”

F. Vesely CS 4500 September 13, 2019 13 / 16

Pair Programming

1. driver: controls the keyboardÏ writes code or draws up design

2. observer (or navigator)Ï continuous and active observation of driver’s workÏ watches for defectsÏ alternativesÏ looking up resourcesÏ considering the bigger picture

F. Vesely CS 4500 September 13, 2019 14 / 16

Pair Programming

• Partners deliberately switch roles periodically• Wholly share ownership of the work• In general, people have unequal skills• Goal: use each others strengths and learn from each other.

F. Vesely CS 4500 September 13, 2019 15 / 16

Pair Programming – Why?

• Two pairs of eyes better than one.Ï design and programming is a thinking activity

• Overall, a slight increase in cost/time is o�set by less buggy in code• At any moment, (at least) two people are well familiar with the codebase

Ï better than having a single start developer with exclusive knowledgeÏ avoids problems with sta� turnaround

F. Vesely CS 4500 September 13, 2019 16 / 16