SlideShare a Scribd company logo
1 of 26
Download to read offline
Coding Dojo:
Data Munging
(without control structures)
Peter Kofler, ‘Code Cop’
@codecopkofler
www.code-cop.org
Copyright Peter Kofler, licensed under CC-BY.
Peter Kofler
• Ph.D. (Appl. Math.)
• Professional Software
Developer for 15+ years
• “fanatic about code quality”
• Freelance Code Mentor
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
I help development teams with
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
●
Professionalism
●
Quality and
Productivity
●
Continuous
Improvement
Mentoring
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
●
Pair Programming
●
Programming
Workshops
●
Deliberate
Practice, e.g.
Coding Dojos
Developing Quality
Software Developers
Dojo Structure
●
Introduction 15'
●
Coding 60'
●
Retrospective 15'
●
Break 15'
●
Coding 60'
●
Retrospective 15'
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Coding Dojo Mindset
●
Safe place outside
work
●
We are here to learn
●
Need to slow down
●
Focus on doing it right
●
Collaborative Game
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Coding Dojo Rules
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Pair Programming & TDD
●
regular Pair Programming
●
do not talk for too long
●
do not interrupt the other
●
no “keyboard hugging“
●
use TDD (or at least “sort of” TDD)
●
write a test before you write code
●
refactor mercilessly
●
no debugger
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Constraints
●
Challenges during a dojo or coderetreat
●
Moving to the extreme is a way of learning
●
Examples
●
Missing Tool (No Mouse, …)
●
Missing Feature (No IFs, …)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Constraint: Complexity One
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Cyclomatic Complexity One
●
No conditional statements (if, switch, ?:)
●
No loops (for, while, loop, etc.)
●
Technically no control structures.
●
Use Optional or Maybe type.
●
Use higher order functions like map,
filter and reduce instead.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Assignment Part 1
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Weather “Data Munging“
●
weather.dat contains daily weather
data for a month.
●
Find the day number (column one)
●
with the smallest temperature spread.
(Max temperature is second column,
min temperature is third column.)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Prepare
●
Find a pair.
●
Choose a programming language.
●
Set up the environment.
●
Create new project.
●
Add testing framework.
●
Check part1/requirements.txt.
●
Implement Data Munging.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Don't Focus on
Getting it Done.
F0cus on Doing
It Perfectly.
→Practice
Assignment Part 2
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Soccer “Data Munging“
●
football.dat contains the results
from the English Soccer League.
●
The columns 'F' and 'A' contain the total
number of goals scored for and against
each team.
●
Find the name of the team
●
with the smallest difference in 'for' (F)
and 'against' (A) goals.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
→Practice
Assignment Part 3
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
DRY Fusion
●
Take the two programs written,
●
factor out as much common code as
possible,
●
leaving you with two smaller programs
●
and some kind of shared functionality.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
→Practice
Closing Circle
●
What did you learn today?
●
What surprised you today?
●
What will you do
differently in the
future?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Peter Kofler
@codecopkofler
www.code-cop.org
Kata by
Dave Thomas
@pragdave
http://codekata.com/kata/kata04-data-munging/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
CC Images
●
Bruce http://www.flickr.com/photos/sherpas428/4350620602/
●
pairing http://www.flickr.com/photos/dav/94735395/
●
agenda http://www.flickr.com/photos/24293932@N00/2752221871/
●
dojo http://www.flickr.com/photos/49715404@N00/3267627038/
●
rules http://www.flickr.com/photos/phunk/4188827473 x
●
maze https://www.flickr.com/photos/cyberslayer/952953634
●
weather https://www.flickr.com/photos/enki22/8255595370/
●
stadium https://www.flickr.com/photos/113417287@N08/13994724156/
●
DRY https://www.flickr.com/photos/draconianrain/896834248/
●
wants you http://www.flickr.com/photos/shutter/105497713/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY

More Related Content

What's hot

Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Peter Kofler
 
Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)Peter Kofler
 
The Brutal Refactoring Game (2013)
The Brutal Refactoring Game (2013)The Brutal Refactoring Game (2013)
The Brutal Refactoring Game (2013)Peter Kofler
 
Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013Peter Kofler
 
Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)Peter Kofler
 
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)Peter Kofler
 
Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)Peter Kofler
 
Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)Peter Kofler
 
Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)Peter Kofler
 
Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)Peter Kofler
 
Coding Dojo: Mars Rover (2014)
Coding Dojo: Mars Rover (2014)Coding Dojo: Mars Rover (2014)
Coding Dojo: Mars Rover (2014)Peter Kofler
 
Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)Peter Kofler
 
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Peter Kofler
 
Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)Peter Kofler
 
Idiomatic R for Rosetta Code (2013)
Idiomatic R for Rosetta Code (2013)Idiomatic R for Rosetta Code (2013)
Idiomatic R for Rosetta Code (2013)Peter Kofler
 
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...Peter Kofler
 
Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)Peter Kofler
 
Outside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDDOutside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDDPeter Kofler
 
Refactoring the Tennis Kata (2013)
Refactoring the Tennis Kata (2013)Refactoring the Tennis Kata (2013)
Refactoring the Tennis Kata (2013)Peter Kofler
 
Pair Programming (2015)
Pair Programming (2015)Pair Programming (2015)
Pair Programming (2015)Peter Kofler
 

What's hot (20)

Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)Coding Dojo: Functional Calisthenics (2016)
Coding Dojo: Functional Calisthenics (2016)
 
Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)Brutal Coding Constraints (ITAKE 2017)
Brutal Coding Constraints (ITAKE 2017)
 
The Brutal Refactoring Game (2013)
The Brutal Refactoring Game (2013)The Brutal Refactoring Game (2013)
The Brutal Refactoring Game (2013)
 
Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013Code Retreat Graz, Austria 2013
Code Retreat Graz, Austria 2013
 
Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)Extract Method Refactoring Workshop (2016)
Extract Method Refactoring Workshop (2016)
 
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)
 
Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)Coding Dojo: Baby Steps Push Challenge (2021)
Coding Dojo: Baby Steps Push Challenge (2021)
 
Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)Coding Dojo: Bank OCR Outside-In (2015)
Coding Dojo: Bank OCR Outside-In (2015)
 
Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)Designing Test Cases for the Gilded Rose Kata (2013)
Designing Test Cases for the Gilded Rose Kata (2013)
 
Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)Coding Dojo Object Calisthenics (2016)
Coding Dojo Object Calisthenics (2016)
 
Coding Dojo: Mars Rover (2014)
Coding Dojo: Mars Rover (2014)Coding Dojo: Mars Rover (2014)
Coding Dojo: Mars Rover (2014)
 
Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)Software Craftsmanship Journeyman Tour (2013)
Software Craftsmanship Journeyman Tour (2013)
 
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
 
Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)Coding Dojo: Naming with Dices (2021)
Coding Dojo: Naming with Dices (2021)
 
Idiomatic R for Rosetta Code (2013)
Idiomatic R for Rosetta Code (2013)Idiomatic R for Rosetta Code (2013)
Idiomatic R for Rosetta Code (2013)
 
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
Using Automated Code Reviews to Achieve Continuous Quality (ASQF Agile Night ...
 
Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)Coding Dojo: Adding Tests to Legacy Code (2014)
Coding Dojo: Adding Tests to Legacy Code (2014)
 
Outside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDDOutside-in Test Driven Development - the London School of TDD
Outside-in Test Driven Development - the London School of TDD
 
Refactoring the Tennis Kata (2013)
Refactoring the Tennis Kata (2013)Refactoring the Tennis Kata (2013)
Refactoring the Tennis Kata (2013)
 
Pair Programming (2015)
Pair Programming (2015)Pair Programming (2015)
Pair Programming (2015)
 

Viewers also liked

Jesse Sampermans Research Project Presentation
Jesse Sampermans Research Project PresentationJesse Sampermans Research Project Presentation
Jesse Sampermans Research Project PresentationJesse Sampermans
 
Practical (J)Unit Testing (2009)
Practical (J)Unit Testing (2009)Practical (J)Unit Testing (2009)
Practical (J)Unit Testing (2009)Peter Kofler
 
Coding dojo
Coding dojoCoding dojo
Coding dojovietnt84
 
XpUg Coding Dojo: KataYahtzee in Ocp way
XpUg Coding Dojo: KataYahtzee in Ocp wayXpUg Coding Dojo: KataYahtzee in Ocp way
XpUg Coding Dojo: KataYahtzee in Ocp wayGiordano Scalzo
 
RailsWayCon 2010 Coding Dojo
RailsWayCon 2010 Coding DojoRailsWayCon 2010 Coding Dojo
RailsWayCon 2010 Coding DojoMichael Mahlberg
 
Agile tour 2014 - Coding Dojo with C# and TDD
Agile tour 2014 - Coding Dojo with C# and TDDAgile tour 2014 - Coding Dojo with C# and TDD
Agile tour 2014 - Coding Dojo with C# and TDDAgileCommunity
 
Construindo um Servidor Web com GO
Construindo um Servidor Web com GOConstruindo um Servidor Web com GO
Construindo um Servidor Web com GOBeto Muniz
 
GDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaPeter Kofler
 
InCuca - Coding dojo - AngularJS
InCuca - Coding dojo - AngularJSInCuca - Coding dojo - AngularJS
InCuca - Coding dojo - AngularJSInCuca
 
Making simulation training stick with rapid cycle deliberate practice
Making simulation training stick with rapid cycle deliberate practiceMaking simulation training stick with rapid cycle deliberate practice
Making simulation training stick with rapid cycle deliberate practiceINSPIRE_Network
 
Code Kata Workshop - Improve your skills through deliberate practice
Code Kata Workshop - Improve your skills through deliberate practiceCode Kata Workshop - Improve your skills through deliberate practice
Code Kata Workshop - Improve your skills through deliberate practiceDaniel Kummer
 
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Peter Kofler
 
Improving knowledge and confidence of emergency residents in pediatric resusc...
Improving knowledge and confidence of emergency residents in pediatric resusc...Improving knowledge and confidence of emergency residents in pediatric resusc...
Improving knowledge and confidence of emergency residents in pediatric resusc...INSPIRE_Network
 

Viewers also liked (17)

Bern.jb
Bern.jbBern.jb
Bern.jb
 
Jesse Sampermans Research Project Presentation
Jesse Sampermans Research Project PresentationJesse Sampermans Research Project Presentation
Jesse Sampermans Research Project Presentation
 
Practical (J)Unit Testing (2009)
Practical (J)Unit Testing (2009)Practical (J)Unit Testing (2009)
Practical (J)Unit Testing (2009)
 
Kiev Coding Dojo
Kiev Coding DojoKiev Coding Dojo
Kiev Coding Dojo
 
Refactoring
RefactoringRefactoring
Refactoring
 
Coding dojo
Coding dojoCoding dojo
Coding dojo
 
XpUg Coding Dojo: KataYahtzee in Ocp way
XpUg Coding Dojo: KataYahtzee in Ocp wayXpUg Coding Dojo: KataYahtzee in Ocp way
XpUg Coding Dojo: KataYahtzee in Ocp way
 
RailsWayCon 2010 Coding Dojo
RailsWayCon 2010 Coding DojoRailsWayCon 2010 Coding Dojo
RailsWayCon 2010 Coding Dojo
 
Agile tour 2014 - Coding Dojo with C# and TDD
Agile tour 2014 - Coding Dojo with C# and TDDAgile tour 2014 - Coding Dojo with C# and TDD
Agile tour 2014 - Coding Dojo with C# and TDD
 
Coding Dojo
Coding DojoCoding Dojo
Coding Dojo
 
Construindo um Servidor Web com GO
Construindo um Servidor Web com GOConstruindo um Servidor Web com GO
Construindo um Servidor Web com GO
 
GDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran Canaria
 
InCuca - Coding dojo - AngularJS
InCuca - Coding dojo - AngularJSInCuca - Coding dojo - AngularJS
InCuca - Coding dojo - AngularJS
 
Making simulation training stick with rapid cycle deliberate practice
Making simulation training stick with rapid cycle deliberate practiceMaking simulation training stick with rapid cycle deliberate practice
Making simulation training stick with rapid cycle deliberate practice
 
Code Kata Workshop - Improve your skills through deliberate practice
Code Kata Workshop - Improve your skills through deliberate practiceCode Kata Workshop - Improve your skills through deliberate practice
Code Kata Workshop - Improve your skills through deliberate practice
 
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
 
Improving knowledge and confidence of emergency residents in pediatric resusc...
Improving knowledge and confidence of emergency residents in pediatric resusc...Improving knowledge and confidence of emergency residents in pediatric resusc...
Improving knowledge and confidence of emergency residents in pediatric resusc...
 

Similar to Coding Dojo: Data Munging (2016)

Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)Peter Kofler
 
Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)Peter Kofler
 
Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)Peter Kofler
 
Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)Peter Kofler
 
Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)Peter Kofler
 
Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)Peter Kofler
 
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Peter Kofler
 
Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Peter Kofler
 
Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)Peter Kofler
 
Deliberate Practice (2014)
Deliberate Practice (2014)Deliberate Practice (2014)
Deliberate Practice (2014)Peter Kofler
 
Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)Peter Kofler
 
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Peter Kofler
 
Can PL/SQL be Clean? (2013)
Can PL/SQL be Clean? (2013)Can PL/SQL be Clean? (2013)
Can PL/SQL be Clean? (2013)Peter Kofler
 
Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)Peter Kofler
 

Similar to Coding Dojo: Data Munging (2016) (14)

Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)Coding Dojo: Bank OCR (2014)
Coding Dojo: Bank OCR (2014)
 
Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)Coding Dojo: Baby Steps (2014)
Coding Dojo: Baby Steps (2014)
 
Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)Coding Dojo: Roman Numerals (2014)
Coding Dojo: Roman Numerals (2014)
 
Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)Coding Dojo: String Calculator (2013)
Coding Dojo: String Calculator (2013)
 
Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)Coding Dojo: Tic-Tac-Toe (2014)
Coding Dojo: Tic-Tac-Toe (2014)
 
Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)Prime Factors Code Kata - Practicing TDD (2014)
Prime Factors Code Kata - Practicing TDD (2014)
 
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)
 
Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)Code Quality Assurance v4 (2013)
Code Quality Assurance v4 (2013)
 
Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)Coding Dojo: Fun with Tic-Tac-Toe (2014)
Coding Dojo: Fun with Tic-Tac-Toe (2014)
 
Deliberate Practice (2014)
Deliberate Practice (2014)Deliberate Practice (2014)
Deliberate Practice (2014)
 
Pair Programming (2014)
Pair Programming (2014)Pair Programming (2014)
Pair Programming (2014)
 
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)Pragmatic Introduction to Python Unit Testing (PyDays 2018)
Pragmatic Introduction to Python Unit Testing (PyDays 2018)
 
Can PL/SQL be Clean? (2013)
Can PL/SQL be Clean? (2013)Can PL/SQL be Clean? (2013)
Can PL/SQL be Clean? (2013)
 
Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)Pragmatic Introduction to PHP Unit Testing (2015)
Pragmatic Introduction to PHP Unit Testing (2015)
 

Recently uploaded

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

Coding Dojo: Data Munging (2016)

  • 1. Coding Dojo: Data Munging (without control structures) Peter Kofler, ‘Code Cop’ @codecopkofler www.code-cop.org Copyright Peter Kofler, licensed under CC-BY.
  • 2. Peter Kofler • Ph.D. (Appl. Math.) • Professional Software Developer for 15+ years • “fanatic about code quality” • Freelance Code Mentor PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 3. I help development teams with PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY ● Professionalism ● Quality and Productivity ● Continuous Improvement
  • 4. Mentoring PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY ● Pair Programming ● Programming Workshops ● Deliberate Practice, e.g. Coding Dojos
  • 6. Dojo Structure ● Introduction 15' ● Coding 60' ● Retrospective 15' ● Break 15' ● Coding 60' ● Retrospective 15' PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 7. Coding Dojo Mindset ● Safe place outside work ● We are here to learn ● Need to slow down ● Focus on doing it right ● Collaborative Game PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 8. Coding Dojo Rules PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 9. Pair Programming & TDD ● regular Pair Programming ● do not talk for too long ● do not interrupt the other ● no “keyboard hugging“ ● use TDD (or at least “sort of” TDD) ● write a test before you write code ● refactor mercilessly ● no debugger PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 10. Constraints ● Challenges during a dojo or coderetreat ● Moving to the extreme is a way of learning ● Examples ● Missing Tool (No Mouse, …) ● Missing Feature (No IFs, …) PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 11. Constraint: Complexity One PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 12. Cyclomatic Complexity One ● No conditional statements (if, switch, ?:) ● No loops (for, while, loop, etc.) ● Technically no control structures. ● Use Optional or Maybe type. ● Use higher order functions like map, filter and reduce instead. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 13. Assignment Part 1 PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 14. Weather “Data Munging“ ● weather.dat contains daily weather data for a month. ● Find the day number (column one) ● with the smallest temperature spread. (Max temperature is second column, min temperature is third column.) PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 15. Prepare ● Find a pair. ● Choose a programming language. ● Set up the environment. ● Create new project. ● Add testing framework. ● Check part1/requirements.txt. ● Implement Data Munging. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 16. Don't Focus on Getting it Done. F0cus on Doing It Perfectly.
  • 18. Assignment Part 2 PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 19. Soccer “Data Munging“ ● football.dat contains the results from the English Soccer League. ● The columns 'F' and 'A' contain the total number of goals scored for and against each team. ● Find the name of the team ● with the smallest difference in 'for' (F) and 'against' (A) goals. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 21. Assignment Part 3 PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 22. DRY Fusion ● Take the two programs written, ● factor out as much common code as possible, ● leaving you with two smaller programs ● and some kind of shared functionality. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 24. Closing Circle ● What did you learn today? ● What surprised you today? ● What will you do differently in the future? PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 25. Peter Kofler @codecopkofler www.code-cop.org Kata by Dave Thomas @pragdave http://codekata.com/kata/kata04-data-munging/ PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 26. CC Images ● Bruce http://www.flickr.com/photos/sherpas428/4350620602/ ● pairing http://www.flickr.com/photos/dav/94735395/ ● agenda http://www.flickr.com/photos/24293932@N00/2752221871/ ● dojo http://www.flickr.com/photos/49715404@N00/3267627038/ ● rules http://www.flickr.com/photos/phunk/4188827473 x ● maze https://www.flickr.com/photos/cyberslayer/952953634 ● weather https://www.flickr.com/photos/enki22/8255595370/ ● stadium https://www.flickr.com/photos/113417287@N08/13994724156/ ● DRY https://www.flickr.com/photos/draconianrain/896834248/ ● wants you http://www.flickr.com/photos/shutter/105497713/ PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY