SlideShare a Scribd company logo
1 of 62
Software Craftsmanship and
Agile Code Games
Mike Clement
@mdclement
mike@softwareontheside.com
http://blog.softwareontheside.com
http://agilecodegames.com
“Often the true value of
a thing isn’t the thing
itself, but instead is the
activity that created it.”
-Dave Thomas
Manifesto for Agile Software Development
We are uncovering better ways of developing
software by doing it and helping others do it.
Through this work we have come to value:
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
That is, while there is value in the items on
the right, we value the items on the left more.
Principles of Agile Software Development
• Our highest priority is to satisfy the customer through early and continuous delivery of valuable
software.
• Welcome changing requirements, even late in development.
• Deliver working software frequently.
• Business people and developers must work together daily throughout the project.
• Build projects around motivated individuals.
• The most efficient and effective method of conveying information is face-to-face conversation.
• Working software is the primary measure of progress.
• Agile processes promote sustainable development.
• Continuous attention to technical excellence and good design enhances agility.
• Simplicity--the art of maximizing the amount of work not done--is essential.
• The best architectures, requirements, and designs emerge from self-organizing teams.
• At regular intervals, the team reflects on how to become more effective, then adjusts accordingly.
Principles of Agile Software Development
• satisfy the customer
• changing requirements
• deliver frequently
• work together
• motivated individuals
• face-to-face conversation
• working software
• sustainable development
• technical excellence
• simplicity
• emerge from self-organizing teams
• team reflects
Principles of Agile Software Development
• satisfy the customer
• changing requirements
• deliver frequently
• work together
• motivated individuals
• face-to-face conversation
• working software
• sustainable development
• technical excellence
• simplicity
• emerge from self-organizing teams
• team reflects
Continuous attention to
technical excellence and good
design enhances agility.
Literature Roots (1999 and 2001)
Clean Code – August 2008
Manifesto for Software Craftsmanship
As aspiring Software Craftsmen we are raising the bar of professional software
development by practicing it and helping others learn the craft. Through this work
we have come to value:
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
That is, in pursuit of the items on the left we have found the items on the right to
be indispensable.
Apprenticeship Patterns – October 2009
The Clean Coder – May 2011
Software Craftsmanship – 2013/2014
Quality Code – November 2013
Software Engineering?
Engineering is the application of scientific, economic, social, and
practical knowledge in order to design, build, maintain, and improve
structures, machines, devices, systems, materials and processes.
• Civil Engineers – do they drive rivets?
• Automotive Engineers – do they assemble cars?
• Computer Engineers – do they fabricate processors?
• Software Engineers – do they write code?
Craftsmanship: What’s different?
“Going slow today to go fast
tomorrow”
“Going deliberately today to not
be stuck tomorrow” – Me
“The only way to go fast, is to go
well” – Uncle Bob
“Optimize for read time, not
write time” – Me
Things that Software Craftsmen Value
• Growth mindset
• Adapting and changing
• Share over hoarding
• Safety to experiment
• Taking control of own destiny
• Inclusiveness
• Skill-centric over process-centric
• Situated Learning
Things that Software Craftsmen Value
• Growth mindset
• Adapting and changing
• Share over hoarding
• Safety to experiment
• Taking control of own destiny
• Inclusiveness
• Skill-centric over process-centric
• Situated learning
Situated learning is learning that
takes place in the same context in
which it is applied.
Agile Code Games
How to learn without really trying
“Often the true value of
a thing isn’t the thing
itself, but instead is the
activity that created it.”
-Dave Thomas
Code Katas
The scales and etudes of developing software
Part of a Guided Kata
FizzBuzz
Solo Randori
Coding up a problem, probably repeatedly (sometimes referred to as a kata)
Problem Description
Once upon a time there was a series of 5 books about a very English hero called Harry. (At least when this Kata was
invented, there were only 5. Since then they have multiplied) Children all over the world thought he was fantastic,
and, of course, so did the publisher. So in a gesture of immense generosity to mankind, (and to increase sales) they
set up the following pricing model to take advantage of Harry's magical powers.
One copy of any of the five books costs 8 EUR. If, however, you buy two different books from the series, you get a 5%
discount on those two books. If you buy 3 different books, you get a 10% discount. With 4 different books, you get a
20% discount. If you go the whole hog, and buy all 5, you get a huge 25% discount.
Note that if you buy, say, four books, of which 3 are different titles, you get a 10% discount on the 3 that form part of
a set, but the fourth book still costs 8 EUR.
Potter mania is sweeping the country and parents of teenagers everywhere are queueing up with shopping baskets
overflowing with Potter books. Your mission is to write a piece of code to calculate the price of any conceivable
shopping basket, giving as big a discount as possible.
For example, how much does this basket of books cost?
2 copies of the first book
2 copies of the second book
2 copies of the third book
1 copy of the fourth book
1 copy of the fifth book
(answer: 51.20 EUR)
http://www.codingdojo.org/cgi-bin/index.pl?action=browse&id=KataPotter&revision=41
Wasa
Coding up a problem, with a pair
Group Randori
Ready… fight!
Quick Concepts
TDD
• Red
• Green
• Refactor
Simple Design
• Passes all tests
• Clear, expressive, consistent
• No duplication
• Minimal
Ways to get Green
• Fake it
• Obvious implementation
• Triangulation
Rules
• Pair Programming
• Use TDD
• Everyone should be following
• Pair should be explaining
• Audience gives suggestions only with when Green
• Today: Will switch pairs about every 2 minutes
Numbers to LCD
123456789
Translates to:
// _ _ _ _ _ _ _
// | _| _||_||_ |_ ||_||_|
// ||_ _| | _||_| ||_| _|
Problem/Kata Lists
• http://codingdojo.org/
• http://codekata.com/
• http://katas.softwarecraftsmanship.org/
Koans
The Path to Enlightenment
Example Koans
• Ruby http://rubykoans.com/
• F# https://github.com/ChrisMarinos/FSharpKoans
• Javascript https://github.com/liammclennan/JavaScript-Koans
• Javascript https://github.com/mrdavidlaing/javascript-koans
• Intro to programming using Javascript
https://github.com/greatersum/intro-to-programming-using-
javascript-koans
• Linq http://linqkoans.codeplex.com/
• Approval Tests
https://github.com/approvals/ApprovalTests.Net.Koans
Coderetreat
A day like no other
Structure of Coderetreat
• Duration: 8:30am to 5 or 6pm (provide breakfast and lunch, not pizza)
• Problem: Conway's Game of Life
• Length of Session: 45 minutes (5 or 6 sessions usually)
• Pair-programming is necessary, as the knowledge transfer contained
in that activity is essential to the practice
• Prefer using Test-Driven Development (TDD)
• After each session, pairs should be swapped
• After each session, code must be deleted, not put in a branch, not
stashed, just deleted with no trace left
Activities/Constraints
• Explore the problem
• Ping pong – intro to pairing techniques
• No mouse
• Paper only
Activities/Constraints
• No naked primitives
• No conditionals
• No loops
• Only 2, 3, 4 lines per method
• Immutable
• Mute
• Evil pair/find the loophole
• Mute with find the loophole
• Tell, don’t ask
• TDD as if you meant it
Experience + Reflection =
Learning
Closing Circle
• What, if anything, did you learn today?
• What, if anything, surprised you today?
• What, if anything, will you do differently in the future?
Mob Programming
Like Randori, but larger switching cycles, and a real team working on a real system
throughout the day
One navigator, many pairs
One navigator, many mobs
Greater Sum Workshops
• 2 hours
• Opening Circle
• Name
• Programming Experience
• Silly question (What’s your favorite… ?)
• Mobbing!
• Possibly “One navigator, many mobs”
• Closing Circle
• Borrowed from Coderetreat
Software Craftsmanship Atlanta and
Utah Software Craftsmanship Format
Our meeting format differs from your usual technology user
group. At a meeting we have:
• 0-3 Lightning talks (up to but not over 5 minutes each)
• ~30 min - Reading Discussion
• ~60 min - Interactive Craftsman-run Coding Exercise (based
on the principles of a Coding Dojo)
“Often the true value of
a thing isn’t the thing
itself, but instead is the
activity that created it.”
-Dave Thomas
Books
• The Pragmatic Programmer: From Journeyman to Master
• Clean Code
• Apprenticeship Patterns (free online)
• The Clean Coder
• Software Craftsmanship: Professionalism, Pragmatism, Pride
• Quality Code: Software Testing Principles, Practices, and Patterns
• The Coding Dojo Handbook
Resources
• http://agilemanifesto.org/
• http://manifesto.softwarecraftsmanship.org/
• http://coderetreat.org/
• http://mobprogramming.org/
• http://www.agilecodegames.com/
Mike Clement
• @mdclement
• mike@softwareontheside.com
• http://blog.softwareontheside.com
• http://agilecodegames.com
• https://github.com/mdclement
• http://www.greatersum.com
• Software Craftsmanship Atlanta – first Wed at 6pm

More Related Content

What's hot

SOLID Design Principles
SOLID Design PrinciplesSOLID Design Principles
SOLID Design Principles
Samuel Breed
 
Clean architecture
Clean architectureClean architecture
Clean architecture
andbed
 

What's hot (20)

Développeur informatique
Développeur informatiqueDéveloppeur informatique
Développeur informatique
 
SOLID Design Principles
SOLID Design PrinciplesSOLID Design Principles
SOLID Design Principles
 
Object Oriented Design SOLID Principles
Object Oriented Design SOLID PrinciplesObject Oriented Design SOLID Principles
Object Oriented Design SOLID Principles
 
Measuring Performance - Quantifying the Work of a Scrum Master
Measuring Performance - Quantifying the Work of a Scrum MasterMeasuring Performance - Quantifying the Work of a Scrum Master
Measuring Performance - Quantifying the Work of a Scrum Master
 
Test Driven Development for Embedded C
Test Driven Development for Embedded CTest Driven Development for Embedded C
Test Driven Development for Embedded C
 
Clean code
Clean codeClean code
Clean code
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
業務マニュアルの作り方、使い方
業務マニュアルの作り方、使い方業務マニュアルの作り方、使い方
業務マニュアルの作り方、使い方
 
Solid principles
Solid principlesSolid principles
Solid principles
 
How to build & Coach an Agile team
How to build & Coach an Agile teamHow to build & Coach an Agile team
How to build & Coach an Agile team
 
Introduction to Resilience4j
Introduction to Resilience4jIntroduction to Resilience4j
Introduction to Resilience4j
 
Key Note - Path to Agility 2013 - Kanban - the alternative path to agility
Key Note - Path to Agility 2013 - Kanban - the alternative path to agilityKey Note - Path to Agility 2013 - Kanban - the alternative path to agility
Key Note - Path to Agility 2013 - Kanban - the alternative path to agility
 
Solid Principle
Solid PrincipleSolid Principle
Solid Principle
 
Lean Software Development
Lean Software Development Lean Software Development
Lean Software Development
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
Debugging NET Applications With WinDBG
Debugging  NET Applications With WinDBGDebugging  NET Applications With WinDBG
Debugging NET Applications With WinDBG
 
Design principle vs design patterns
Design principle vs design patternsDesign principle vs design patterns
Design principle vs design patterns
 
Keep your code clean
Keep your code cleanKeep your code clean
Keep your code clean
 
The Art of Clean code
The Art of Clean codeThe Art of Clean code
The Art of Clean code
 
Open Closed Principle kata
Open Closed Principle kataOpen Closed Principle kata
Open Closed Principle kata
 

Viewers also liked

Using Rhino Mocks for Effective Unit Testing
Using Rhino Mocks for Effective Unit TestingUsing Rhino Mocks for Effective Unit Testing
Using Rhino Mocks for Effective Unit Testing
Mike Clement
 
FizzBuzz Guided Kata
FizzBuzz Guided KataFizzBuzz Guided Kata
FizzBuzz Guided Kata
Mike Clement
 

Viewers also liked (9)

Put the Tests Before the Code
Put the Tests Before the CodePut the Tests Before the Code
Put the Tests Before the Code
 
Thinking in F#
Thinking in F#Thinking in F#
Thinking in F#
 
Using Rhino Mocks for Effective Unit Testing
Using Rhino Mocks for Effective Unit TestingUsing Rhino Mocks for Effective Unit Testing
Using Rhino Mocks for Effective Unit Testing
 
Play to Learn: Agile Games with Cards and Dice
Play to Learn: Agile Games with Cards and DicePlay to Learn: Agile Games with Cards and Dice
Play to Learn: Agile Games with Cards and Dice
 
Power of Patterns: Refactoring to (or away from) Patterns
Power of Patterns: Refactoring to (or away from) PatternsPower of Patterns: Refactoring to (or away from) Patterns
Power of Patterns: Refactoring to (or away from) Patterns
 
Transformation Priority Premise: TDD Test Order Matters
Transformation Priority Premise: TDD Test Order MattersTransformation Priority Premise: TDD Test Order Matters
Transformation Priority Premise: TDD Test Order Matters
 
FizzBuzz Guided Kata
FizzBuzz Guided KataFizzBuzz Guided Kata
FizzBuzz Guided Kata
 
The Quest for Continuous Delivery at Pluralsight
The Quest for Continuous Delivery at PluralsightThe Quest for Continuous Delivery at Pluralsight
The Quest for Continuous Delivery at Pluralsight
 
Mob Programming for Continuous Learning
Mob Programming for Continuous LearningMob Programming for Continuous Learning
Mob Programming for Continuous Learning
 

Similar to Software Craftsmanship and Agile Code Games

Software development management slides by George Berkowski (Hailo)
Software development management slides by George Berkowski (Hailo)Software development management slides by George Berkowski (Hailo)
Software development management slides by George Berkowski (Hailo)
MiniBar
 
Agile software development
Agile software developmentAgile software development
Agile software development
Hemangi Talele
 

Similar to Software Craftsmanship and Agile Code Games (20)

"Startups, comment gérer une équipe de développeurs" par Laurent Cerveau
"Startups, comment gérer une équipe de développeurs" par Laurent Cerveau"Startups, comment gérer une équipe de développeurs" par Laurent Cerveau
"Startups, comment gérer une équipe de développeurs" par Laurent Cerveau
 
Binary crosswords
Binary crosswordsBinary crosswords
Binary crosswords
 
It's XP, Stupid
It's XP, StupidIt's XP, Stupid
It's XP, Stupid
 
Distributed teams - it takes two to tango
Distributed teams - it takes two to tangoDistributed teams - it takes two to tango
Distributed teams - it takes two to tango
 
Webinar - Design thinking 101 - 2018-07-24
Webinar - Design thinking 101 - 2018-07-24Webinar - Design thinking 101 - 2018-07-24
Webinar - Design thinking 101 - 2018-07-24
 
Redesigning everything ITARC Stockholm 2021
Redesigning everything ITARC Stockholm 2021Redesigning everything ITARC Stockholm 2021
Redesigning everything ITARC Stockholm 2021
 
Software development management slides by George Berkowski (Hailo)
Software development management slides by George Berkowski (Hailo)Software development management slides by George Berkowski (Hailo)
Software development management slides by George Berkowski (Hailo)
 
The 360 Developer
The 360 DeveloperThe 360 Developer
The 360 Developer
 
Agile software development
Agile software developmentAgile software development
Agile software development
 
It's XP Stupid (2019)
It's XP Stupid (2019)It's XP Stupid (2019)
It's XP Stupid (2019)
 
Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)
 
Agile Software Development.ppt
Agile Software Development.pptAgile Software Development.ppt
Agile Software Development.ppt
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 
Intro to Agile and Lean UX
Intro to Agile and Lean UXIntro to Agile and Lean UX
Intro to Agile and Lean UX
 
The alignment
The alignmentThe alignment
The alignment
 
MagmaRails - Passionate Programmer
MagmaRails - Passionate ProgrammerMagmaRails - Passionate Programmer
MagmaRails - Passionate Programmer
 
Introducing Pair Programming
Introducing Pair ProgrammingIntroducing Pair Programming
Introducing Pair Programming
 
10 Observations from 10+ years in the Corporate UX Trenches
10 Observations from 10+ years in the Corporate UX Trenches10 Observations from 10+ years in the Corporate UX Trenches
10 Observations from 10+ years in the Corporate UX Trenches
 
Working in teams vs working individually
Working in teams vs working individuallyWorking in teams vs working individually
Working in teams vs working individually
 

More from Mike Clement

Code Katas Spring 2012
Code Katas Spring 2012Code Katas Spring 2012
Code Katas Spring 2012
Mike Clement
 
Bowling Game Kata in C# Adapted
Bowling Game Kata in C# AdaptedBowling Game Kata in C# Adapted
Bowling Game Kata in C# Adapted
Mike Clement
 
Software Craftsmanship
Software CraftsmanshipSoftware Craftsmanship
Software Craftsmanship
Mike Clement
 

More from Mike Clement (11)

Collaboration Principles from Mob Programming
Collaboration Principles from Mob ProgrammingCollaboration Principles from Mob Programming
Collaboration Principles from Mob Programming
 
Focus on Flow: Lean Principles in Action
Focus on Flow: Lean Principles in ActionFocus on Flow: Lean Principles in Action
Focus on Flow: Lean Principles in Action
 
Taming scary production code that nobody wants to touch
Taming scary production code that nobody wants to touchTaming scary production code that nobody wants to touch
Taming scary production code that nobody wants to touch
 
Develop your sense of code smell
Develop your sense of code smellDevelop your sense of code smell
Develop your sense of code smell
 
Maps over Backlogs: User Story Mapping to Share the Big Picture
Maps over Backlogs: User Story Mapping to Share the Big PictureMaps over Backlogs: User Story Mapping to Share the Big Picture
Maps over Backlogs: User Story Mapping to Share the Big Picture
 
Escaping the Pitfalls of Software Product Development
Escaping the Pitfalls of Software Product DevelopmentEscaping the Pitfalls of Software Product Development
Escaping the Pitfalls of Software Product Development
 
Code Katas Spring 2012
Code Katas Spring 2012Code Katas Spring 2012
Code Katas Spring 2012
 
Linq (from the inside)
Linq (from the inside)Linq (from the inside)
Linq (from the inside)
 
Bowling Game Kata in C# Adapted
Bowling Game Kata in C# AdaptedBowling Game Kata in C# Adapted
Bowling Game Kata in C# Adapted
 
Code Katas: Practicing Your Craft
Code Katas: Practicing Your CraftCode Katas: Practicing Your Craft
Code Katas: Practicing Your Craft
 
Software Craftsmanship
Software CraftsmanshipSoftware Craftsmanship
Software Craftsmanship
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Software Craftsmanship and Agile Code Games

  • 1. Software Craftsmanship and Agile Code Games Mike Clement @mdclement mike@softwareontheside.com http://blog.softwareontheside.com http://agilecodegames.com
  • 2. “Often the true value of a thing isn’t the thing itself, but instead is the activity that created it.” -Dave Thomas
  • 3. Manifesto for Agile Software Development We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more.
  • 4. Principles of Agile Software Development • Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. • Welcome changing requirements, even late in development. • Deliver working software frequently. • Business people and developers must work together daily throughout the project. • Build projects around motivated individuals. • The most efficient and effective method of conveying information is face-to-face conversation. • Working software is the primary measure of progress. • Agile processes promote sustainable development. • Continuous attention to technical excellence and good design enhances agility. • Simplicity--the art of maximizing the amount of work not done--is essential. • The best architectures, requirements, and designs emerge from self-organizing teams. • At regular intervals, the team reflects on how to become more effective, then adjusts accordingly.
  • 5. Principles of Agile Software Development • satisfy the customer • changing requirements • deliver frequently • work together • motivated individuals • face-to-face conversation • working software • sustainable development • technical excellence • simplicity • emerge from self-organizing teams • team reflects
  • 6. Principles of Agile Software Development • satisfy the customer • changing requirements • deliver frequently • work together • motivated individuals • face-to-face conversation • working software • sustainable development • technical excellence • simplicity • emerge from self-organizing teams • team reflects
  • 7. Continuous attention to technical excellence and good design enhances agility.
  • 9. Clean Code – August 2008
  • 10. Manifesto for Software Craftsmanship As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. Through this work we have come to value: 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 That is, in pursuit of the items on the left we have found the items on the right to be indispensable.
  • 12. The Clean Coder – May 2011
  • 14. Quality Code – November 2013
  • 15. Software Engineering? Engineering is the application of scientific, economic, social, and practical knowledge in order to design, build, maintain, and improve structures, machines, devices, systems, materials and processes. • Civil Engineers – do they drive rivets? • Automotive Engineers – do they assemble cars? • Computer Engineers – do they fabricate processors? • Software Engineers – do they write code?
  • 17. “Going slow today to go fast tomorrow”
  • 18. “Going deliberately today to not be stuck tomorrow” – Me
  • 19. “The only way to go fast, is to go well” – Uncle Bob
  • 20. “Optimize for read time, not write time” – Me
  • 21. Things that Software Craftsmen Value • Growth mindset • Adapting and changing • Share over hoarding • Safety to experiment • Taking control of own destiny • Inclusiveness • Skill-centric over process-centric • Situated Learning
  • 22. Things that Software Craftsmen Value • Growth mindset • Adapting and changing • Share over hoarding • Safety to experiment • Taking control of own destiny • Inclusiveness • Skill-centric over process-centric • Situated learning
  • 23. Situated learning is learning that takes place in the same context in which it is applied.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. Agile Code Games How to learn without really trying
  • 31. “Often the true value of a thing isn’t the thing itself, but instead is the activity that created it.” -Dave Thomas
  • 32. Code Katas The scales and etudes of developing software
  • 33. Part of a Guided Kata FizzBuzz
  • 34. Solo Randori Coding up a problem, probably repeatedly (sometimes referred to as a kata)
  • 35. Problem Description Once upon a time there was a series of 5 books about a very English hero called Harry. (At least when this Kata was invented, there were only 5. Since then they have multiplied) Children all over the world thought he was fantastic, and, of course, so did the publisher. So in a gesture of immense generosity to mankind, (and to increase sales) they set up the following pricing model to take advantage of Harry's magical powers. One copy of any of the five books costs 8 EUR. If, however, you buy two different books from the series, you get a 5% discount on those two books. If you buy 3 different books, you get a 10% discount. With 4 different books, you get a 20% discount. If you go the whole hog, and buy all 5, you get a huge 25% discount. Note that if you buy, say, four books, of which 3 are different titles, you get a 10% discount on the 3 that form part of a set, but the fourth book still costs 8 EUR. Potter mania is sweeping the country and parents of teenagers everywhere are queueing up with shopping baskets overflowing with Potter books. Your mission is to write a piece of code to calculate the price of any conceivable shopping basket, giving as big a discount as possible. For example, how much does this basket of books cost? 2 copies of the first book 2 copies of the second book 2 copies of the third book 1 copy of the fourth book 1 copy of the fifth book (answer: 51.20 EUR) http://www.codingdojo.org/cgi-bin/index.pl?action=browse&id=KataPotter&revision=41
  • 36. Wasa Coding up a problem, with a pair
  • 38. Quick Concepts TDD • Red • Green • Refactor Simple Design • Passes all tests • Clear, expressive, consistent • No duplication • Minimal
  • 39. Ways to get Green • Fake it • Obvious implementation • Triangulation
  • 40. Rules • Pair Programming • Use TDD • Everyone should be following • Pair should be explaining • Audience gives suggestions only with when Green • Today: Will switch pairs about every 2 minutes
  • 41. Numbers to LCD 123456789 Translates to: // _ _ _ _ _ _ _ // | _| _||_||_ |_ ||_||_| // ||_ _| | _||_| ||_| _|
  • 42. Problem/Kata Lists • http://codingdojo.org/ • http://codekata.com/ • http://katas.softwarecraftsmanship.org/
  • 43. Koans The Path to Enlightenment
  • 44. Example Koans • Ruby http://rubykoans.com/ • F# https://github.com/ChrisMarinos/FSharpKoans • Javascript https://github.com/liammclennan/JavaScript-Koans • Javascript https://github.com/mrdavidlaing/javascript-koans • Intro to programming using Javascript https://github.com/greatersum/intro-to-programming-using- javascript-koans • Linq http://linqkoans.codeplex.com/ • Approval Tests https://github.com/approvals/ApprovalTests.Net.Koans
  • 46. Structure of Coderetreat • Duration: 8:30am to 5 or 6pm (provide breakfast and lunch, not pizza) • Problem: Conway's Game of Life • Length of Session: 45 minutes (5 or 6 sessions usually) • Pair-programming is necessary, as the knowledge transfer contained in that activity is essential to the practice • Prefer using Test-Driven Development (TDD) • After each session, pairs should be swapped • After each session, code must be deleted, not put in a branch, not stashed, just deleted with no trace left
  • 47. Activities/Constraints • Explore the problem • Ping pong – intro to pairing techniques • No mouse • Paper only
  • 48. Activities/Constraints • No naked primitives • No conditionals • No loops • Only 2, 3, 4 lines per method • Immutable • Mute • Evil pair/find the loophole • Mute with find the loophole • Tell, don’t ask • TDD as if you meant it
  • 50. Closing Circle • What, if anything, did you learn today? • What, if anything, surprised you today? • What, if anything, will you do differently in the future?
  • 51. Mob Programming Like Randori, but larger switching cycles, and a real team working on a real system throughout the day
  • 52.
  • 54.
  • 56.
  • 57. Greater Sum Workshops • 2 hours • Opening Circle • Name • Programming Experience • Silly question (What’s your favorite… ?) • Mobbing! • Possibly “One navigator, many mobs” • Closing Circle • Borrowed from Coderetreat
  • 58. Software Craftsmanship Atlanta and Utah Software Craftsmanship Format Our meeting format differs from your usual technology user group. At a meeting we have: • 0-3 Lightning talks (up to but not over 5 minutes each) • ~30 min - Reading Discussion • ~60 min - Interactive Craftsman-run Coding Exercise (based on the principles of a Coding Dojo)
  • 59. “Often the true value of a thing isn’t the thing itself, but instead is the activity that created it.” -Dave Thomas
  • 60. Books • The Pragmatic Programmer: From Journeyman to Master • Clean Code • Apprenticeship Patterns (free online) • The Clean Coder • Software Craftsmanship: Professionalism, Pragmatism, Pride • Quality Code: Software Testing Principles, Practices, and Patterns • The Coding Dojo Handbook
  • 61. Resources • http://agilemanifesto.org/ • http://manifesto.softwarecraftsmanship.org/ • http://coderetreat.org/ • http://mobprogramming.org/ • http://www.agilecodegames.com/
  • 62. Mike Clement • @mdclement • mike@softwareontheside.com • http://blog.softwareontheside.com • http://agilecodegames.com • https://github.com/mdclement • http://www.greatersum.com • Software Craftsmanship Atlanta – first Wed at 6pm

Editor's Notes

  1. Verbs vs. Nouns Requirements “Plans are useless, but planning is invaluable” – Dwight D. Eisenhower the value is the process that everyone goes through in order to produce the document: the understanding gained, the relationships forged, the negotiations, the compromises, and all the other little interactions which share information. Quality Plan, measure, build a quality product! Quality is PART OF THE PROCESS. Quality is in the spirit of the smallest of our daily activities.
  2. A Handbook for Agile Software Craftsmanship
  3. March 2009 A manifesto to complement the Agile Manifesto
  4. Mostly about software testing, but great intro that talks about why code quality is important and uses the context of craftsmanship
  5. Do any other professionals that use the title “engineer” work all the way through the process, from design to building to testing? So, while there are aspects of engineering in software, there is just as much craft.
  6. Notes from recent discussion at the Salt Lake Agile Roundtable – question was “What’s different about Software Craftsmen? Why should a company care?”
  7. Great for what it says, trying F#, but if you really want to learn how to use it, you need to use it in the environment in which you will use it for real.
  8. Agile community has “Agile Games” that facilitate learning of agile/lean principles Emily Bache talks about many of these as part of a catalog of activities that you would do at a Coding Dojo, but I wanted to broaden the scope.
  9. Verbs vs. Nouns Requirements “Plans are useless, but planning is invaluable” – Dwight D. Eisenhower the value is the process that everyone goes through in order to produce the document: the understanding gained, the relationships forged, the negotiations, the compromises, and all the other little interactions which share information. Quality Plan, measure, build a quality product! Quality is PART OF THE PROCESS. Quality is in the spirit of the smallest of our daily activities.
  10. Japanese word describing detailed choreographed patterns of movements practiced either solo or in pairs. A kata is a coding exercise that performed repeatedly and perfected. Practicing a specific skill
  11. Familiarity with TDD Familiarity with Principles of Simple Design
  12. if anyone is lost, pair should explain – audience can ask clarifying questions, but not give suggestions unless Green
  13. A story, dialog, question or statement which is used to test a students progress.
  14. From a practical standpoint, if you facilitate a coderetreat, it’s best to give the group some time to reflect (3-5 minutes) and then write down their own answers to these questions so that the circle can move quickly.
  15. Currently reading Apprenticeship Patterns
  16. Verbs vs. Nouns Requirements “Plans are useless, but planning is invaluable” – Dwight D. Eisenhower the value is the process that everyone goes through in order to produce the document: the understanding gained, the relationships forged, the negotiations, the compromises, and all the other little interactions which share information. Quality Plan, measure, build a quality product! Quality is PART OF THE PROCESS. Quality is in the spirit of the smallest of our daily activities.