Docsity

Extreme Programming Practices: Understanding the 12 Sacred Tenets, Slides of Computer Science

Partial preview of the text

Download Extreme Programming Practices: Understanding the 12 Sacred Tenets and more Slides Computer Science in PDF only on Docsity!

1

Extreme Programming Practices

2

Plan

  • Example
  • Practices
  • Conclusions

4

Story cards

1. Story name : Enter and validate customer details Task description : enter customer details and validate (ref. unique, name alphanumeric, phone numeric, address non-empty); if valid record then store it otherwise re-enter it.

Initiating event : a request made through choosing a menu option

5

Story card cont’d

Memory context: customer records exist and will

be updated

Observable result : confirmation of success or

prompting an error otherwise

Related stories : Edit a customer details

Notes : Mandatory

Risk factor : 1(low) / Change factor: 1 (low)

7

More story cards:

  1. Edit customer details (validation included)
  2. Enter and validate orders by customer
  3. Edit orders (validation included)

8

The twelve sacred tenets of XP

1. Test first programming

Functional test sets; from story cards

Unit test sets (white-box: branch/condition/statement coverage)

Non-functional requirements tested

10

2. Pair programming

Any work involving code is done in pairs: two people – one computer

11

3. On site customer: N/a

4. The planning game

Story cards + cost estimations (how long it takes, how many people involved)

Story cards discussed with the client

Test sets associated with will help to understand some tricky conditions/new aspects; ask the client

13

X-machine specification

customer_proc

end_customer pick_up_customer

end_customer

order_proc

end_order

exit

14

X-machine model

State based model (states in green); with an initial state

Transitions labeled by function names

The model may contain functions which themselves will become X-machines (blue ones)

Hierarchical model

16

Function component

Takes an input (click a button, enter some data) and a memory value then produces an output and updates the memory side.

Formally:

func_comp:: Input x Memory -> Output x Memory

17

Function components (examples)

click_customer::

customer_btn x λ -> λ x customer_sel

enter_customer::

enter_btn x customer_sel -> λ x customer_sel

enter_detail::

data x customer_sel -> data_echoed x data

where data =(name, reference,address,phone,email)

19

7. Continuous integration

Write small units and test them (unit testing)

Integrate into the system and test it functionally (test first programming)

Suggestion: one pair be responsible for integrating components into an operational system

20

8. Keep your code as SIMPLE as

possible

If it’s not so simple then…