How I help others to level
up technical practices
stanly@odd-e.com
@stanlylau
Lives in Singapore

Software development coach / mentor

Agile Singapore 2013, 2014, 2016
http://www.marketingfirepower.info/the-minefield-you-didn’t-know-you-were-in
Early days

First attempts…
Photo: mint.com
Brown Bag sharing

TDD Coding Dojo
How I became better

Scrum Developer course
Experiments

(informal)
Alright, back to topic
Community Coding Dojo
Tried
• StringCalculator TDD exercise
• 20 people, most are new to TDD
Learned
• Most have trouble writing test first
• Questions of applying on their existing systems
• What if we focus only on refactoring first?
Community Mini-Coderetreat
Community Refactoring Kata
Community Refactoring Kata
`
Learned
• They felt confident changing code
• Inspired them to add tests at work
• They added and was unmaintainable
Community Refactoring Kata
TDD workshop followed by pairing
with team members for two weeks
Tried
• 70% lectures, 30% exercises
• Code exercises from public repositories
• Pairing happens random
Learned
• Pairing related to code were slim
• Assess the current state of automated build
• Some people were defensive
Pairing
Tried
• From an hour to 10 days
• Prepare a few topics
• Share with me their reflection/learnings
Learned
• Don’t know where to start in long method
• Draw/Model the classes
• Skills often mentioned
Pairing
Common mentioned skills
• Hotkeys
• Understanding Single Responsibility Principle
• Return null vs empty list
• Refactor multiple returns to single return
• Distance of behavior and data (domain object)
• Working with 3rd party webservice API
• Name closer to the business language
• Start with Code Smells & Refactoring Workshop
• Code exercises from product’s codebase
• Series of progressive one-day workshops
• One-on-one sessions between workshops
• Hands-on exercises then debrief
• Maximum of 8 participants
• Two co-leaders, me & another from the company
• Platform for growing mentors
Technical Training Program
Tried
• Took one week to create
• More than 10 exercises
• Remove code smells always
• Context limited to within the method
• Repetition + a little different
• Respectfully intrude and challenge
Refactoring Workshop #1
Anonymised
Tried
• Took more than a week to create
• Lesser exercises and repetition
• Context includes callers and call-ees
• New code smells
• Characterisation tests
• Simplify code using library e.g. JSONConvert
• Agile modeling
• Assignments as a pre-requisite
Refactoring Workshop #2
Agile modeling
Assignments as a Pre-requisite
Tried
• Part 1: Review a recent code that was refactored
• Part 2: Remove the smells in a refactoring kata
• I provide feedback about their code
Learned
• Excellent way to find out where they are
• Opportunity to hear their thoughts
Assignments as a Pre-requisite
“Actually I knew this code smell in my code but I
don’t know any good way to remove this smell, so I
hope I can attend workshop #2 to learn more about
refactoring.”
What aspects of the course were most
successful in helping you to learn?
“Explanation on speculative generality with diagrams”
“Trying out by ourself how to identify and refactor”
“Use Resharper hotkeys”
“Use real production code to practise”
“Approach towards a problem, especially all those shared
examples are very commonly seen code smells.”
What improvements to the course do you
suggest?
“More practice examples to be more familiar in
recognizing and tackle the similar code smell.”
“More examples on how to identify code smells such as
primitive obsession”
“Sometimes I am lost after the trainer expect me to do
the refactoring on the code”
“More sessions"
Supportive
Environment
Effective
Feedback
Being
Competent
Key factors of
helping others to grow
One more experiment…
Developmental Mentoring
Everyone Needs A Mentor by David Clutterbuck
“Mentoring is a partnership between two people built
upon trust. It is a process in which the mentor offers
ongoing support and development opportunities to
the mentee. Addressing issues and blockages
identified by the mentee, the mentor offers guidance,
counselling and support in the form of pragmatic and
objective assistance. Both share a common purpose
of developing a strong two-way learning
relationship.”
- Jenny Sweeney
Goals not limited to…
Able to apply clean code, refactoring, modeling, design principles
and design patterns [1].
Able to work effectively with legacy code and automated tests.
Able to come up and demonstrate with examples/exercises
appropriate for mentee's level.
Able to apply coaching skills of Accountability, Acknowledgment,
Articulate What is Going On, Challenging, Inquiry, Metaphor,
Powerful Questions, Intuition, Championing and Listening
(Internal, Focused).
[1]

Design patterns: Strategy, Template method, Factory, Builder, Adapter, Command, Mediator, Null Object

Design principles: S.O.L.I.D, Law of Demeter, Tell Don't Ask

Refactoring: The skill of driving refactoring by code smells and design principles.
Thank you
stanly@odd-e.com

How I help others to level up technical practices

  • 1.
    How I helpothers to level up technical practices stanly@odd-e.com @stanlylau
  • 2.
    Lives in Singapore Softwaredevelopment coach / mentor Agile Singapore 2013, 2014, 2016
  • 3.
  • 4.
  • 6.
    Photo: mint.com Brown Bagsharing TDD Coding Dojo
  • 7.
    How I becamebetter Scrum Developer course
  • 11.
  • 14.
  • 15.
  • 16.
    Tried • StringCalculator TDDexercise • 20 people, most are new to TDD Learned • Most have trouble writing test first • Questions of applying on their existing systems • What if we focus only on refactoring first? Community Mini-Coderetreat
  • 17.
  • 18.
  • 19.
    Learned • They feltconfident changing code • Inspired them to add tests at work • They added and was unmaintainable Community Refactoring Kata
  • 20.
    TDD workshop followedby pairing with team members for two weeks Tried • 70% lectures, 30% exercises • Code exercises from public repositories • Pairing happens random Learned • Pairing related to code were slim • Assess the current state of automated build • Some people were defensive
  • 21.
    Pairing Tried • From anhour to 10 days • Prepare a few topics • Share with me their reflection/learnings Learned • Don’t know where to start in long method • Draw/Model the classes • Skills often mentioned
  • 22.
    Pairing Common mentioned skills •Hotkeys • Understanding Single Responsibility Principle • Return null vs empty list • Refactor multiple returns to single return • Distance of behavior and data (domain object) • Working with 3rd party webservice API • Name closer to the business language
  • 23.
    • Start withCode Smells & Refactoring Workshop • Code exercises from product’s codebase • Series of progressive one-day workshops • One-on-one sessions between workshops • Hands-on exercises then debrief • Maximum of 8 participants • Two co-leaders, me & another from the company • Platform for growing mentors Technical Training Program
  • 24.
    Tried • Took oneweek to create • More than 10 exercises • Remove code smells always • Context limited to within the method • Repetition + a little different • Respectfully intrude and challenge Refactoring Workshop #1
  • 25.
  • 28.
    Tried • Took morethan a week to create • Lesser exercises and repetition • Context includes callers and call-ees • New code smells • Characterisation tests • Simplify code using library e.g. JSONConvert • Agile modeling • Assignments as a pre-requisite Refactoring Workshop #2
  • 29.
  • 30.
    Assignments as aPre-requisite Tried • Part 1: Review a recent code that was refactored • Part 2: Remove the smells in a refactoring kata • I provide feedback about their code Learned • Excellent way to find out where they are • Opportunity to hear their thoughts
  • 31.
    Assignments as aPre-requisite “Actually I knew this code smell in my code but I don’t know any good way to remove this smell, so I hope I can attend workshop #2 to learn more about refactoring.”
  • 32.
    What aspects ofthe course were most successful in helping you to learn? “Explanation on speculative generality with diagrams” “Trying out by ourself how to identify and refactor” “Use Resharper hotkeys” “Use real production code to practise” “Approach towards a problem, especially all those shared examples are very commonly seen code smells.”
  • 33.
    What improvements tothe course do you suggest? “More practice examples to be more familiar in recognizing and tackle the similar code smell.” “More examples on how to identify code smells such as primitive obsession” “Sometimes I am lost after the trainer expect me to do the refactoring on the code” “More sessions"
  • 34.
  • 35.
  • 36.
    Developmental Mentoring Everyone NeedsA Mentor by David Clutterbuck
  • 37.
    “Mentoring is apartnership between two people built upon trust. It is a process in which the mentor offers ongoing support and development opportunities to the mentee. Addressing issues and blockages identified by the mentee, the mentor offers guidance, counselling and support in the form of pragmatic and objective assistance. Both share a common purpose of developing a strong two-way learning relationship.” - Jenny Sweeney
  • 38.
    Goals not limitedto… Able to apply clean code, refactoring, modeling, design principles and design patterns [1]. Able to work effectively with legacy code and automated tests. Able to come up and demonstrate with examples/exercises appropriate for mentee's level. Able to apply coaching skills of Accountability, Acknowledgment, Articulate What is Going On, Challenging, Inquiry, Metaphor, Powerful Questions, Intuition, Championing and Listening (Internal, Focused). [1]
 Design patterns: Strategy, Template method, Factory, Builder, Adapter, Command, Mediator, Null Object
 Design principles: S.O.L.I.D, Law of Demeter, Tell Don't Ask
 Refactoring: The skill of driving refactoring by code smells and design principles.
  • 39.