Introduction Professional Scrum Developer for Java
-
Upload
joris-de-winne -
Category
Technology
-
view
1.968 -
download
4
description
Transcript of Introduction Professional Scrum Developer for Java
![Page 1: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/1.jpg)
Introduction PSD
Professional Scrum Developer Java
![Page 2: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/2.jpg)
Who am I? Who are you?
Name From What would I be if I did not end up in IT?
![Page 3: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/3.jpg)
Rules during the course
● Questions?– Ask!!!!
– Or put them on the board
● Mobile phones● Laptops● Breaks
![Page 4: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/4.jpg)
Course content
1. Introduction
2. Scrum explained
3. Scrum courses
4. Agile Testing & TDD
5. Pair Programming
6. Clean Code
7. Continuous Delivery
8. Tools
9. Books
![Page 5: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/5.jpg)
Scrum explained (5 min.)
● Question:What is Scrum for you?
● Put in one sentence on a post-it what you think Scrum is.
![Page 6: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/6.jpg)
Scrum explained
● What are the results? Discuss.
![Page 7: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/7.jpg)
Scrum explained
● Definition:Scrum is a framework for developing and sustaining complex products.
![Page 8: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/8.jpg)
Scrum explained: Roles
● Product Owner– Maximize value of the product– Manages Product Backlog– 1 person!– Prioritizes PBI's
● Scrum Master– Ensures Scrum is understood & enacted– Servant leader– Helps Product Owner, Development Team & Organization– Applies Scrum theory, practices & rules
© 1993 - 2013 Scrum.org, All Rights Reserved
![Page 9: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/9.jpg)
Scrum explained: Roles
● Development Team– Professionals
– Self organizing
– Everyone is a developer
– Cross functional
– Self Organizing
● Scrum Team– Consists of “Development Team”, “Product Owner” and
“Scrum Master”
© 1993 - 2013 Scrum.org, All Rights Reserved
![Page 10: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/10.jpg)
Scrum explained: Roles
![Page 11: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/11.jpg)
Scrum explained: Events
● Sprint Planning– Define work to be performed during the upcoming Sprint.– Timeboxed: 8 hours for 4 week sprint– Two parts
● What will we do● How will we do it
– Sprint Goal
● Daily Scrum– Daily 15 minute time boxed event– For the Development Team
– No status meeting
© 1993 - 2013 Scrum.org, All Rights Reserved
![Page 12: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/12.jpg)
Scrum explained: Events
● Sprint Review– Inspect the increment and adapt Product Backlog
– Invite stakeholders
– Timeboxed: 4 hours for 4 week sprint
● Sprint Retrospective– Opportunity to inspect how we are working and to
adapt
– For the Scrum Team
– Timeboxed: 3 hours for 4 week sprint
http://davidemanske.com/wp-content/uploads/2013/06/SpeedBoatRetrospective-300x128.png
http://www.flickr.com/photos/92328289@N02/
![Page 13: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/13.jpg)
Scrum explained: Events
● Sprint– The heart of Scrum
– Timeboxed: Max one month.
– Delivers a “Done”, useable and potentially releasable product increment
– Contains all the other events
http://www.flickr.com/photos/gareth_price/
![Page 14: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/14.jpg)
Scrum Explained: Artifacts
● Product Backlog– Ordered list
– Never complete– Contains PBI's– Product Owner is responsible
● Sprint Backlog– Set of Product Backlog Items– Plan for delivering Product Increment– Contains Sprint Goal
● Increment– Sum of all PBI's done during a Sprint
![Page 15: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/15.jpg)
Management by walking around
● Round 1– Pair up: one person will be manager, other the worker
– Simulation: shopping mall traffic, by walking from one shop to another
– Goal: Take 60 steps
– Instructions:● Go 1 step forward● Turn 1 step left● Turn 1 step right● Stop
– Manager counts the number of steps
– You get 60 seconds
![Page 16: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/16.jpg)
Management by walking around
● Round 1 evaluation– How many steps did you take?
– How did you feel? Managers? Workers?
![Page 17: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/17.jpg)
Management by walking around
● Round 2– No more pairs
– Goal: Take 60 steps
– Each person counts his own steps
– You get again 60 seconds
![Page 18: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/18.jpg)
Management by walking around
● Round 2 evaluation– How many steps?
– How did you feel?
https://upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Fugle,_%C3%B8rns%C3%B8_073.jpg/250px-Fugle,_%C3%B8rns%C3%B8_073.jpg
![Page 19: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/19.jpg)
Scrum explained: self organizing
● No one (not even the Scrum Master) tells the Development Team how to turn Product Backlog into Increments of potentially releasable functionality.
● The Development Team self-organizes to undertake the work in the Sprint Backlog, both during the Sprint Planning Meeting and as needed throughout the Sprint.
● Self-organizing teams choose how best to accomplish their work, rather than being directed by others outside the team.
![Page 20: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/20.jpg)
Scrum explained: self organizing
Old style Scrum
Team lead assigns tasks Development figures it out ;-)
No such thing as people working together Pair programming
All communication is done through team lead
Direct communication between developers
Weekly status meeting, reporting to manager
Daily Scrum
Team lead is responsible The whole Scrum Team is responsible, including ALL developers.
![Page 21: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/21.jpg)
Scrum explained: transparency, inspect & adapt
● Pillars of empirical process control– Transparency: be realistic, no hidden stuff
– Inspection: Look back, measure stuff
– Adaption: Be open for changes!
● You can NOT predict the future
![Page 22: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/22.jpg)
Scrum explained: transparency, inspect & adapt
Cirkel van Deming
PlanPlan
Inspect
Do
Goal
• Constantly improve• Deliver faster• Deliver more efficient• Deliver with higher quality
Act
![Page 23: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/23.jpg)
Scrum explained: Cross functional
DBATestingDevelopmentAnalysisOperations
DBATestingDevelopmentAnalysisOperations
DBATestingDevelopmentAnalysisOperations
DBATestingDevelopmentAnalysisOperations
DBA
Testing
DevelopmentTesting
Analysis
Operations
TEAM 1 TEAM 2
Testing
DevelopmentTesting
TEAM 3 TEAM 4
Analysis
Testing
Analysis
![Page 24: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/24.jpg)
Scrum explained: DoD
“Done”: Means a PBI is potentially shippable.
Definition of Done (DoD)
● Checklist
● Visible
● Inspected & adapted
![Page 25: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/25.jpg)
Scrum explained: DoD (5min.)
● Answer the following questions:
– What is your Definition of Done?
– Who owns the Definition of Done?
– Who or what influences it and how?
![Page 26: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/26.jpg)
Scrum explained: DoD (5min.)
● Answer the following questions:
– What is your Definition of Done?
– Who owns the Definition of Done?
– Who or what influences it and how?
![Page 27: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/27.jpg)
Scrum explained: Estimation
Architect
Team
Customer
When?
During BDUF
Sprint Planning
All the time
How?
Hours
Fibonacci
Beers
...
![Page 28: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/28.jpg)
Scrum explained: Estimation
● How?
– In group!– Discussion & Conversation is most important.– Relative to other things
● Hours???
– Parkinson's law: When an item is finished earlier, the developer will fill remaining time.
– Ideal or working hours?
Example: Why 16 hours and not 15?
![Page 29: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/29.jpg)
Scrum explained: Poker planning
http://wendysdogwalking.co.uk/wp-content/uploads/2013/04/dog-on-sofa-300x225.jpg
![Page 30: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/30.jpg)
Scrum explained: Backlog refinement
● aka Grooming
● Refine PBI's
– Clear and understood
– Estimated
– Broken down in small enough items
– Have acceptance criteria
Product Owner+
Development Team
During EACH Sprint
Timeboxed
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
As a …I want to …So that ….
3
1
0
8
13
●
●
●
![Page 31: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/31.jpg)
Scrum explained: Cone of Uncertainty
www.construx.comInitial EstimateProduct Backlog
Item Estimate
Sprint BacklogItem Estimate
![Page 32: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/32.jpg)
Scrum explained: Waterfall vs. Scrum
Req
uire
men
ts
BD
UF
Dev
elop
men
t
Test
ing
Don
e
Req
uire
men
ts
BD
UF
Dev
elop
men
t
Test
ing
Don
e
Req
uire
men
ts
BD
UF
Dev
elop
men
t
Test
ing
Don
e
Req
uire
men
ts
BD
UF
Dev
elop
men
t
Test
ing
Don
e
Req
uire
men
ts
BD
UF
Dev
elop
men
t
![Page 33: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/33.jpg)
Scrum explained: Waterfall vs. Scrum
DONE
DONE
DONE
DONE
DONE
● Done is Live
● Collaboration
● Communication
● Requirements, Design, Development, Testing
– All done in parallel, during Sprint
![Page 34: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/34.jpg)
Scrum explained: Waterfall vs. Scrum
Visibility Ability to Change
Business Value Risk
Waterfall Scrum
© 1993 - 2013 Scrum.org, All Rights Reserved
![Page 35: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/35.jpg)
Scrum explained: Scope, Resources, Time and Quality
● Project Management Triangle
QUALITY
SCOPE
TIME
RESOURCES
![Page 36: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/36.jpg)
Scrum explained: Where to start?
● Read the Scrum guide!
● Embrace failure.
● Do some assessmentshttp://www.scrum.org/Assessments/Open-Assessments
● Practice, practice, practice
● And practice
● Follow the rules, no exception.
© 1993 - 2013 Scrum.org, All Rights Reserved
![Page 37: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/37.jpg)
Scrum.org courses
Professional Scrum
Product Owner
Professional Scrum Foundations
Professional Scrum Master
Professional Scrum
Developer.NET | Java
Product OwnersExecutives Scrum Masters
ArchitectsBusiness Analysts
DB SpecialistsDesigners
DevelopersTesters
Everyone
© 1993 - 2013 Scrum.org, All Rights Reserved
![Page 38: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/38.jpg)
Scrum.org coursesCourses Public and private courses are offered worldwide Assessments Certification
Professional Scrum Foundations
Hands-on training for people looking to start Scrum or reboot a struggling implementation.
Professional Scrum Master
In-depth training for Scrum Masters and experienced practitioners needing more advanced instruction.
Professional Scrum Product Owner
Teaches people how to maximize ROI, and optimize the Total Cost of Ownership of products and systems.
Professional Scrum Developer
Students work as part of a self-organizing team to learn how to use ALM tools and Software development best practices in Scrum.
Certification only granted to those that achieve a passing score on the associated assessment
![Page 39: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/39.jpg)
Scrum.org vs Scrum Alliance
● Scrum.org– Assessments have more value.
– Each course is the same (doesn't depend on the trainer)
– Open for feedback and improvements
– Home of Scrum!
● Scrum alliance– Easier to get certified
– ...
![Page 40: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/40.jpg)
Time for ….
![Page 41: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/41.jpg)
Agile Testing
● Quadrants
Acceptance TestingFunctional TestsIntegration Tests
Exploratory TestingScenario TestingUsability Testing
Test by End User (UAT)
Unit TestModule Tests
Component Tests
Performance & Load TestingSecurity Testing
*ility Testing
Technology Facing
Business Facing
Automated
Automated Manual
Manual?
© 1993 - 2013 Scrum.org, All Rights Reserved
Brian Marick, http://bit.ly/PrsMY1
![Page 42: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/42.jpg)
Agile Testing
● Test Pyramids Mike Cohn, Succeeding with Agile
UI
Service
Unit
● Not executed frequently● Take long time to execute
● Executed frequently● Take short time to execute
![Page 43: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/43.jpg)
Agile Testing (5min.)
● What is wrong with the following?
UI
Service
ServiceUnit
Unit
UI
Service
Unit
UI
Service
Unit
UI
Service
Unit
How do your curre
nt tests lo
ok like? Explain.
![Page 44: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/44.jpg)
TDD (Test Driven Development)
● TDD Cycle
Write Test Watch Test Fail
Write simplestcode
Run all tests
Refactor
Run all tests
Idea?
![Page 45: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/45.jpg)
TDD (Test Driven Development)
● Three Laws of TDD– First: You may not write production code until you have written
a failing unit test.
– Second: You may not write more of a unit test than is sufficient to fail, and not compiling is failing.
– Third: You may not write more production code than is sufficient to pass the currently failing test.
● Keep test clean!● One Assert per Test.● Single Concept per Test.
Robert C. Martin
![Page 46: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/46.jpg)
TDD (Test Driven Development)
● F.I.R.S.T.– Fast
Tests should be fast.
– IndependentTests should not depend on each other.
– RepeatableTests should be repeatable in any environment.
– Self-ValidatingTests should have a boolean output (pass or fail).
– TimelyTests should be written before the production code.
Robert C. Martin
![Page 47: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/47.jpg)
TDD (Test Driven Development)
Kata String Calculator● Before you start:
– Try not to read ahead.
– Do one task at a time. The trick is to learn to work incrementally.
– Make sure you only test for correct inputs. there is no need to test for invalid inputs for this kata
http://osherove.com/tdd-kata-1/
![Page 48: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/48.jpg)
Kata String Calculator (10min.)
Part 1● Create a simple String calculator with a method
int Add(string numbers)– The method can take 0, 1 or 2 numbers, and will return their sum
(for an empty string it will return 0) for example “” or “1” or “1,2”
– Start with the simplest test case of an empty string and move to 1 and two numbers
– Remember to solve things as simply as possible so that you force yourself to write tests you did not think about
– Remember to refactor after each passing test
http://osherove.com/tdd-kata-1/
![Page 49: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/49.jpg)
Kata String Calculator (2 min.)
Part 1: Review● Who has written first a test, before writing the
Calculator class?● How many tests do you have now?● How many times did you run the test?● How many times did you refactor your code?
http://osherove.com/tdd-kata-1/
![Page 50: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/50.jpg)
Kata String Calculator (10 min.)
Part 2● Allow the Add method to handle an unknown
amount of numbers● Allow the Add method to handle new lines
between numbers (instead of commas).– the following input is ok: “1\n2,3” (will equal 6)
– the following input is NOT ok: “1,\n” (not need to prove it - just clarifying)
http://osherove.com/tdd-kata-1/
![Page 51: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/51.jpg)
Kata String Calculator (2 min.)
Part 2: Review● Who followed TDD Cycle?● How many tests do you have now?● Who wrote multiple tests at once?● What about exceptions?
http://osherove.com/tdd-kata-1/
![Page 52: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/52.jpg)
Kata String Calculator (10 min.)
Part 3● Support different delimiters
– to change a delimiter, the beginning of the string will contain a separate line that looks like this: “//[delimiter]\n[numbers…]” for example “//;\n1;2” should return three where the default delimiter is ‘;’ .
– the first line is optional. all existing scenarios should still be supported
http://osherove.com/tdd-kata-1/
![Page 53: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/53.jpg)
Kata String Calculator (2 min.)
Part 3: Review● Who followed TDD Cycle?● How do the names of your tests look like?
[MethodUnderTest]_[Given]_[Then]?● How many asserts does one test contain?
http://osherove.com/tdd-kata-1/
![Page 54: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/54.jpg)
Kata String Calculator (10 min.)
Part 4:● Calling Add with a negative number will throw
an exception “negatives not allowed” - and the negative that was passed. If there are multiple negatives, show all of them in the exception message
http://osherove.com/tdd-kata-1/
![Page 55: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/55.jpg)
Kata String Calculator (10 min.)
Part 4: Review● Who wants to show the result?
http://osherove.com/tdd-kata-1/
![Page 56: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/56.jpg)
Agile Testing: Code Coverage
What does this mean?
![Page 57: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/57.jpg)
Agile Testing: Tools
![Page 58: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/58.jpg)
Time for ….
![Page 59: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/59.jpg)
Time for ….
![Page 60: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/60.jpg)
Pair Programming
![Page 61: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/61.jpg)
Pair Programming
● Roles– Driver
– Navigator
● Rules– Pair on everything you'll need to maintain.
– Allow pairs to form fluidly rather than assigning partners.
– Switch partners when you need a fresh perspective.
– Avoid pairing with the same person for more than a day at a time.
– Sit confortable, side by side.
– Produce code through conversation. Collaborate, don't critique.
– Switch driver and navgator role frequently.
![Page 62: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/62.jpg)
Pair Programming
● Advantages– Higher quality
– Constant knowledge sharing
– Deliver faster
– Faster development
– An extra pair of eyes
– If Bob (the guru) leaves for a round-the-world trip → He Can!
– If Rob (the junior) joines the company, he gets up to speed in notime.
![Page 63: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/63.jpg)
Pair Programming
● Disadvantages– Are there?
![Page 64: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/64.jpg)
Clean Code
● Michael Feathers, author of Working Effectively with Legacy Code“Clean code always looks like it was written by someone who cares. There is nothing obvious that you can do to make it better”
Elegant
Efficient
Straightforward
Simple
Direct
Well written
Meaningfull
Clear
Beautifull
![Page 65: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/65.jpg)
Time for ….
![Page 66: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/66.jpg)
Clean Code: Boy Scout Rule
“Leave the campground cleaner than you found it.”
![Page 67: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/67.jpg)
Clean Code: Broken Windows Theory
The broken windows theory is a criminological theory of the norm-setting and signaling effect of urban disorder and vandalism on additional crime and anti-social behavior. The theory states that maintaining and monitoring urban environments in a well-ordered condition may stop further vandalism and escalation into more serious crime.http://en.wikipedia.org/wiki/Broken_windows_theory
● Just add another “if”.● Dirty code invites to add
more smells.● Growing method length● Growing class length● ...
![Page 68: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/68.jpg)
Clean Code: How to measure?
● The # tests?● The # bugs?● The # duplicated code?● The # unused code?● ...
![Page 69: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/69.jpg)
Clean Code: How to measure?http://www.osnews.com/story/19266/WTFs_m
![Page 70: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/70.jpg)
Clean Code: Clean Kitchen
3 Michelin sushi chef Saito is a master with the knifehttp://youtu.be/robvvJZkfcU
![Page 71: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/71.jpg)
Clean Code: Names
● Use meaningful names● Use intention – revealing names● Avoid disinformation● Use pronounceable names● Avoid encodings
– No Hungarian Notation
– Member prefixes?
● Use solution domain names● Use problem domain names● Pick one word per Concept
– No “get”, “retrieve”, “fetch”, ….
![Page 72: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/72.jpg)
Clean Code: Names (15min.)
● Checkout the code @https://github.com/jdewinne/PSDExamples
● Refactor the following code: Names.java
![Page 73: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/73.jpg)
Clean Code: Names (10min.)
● Who wants to show the result?
![Page 74: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/74.jpg)
Clean Code: Functions
● Small!● Do one thing!● Reading code from Top to Bottom
The stepdown rule● Arguments
– No flags
– As less as possible
– Don't use it for returning values
● Have no side effects– “checkPassword” should not create a session
● Exceptions over Error codes● DRY
![Page 75: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/75.jpg)
Clean Code: Functions
Any comments?
![Page 76: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/76.jpg)
Clean Code: Comments
“Don't comment bad code – rewrite it.”Brian W. Kernighan and P.J. Plaugher
● Explain in code, not in comments● Redundant comments :-(● Misleading comments :-(● Commented out code :-(● HTML comments :-(● Too much information (Do not add the whole
specification document)
![Page 77: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/77.jpg)
Clean Code: Comments (20 min.)
● Checkout the code @https://github.com/jdewinne/PSDExamples
● Refactor the following code: Comments.java
![Page 78: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/78.jpg)
Clean Code: Comments (10min.)
● Who wants to show the result?
![Page 79: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/79.jpg)
Clean Code: Formatting
● Vertical formatting– Lines per file.
– Each class should be max 200 lines!
– Vertical openness● Use some white lines ;-)
– Vertical Density● Tightly related lines should be close to each other
● Horizontal formatting– Line length
– Each line should max be 120characters long
– Horizontal Openness and Density
– Indentation
● Team rules!!!!!!!!!
![Page 80: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/80.jpg)
Clean Code: Law of Demeter
● A module should not know about the innards of the objects it manipulates.
customer.getAddress().getBillingAddress().getLine1()government.getPresident().getJobDescription().setName()
![Page 81: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/81.jpg)
Clean Code: Exceptions
● Use exceptions, instead of return codes.● Use meaningful exceptions● Don't return null● Don't pass null● Write the try / catch / finally first● Use unchecked exceptions
![Page 82: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/82.jpg)
Clean Code: Emergent Architecture (5min.)
● How does your architecture looks like?● First design, then implement?● You think also of the future? And have statements like:
– It must be scalable– It must be extensible for any feature we can think of– …
Discuss!
![Page 83: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/83.jpg)
Clean Code: Emergent Architecture
● BDUF is waste!● TDD is design.● BDD is design.● Allow your architecture to emerge as you
develop.● Think in slices (not in layers)
![Page 84: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/84.jpg)
Clean Code: Technical debt
Code Rots in Presence of Change!
![Page 85: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/85.jpg)
Clean Code: Technical debt
Broken window Phenomena
![Page 86: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/86.jpg)
Clean Code: Technical debt
● Technical debt = Defects, complexity, coupled code, lack of testing, duplication, …
● Do NOT let it grow!
Value
Technicaldebt
![Page 87: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/87.jpg)
Clean Code: SOLIDSRP (Single Responsibility Principle)
DB
Customer
PersistenceSystem
DB
Customer
Enterprise Java Beans 1/2 Java Persistence API
![Page 88: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/88.jpg)
Clean Code: SOLIDOCP (Open Close Principle)
http://lostechies.com
● Open for Extension● Closed for
Modification
![Page 89: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/89.jpg)
Clean Code: SOLIDLSP (Liskov Substitution Principle)
Functions that use pointers to base classes must be able to use objects of derived classes without knowing it.
http://lostechies.com/derickbailey/2009/02/11/solid-development-principles-in-motivational-pictures/
![Page 90: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/90.jpg)
Clean Code: SOLIDISP (Interface Segregation Principle)
http://javiernavarromachuca.blogspot.nl/2011/07/interface-segregation-principle.html
● One interface per kind of client.
● No methods in interface that client does not use.
● No “fat” interfaces.
![Page 91: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/91.jpg)
Clean Code: SOLIDDIP (Dependency Inversion Principle)
http://lostechies.com/derickbailey/2009/02/11/solid-development-principles-in-motivational-pictures/
● “High-level modules should not depend on low-level modules. Both should depend on abstractions”
● “Abstractions should not depend on details. Details should depend on abstractions”
![Page 92: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/92.jpg)
Time for ….
![Page 93: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/93.jpg)
Continuous Delivery
Row 1 Row 2 Row 3 Row 40
2
4
6
8
10
12
Column 1Column 2Column 3
Source Control
Automated build
Continuous integration
Automated Testing
Automated Deployments
Continuous Delivery
Automated Provisioning
![Page 94: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/94.jpg)
Continuous Delivery
![Page 95: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/95.jpg)
Continuous Delivery
Deployment Pipeline provides constant quick feedback
Continuous Integration
Middleware Provisioning
Virtualized Infrastructure
Test ToolingDevelopment
Central Monitoring &
Logging
Application Release
Automation
O T A P all identical
On Demand Environments
![Page 96: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/96.jpg)
Continuous DeliveryTime to Market
![Page 97: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/97.jpg)
Continuous DeliveryCost Reduction
![Page 98: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/98.jpg)
Continuous DeliveryBuilding Blocks
![Page 102: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/102.jpg)
Tools
● Management: Jira, Trello, Excel● Continuous Integration: Jenkins, Bamboo, Hudson● Testing: JUnit, FitNesse, Cucumber, DBUnit, TestNG, Greenpepper, Jbehave,
Jacoco, Arquillian, ...● Automated Deployment: Deployit, Nolio, uDeploy● Collaboration: Confluence, xWiki● Automated Provisioning: Puppet, Chef, Vagrant, MCollective● Quality: Sonar● Build tools: ant, ivy, maven, gradle● Source safety: subversion, git● Cloud solutions
– Continuous Integration: Cloudbees
– Public PAAS: Heroku, OpenShift
– Issue Management: Atlassian (Jira), Trello
– Don't forget Amazon
![Page 103: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/103.jpg)
Books
![Page 104: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/104.jpg)
Books
![Page 105: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/105.jpg)
Books
![Page 106: Introduction Professional Scrum Developer for Java](https://reader033.fdocuments.in/reader033/viewer/2022052303/554c4793b4c90570648b53ab/html5/thumbnails/106.jpg)
Books