SlideShare a Scribd company logo
1 of 104
Talking about craftsmanship
with ‘ensaimadas’ and katas
Raquel M. Carmena
@codurance_ES
@scmallorca
@bberrycarmen
Thanks ...
THANKS ...
@ialbeniz
THANKS ...
@isacazorl
THANKS ...
@jllado
@brujula_talk @fdsaprogramacio
THANKS ...
THANKS ...
@codurance_ES
YOU
THANKS ...
Planning WELCOME & TALK
CODE KATA
TALK
CODE KATA
CLOSING
Once upon a time ...
1992
1998
2003
Extreme Humility
wiki.c2.com/?ExtremeHumility
Ward Cunningham
I think Extreme Programming and several other similar
approaches are based on humility about our abilities:
● we won't be able to work out all the requirements up
front (so allow mid-course corrections).
Extreme Humility
wiki.c2.com/?ExtremeHumility
Ward Cunningham
● we won't get the design right first time. So don't try! Just
DoTheSimplestThingThatCouldPossiblyWork and then
RefactorMercilessly.
● we don't know how implementable this design is. So
implement it and see.
Extreme Humility
wiki.c2.com/?ExtremeHumility
Ward Cunningham
● we'll make mistakes in coding and interpreting designs.
So test everything, run the tests every time you make a
change.
● we don't understand the problem well enough to predict
what we'll need later. So YouArentGonnaNeedIt.
Extreme Humility
wiki.c2.com/?ExtremeHumility
Ward Cunningham
● we can't reliably write simple, understandable code on
our own, so we work in pairs for constant feedback.
In contrast, the (pure) WaterFall method is arrogant in its
confidence ...
Requirements
Analysis
Design
Coding
Testing
Lack of practice
Distance between master and apprentice
Difficulty in giving feedback
Don’t think
Lack of humility
Deployment
Separation
Requirements
Analysis
Design
Coding
Testing
Spikes
Master and apprentice
together
Everybody thinks
Humility
Deployment
Continuous integration,
deployment and delivery
Fast feedback
No separation
between coding
and quality
Evolutionary design
Postponed decisions
Manifesto for Software Craftsmanship
Raising the bar.
As aspiring Software Craftspeople
we are raising the bar of professional software development
by practicing it and helping others learn the craft.
2009
Not only working software,
but also well-crafted software
Not only responding to change,
but also steadily adding value
Not only individuals and interactions,
but also a community of professionals
Not only customer collaboration,
but also productive partnerships
Manifesto for Software Craftsmanship2009
Practice ?
1998
DRIVER NAVIGATOR
Pair programming
● Respect
● ‘Let’s try your idea first’
● DRIVER: Thinking out loud
● NAVIGATOR: 10-second rule
● Don’t worry if it feels awkward at first
All the time?
DRIVER < > NAVIGATOR
● Ping-pong / Popcorn
● Chess clock
Recommendation
Idea
Place a rubber duck on your monitor
and describe your problems to it.
There's something magical about
stating your problems aloud
that makes the solution more clear.
Rubber Ducking
TDD do not ... make decisions for yourself
TDD is ... a guide
TDD is not ... a testing discipline
TDD is ... a design discipline
Let’s start from the beginning...
“Today a usual technique is
to make a program
and then to test it.“
The Humble Programmer - Dijkstra
(...)
Today a usual technique is to make a program and then to test it. But: program testing
can be a very effective way to show the presence of bugs, but is hopelessly inadequate
for showing their absence. The only effective way to raise the confidence level of a
program significantly is to give a convincing proof of its correctness. But one should
not first make the program and then prove its correctness, because then the
requirement of providing the proof would only increase the poor programmer’s
burden. On the contrary: the programmer should let correctness proof and program
grow hand in hand.
(...)
1972
@KentBeck
PRODUCTION
CODE
TEST
CODE
Implementation
TEST
CODE
PRODUCTION
CODE
Behaviour/Intention
WRITE
TEST CODE
WRITE
PRODUCTION
CODE
REFACTOR
WRITE
TEST CODE
WRITE
PRODUCTION
CODE
REFACTOR
Humility
“Write a test, make it run, make it right.
To make it run,
one is allowed to violate principles of good design.
Making it right means to refactor it.”
Dave Hoover
Refactor ?
Production code & Test code
4 RULES OF SIMPLE DESIGN
“Design for the future.
Change is expensive.
Make it cheap by anticipating it.”
4 RULES OF SIMPLE DESIGN
● Pass all the tests
● Reveal intention
● No duplication
● Fewer elements
4 RULES OF SIMPLE DESIGN
● Pass all the tests
● Reveal intention
● No knowledge duplication
● Fewer elements
4RSD
Clean architecture
C.R.P.
Connascence
S.o.C.
Cohesion
Coupling
P.O.L.A.
D.R.Y.
GoF Patterns
K.I.S.S.
Y.A.G.N.I.
Law of Demeter
S.O.L.I.D.
DDD
Screaming Architecture
Kata!
Rules
DRIVER NAVIGATOR
WRITE
TEST CODE
WRITE
PRODUCTION
CODE
REFACTOR
DRIVER <-> NAVIGATOR
WRITE
TEST CODE
WRITE
PRODUCTION
CODE
REFACTOR
$> git commit -m “RED: ... “
$> git commit -m “GREEN: ... “
$> git commit -m “REFACTOR: ... “
Arrange
Act
Assert
Code Kata: The GREETING KATA
/testdouble/contributing-tests/wiki/Greeting-Kata
/swkBerlin/kata-bootstraps
Retrospective
- Design decisions
- Inputs&Outputs vs User Stories
- Test names (intention/behaviour, no implementation)
- Too much logic in tests
- Actual vs Expected
Actual vs Expected
assertThat(expected, is(actual))
assertThat(actual, is(expected))
A side benefit
A side benefit: coverage
Helping others ...
Writing ….
Not only reading ...
I love...
● About the author
● Preface
● Foreword
● Acknowledgements
Learning culture at your work
● Katas
● Lunch & Learn
● Book club
● ...
“What we want is to work with
people that can make us better,
that are willing to share and learn from each other.
We do not want mere colleagues.
We want passionate and inspiring professionals
that we can call friends.”
Kata !
Code Kata: SHOPPING CART KATA
/swkBerlin/kata-bootstraps
CRC Cards
CRC Cards
http://c2.com/doc/oopsla89/paper.html
A Laboratory For Teaching
Object-Oriented Thinking
Kent Beck, Apple Computer, Inc.
Ward Cunningham, Wyatt Software Services, Inc.
Growing Object-Oriented Software, Guided by Tests
Steve Freeman and Nat Pryce
Retrospective
- Design decisions
- Inputs&Outputs vs User Stories
- Test names (intention/behaviour, no implementation)
- Too much logic in tests
- Additional code for testing
Additional code for testing
- Equality Pollution
- JSON, XML, … readers
- Additional features
To conclude...
@codurance_ES
@bberrycarmen

More Related Content

Similar to Talking about craftsmanship with ensaimadas and katas

Effective entrepreneurship for developers
Effective entrepreneurship for developersEffective entrepreneurship for developers
Effective entrepreneurship for developers
Carlos Ble
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
John Choi
 
Perth codedojo 5-anagram-algorithm
Perth codedojo 5-anagram-algorithmPerth codedojo 5-anagram-algorithm
Perth codedojo 5-anagram-algorithm
Will Webster
 

Similar to Talking about craftsmanship with ensaimadas and katas (20)

TDD Workshop (January, 2018)
TDD Workshop (January, 2018)TDD Workshop (January, 2018)
TDD Workshop (January, 2018)
 
Unit testing traning
Unit testing traningUnit testing traning
Unit testing traning
 
Big code refactoring with agility
Big code refactoring with agilityBig code refactoring with agility
Big code refactoring with agility
 
Day1 - TDD (Lecture SS 2015)
Day1 - TDD (Lecture SS 2015)Day1 - TDD (Lecture SS 2015)
Day1 - TDD (Lecture SS 2015)
 
Effective entrepreneurship for developers
Effective entrepreneurship for developersEffective entrepreneurship for developers
Effective entrepreneurship for developers
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
 
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLEAN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
 
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE - CFObjective() 2017
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE - CFObjective() 2017AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE - CFObjective() 2017
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE - CFObjective() 2017
 
Quality code 2019
Quality code 2019Quality code 2019
Quality code 2019
 
Extreme Programming
Extreme ProgrammingExtreme Programming
Extreme Programming
 
Reversed Tests Pyramid - Agile Prague 2014
Reversed Tests Pyramid - Agile Prague 2014Reversed Tests Pyramid - Agile Prague 2014
Reversed Tests Pyramid - Agile Prague 2014
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
 
TDD: seriously, try it! 
TDD: seriously, try it! TDD: seriously, try it! 
TDD: seriously, try it! 
 
Xp days ukraine 2012
Xp days ukraine 2012Xp days ukraine 2012
Xp days ukraine 2012
 
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
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Software craftsmanship
Software craftsmanshipSoftware craftsmanship
Software craftsmanship
 
TDD as if You Meant It (2013)
TDD as if You Meant It (2013)TDD as if You Meant It (2013)
TDD as if You Meant It (2013)
 
Perth codedojo 5-anagram-algorithm
Perth codedojo 5-anagram-algorithmPerth codedojo 5-anagram-algorithm
Perth codedojo 5-anagram-algorithm
 

More from Rachel M. Carmena

More from Rachel M. Carmena (8)

2013 - Semana Informática - Seminario Cajón de Sastre
2013 - Semana Informática - Seminario Cajón de Sastre2013 - Semana Informática - Seminario Cajón de Sastre
2013 - Semana Informática - Seminario Cajón de Sastre
 
The power of accessibility (November, 2018)
The power of accessibility (November, 2018)The power of accessibility (November, 2018)
The power of accessibility (November, 2018)
 
Git challenges
Git challengesGit challenges
Git challenges
 
What's the origin of REST architectural style?
What's the origin of REST architectural style?What's the origin of REST architectural style?
What's the origin of REST architectural style?
 
Coding Dojo (November, 2017)
Coding Dojo (November, 2017)Coding Dojo (November, 2017)
Coding Dojo (November, 2017)
 
Be open-minded, my friend (June, 2018)
Be open-minded, my friend (June, 2018)Be open-minded, my friend (June, 2018)
Be open-minded, my friend (June, 2018)
 
Software as a craft (February, 2018)
Software as a craft (February, 2018)Software as a craft (February, 2018)
Software as a craft (February, 2018)
 
Just-in-time compiler (March, 2017)
Just-in-time compiler (March, 2017)Just-in-time compiler (March, 2017)
Just-in-time compiler (March, 2017)
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Recently uploaded (20)

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Talking about craftsmanship with ensaimadas and katas