Coding Dojo
“Naming”
March 2021
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 20+ years
• “fanatic about code quality”
• Independent Code Quality Coach
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
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
Rules of the Dojo
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)
●
start with a test list
●
write a test before you write code
●
refactor mercilessly
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
(Maybe Some) 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
Today surely some fun
Tic-Tac-Toe
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Assignment
●
http://en.wikipedia.org/wiki/Tic-tac-toe
●
Board 3x3
●
X plays first, O plays second
●
Implement
●
2 Player Game
●
Determine Winner
●
AI Bot Player
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Constraint
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Named by Dices
●
Everything
●
- but the names of test methods -
●
is named using random dices.
●
Specifically using these random dices
with enterprise-y useless names.
●
https://blog.code-cop.org/p/arolla-dice-namer.html
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 Tic-Tac-Toe.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
→Practice
→Break
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
Code which does
not make me want
to kill the author.
http://programmers.stackexchange.com/a/13594/15057
Peter Kofler
@codecopkofler
www.code-cop.org
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
CC Images
●
cleaning: http://www.flickr.com/photos/inf3ktion/4477642894/
●
Bruce http://www.flickr.com/photos/sherpas428/4350620602/
●
pairing http://www.flickr.com/photos/dav/94735395/
●
dojo http://www.flickr.com/photos/49715404@N00/3267627038/
●
rule http://www.flickr.com/photos/phunk/4188827473
●
game http://www.flickr.com/photos/benclinch/476855843/
●
dice https://www.flickr.com/photos/sophieffc/2580454777/
●
wants you http://www.flickr.com/photos/shutter/105497713/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY

Coding Dojo: Naming with Dices (2021)

  • 1.
    Coding Dojo “Naming” March 2021 PeterKofler, ‘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 20+ years • “fanatic about code quality” • Independent Code Quality Coach PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 3.
    I help developmentteams with PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY ● Professionalism ● Quality and Productivity ● Continuous Improvement
  • 4.
    Mentoring PETER KOFLER, CODE-COP.ORGFANATIC ABOUT CODE QUALITY ● Pair Programming ● Programming Workshops ● Deliberate Practice, e.g. Coding Dojos
  • 5.
  • 6.
    Coding Dojo Mindset ● Safeplace 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
  • 7.
    Rules of theDojo PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 8.
    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) ● start with a test list ● write a test before you write code ● refactor mercilessly PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 9.
    (Maybe Some) Constraints ● Challengesduring 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 Today surely some fun
  • 10.
    Tic-Tac-Toe PETER KOFLER, CODE-COP.ORGFANATIC ABOUT CODE QUALITY
  • 11.
    Assignment ● http://en.wikipedia.org/wiki/Tic-tac-toe ● Board 3x3 ● X playsfirst, O plays second ● Implement ● 2 Player Game ● Determine Winner ● AI Bot Player PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 12.
    Constraint PETER KOFLER, CODE-COP.ORGFANATIC ABOUT CODE QUALITY
  • 13.
    Named by Dices ● Everything ● -but the names of test methods - ● is named using random dices. ● Specifically using these random dices with enterprise-y useless names. ● https://blog.code-cop.org/p/arolla-dice-namer.html PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 14.
    Prepare ● Find a pair. ● Choosea programming language. ● Set up the environment. ● Create new project. ● Add testing framework. ● Check Wikipedia for requirements. ● Implement Tic-Tac-Toe. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 15.
  • 16.
  • 17.
    Closing Circle ● What didyou learn today? ● What surprised you today? ● What will you do differently in the future? PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 18.
    Code which does notmake me want to kill the author. http://programmers.stackexchange.com/a/13594/15057
  • 19.
    Peter Kofler @codecopkofler www.code-cop.org PETER KOFLER,CODE-COP.ORG FANATIC ABOUT CODE QUALITY
  • 20.
    CC Images ● cleaning: http://www.flickr.com/photos/inf3ktion/4477642894/ ● Brucehttp://www.flickr.com/photos/sherpas428/4350620602/ ● pairing http://www.flickr.com/photos/dav/94735395/ ● dojo http://www.flickr.com/photos/49715404@N00/3267627038/ ● rule http://www.flickr.com/photos/phunk/4188827473 ● game http://www.flickr.com/photos/benclinch/476855843/ ● dice https://www.flickr.com/photos/sophieffc/2580454777/ ● wants you http://www.flickr.com/photos/shutter/105497713/ PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY