you cant be agile if your code sucks
DESCRIPTION
What is "Agile"? Why would someone like to be agile? What are the 3 pillars for agile software development? How can you achieve technical excellence in your software teams? Are developer skills more important than languages, methods or frameworks?TRANSCRIPT
![Page 1: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/1.jpg)
You can’t be Agile if your code sucks
Peter Gfadertwitter.com/peitor
Start
the
convers
ation
![Page 2: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/2.jpg)
My Mission
#1 Agile??
#2 Code & Craftmanship
![Page 3: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/3.jpg)
About me
![Page 5: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/5.jpg)
Agile
![Page 6: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/6.jpg)
What is Agile for you?
![Page 8: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/8.jpg)
![Page 9: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/9.jpg)
„And we
really mean
it“
![Page 10: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/10.jpg)
The Agile Manifesto invites wimpy-ness"… Individuals and interactions over processes & tools…"
Yayy!! I don't have to follow those stupid processes any more!
"… Working software over comprehensive documentation…"W00t!! Dump the documentation! I LOVE this agile stuff!
"… Customer collaboration over contract negotiations…"I'm done when I'm done and I never have to say when!
"… Responding to change over following a plan…"No plans! No project managers! No architects!
Where do I sign up?© Alistair Cockburn
Warmduscher
![Page 11: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/11.jpg)
What is Agile for you?
![Page 12: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/12.jpg)
Lean
XPScrum
Agile
RUP
Kanban SAFe
What is all this stuff?
Enterprise
ScrumCrystal
DSDM
© Henrik Knieberg
![Page 13: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/13.jpg)
Pair programming
Product Owner role
Physical tools
Process toolsa.k.a. ”organizational patterns”
Thinking toolsa.k.a. ”mindsets” or ”philosophies”
Lean AgileToolkitsa.k.a. ”frameworks”
Scrum XP
Visualize the workflowTo do Dev Release
H C
2Test
35Done!
3
D
G
K
A
B
FLOW
Kanban
Systems ThinkingTheory of Constraints
RUP
Tool”anything used as a means of accomplishing a task or purpose.”- dictionary.com
© Henrik Knieberg
![Page 14: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/14.jpg)
© Henrik Knieberg
![Page 15: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/15.jpg)
The illusion of a ”bad tool”
The old toolwas better!
Don’t blamethe tool!
© Henrik Knieberg
![Page 16: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/16.jpg)
KeypointCompare for
understanding, not judgement
© Henrik Knieberg
![Page 17: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/17.jpg)
KeypointCompare for
understanding, not judgement
Tools can be combined
© Henrik Knieberg
![Page 18: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/18.jpg)
• Know your Goalo Why
• Agile/Lean are tools, not goals• Don’t limit yourself to one tool• Experiment & enjoy the rideoDon’t worry about getting it right
from start•We won’t
Take-away points
© Henrik Knieberg
![Page 19: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/19.jpg)
Lean
XPScrum
Agile
RUP
Kanban SAFe
Enterprise
ScrumCrystal
DSDM
© Henrik Knieberg
![Page 20: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/20.jpg)
The important thing isn’t the
process.
© Henrik Knieberg
![Page 21: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/21.jpg)
The important thing isn’t the
process.
The important thing is the process
for improving your process.
© Henrik Knieberg
![Page 22: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/22.jpg)
The important thing isn’t the
process.
The important thing is the process
for improving your process.
Continuous Improvement© Henrik Knieberg
![Page 23: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/23.jpg)
3 essential skills neededregardless of process
Software craftsmanship
Splitting the system into useful pieces
Retrospectives
As a buyerI want to save my shopping cartso that I can continue shopping later
© Henrik Knieberg
![Page 24: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/24.jpg)
3 essential skills neededregardless of process
Software craftsmanship
Splitting the system into useful pieces
Retrospectives
As a buyerI want to save my shopping cartso that I can continue shopping later
+ Communication Skills
+ Facilitator / ScrumMaster
+ Vision
![Page 25: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/25.jpg)
3 essential skills neededregardless of process
Software craftsmanship
Splitting the system into useful pieces
Retrospectives
As a buyerI want to save my shopping cartso that I can continue shopping later
![Page 26: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/26.jpg)
Essential Skill:
Software craftsmanship
![Page 27: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/27.jpg)
1) Software is never written once and never
changed
![Page 28: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/28.jpg)
[LARM03]
![Page 29: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/29.jpg)
2) How to slow down your project?
![Page 30: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/30.jpg)
![Page 31: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/31.jpg)
Write crappy code
![Page 32: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/32.jpg)
Write crappy code Make code easier to read
![Page 33: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/33.jpg)
Easy code to read Easy code to change
maintain
![Page 34: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/34.jpg)
Why do you write bad code?
![Page 35: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/35.jpg)
#1 reason for Bad code
We write bad code, because we read bad code
![Page 36: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/36.jpg)
Code Readings?• Code Reviews• Peer Reviews• Pair Programming• Open source
![Page 37: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/37.jpg)
Good code is like a joke!
No need for explanation
![Page 38: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/38.jpg)
#TODO: Code to readhttps://github.com/nsubstitute/NSubstitute https://github.com/techtalk/SpecFlowhttps://github.com/sf105/goos-codehttps://github.com/machine/machine.specificationshttps://github.com/BjRo/xunitbddextensionshttps://github.com/dtchepak/DaveSquared.StringsTheThing
![Page 39: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/39.jpg)
#TODO: Review Code• In your team• With 1 peer• Open source• Brown bags – Lunch time
discussion
![Page 40: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/40.jpg)
Code Reviews• Code, !Person• Constructively propose changes
Questions!
![Page 41: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/41.jpg)
Code Reviews• Code, !Person• Constructively propose changes
Questions!
• Review not only codeo Testso Build processo ..
![Page 42: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/42.jpg)
Code Reviews• Code, !Person• Constructively propose changes
Questions!
• Review not only codeo Testso Build processo ..
Grow as a team
![Page 43: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/43.jpg)
Instead of“That lousy long method”
“I reviewed your code and found 1,2,3 things to change”
“If you don’t want to do it. I do it”
“Why don’t you split that method”
“Can you help me?”
“Can I help you with this? I think we can improve it”
Say
![Page 44: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/44.jpg)
#2 reason for Bad codeNobody can write good code in 1 sit-in
-> Refactoringit’s an art of designing code
![Page 45: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/45.jpg)
#TODO Refactoring
https://github.com/NotMyself/GildedRose
https://github.com/jcbozonier/Refactoring-Katas
![Page 46: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/46.jpg)
The little issue with Refactoring?
![Page 47: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/47.jpg)
• Don’t know our own quality
• Unclear what works and what doesn't
• Unintended consequences of changes remain hidden
• We are never done
• Change and refactor without fear
• Add new features faster
• Confidence that we didn't break anything
• We can actually be doneDone = Tested!
Development With and Without TestingWithout Tests With Tests
![Page 48: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/48.jpg)
Refactoring+
Tests=?
![Page 49: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/49.jpg)
Refactoring+
Tests=
Waste?? Overhead??
![Page 50: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/50.jpg)
• Writing tests prior to writing the production code
• Test-Driven Development iso A design practiceo A powerful way to avoid defects in softwareo A feedback loop for validating code changeso A way to write tests
Test-Driven Development (TDD)
REFACTOR GREEN
RED
![Page 51: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/51.jpg)
Goal is not to write tests but to write good code
Test-Driven Development (TDD)
REFACTOR GREEN
RED
![Page 52: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/52.jpg)
What is Quality
![Page 53: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/53.jpg)
“Why should I care?We have a QA department!”
![Page 54: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/54.jpg)
**** ADD PIC ****
![Page 55: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/55.jpg)
How do you measure Quality?
![Page 56: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/56.jpg)
![Page 57: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/57.jpg)
First Law of Programming
“Lowering Quality Lengthens Development
Time”
http://c2.com/cgi/wiki?FirstLawOfProgramming
![Page 58: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/58.jpg)
Only Quality lets us go faster!
![Page 59: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/59.jpg)
http://manifesto.softwarecraftsmanship.org/
![Page 60: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/60.jpg)
Who?
![Page 61: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/61.jpg)
Quality?• Measure of how well the software
is designed and implemented• Subjective
![Page 62: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/62.jpg)
Quality?• LOC• Code Coverage• Class Coupling• Cohesion• Code Duplication• Cyclomatic Complexity
![Page 63: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/63.jpg)
Quality: How to measure?• Highly subjective• Highly qualitative• Is the code readable, understandable?• Is the code verbose?• Variable/method names that are
meaningful• Simple code that works• Does it have tests? What’s the coverage?
![Page 64: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/64.jpg)
Quality: How to measure?• Trends
![Page 65: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/65.jpg)
Quality: How to measure?• Trends• “Output” over time
o Velocity - Trendo Business Value - Trendo Bug – Trends
• #TODO: How do you measure Business value?
![Page 66: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/66.jpg)
Ways to Improve Quality• Avoid Silo Thinking
o Its not “us” vs “them”
• Start early• Don’t Compromise• Schedule time to lower your technical debt• Make it work; make it right (right away)• Requires monitoring and changing behavior• Be willing to help and be helped• Devise lightweight non-bureaucratic measures
![Page 67: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/67.jpg)
Simple Design == High Quality?
• Passes its tests• Minimizes duplication• Maximizes clarity• Has fewer elements
http://c2.com/cgi/wiki?XpSimplicityRules
![Page 68: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/68.jpg)
#TODO Visualize• Bug Trends• Build Status• Performance Report• Technical Debt• Code Quality
![Page 69: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/69.jpg)
Visualize Technical Debt
http://verraes.net/2013/07/managed-technical-debt/
![Page 70: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/70.jpg)
Build Monitor
![Page 71: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/71.jpg)
Checkin Frequently• Focus your work on small tasks• Easier to describe what you did in your check-in
comment• Clear code history• Easier merging -> if you really need to branch and merge
• Fast code reviews• Never get merge hell -> only give it :-)
http://blog.gfader.com/2011/12/tfs-see-your-application-grow-like.html
![Page 72: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/72.jpg)
Team Efforts• Avoid Shortcuts• Take collective ownership
Team should own the code• Promote positive interaction• Provide constructive feedback• Constant code review
![Page 73: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/73.jpg)
Guantanamo Code Tool• All code is guilty until tested
innocent
• Do you have problems maintaining high test coverage?
• Send the untested code to Guantanamo!http://docs.codehaus.org/display/ASH/Guantanamo
![Page 74: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/74.jpg)
Agile – the bar is rising
http://blog.gfader.com/2013/05/the-1st-principle-of-agile-manifesto-30.html
![Page 75: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/75.jpg)
Our highest priority is to satisfy the
customer
through early and continuous delivery
of valuable software
1st principle of the Agile Manifesto
![Page 76: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/76.jpg)
Our highest priority is to satisfy the
customer
through early and continuous delivery
of valuable software1st principle of the Agile Manifesto
delight the customer
![Page 77: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/77.jpg)
Recap
![Page 78: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/78.jpg)
The important thing isn’t the
process
The important thing is the process
for improving your process
![Page 79: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/79.jpg)
Essential skills neededregardless of process
Software craftsmanship
Splitting the system into useful pieces
Retrospectives
As a buyerI want to save my shopping cartso that I can continue shopping later
![Page 80: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/80.jpg)
#TODO TO READE. Goldratt “The Goal” S.Freeman, N.Price GOOS
![Page 81: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/81.jpg)
#TODO References• Pragmatics of Agile Development
http://www.agiledeveloper.com/presentations/pragmatics_of_agile_development.pdf
• Kanban VS Scrumhttp://www.infoq.com/minibooks/kanban-scrum-minibook
• Agile Software Developmenthttp://www.agiledeveloper.com/presentations/AgileSoftwareDevelopment.zip
• A Thinking Tool called Agilehttps://sites.google.com/site/leanagileandscrum/lean-agile-scrum-conference-2010/presentations-las-2010/00_Kniberg_Keynote.pdf?attredirects=0&d=1
• The Four Elements of Simple Designhttp://www.jbrains.ca/permalink/the-four-elements-of-simple-design
• http://agilemanifesto.org/• http://manifesto.softwarecraftsmanship.org/
![Page 82: You cant be agile if your code sucks](https://reader034.vdocuments.net/reader034/viewer/2022051412/54b736d24a7959be4c8b4612/html5/thumbnails/82.jpg)
Now you1. Download presentation2. Search for #TODO3. Get it done4. Send me a tweet “I’m done”