Upcoming SlideShare
×

# Coding Dojo: Roman Numerals (2014)

1,104 views

Published on

Published in: Technology, Sports
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
1,104
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
6
0
Likes
1
Embeds 0
No embeds

No notes for slide

### Coding Dojo: Roman Numerals (2014)

1. 1. Coding Dojo: Roman Numerals July 2014 Peter Kofler, ‘Code Cop’ @codecopkofler www.code-cop.org Copyright Peter Kofler, licensed under CC-BY.
2. 2. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Peter Kofler • Ph.D. (Appl. Math.) • Professional Software Developer for 15 years • “fanatic about code quality” • I help development teams
3. 3. Coding Dojo? Expectations?
4. 4. 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
5. 5. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Rules ● Collaborative = Pair Programming ● “Randori“ (pairing on the projector) ● or programming in pairs ● Test Driven Development ● think about test cases ● write the test first
6. 6. 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, …)
7. 7. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Dojo Structure ● Introduction 15' ● Coding 45' ● Interim (Retrospective) 15' ● Break 10' ● Coding 45' ● Retrospective 15'
8. 8. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Assignment
9. 9. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY 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
10. 10. 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 Wikipedia for requirements. ● Implement requirements.
11. 11. Don't Focus on Getting it Done. F0cus on Doing It Perfectly.
12. 12. → Practice
13. 13. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY 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
14. 14. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY 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.
15. 15. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Algorithm Considerations ● No loops. ● No table/map/switch for literal lookup. ● Subtractive form is not a literal.
16. 16. → Practice
17. 17. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Short Closing Circle ● How did it work out? ● How do you feel? ● What did you learn and want to share with the group?
18. 18. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Full Closing Circle ● What did you learn today? ● What surprised you today? ● What will you do differently in the future?
19. 19. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Coding Dojo Vienna ● Biweekly Coding Dojo in Vienna ● Every other Wednesday 6PM ● Changing locations ● Follow #CodingDojoVie http://codingdojovie.github.io/
20. 20. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Global Day of Code Retreat ● A world-wide event celebrating passion and software craftsmanship. ● GDCR 2014: 15th November ● Follow #GDCR14 http://globalday.coderetreat.org/
21. 21. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY Peter Kofler @codecopkofler www.code-cop.org
22. 22. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY 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/