Extreme Programming - Practices: Dr. Marian Gheorghe
Extreme Programming - Practices: Dr. Marian Gheorghe
Extreme Programming - Practices: Dr. Marian Gheorghe
Marian Gheorghe
Pla n
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
Story card contd 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)
2. Pair programming
Any work involving code is done in pairs: two people one computer
5. System metaphor
A read.me file with the file structure of the project + a short description of the components An X-machine model of the system/subsystem
X-machine specification
customer_proc
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
customer_proc:
search&display edit_custome r change_custome click_customer r enter_customer enter_detail end_customer success error validate_data
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
6. Small, frequent releases Releases are not prototypes A release implement a couple of stories A release is thoroughly tested Releases are related to
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
9. Refactoring
Restructuring the code without changing its functionality Its main use is to simplify the code (Fowler) -moving methods used in several classes in a new one renaming classes, methods, functions simplify conditional expressions; reorganise data
Refactoring (contd)
Refactoring the test sets accordingly Changes into code require test sets changes as source code and test sets are the two main deliverables
Coding standards
Decide which standards you apply Apply them consistently (youll be marked on this basis!) The standards are there to help you produce simpler and easier to understand code
References
K. Beck, Extreme programming explained. AddisonWesley, 1999 K. Beck & M. Fowler, Planning extreme programming. Addison-Wesley, 2000 M. Holcombe, Extreme programming for real: a disciplined, agile,approach to software engineering, 2003 M. Holcombe & F. Ipate, Correct systems: building a business process solution, Springer, 1998.
Summary
Are the 12 XP practices all applicable to SH projects?