SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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 2013
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
 
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
 
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
 

Was ist angesagt? (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)
 

Andere mochten auch

Jesse Sampermans Research Project Presentation
Jesse Sampermans Research Project PresentationJesse Sampermans Research Project Presentation
Jesse Sampermans Research Project Presentation
Jesse Sampermans
 
Practical (J)Unit Testing (2009)
Practical (J)Unit Testing (2009)Practical (J)Unit Testing (2009)
Practical (J)Unit Testing (2009)
Peter Kofler
 
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
AgileCommunity
 
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
 

Andere mochten auch (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...
 

Ähnlich wie 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
 
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
 
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
 

Ähnlich wie 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)
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

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