Pair and Mob Programming Secret weapon for agile and continuous - - PowerPoint PPT Presentation

pair and mob programming
SMART_READER_LITE
LIVE PREVIEW

Pair and Mob Programming Secret weapon for agile and continuous - - PowerPoint PPT Presentation

Pair and Mob Programming Secret weapon for agile and continuous software development Thomas Much @thmuch #JAXLondon About @thmuch Thomas Much #JAXLondon Freelancer, Hamburg Agile Developer Coach Software Developer (Java et al.)


slide-1
SLIDE 1

Pair and Mob Programming

Secret weapon for agile and continuous software development Thomas Much @thmuch #JAXLondon

slide-2
SLIDE 2

Thomas Much Freelancer, Hamburg
 Agile Developer Coach Software Developer (Java et al.)


About…

@thmuch

#JAXLondon

slide-3
SLIDE 3

A long time ago in a galaxy far, far away….

slide-4
SLIDE 4

The other day, in a cubicle next to you…. some coworking space

slide-5
SLIDE 5

“Woah, who’s supposed to maintain this crap?” “Who wrote that code?” “Oh. That was me.”

slide-6
SLIDE 6

“Leave that to <insert name here>,
 he wrote that in his #!@%&$!? coding style.”

slide-7
SLIDE 7

Problem: Readability

  • We read code a lot more often than we write it
  • Understanding code is essential for


product care and maintenance!

  • We developers tend to write sloppy code – or too “clever” code
  • Who’s going to give us feedback – before it’s too late?

solve problem write code read existing code

https://www.slideshare.net/cairolali/langlebige-architekturen

slide-8
SLIDE 8

– Brian Kernighan

“Everyone knows that debugging is twice as hard
 as writing a program in the first place. So if you're as clever as you can be when you write it,
 how will you ever debug it?”

Problem: Simplicity

Who protects us from being too “clever”?

slide-9
SLIDE 9

“We’ve got a mandatory code review process!”

slide-10
SLIDE 10

Code reviews?

Honesty of reviews questionable (for systemic reasons). Wrong incentives.
 Feedback too late. Who’s really going to make major changes then?

slide-11
SLIDE 11

“Developer A is on vacation,
 we’ll get the urgent bugfix afterwards.” “Developer B has left the company,
 we’ll have to rewrite his apps from scratch.” “It will take months before newly-hired developer C
 fully understands our project and code.”

slide-12
SLIDE 12

Problem: Know-how transfer

Missing know-how transfer. No collective code product ownership. How? Documentation, workshops, trainings … Are we working together as a team on our product / code?

slide-13
SLIDE 13

“But we are a team?!”

slide-14
SLIDE 14

“Team”work

Task 1 Task 2 A B

slide-15
SLIDE 15

Solution! “Let’s become agile.”

To Do In Progress Done Story 1 Story 2 A B

slide-16
SLIDE 16

– Tim Ottinger

“If your agile Team has individual work assignments, I suspect it is neither agile nor team.”

slide-17
SLIDE 17

Real team collaboration

To Do In Progress Done Story 1 Story 2 A C B D

slide-18
SLIDE 18

Problem: Collaboration

How can we really work together instead of just next to each other?


slide-19
SLIDE 19

Problems!?

Readability / Simplicity / Intelligibility Maintainability Know-how transfer / Collaboration

slide-20
SLIDE 20

What do we want to achieve?

Getting things “done” quickly? (“devil-may-care”, release & run) Or rather develop maintainable software?

slide-21
SLIDE 21

Maintainable software

In “my” projects:
 Clients have to / want to maintain software themselves.
 Our goal:
 Develop maintainable software. Supported by pair programming.

slide-22
SLIDE 22

Pair programming coaching

Idea: Actively promote pair programming. Since 2013: Numerous teams supported by coaching. E-commerce, BI, traditional enterprise back-ends.
 Coach accompanies team for 1-2 sprints (2-4 weeks). Coach works as a developer wherever possible.

slide-23
SLIDE 23

Timetable

Kickoff 1-2 weeks of coaching Status 1-2 weeks of coaching Retrospective Kickoff 1-2 weeks of coaching Status 1-2 weeks of coaching Retrospective

{

½ or 1 sprint Coach codes together with the team

slide-24
SLIDE 24

Pair programming in a nutshell

1 task

slide-25
SLIDE 25

Driver & navigator

https://commons.wikimedia.org/wiki/File:FORD_Taunus_17M_P2_deLuxe_Steering_wheel.jpg http://www.marcusvenzke.de/HamburgKarte/

slide-26
SLIDE 26

Variants

slide-27
SLIDE 27

Pair programming – our salvation

Know-how transfer Collective code product ownership Clean code Maintainability Quality

Y e a h , w e l l …

slide-28
SLIDE 28

Nothing new

Pair programming – ca. 1992? .. 2000 … Extreme programming (XP) – ca. 1996 .. 2000 … “Flaccid Scrum” (Fowler 2009): Scrum = XP - practices !

slide-29
SLIDE 29

Pair programming is “in”

Boss:
 “We’re doing pair programming now.
 You’ll sit in pairs in front of your computers!” Developer A: “Finally!”
 Developer B: “No. Not really. Not again.”
 Developer C: “???”

slide-30
SLIDE 30

“The other one’s way too fast.” “The other one’s way too slow and just doesn’t get it.” “I’m exhausted. Every. Single. Evening.” “I’d rather work alone.”

slide-31
SLIDE 31

Anti-patterns


 Fixed pair works a story. That story takes 4 weeks or more. Basically one developer owns the keyboard. Variation, relief & creativity are missing completely!

slide-32
SLIDE 32

Small print

slide-33
SLIDE 33

We can’t do without exercises

appropriate communication switching roles taking breaks efficiently pair rotation how to deal with different levels of knowledge preparation of stories & tasks

slide-34
SLIDE 34

Appropriate communication

silence ⟷ too much talking
 As engineers we have to practice communicating with people…
 Driver explains “why”, not “how”. Navigator does not criticise details.

slide-35
SLIDE 35

Proper pair programming

slide-36
SLIDE 36

Proper pair programming is communicating by writing down code.
 Not just talking about hypothetical code. 


slide-37
SLIDE 37

Why pair programming helps us

We are subject to certain “brain patterns”: interpretation “how” vs. “why” …

https://www.smidig.de/2015/12/brain-patterns-for-software-development/ https://javabarista.blogspot.de/2016/06/pair-programming-das-gehirn.html

slide-38
SLIDE 38

Switching roles

  • Frequently!
  • Every few minutes?!
  • Keeps attentiveness & creativity alive.

ping-pong programming
 red-green-refactor
 TDD

slide-39
SLIDE 39

Code reviews: ongoing & implicit

Pair programming = software peer review. Timely feedback. Even for major changes.


slide-40
SLIDE 40

Explicit code reviews: optional

No mandatory code reviews when working in pairs. 
 (But you can request them if you need another “senior” view.)


slide-41
SLIDE 41

Attentiveness & creativity

slide-42
SLIDE 42

Taking breaks efficiently

Before attentiveness decreases too much. Life hack of choice: “Pomodoro” time management method

https://en.wikipedia.org/wiki/File:Il_pomodoro.jpg

slide-43
SLIDE 43

Taking breaks efficiently

Use timer app! 25 min. 5 25 5 25 5 25 5

timebox work focused

  • n the

task! break stay

  • n

schedule! longer break pair rotation?

slide-44
SLIDE 44

Isolated knowledge

slide-45
SLIDE 45

Isolated knowledge 2.0

1 1 2 2 3 3

slide-46
SLIDE 46

Pair rotation!

1 1 2 2 3 3 At least

  • nce a day
slide-47
SLIDE 47

Who with whom?

All together!
 expert & expert
 expert & beginner
 beginner & beginner Sparring partner Know-how transfer. Beginner’s mind! Discover project. Reveal weak spots.

slide-48
SLIDE 48

What about the coach?

Coach is an expert (methodically, sometimes technically) Coach is a beginner (functionally, often technically)
 Realistic collaboration! Acceptance

slide-49
SLIDE 49

The coach …

is a pairing
 partner
 
 
 watches other
 pairs 
 practises together with the team:
 Switching roles. Pair rotation. Taking breaks. Variants of pair programming.

slide-50
SLIDE 50

Variants of pair programming

https://twitter.com/thmuch/status/959456902877974528 @LlewellynFalco

“classic” “strong style”

slide-51
SLIDE 51

Remote
 pair programming

Be an experienced offline (co-located) pair programmer first! Tools:
 Floobits editor IDE plug-in, AWS Cloud 9 etc.
 TeamViewer, appear.in, Tuple.app etc. Give it a try. Depends a lot on your network (proxies etc.).

slide-52
SLIDE 52

Thorough preparation a must

Joint preparation of suitable, small stories & tasks. Discovery, planning, … Often, teams see room for improvement
 when doing pair programming.

slide-53
SLIDE 53

Comprehensive collaboration

Across roles:
 Dev, QA, UX, … Pair Doing – “Pair on Everything” Change of perspective.


slide-54
SLIDE 54

?

Technology Programming language Tooling

?

Tests Quality

?

Business Product User wait, research, (re-)plan

? ?

slide-55
SLIDE 55

Technology Programming language Tooling Tests Quality Business, Product, User

Dev Dev Ops PO QS

slide-56
SLIDE 56

Technology Programming language Tooling Tests Quality Business, Product, User

Mob programming

Dev Dev Ops PO QS

at the same time, in the same space!

slide-57
SLIDE 57

Mob programming

– Llewellyn Falco

“It’s about getting the BEST (not the most) from your team.”

– Woody Zuill

“All the brilliant minds working on the same thing,
 at the same time, on the same computer.” “Continuous Integration of Ideas”

slide-58
SLIDE 58

Mob programming

Switch roles! Fixed timebox
 (every 5-10 min.), http://mobster.cc Dynamic mob:
 coming and going. Feels less cramped
 compared to pair programming.

slide-59
SLIDE 59

Mob programming

Across team roles! Getting the most important task
 done first.

Dev Dev Ops QS UX PO

slide-60
SLIDE 60

Highest priority first!

To do In progress Done Story 1 Story 2 WIP limit 1

slide-61
SLIDE 61

Highest priority first!

To do In progress Done Story 1 Story 2 WIP limit 1

slide-62
SLIDE 62

Mob programming – setups

Driver Nav. Mob Coach Coach

slide-63
SLIDE 63

– Marcus Hammarberg

“Mob Programming ... is the most important improvement I've seen the last couple of years.”

https://twitter.com/marcusoftnet/status/1042708243544514560

slide-64
SLIDE 64

Modern Agile

http://modernagile.org/ Pair & mob programming are part of it, simple as that.

slide-65
SLIDE 65

And still …

slide-66
SLIDE 66

“I’m faster alone.”

slide-67
SLIDE 67

– African proverb

“If you want to go fast, go alone.
 If you want to go far, go together.”

Raise awareness

slide-68
SLIDE 68

Take care of the details

Many reasons for rejection… Proponents and opponents must compromise. Fix clear agreements. “Short-time pair programming”, for instance. One small step for a developer, one giant leap for a team!

slide-69
SLIDE 69

– Jason Gorman

“Don't think of pair programming
 as 2 people doing the work of one. Think of it as 2 people avoiding the rework of 7.”

slide-70
SLIDE 70

Speed… velocity… pace…

We follow these principles: … Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. …

http://agilemanifesto.org/principles.html

slide-71
SLIDE 71

100% pair programming?

Probably not. But: Should be standard programming practice! No excuses for not working in pairs. How much % per day do we code? Hand on heart! 100%? Much of the real coding time should be spent working in pairs! Allow for solo time!
 For learning something new, reading, doing research etc.

slide-72
SLIDE 72

Recap

Pair & mob programming strengthen agile processes. Focus on developer skills & programming practices.
 Coaching helps establishing pair & mob programming long-term. Developers experience benefits hands-on.

slide-73
SLIDE 73

Methodical agile coaching – important! But: Don’t forget coaching of programming practices.
 
 
 


slide-74
SLIDE 74

Questions?

Mob Programming Pomodoro Strong Style Pairing Readability Simplicity Know-How Transfer Collective Product Ownership XP TDD Pair Programming Coaching Modern Agile Velocity Speed

slide-75
SLIDE 75

Thank you!

thomas@muchsoft.com www.javabarista.de @thmuch