SlideShare a Scribd company logo
1 of 49
Paweł Lipiński
Extreme Programming practices
for your team
whoami
ā€¢ ~15 years as a developer, ~11 years in Java
ā€¢ programming, consulting, training,
auditing, architecturing, coaching,
team leading
ā€¢ Formal & agile methods
ā€¢ currently: developer, coach, ceo @
Nokia Test
ā€¢ iterations timeboxed and < 4 weeks
ā€¢ newly created features tested and working at
the end of each iteration
ā€¢ iteration must start before its speciļ¬cation is
complete
Thatā€™s not agile yet, weā€™re only talking
about being iterative here.
Nokia Test - SCRUM
ā€¢ you know who the PO is
ā€¢ there is a Product Backlog prioritised by business
value
ā€¢ the Product Backlog has estimates created by the
Team
ā€¢ the Team maintains burndown charts and knows
their velocity
ā€¢ there are no PMs disrupting the work of the Team
Once upon a time...
1970. Royce, Winston (1970), "Managing the Development of Large Software Systems",
Proceedings of IEEE WESCON 26 (August): 1ā€“9.
He was the ļ¬rst who described the Waterfall model for software development,
although Royce did not use the term "waterfall" in that article,
nor advocated the waterfall model as a working methodology.
Royce in fact said that it was "risky and invites failure" and went on to
describe Incremental development. DOD-STD-2167 coined the term Waterfall
to refer to the diagram on page 2 of Dr. Royce's paper.
http://en.wikipedia.org/wiki/Winston_W._Royce
1970. Royce, Winston (1970), "Managing the Development of Large Software Systems",
Proceedings of IEEE WESCON 26 (August): 1ā€“9.
Cost of change
grows exponentially with time
0
250
500
750
1000
Reqs Analysis Design Coding Testing Prod
Barry Boehm
Ideas are cheaper to change than code.
Bugs found early are cheaper to ļ¬x.
Does cost of change really
grow exponentially with time?
0
5
10
15
20
0 1 2 3 4 5 6
Postponing decisions and
reducing feedback cycles ļ¬‚attens the curve.
The ā€žSā€ word
Well-deļ¬ned process
Certiļ¬cation
Books
Conferences
Coaching
SCRUM = Agile
Long iterations
XP is a discipline
of software development
There are certain things
you must do...
You must write tests before code.
You must program in pairs.
You must integrate frequently.
You must be rested.
You must communicate with the customer daily.
You must follow the customerā€™s priorities.
You must leave the software clean and simple
by the end of the day.
You must adapt the process and practices
to your environment.
If something is hard, letā€™s do it more often.
Why is it called Extreme?
If something is good, letā€™s do it more often.
Beck, K. (1999). Extreme Programming Explained: Embrace Change. Addison-Wesley. ISBNĀ 978-0-321-27865-4.
Ariane 5 ļ¬‚ight 501
10 years of work
5.000.000.000 ā‚¬ā‚¬
http://www.dutchspace.nl/uploadedImages/Products_and_Services/Launchers/Ariane%205%20Launch%20512%20-%20ESA.JPG
http://www.capcomespace.net/dossiers/espace_europeen/ariane/ariane5/AR501/V88%20explosion%2003.jpg
TDD
A technique of software development
based on repeating a short cycle:
Red
Green
Refactor
make the test pass
improve the design and code readability
write new, unpassing test
TDD
A technique of software development
based on repeating a short cycle:
Acceptable quality
0
25
50
75
100
0 1 2 3 4 5
0
25
50
75
100
0 1 2 3 4 5
Traditional development
Agile
http://ļ¬‚agstaffclimbing.com/wp-content/themes/climbing/images/ļ¬‚ag-climbing-bg.jpg
Deļ¬ne behaviour
Specify contract
Clock clock = new Clock();
clock.set(6, 15);
wait(5).minutes();
assertClockAt(6, 20);
Red
ā€¢ thinking - which way to choose?
ā€¢ designing
Clock clock = new Clock();
clock.set(6, 15);
wait(5).minutes();
assertClockAt(6, 20);
ā€¢ code quality
ā€¢ testability
ā€¢ test quality
Red āž” Green
How to achieve the behaviour?
Clock clock = new Clock();
clock.set(6, 15);
wait(5).minutes();
assertClockAt(6, 20);
class Clock {
...
}
class Clock {
...
}
class Clock {
...
}
Red āž” Green
programming
ā€¢ is the new code working?
ā€¢ didnā€™t I break any other piece of
code?
ā€¢ did I choose the right test size?
(coding time)
Refactor
How should the code look
like?
Clock clock = new Clock();
clock.set(6, 15);
wait(5).minutes();
assertClockAt(6, 20);
ā€¢ design quality (how easy it is to refactor)
ā€¢ testsā€™ quality (how safe is it to refactor)
Refactor
ā€¢ designing
ā€¢ refactoring
How to start doing it?
JUnit junitparams arquilian
hamcrest mockito jMock
fest-assert runners TestNG
catch-exception sureļ¬re PowerMock
MINDSET
How to start doing it?
Just do it.
Ok, but... how to make it stick?
Do it with the whole team.
Get a coach to spend time with your
team, on your code.
Learn it in pairs
Try kata trainings - it will build a
habit of test-driving in your head.
Peer-review
your test code
Refactoring
Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
Martin Fowler
public int[] returnPoints (Theme usersTheme) {
	 	 int[] points = new int[10];
	 	 if (year != 0 && year >= usersTheme.year - 15 && year <= usersTheme.year + 15) {
	 	 	 if (year >= usersTheme.year - 10 && year <= usersTheme.year + 10) {
	 	 	 	 if (year >= usersTheme.year - 5 && year <= usersTheme.year + 5) {
	 	 	 	 	 if (year >= usersTheme.year - 2 && year <= usersTheme.year + 2) {
	 	 	 	 	 	 points[0] = 4;
	 	 	 	 	 } else
	 	 	 	 	 	 points[0] = 3;
	 	 	 	 } else
	 	 	 	 	 points[0] = 2;
	 	 	 } else
	 	 	 	 points[0] = 1;
	 	 }
	 	 if (composer == usersTheme.composer) {
	 	 	 points[1] = 8;
	 	 }
	 	 if (category != 2) {
	 	 	 if (_11 != 0 && _11 == usersTheme._11)
	 	 	 	 points[4] = 4;
	 	 	 if (_12 != 0 && _12 == usersTheme._12)
	 	 	 	 points[5] = 3;
	 	 	 if (_13 != 0 && _13 == usersTheme._13)
	 	 	 	 points[6] = 2;
	 	 	 if (_15 != 0 && _15 == usersTheme._15)
	 	 	 	 points[8] = 2;
	 	 	 if (_16 != 0 && _16 == usersTheme._16)
	 	 	 	 points[9] = 4;
	 	 	 if (category == 1) {
	 	 	 	 if (((_9 == 1 || _9 == 3) && _9 == usersTheme._9) || ((_9 == 2 || _9 == 4) && _9 == usersTheme._9 && _10 == usersTheme._10))
	 	 	 	 	 points[2] = 6;
	 	 	 } else {
	 	 	 	 if (_9 == usersTheme._9 && _10 == usersTheme._10)
	 	 	 	 	 points[2] = 6;
	 	 	 }
	 	 } else {
	 	 	 if (_9 != 0 && _9 == usersTheme._9)
	 	 	 	 points[2] = 6;
	 	 	 if (_10 != 0 && _10 == usersTheme._10)
	 	 	 	 points[3] = 3;
	 	 	 if (Application.getConfiguration().getQuestions() == Configuration.QUESTIONS_FULL_SET) {
	 	 	 	 if ((_11 != 0 && _11 == usersTheme._11 && _13 != 0 && _13 == usersTheme._13)
	 	 	 	 	 	 || (_11 != 0 && _11 == usersTheme._12 && _13 != 0 && _13 == usersTheme._14))
	 	 	 	 	 points[4] = 4;
	 	 	 	 if ((_12 != 0 && _12 == usersTheme._12 && _14 != 0 && _14 == usersTheme._14)
	 	 	 	 	 	 || (_12 != 0 && _12 == usersTheme._11 && _14 != 0 && _14 == usersTheme._13))
	 	 	 	 	 points[6] = 4;
	 	 	 } else {
	 	 	 	 if (_13 != 0 && (_13 == usersTheme._13 || _13 == usersTheme._14))
	 	 	 	 	 points[4] = 4;
	 	 	 	 if (_14 != 0 && (_14 == usersTheme._14 || _14 == usersTheme._13))
	 	 	 	 	 points[6] = 4;
	 	 	 }
	 	 	 if (_15 != 0 && _15 == usersTheme._15)
	 	 	 	 points[8] = 4;
	 	 	 if (_16 != 0 && _16 == usersTheme._16)
	 	 	 	 points[9] = 2;
	 	 }
	 	 return points;
	 }
// https://code.google.com/p/gag/
@LOL @Facepalm
@WTF("whoā€™s gonna refactor this one?")
Refactoring
ā€¢ no change in code semantics
ā€¢ improves readability
ā€¢ improves ļ¬‚exibility
ā€¢ improves performance
Ok, but how to start doing it?
Have automated tests!
Learn a bit about OOD...
Baby steps - as a part of
your TDD cycle at best.
Design Patterns
S.O.L.I.D.
Check what your IDE
can do automatically ...and master it :-)
And how to make it stick?
Become an OO master
Master your IDE
Big refactorings only when
absolutely needed.
Donā€™t do it just for artā€™s sake.
Force yourself to think what to refactor
in every TDD cycle.
Pair programming
http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2011/10/25/1319565246130/Russian-President-Dmitry--007.jpg
The biggest challenge for me personally was essentially mourning for
the death of ā€œProgrammer Manā€.
http://www.nomachetejuggling.com/2009/02/21/i-love-pair-programming/
Programmer Man is how I think of myself when Iā€™ve got my
headphones in, speed metal blaring in my ears, and Iā€™m coding like a
motherfucker. My ļ¬ngers canā€™t keep up with my brain. Iā€™m In The
Zone.
For most of my career, this image is what Iā€™ve considered to be the
zenith. When I come home and was in Programmer Man Mode most of
the day, I feel like Iā€™ve had a good day.
Pair Programming undeniably killed Programmer Man. This
was a tough adjustment, since Iā€™ve considered that mode to be my
favorite for so long. I now see, however, that Programmer Man was,
without me knowing it, Technical Debt Man.
Donā€™t be afraid of pair-programming - youā€™re not as good as
you think, but youā€™re not as bad as you fear.
Ron Jeffries
Ok, but how to start doing it?
Comfortable position
Do harder bits in pairs ļ¬rst
Do it the right way - one person codes,
the other gets the bigger picture.
Get a shower.
Switch pairs.
And how to make it stick?
2 mice
2 keyboards
Check which setting ļ¬ts you best.
Initially everybody MUST pair. Make it
optional once you know it well.
http://www.nomachetejuggling.com/2011/08/25/mechanics-of-good-pairing/
Collective code ownership
Whose bug is it?
Who wrote it?
Hey, whose is that class?
John, would you be so nice...
Sorry, Iā€™ve got other things to do now.
We cannot ļ¬x it - Steveā€™s ill.
WTF??? Who is the owner of...
Mary, youā€™re
responsible for
it, ainā€™t ya?
Ok, but how to start doing it?
Choose one module to own collectively
Have automated tests!
ā€žCannot refuse helpingā€ rule. Pair program as
much as you can.
Choose tasks you have little clue about.
Discuss what youā€™re planning to work on.
Make technical presentations / discussions
Ask for help.
And how to make it stick?
Itā€™s about team culture - discuss it.
Pair program.
Peer-review everything that
hasnā€™t been pair-programmed.
Initially everybody MUST pair. Make it
optional once you know it well.
Ok, but how to start doing it?
Jenkins cruise-control
gump Team Foundation Server
TeamCity Continuum Hudson
Bamboo
Check-in often... clean builds.
Never leave the ofļ¬ce
if the build is broken.
Time-box ļ¬xing build
revert if needed.
Youā€™re responsible if your
build broke something.
Donā€™t comment out
failing tests...
And how to make it stick?
Sonar
Lots of tests.
Integration tests.
Notiļ¬cations which piss you off.
End-to-end tests.
Keep your tests fast.
Fancy info radiator.
Optimize your building process.
Pair Programming
Coding Standards
Continuous IntegrationRefactoring
40-hour week
Collective Code Ownership
TDD
Simple Design
Metaphor
Extreme Programming practices
Fun
Quality
Growth
Efļ¬ciency
Team
Effectiveness
Motivation
Skills
Diversity
Business-driven
pawel.lipinski@pragmatists.pl
Thank you!

More Related Content

Similar to Extreme Programming practices for your team

You shouldneverdo
You shouldneverdoYou shouldneverdo
You shouldneverdo
daniil3
Ā 
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaBoost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Stack Learner
Ā 
Code Retreat
Code RetreatCode Retreat
Code Retreat
Igor Popov
Ā 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
Svetlin Nakov
Ā 
JavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdfJavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdf
Sathwika7
Ā 
Drupalcamp Simpletest
Drupalcamp SimpletestDrupalcamp Simpletest
Drupalcamp Simpletest
lyricnz
Ā 

Similar to Extreme Programming practices for your team (20)

You shouldneverdo
You shouldneverdoYou shouldneverdo
You shouldneverdo
Ā 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
Ā 
Training methdology testers to developers
Training methdology   testers to developersTraining methdology   testers to developers
Training methdology testers to developers
Ā 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
Ā 
Hacking Primavera P6 - Creative Solutions to Common Problems From the Primave...
Hacking Primavera P6 - Creative Solutions to Common Problems From the Primave...Hacking Primavera P6 - Creative Solutions to Common Problems From the Primave...
Hacking Primavera P6 - Creative Solutions to Common Problems From the Primave...
Ā 
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
Ā 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
Ā 
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaBoost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Ā 
Overcome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challengesOvercome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challenges
Ā 
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Case Study: Time Warner Cable's Formula for Maximizing Adobe Experience Manager
Ā 
Cursus phpunit
Cursus phpunitCursus phpunit
Cursus phpunit
Ā 
Code Retreat
Code RetreatCode Retreat
Code Retreat
Ā 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
Ā 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
Ā 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
Ā 
JavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdfJavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdf
Ā 
Six Years of Teaching Certified Scrum Developers
Six Years of Teaching Certified Scrum DevelopersSix Years of Teaching Certified Scrum Developers
Six Years of Teaching Certified Scrum Developers
Ā 
Dutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: DistilledDutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: Distilled
Ā 
Tdd
TddTdd
Tdd
Ā 
Drupalcamp Simpletest
Drupalcamp SimpletestDrupalcamp Simpletest
Drupalcamp Simpletest
Ā 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(ā˜Žļø+971_581248768%)**%*]'#abortion pills for sale in dubai@
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Ā 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Ā 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Ā 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā 
Scaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organizationScaling API-first ā€“ The story of a global engineering organization
Scaling API-first ā€“ The story of a global engineering organization
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 

Extreme Programming practices for your team

  • 2. whoami ā€¢ ~15 years as a developer, ~11 years in Java ā€¢ programming, consulting, training, auditing, architecturing, coaching, team leading ā€¢ Formal & agile methods ā€¢ currently: developer, coach, ceo @
  • 3. Nokia Test ā€¢ iterations timeboxed and < 4 weeks ā€¢ newly created features tested and working at the end of each iteration ā€¢ iteration must start before its speciļ¬cation is complete Thatā€™s not agile yet, weā€™re only talking about being iterative here.
  • 4. Nokia Test - SCRUM ā€¢ you know who the PO is ā€¢ there is a Product Backlog prioritised by business value ā€¢ the Product Backlog has estimates created by the Team ā€¢ the Team maintains burndown charts and knows their velocity ā€¢ there are no PMs disrupting the work of the Team
  • 5. Once upon a time... 1970. Royce, Winston (1970), "Managing the Development of Large Software Systems", Proceedings of IEEE WESCON 26 (August): 1ā€“9.
  • 6. He was the ļ¬rst who described the Waterfall model for software development, although Royce did not use the term "waterfall" in that article, nor advocated the waterfall model as a working methodology. Royce in fact said that it was "risky and invites failure" and went on to describe Incremental development. DOD-STD-2167 coined the term Waterfall to refer to the diagram on page 2 of Dr. Royce's paper. http://en.wikipedia.org/wiki/Winston_W._Royce
  • 7. 1970. Royce, Winston (1970), "Managing the Development of Large Software Systems", Proceedings of IEEE WESCON 26 (August): 1ā€“9.
  • 8. Cost of change grows exponentially with time 0 250 500 750 1000 Reqs Analysis Design Coding Testing Prod Barry Boehm Ideas are cheaper to change than code. Bugs found early are cheaper to ļ¬x.
  • 9. Does cost of change really grow exponentially with time? 0 5 10 15 20 0 1 2 3 4 5 6 Postponing decisions and reducing feedback cycles ļ¬‚attens the curve.
  • 10. The ā€žSā€ word Well-deļ¬ned process Certiļ¬cation Books Conferences Coaching SCRUM = Agile Long iterations
  • 11. XP is a discipline of software development
  • 12. There are certain things you must do... You must write tests before code. You must program in pairs. You must integrate frequently. You must be rested. You must communicate with the customer daily. You must follow the customerā€™s priorities. You must leave the software clean and simple by the end of the day. You must adapt the process and practices to your environment.
  • 13. If something is hard, letā€™s do it more often. Why is it called Extreme? If something is good, letā€™s do it more often.
  • 14. Beck, K. (1999). Extreme Programming Explained: Embrace Change. Addison-Wesley. ISBNĀ 978-0-321-27865-4.
  • 15. Ariane 5 ļ¬‚ight 501 10 years of work 5.000.000.000 ā‚¬ā‚¬ http://www.dutchspace.nl/uploadedImages/Products_and_Services/Launchers/Ariane%205%20Launch%20512%20-%20ESA.JPG
  • 17.
  • 18. TDD A technique of software development based on repeating a short cycle: Red Green Refactor
  • 19. make the test pass improve the design and code readability write new, unpassing test TDD A technique of software development based on repeating a short cycle:
  • 20. Acceptable quality 0 25 50 75 100 0 1 2 3 4 5 0 25 50 75 100 0 1 2 3 4 5 Traditional development Agile
  • 22. Deļ¬ne behaviour Specify contract Clock clock = new Clock(); clock.set(6, 15); wait(5).minutes(); assertClockAt(6, 20);
  • 23. Red ā€¢ thinking - which way to choose? ā€¢ designing Clock clock = new Clock(); clock.set(6, 15); wait(5).minutes(); assertClockAt(6, 20); ā€¢ code quality ā€¢ testability ā€¢ test quality
  • 24. Red āž” Green How to achieve the behaviour? Clock clock = new Clock(); clock.set(6, 15); wait(5).minutes(); assertClockAt(6, 20); class Clock { ... } class Clock { ... } class Clock { ... }
  • 25. Red āž” Green programming ā€¢ is the new code working? ā€¢ didnā€™t I break any other piece of code? ā€¢ did I choose the right test size? (coding time)
  • 26. Refactor How should the code look like? Clock clock = new Clock(); clock.set(6, 15); wait(5).minutes(); assertClockAt(6, 20);
  • 27. ā€¢ design quality (how easy it is to refactor) ā€¢ testsā€™ quality (how safe is it to refactor) Refactor ā€¢ designing ā€¢ refactoring
  • 28. How to start doing it? JUnit junitparams arquilian hamcrest mockito jMock fest-assert runners TestNG catch-exception sureļ¬re PowerMock MINDSET
  • 29. How to start doing it? Just do it.
  • 30. Ok, but... how to make it stick? Do it with the whole team. Get a coach to spend time with your team, on your code. Learn it in pairs Try kata trainings - it will build a habit of test-driving in your head. Peer-review your test code
  • 31. Refactoring Any fool can write code that a computer can understand. Good programmers write code that humans can understand. Martin Fowler
  • 32. public int[] returnPoints (Theme usersTheme) { int[] points = new int[10]; if (year != 0 && year >= usersTheme.year - 15 && year <= usersTheme.year + 15) { if (year >= usersTheme.year - 10 && year <= usersTheme.year + 10) { if (year >= usersTheme.year - 5 && year <= usersTheme.year + 5) { if (year >= usersTheme.year - 2 && year <= usersTheme.year + 2) { points[0] = 4; } else points[0] = 3; } else points[0] = 2; } else points[0] = 1; } if (composer == usersTheme.composer) { points[1] = 8; } if (category != 2) { if (_11 != 0 && _11 == usersTheme._11) points[4] = 4; if (_12 != 0 && _12 == usersTheme._12) points[5] = 3; if (_13 != 0 && _13 == usersTheme._13) points[6] = 2; if (_15 != 0 && _15 == usersTheme._15) points[8] = 2; if (_16 != 0 && _16 == usersTheme._16) points[9] = 4; if (category == 1) { if (((_9 == 1 || _9 == 3) && _9 == usersTheme._9) || ((_9 == 2 || _9 == 4) && _9 == usersTheme._9 && _10 == usersTheme._10)) points[2] = 6; } else { if (_9 == usersTheme._9 && _10 == usersTheme._10) points[2] = 6; } } else { if (_9 != 0 && _9 == usersTheme._9) points[2] = 6; if (_10 != 0 && _10 == usersTheme._10) points[3] = 3; if (Application.getConfiguration().getQuestions() == Configuration.QUESTIONS_FULL_SET) { if ((_11 != 0 && _11 == usersTheme._11 && _13 != 0 && _13 == usersTheme._13) || (_11 != 0 && _11 == usersTheme._12 && _13 != 0 && _13 == usersTheme._14)) points[4] = 4; if ((_12 != 0 && _12 == usersTheme._12 && _14 != 0 && _14 == usersTheme._14) || (_12 != 0 && _12 == usersTheme._11 && _14 != 0 && _14 == usersTheme._13)) points[6] = 4; } else { if (_13 != 0 && (_13 == usersTheme._13 || _13 == usersTheme._14)) points[4] = 4; if (_14 != 0 && (_14 == usersTheme._14 || _14 == usersTheme._13)) points[6] = 4; } if (_15 != 0 && _15 == usersTheme._15) points[8] = 4; if (_16 != 0 && _16 == usersTheme._16) points[9] = 2; } return points; } // https://code.google.com/p/gag/ @LOL @Facepalm @WTF("whoā€™s gonna refactor this one?")
  • 33. Refactoring ā€¢ no change in code semantics ā€¢ improves readability ā€¢ improves ļ¬‚exibility ā€¢ improves performance
  • 34. Ok, but how to start doing it? Have automated tests! Learn a bit about OOD... Baby steps - as a part of your TDD cycle at best. Design Patterns S.O.L.I.D. Check what your IDE can do automatically ...and master it :-)
  • 35. And how to make it stick? Become an OO master Master your IDE Big refactorings only when absolutely needed. Donā€™t do it just for artā€™s sake. Force yourself to think what to refactor in every TDD cycle.
  • 37. The biggest challenge for me personally was essentially mourning for the death of ā€œProgrammer Manā€. http://www.nomachetejuggling.com/2009/02/21/i-love-pair-programming/ Programmer Man is how I think of myself when Iā€™ve got my headphones in, speed metal blaring in my ears, and Iā€™m coding like a motherfucker. My ļ¬ngers canā€™t keep up with my brain. Iā€™m In The Zone. For most of my career, this image is what Iā€™ve considered to be the zenith. When I come home and was in Programmer Man Mode most of the day, I feel like Iā€™ve had a good day. Pair Programming undeniably killed Programmer Man. This was a tough adjustment, since Iā€™ve considered that mode to be my favorite for so long. I now see, however, that Programmer Man was, without me knowing it, Technical Debt Man.
  • 38. Donā€™t be afraid of pair-programming - youā€™re not as good as you think, but youā€™re not as bad as you fear. Ron Jeffries
  • 39. Ok, but how to start doing it? Comfortable position Do harder bits in pairs ļ¬rst Do it the right way - one person codes, the other gets the bigger picture. Get a shower. Switch pairs.
  • 40. And how to make it stick? 2 mice 2 keyboards Check which setting ļ¬ts you best. Initially everybody MUST pair. Make it optional once you know it well. http://www.nomachetejuggling.com/2011/08/25/mechanics-of-good-pairing/
  • 41. Collective code ownership Whose bug is it? Who wrote it? Hey, whose is that class? John, would you be so nice... Sorry, Iā€™ve got other things to do now. We cannot ļ¬x it - Steveā€™s ill. WTF??? Who is the owner of... Mary, youā€™re responsible for it, ainā€™t ya?
  • 42. Ok, but how to start doing it? Choose one module to own collectively Have automated tests! ā€žCannot refuse helpingā€ rule. Pair program as much as you can. Choose tasks you have little clue about. Discuss what youā€™re planning to work on. Make technical presentations / discussions Ask for help.
  • 43. And how to make it stick? Itā€™s about team culture - discuss it. Pair program. Peer-review everything that hasnā€™t been pair-programmed. Initially everybody MUST pair. Make it optional once you know it well.
  • 44.
  • 45. Ok, but how to start doing it? Jenkins cruise-control gump Team Foundation Server TeamCity Continuum Hudson Bamboo Check-in often... clean builds. Never leave the ofļ¬ce if the build is broken. Time-box ļ¬xing build revert if needed. Youā€™re responsible if your build broke something. Donā€™t comment out failing tests...
  • 46. And how to make it stick? Sonar Lots of tests. Integration tests. Notiļ¬cations which piss you off. End-to-end tests. Keep your tests fast. Fancy info radiator. Optimize your building process.
  • 47. Pair Programming Coding Standards Continuous IntegrationRefactoring 40-hour week Collective Code Ownership TDD Simple Design Metaphor