48
Coding Dojos på arbetstid [email protected] PST, PSD, PSM I, CSM

Coding dojos på arbetstid

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Coding dojos på arbetstid

Coding Dojos

på arbetstid

[email protected]

PST, PSD, PSM I, CSM

Page 2: Coding dojos på arbetstid

This work by

Fredrik Wendtis licensed under a

Creative Commons Attribution-ShareAlike

3.0 Unported License

http://creativecommons.org/licenses/by-sa/3.0/

Page 3: Coding dojos på arbetstid

Ditt namn, vad du gör!

Vad är det?

Har du eller vän deltagit?

Erfarenheter från deltagande?

Förväntning(-ar) på denna session!

Coding Dojo!

Page 4: Coding dojos på arbetstid

Learning Objectives

• why you don't want to run typical generic katas

• how different exercise styles matches learning patterns, skills and objectives of the dojo

• some things to think about when facilitating dojo sessions

• how I convince companies to see coding dojos as an invest with short ROI

• what skill advancements you might expect from coding dojos

• how a successfully run dojo may impact "soft values"

Page 5: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

TL;DR

Page 6: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

➔ Background, context

Page 7: Coding dojos på arbetstid

Based on What?

2 regular user groups

12 teams, 9 customers

past ~ 2 years

50 / 50

Page 8: Coding dojos på arbetstid

Taxonomy: Coding Dojo

“Dojo” from martial arts/budo

Means “place for the way”

Page 9: Coding dojos på arbetstid

More on Coding Dojos?

15% off: scrum-alliance-las-vegas-2013

Page 10: Coding dojos på arbetstid

Taxonomy: Kata

“Kata” from martial arts/budo

Start from scratch, next time – try new approach

Practice until mastered

Small, 1-2 hrs

Page 11: Coding dojos på arbetstid

Presentation

Page 12: Coding dojos på arbetstid

Randori

Page 13: Coding dojos på arbetstid

Roundori

Page 14: Coding dojos på arbetstid

Break-out

Page 15: Coding dojos på arbetstid

biz

CHANGE!

new skills

PracticeCoding Dojo

Page 16: Coding dojos på arbetstid

Examples of ”Skills”

TDD, Good Tests – Test Design

Working with Legacy Code

BDD, ATDD

Clean Code, Refactoring

Patterns, New Technologies

Pair Programming

Page 17: Coding dojos på arbetstid

Examples of ”Change”

New Tests Are Written!

Old Tests starts passing!

Code Coverage Goes Up!

Everyone Cares when the build Fails!

Technology Shift – “On” Plan

Page 18: Coding dojos på arbetstid

Skill Advancement

How comfortable were/are you with SKILL?

Beginner Expert

Before

After

Today

... ... ...

Page 19: Coding dojos på arbetstid

Programming Language

How comfortable were/are you with the programming language?

Beginner Expert

Before

After

Today

... ... ...

Page 20: Coding dojos på arbetstid

IDE-editor

How comfortable were/are you with the IDE-editor?

Beginner Expert

Before

After

Today

... ... ...

Page 21: Coding dojos på arbetstid

Unit Tests

How often did/do you write unit tests?

Beginner Expert

Before

After

Today

... ... ...

Page 22: Coding dojos på arbetstid

Test-Driven Development

How good at test-driven development were/are you?

Beginner Expert

Before

After

Today

... ... ...

Page 23: Coding dojos på arbetstid

Mock Objects

How comfortable were/are you at using Mock objects?

Beginner Expert

Before

After

Today

... ... ...

Page 24: Coding dojos på arbetstid

Refactoring

How good at refactoring were/are you?

Beginner Expert

Before

After

Today

... ... ...

Page 25: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

➔ Background, context

Page 26: Coding dojos på arbetstid

Coding dojo!

Vad tror du behövs för lärande på arbetsplatsen?

(Skills, Change – subjektiva resultat)

Pros/cons – olika sätt att organisera sig?

(Presentation, Randori, break-out)

Page 27: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

➔ Background, context

Page 28: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

Page 29: Coding dojos på arbetstid

Safe Environment for Learning

No salary setting managers in the room

Talk about how humans learn!

Show attendees –

what: learning objective

how: seeing is believing

Page 30: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

Page 31: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

Page 32: Coding dojos på arbetstid

Different Mind-Set!

Attend out of own interest vs told to attend

Telling is not enough

Showing is not enough

Need to experience to believe & understand

Production like, see it's doable outside dojo

Page 33: Coding dojos på arbetstid

Must Feel Real!

Enterprise Java Beans

Java Persistence API

javax.servlet.*

String Calculator? Fizz Buzz?

Roman Numerals? MMXIII?

Bowling? Poker Games?

Page 34: Coding dojos på arbetstid

Example: servlet.Filter

• Kata Java EE Authentication Filter

• Uses javax.servlet.* API

• Uses 2 custom interfaces

• Show classical vs mockist style

• 2nd time around Clean Code

Page 35: Coding dojos på arbetstid

request is part of HTTP Session?

get token from session

SSO token is valid?

pass request on down the filter chain

return;throw AuthException;resp.setStatus(401);

request containsSSO cookie?

SSO token is valid?

request contains un& pw parameters?

get token from cookie

get un & pw from request

un & pw valid in LDAP?

get new SSO token

store SSO token in cookie

store SSO token in session

No

No

No

Yes

Yes

Yes

Yes

Kata

Jav

a EE

Aut

hent

icat

ion

Filte

r

Page 36: Coding dojos på arbetstid

public interface UserAccountRegistry {

boolean credentialsAreValid(String username,

String password);

}

public interface SingleSignOnRegistry {

boolean tokenIsValid(String ssoToken);

String requireToken(String username);

void revokeToken(String ssoToken);

}

Kata

Jav

a EE

Aut

hent

icat

ion

Filte

r

Page 37: Coding dojos på arbetstid

Break-out

Page 38: Coding dojos på arbetstid

Break-out

Page 39: Coding dojos på arbetstid

Break-out

Page 40: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

Page 41: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

Page 42: Coding dojos på arbetstid

Format

15 90 15

40 – 10 – 40

Context

Understand exercise

Fail in order to learn

Tools? Techniques?

“Seeing is believing”

DO

Review, Feedback

Repetition

Participants' own

words means learning!

Input to next session

Page 43: Coding dojos på arbetstid

Learning by Doing

Repeat exercise

without trainer,

same time, place, people

”I can do this on my own”

vs

”only works for others”

Page 44: Coding dojos på arbetstid

Repetition Mother of Learning

E-mail with kata,

retrospective notes,

learning objectives,

ask if they've uncovered new

insights/experiences

Page 45: Coding dojos på arbetstid

➔ Safe Learning Env➔ Like Production➔ Practice, Repetition –

Learning by Doing

Summary

Page 46: Coding dojos på arbetstid

Learning Objectives

• why you don't want to run typical generic katas

• how different exercise styles matches learning patterns, skills and objectives of the dojo

• some things to think about when facilitating dojo sessions

• how I convince companies to see coding dojos as an invest with short ROI

• what skill advancements you might expect from coding dojos

• how a successfully run dojo may impact "soft values"

Page 47: Coding dojos på arbetstid

MORE!

• Fruit, Candy, Coffee, Sugar!

• Whole team vs mixed teams

• Management buy-in – S-curve/hockey stick in learning

• Production like kata – 90 minute problems != realistic

• 1h topic-intro (clean code), lunch, 2h exercise

• 2h kata, lunch, 2h kata

• 1600-1800

• Come prepared, know your audience – 20 Questions

• Plant a mystery

Page 48: Coding dojos på arbetstid

NO MORE!

”Anti patterns”:

• Too complex problem

• Too complex biz rules (or game rules)

• Too huge data model – poker hands kata?

• Too great skill differences, depends on kata & style

• “Hero”?