coding dojo: roman numerals (2014)
DESCRIPTION
TRANSCRIPT
![Page 1: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/1.jpg)
Coding Dojo:Roman Numerals
July 2014
Peter Kofler, ‘Code Cop’@codecopkofler
www.code-cop.org
Copyright Peter Kofler, licensed under CC-BY.
![Page 2: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/2.jpg)
Peter Kofler
• Ph.D. (Appl. Math.)
• Professional SoftwareDeveloper for 15 years
• “fanatic about code quality”
• I help development teams
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 3: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/3.jpg)
Coding Dojo?Expectations?
![Page 4: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/4.jpg)
Coding Dojo Mindset
● Safe place outsidework
● 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
![Page 5: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/5.jpg)
Rules
● Collaborative = Pair Programming● “Randori“ (pairing on the projector)● or programming in pairs
● Test Driven Development● think about test cases● write the test first
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 6: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/6.jpg)
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
![Page 7: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/7.jpg)
Dojo Structure
● Introduction 15'● Coding 45'● Interim (Retrospective) 15'● Break 10'● Coding 45'● Retrospective 15'
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 8: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/8.jpg)
Assignment
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 9: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/9.jpg)
Roman Numerals
● http://en.wikipedia.org/wiki/Roman_numerals“standard”, subtractive form, 1 – 3999
● convert normal (Arabic) numbers to Roman numerals:
– 1 I→– 4 IV→– 7 VII→– 10 X→
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 10: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/10.jpg)
Prepare
● Find a pair.● Choose a programming language.● Set up the environment.
● Create new project.● Add testing framework.
● Check Wikipedia for requirements.● Implement requirements.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 11: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/11.jpg)
Don't Focus on Getting it Done.F0cus on Doing
It Perfectly.
![Page 12: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/12.jpg)
→Practice
![Page 13: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/13.jpg)
Roman Numerals II
● http://en.wikipedia.org/wiki/Roman_numerals“standard”, subtractive form, 1 – 3999
● convert Roman numerals to normal (Arabic) numbers:
– I 1→– IV 4→– VII 7→– X 10→
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 14: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/14.jpg)
Constraint: Ping-Pong
● A writes a test and sees that it fails.● B writes the code needed to pass the test.● B refactors the code as needed.● B writes next test and sees that it fails.● A writes the code needed to pass the test.● And so on.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 15: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/15.jpg)
Algorithm Considerations
● No loops.
● No table/map/switch for literal lookup.
● Subtractive form is not a literal.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 16: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/16.jpg)
→Practice
![Page 17: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/17.jpg)
Short Closing Circle
● How did it work out?
● How do you feel?
● What did you learn and want to share with the group?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 18: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/18.jpg)
Full 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
![Page 19: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/19.jpg)
Coding Dojo Vienna
● Biweekly Coding Dojo in Vienna● Every other Wednesday 6PM
● Changing locations
● Follow#CodingDojoVie
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
http://codingdojovie.github.io/
![Page 20: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/20.jpg)
Global Day of Code Retreat
● A world-wide event celebrating passion and software craftsmanship.
● GDCR 2014: 15th November
● Follow #GDCR14
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
http://globalday.coderetreat.org/
![Page 21: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/21.jpg)
Peter Kofler
@codecopkofler
www.code-cop.org
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 22: Coding Dojo: Roman Numerals (2014)](https://reader034.vdocuments.us/reader034/viewer/2022052321/549ecf36b3795989198b45d3/html5/thumbnails/22.jpg)
CC Images● Corner
https://www.flickr.com/photos/midatlanticbulldogrescue/160531996● Dojo http://www.flickr.com/photos/49715404@N00/3267627038/● Todos http://www.flickr.com/photos/kylesteeddesign/3724074594/● Date https://www.flickr.com/photos/patmilphotos/7694314328● Wants you http://www.flickr.com/photos/shutter/105497713/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY