Slide 1

Slide 1 text

Learning Clean Code as a team with Ralf Klemmer Tec, Agile and personal coach https://www.linkedin.com/in/ralf-klemmer/ https://twitter.com/ralfklemmer

Slide 2

Slide 2 text

Passion? The flow in high-performance teams Mission? Do everything that is needed, so, the team doesn't need me.

Slide 3

Slide 3 text

Hey, I got a code review. Can you help me? https://www.youtube.com/watch?v=rR4n-0KYeKQ

Slide 4

Slide 4 text

Symptoms occur Spend time on good naming? Should I challenge design after making code work? Spend 30 min to understand code? Endless discussions Lot of topics undecided You start picking on people due to shared opinions Missed to stop bad code entering the codebase in reviews

Slide 5

Slide 5 text

A team can only provide high-performance if it has managed to align their values and their way of working. words of wisdom 🙂

Slide 6

Slide 6 text

How to convince my teammates? Involve them, so they might discover on their own! You shouldn‘t.

Slide 7

Slide 7 text

Preparation

Slide 8

Slide 8 text

Goals Recognize bad code Express what is „bad“ in well-defined terms lame What is a good Dev? Is good software equal to working software? Fix it

Slide 9

Slide 9 text

First: learn to identify bad code. Second: learn how good code looks like. Third: fill the gap. 🙂 Learning Path words of wisdom 🙂

Slide 10

Slide 10 text

The Plan Day 5 09:00-09:45 Recap and plan for the day 10:00-17:00 Mob sessions on any topic Goals • Mindset of Software Craftsman • Recognize Code Smells • Name Code Smells Day 1 09:00-11:00 Software Craftsmanship Intro 11:15-12:15 ~4 Code Smells 13:30-15:00 ~4 Code Smells 15:30-16:30 Kata Videostore 16:30-17:00 Recap of Kata Day 2 09:00-09:30 Recap and plan for the day 09:45-10:45 ~4 Code Smells 11:00-12:00 ~4 Code Smells 13:30-14:00 Agenda for the week 14:30-17:00 Mob Sessions (4 groups) - Kata Videostore in Java - Kata Videostore in Typescript Day 3 09:00-09:30 Recap and plan for the day 09:45-10:45 ~4 Code Smells 11:00-12:00 Rest of Code Smells 13:30-17:00 Mob Sessions Choose: - redo or start new Kata - mob on production code Day 4 09:00-09:45 Recap and plan for the day 10:00-14:00 Mob sessions on any topic 14:00-15:00 Big Recap on the last 4 days 15:00-17:00 Mob sessions on any topic

Slide 11

Slide 11 text

Each participant presents 1+ Code Smells • you prepare • you present • ask for a review before you present • Try explain it in ~10min + 5min discussion • What’s in the book Refactoring? Acceptance criteria Rules • Add other sources (youtube, websites, code samples, our code) • Summary in ~10 words • Tricks to understand the problem (faster) or to remember it easier

Slide 12

Slide 12 text

Kata preparation Mob preparation by coach Talk about Software Craftsmanship Get Approval from • Stakeholders (CTO, Customer) • Scrum Masters • PO try it by coach by coach

Slide 13

Slide 13 text

Goals • Mindset of Software Craftsman • Recognize Code Smells • Name Code Smells Goals behind the goals == Business benefits • Build an alignment for future code reviews • Learn to work in a mob • Encourage people to share thoughts about implementation • Team building • Step towards to Clean Code • starting on Extreme Programming Practices

Slide 14

Slide 14 text

The workshop

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Sample of slides

Slide 17

Slide 17 text

Sample of slides

Slide 18

Slide 18 text

Sample of slides

Slide 19

Slide 19 text

Sample of slides

Slide 20

Slide 20 text

Sample of slides

Slide 21

Slide 21 text

Sample of slides

Slide 22

Slide 22 text

Company’s Code Smell repo 💪

Slide 23

Slide 23 text

Company’s Kata repo 🥋 [inside VPN]

Slide 24

Slide 24 text

Feedback What was surprising you in the yesterday's session? Navigating is hard Navigating is hard Even low complexity is hard to design well easiness That there is really no barrier doing remote mob sessions liked the discussions There are so many possible solutions Comminication was great Code smells helps common understanding pair programming is nicer common understanding Biz: How was it ? PO: How was it ? Customer: How was it ?

Slide 25

Slide 25 text

The Clean Code workshop (a second 3-days workshop)

Slide 26

Slide 26 text

3 days of learning Train facilitators for mob sessions Practice micro commits Day 1 09:00 - 09:15 Organizational stuff 09:15 - 09:45 Chapter 1 09:45 - 10:15 Chapter 2 10:15 - 10:30 Break 10:30 - 11:00 Chapter 3 11:15 - 11:45 Chapter 5 11:45 - 12:00 Break 12:00 - 12:30 Chapter 6 12:30 - 13:30 Lunch Break 13:30 - 14:00 Chapter 7 14:00 - 14:30 Chapter 8 14:30 - 14:45 Break 14:45 - 15:15 Chapter 10 15:15 - 15:45 What do you think now? 15:45 - 16:00 Break 16:00 - 17:00 Recap (especially Chapter 1) Day 2 09:00 - 09:15 Define teams (2 Typescript, 2 Java) 09:30 - 12:30 Trivia Kata - part1 12:30 - 13:30 Lunch Break 13:30 - 15:30 Trivia Kata - part2 15:30 - 17:00 Recap show gitlog ! show your code tell mayor learnings what was surprising what was challenging Present the above stuff in 20min incl. questions that may occur from the audience. BUT: If we have a lack of time, we can extend the Recap a little. :-) Clean Code Workshop

Slide 27

Slide 27 text

Clean Code Workshop Rules for mob sessions - start with 5 min turns, increase if you want - do a break after each roundtrip - use mobti.me (if possible) Rules for Clean Code chapter - explain neutral, hide your personal opinion - lead (the controversial) discussion - try to get an agreement that this chapter is valuable

Slide 28

Slide 28 text

Sample of slides

Slide 29

Slide 29 text

Sample of slides

Slide 30

Slide 30 text

Sample of slides impulse to widen our comfort zone

Slide 31

Slide 31 text

Clean Code Workshop Sample of slides

Slide 32

Slide 32 text

Sample of slides

Slide 33

Slide 33 text

Sample of slides

Slide 34

Slide 34 text

Sample of slides

Slide 35

Slide 35 text

Day 2 09:00 - 09:15 Define teams (2 Typescript, 2 Java) -> create appointment for each team 09:30 - 12:30 Kata - part1 12:30 - 13:30 Lunch Break 13:30 - 15:30 Kata - part2 15:30 - 17:00 Recap ● show gitlog, ● show your code, ● tell mayor learnings, ● what was surprising, ● what was challenging Try to present the above stuff in 20min incl. questions that may occur from the audience. BUT: If we have a lack of time, we can extend the Recap a little. :-) 1 commit per ~7:20 min Hands on session

Slide 36

Slide 36 text

Feedback Let’s ask the team!

Slide 37

Slide 37 text

Was it worth the effort? Yes That’s why we are still doing it!

Slide 38

Slide 38 text

If you want to join that company jobs.vm.de

Slide 39

Slide 39 text

Lessons learned Mindset of Software Craftsmanship was an eye-opener Expressing “what is bad” was a game changer Mob session led to fast skill/knowledge share (facilitation needs practice) Involving is more accepted than convincing. Secondary goals help to explain the benefit Katas are not for babies Practice not on real code (in first step).

Slide 40

Slide 40 text

How will this evolve? Put Mob sessions into your toolbox Move towards continuous learning More learning hours instead of weeks/days Stay hungry, be brave, try things out, manifesto.softwarecraftsmanship.org together with your team, maybe tomorrow?

Slide 41

Slide 41 text

Perfect time for questions