xtreme programming by sejo Ćesić and enis zeherović
DESCRIPTION
Introduction to eXtreme Programming (XP) with interactive and practical examples of one of its main practices: Test Driven Development (TDD). In the first part, we will lead you through the practices of XP and make you understand why XP has been revolutionary for the software development. After that, we will provide a more in-depth view of TDD. By sharing the best practices we will give you concrete guidelines on how to apply TDD on your projects. The session is expected to be highly interactive, you are all welcome to bring your own ideas, questions and suggestions.TRANSCRIPT
![Page 1: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/1.jpg)
XP?
![Page 2: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/2.jpg)
eXtreme Programming
Sejo Ćesić[email protected]
be.linkedin.com/in/sejocesic/
Enis Zeherović[email protected]
ba.linkedin.com/in/eniszeherovic
![Page 3: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/3.jpg)
eXtreme Programming
Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries
AGILE software development methodology
Developed in reaction to high ceremony methodologies (e.g. Rational Unified Process - RUP)
![Page 4: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/4.jpg)
XP Goal
Organize people
to produce
higher-quality software
more productively
![Page 5: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/5.jpg)
XP Activities
Coding
Testing
Listening
Designing
![Page 6: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/6.jpg)
XP Values
Communication
Simplicity (YAGNI)
Feedback
"Optimism is an occupational hazard of programming. Feedback is the treatment.“
Courage
refactor/remove code, be persistent
Respect
![Page 7: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/7.jpg)
XP Practices
1. Pair programming
2. Planning game
3. Test driven development
4. Whole team - customer is in the team
5. Continuous process (integration, refactoring, small releases)
6. Shared understanding (coding, collective ownership, simple design)
7. Sustainable pace
![Page 8: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/8.jpg)
Pair programming
![Page 9: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/9.jpg)
Pair programming
Driver & Navigator metaphor improving:
- Economics
Errors avoided, zero cost to fix them later
- Design quality
Second opinion constantly questioning yours
- Satisfaction - Great confidence in code
- Learning - Constant exchange of knowledge
- Team building - Communication improves exponentially
![Page 10: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/10.jpg)
Resistance to XP
2 programmers cost 2 times more than 1 programmer!
Place full of people never shutting their mouth will drive you insane!
When do I get to surf the web? Or chat online?
![Page 11: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/11.jpg)
Resistance to XP (cont.)
Mistakes of a single person cost much much more!
Once you are working with your pair, you don't hear anyone else anymore.
In fact, smart manager knows:
No noise -> something is wrong!
![Page 12: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/12.jpg)
Planning game
![Page 13: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/13.jpg)
Planning game
Release plan
Iteration plan
Acceptance test
Stand Up Meeting
Pair Negotiation
Unit Test
Pair Programming
![Page 14: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/14.jpg)
Planning game
![Page 15: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/15.jpg)
Burndown and velocity
How much work is getting done on your project?
Burndown keeps track of iteration progres
Calculate velocity on the end of iteration
=(estimated hours - remaining hours) / nr. of
days
![Page 16: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/16.jpg)
PG - Burndown and velocity
![Page 17: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/17.jpg)
Test driven development
… will be presented soon
![Page 18: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/18.jpg)
Whole team
Customer is “on site” and used for:
writing user stories
release and iteration planning
complete programming tasks
functional testing
Alternative: “proxy customer”
![Page 19: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/19.jpg)
Continuous process
Continuous integration
Design improvement, refactorings
Small releases, shippable products, demonstration per iteration
![Page 20: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/20.jpg)
Shared understanding
Coding standard
Collective code ownership
Simple design
System metaphor
![Page 21: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/21.jpg)
Sustainable pace
Frequent code merge
&
always executable
&
test covered high quality code
---> fresh and alert minds
40 hours week
![Page 22: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/22.jpg)
![Page 23: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/23.jpg)
Test driven development
![Page 24: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/24.jpg)
Test driven development
Add a test
Run all tests and see if the new one fails
Write some code
Run tests
Refactor code
Repeat
![Page 25: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/25.jpg)
Test driven development
![Page 26: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/26.jpg)
Test driven development
Apply F.I.R.S.T. properties of unit tests:
Fastmany hundreds or thousands per second
Isolatesfailure reason become obvious
Repeatablerun repeatedly in any order any time
Self-validatingno manual evaluation required
Timelywritten before the code
![Page 27: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/27.jpg)
Test driven development
One assert per test
Descriptive names of tests
Test code is important as production code (maybe more)
Recognize test code as documentation you arealways missing
The quality of a test is how good it points you on the failure in your system if it fails
![Page 28: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/28.jpg)
TDD - practical introduction
Two parts:
Java TDD Kata in Eclipse
User interface TDD testing
![Page 29: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/29.jpg)
TDD Kata
String Calculator:
Set of requirements
Develop one task at a time
Test only positive cases
![Page 30: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/30.jpg)
TDD Kata – String Calculator
Requirements:1. Empty string returns zero
2. String with single digit returns that digit
3. String with 2 digits separated with a ‘,‘ retuns sum of these 2 numbers ()
4. Unknown number of digits separated by ‘,‘ must be possible
5. A new line can be used as a separator
6. Custom delimiter must be supported (//[delimiter]\n[numbers])
![Page 31: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/31.jpg)
User interface TDD testing
New page development in TDD
Tools: Eclipse, Selenium, TestNG
Free tool: testeditor.org
![Page 32: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/32.jpg)
Q&A
![Page 33: xTreme Programming by Sejo Ćesić and Enis Zeherović](https://reader034.vdocument.in/reader034/viewer/2022050720/554f9150b4c9052a518b53c3/html5/thumbnails/33.jpg)
THANK YOU