Sandra Parsick
2020-10-07
@DataDuke
@SandraParsick
@SandraParsick
Disclaimer: Thanks to our fellow crafters!
Today we know software development is a mixture out of craft, research and engineering!
However it was not always like this...
Keynote from Uncle Bob:
...later transformed to:
2002 - Software Apprenticeship Summit:
2008 - SC Summit: Micah Martin gave a session
2009 - Doug Bradburry wrote in SC Google group "The New Left Side" vs. Scott Pfister "Right Side, Revisited"
Why a manifesto?
2009 - First SC conferences in USA, UK
2009 - Israeli SCC was founded
2010 - London SCC was founded
2011 - First SoCraTes in Germany
Today - SoCraTes (partner) conferences/days in:
Germany, Chile, Canaries, Italy, UK, USA, Switzerland, France, Austria, Belgium, Finnland, Romania...
vs. 1,5M with Agile
Members:
many new aspiring devs
principles got lost again down the road while doing other activities
IT market is booming and we need technical excellence to tackle our software products
arising lack of broad TDD knowledge
Goals:
London School (Mockist)
Double Loop ATDD
Outside-In Design
Detroit School (Classicist)
Kent Beck, Uncle Bob...
front-door testing
state verification
only mock the process boundary (DB, 3rd party)
design emerges bottom-up / inside-out
"TDD as if you meant it"
"Munich School"
Fake-it Outside-In Design
1. You are not allowed to write any production code unless it is to make a failing unit test pass.
2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
Three rules by Robert C. Martin / Keith Braithwaite
by Robert C. Martin / Acronym by Michael Feathers
...and many more principles can be practiced with Katas!
Individuals & Interactions
(Learning from each others)
Clean Code
Lifelong Learning
Continuous Improvement
(Practice)
A bunch of coders get together, code, learn, and have fun. It’s got to be a winning formula! – Emily Bache
First Rule: Design cannot be discussed without Code, Code can not be shown without tests.
Come with your relicts
Learning Again
Slow down
Throwing yourself in
Finding a master
Subjecting to a master
Mastering a subject
TDD is used as a default pattern for coding!
Task:
Example:
first described in the essay "Fizz! Buzz!” (~1987) by David Langford as a drinking game of his teenage years in the 1960s
Life in life!
String Calculator Kata
Bowling Game Kata (by Robert C. Martin)
Prime Factors Kata (by Robert C. Martin)
Diamond Kata by Seb Rose
BankOCR Kata
Ordered Jobs Kata
Roman Numerals Kata
Kebab Kata
Game Of Life
...
Upfront:
Book a room, Invite people, Print copies of kata description, prepare some slides for dojo introduction, inspect the chosen kata upfront
Start:
During:
Facilitator needs to create good/healthy atmosphere, prompt interesting discussions, keep the code growing,
Try not stop people when they mess up with TDD, let them learn from mistakes, wait until retro before saying anything!
09:30 Intro/Talks
10:45 Round 1
11:45 Round 2
12:45 Lunch
13:30 Round 3
14:30 Round 4
15:30 Round 5
A format popularized by Corey Haines
Kent Beck:
Corey Haines: https://leanpub.com/4rulesofsimpledesign
Basic Activities
Ping Pong
Navigator-Driver
Missing Tool Activities
No Mouse
Text Editor only
Paper only
Missing Feature Activities
No naked primitives
No conditional statements
No loops
Quality-Constraint Activities
Only four lines per method
Immutables only, please
Stretch Activities
Verbs instead of Nouns
Code Swap
Mute with find the loophole
TDD as if you meant it
Baby Steps
Silent Coding (Mute)
No If
No IDE
No Mouse
Only One-Liners
Every Cell is a Microservice (at Game of Life)
…
Sandra Parsick
twitter.com/SandraParsick
mail@sandra-parsick.de
Benjamin Nothdurft
twitter.com/dataduke
benjamin.nothdurft@codecentric.de
Disclaimer: Thanks to our fellow crafters!
Task:
Examples:
21 ➔ XXI 50 ➔ L 100 ➔ C 500 ➔ D 1000 ➔ M
1 ➔ I 2 ➔ II 3 ➔ III 4 ➔ IV 5 ➔ V 9 ➔ IX
1. Create a simple String calculator with a method int add(string numbers)
2. Allow the add method to handle an unknown amount of numbers
3. Allow the add method to handle newlines between numbers instead of commas.
4. Support different delimiters with pattern: //[delimiter]\n[numbers...] , e.g. “//;\n1;2”
5. Calling add with a negative number should throw an exception “negatives not allowed”
6. Ignore big numbers, e.g. boundary is 1000 then 1001 + 2 = 2
...
Idea by Roy Osherove
Steps 1. + 2. = Solved with preparatory refactoring
@DataDuke
Clean Code Helsinki
Latvian SCC
DevTernity
vs. 1,5M with Agile
Given a letter print a diamond starting with 'A' with the supplied letter at the widest point on the command line.
__A__
_B_B_
C___C
_B_B_
__A__
____A____
___B_B___
__C___C__
_D_____D_
E_______E
_D_____D_
__C___C__
___B_B___
____A____
_A_
B_B
_A_
Example for B
Example for C
Example for E
Fake-it-inside-Out Approach