Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Learning Clean Code as a Team

Learning Clean Code as a Team

How can you align a large team of people with different backgrounds on Clean Code principles, in a short time?

First, we struggled during heated code reviews and endless discussions, reaching high levels of frustration. But then we found a way, a fun way, to break out of that and recover the joy of working together with a shared understanding of what quality code should look like.

In this session, Ralf will tell us all about this unusual coaching approach he took at one of his clients, while Victor will keep asking his (and the audience questions). So join this event as an attendee and contribute your ideas to the brainstorming.

~ About the Speaker ~
Ralf Klemmer helps to grow high-performance teams through leading by example. As a regular team member, he uses XP Practices like Mob programming to align and empower his teams while providing additional technical, agile and personal coaching to take them to the next level. Find more about him on Linkedin https://www.linkedin.com/in/ralf-klemmer or his website [DE]: https://klemmer-it.de/

Ralf Klemmer

March 24, 2022
Tweet

Other Decks in Programming

Transcript

  1. 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
  2. Hey, I got a code review. Can you help me?

    https://www.youtube.com/watch?v=rR4n-0KYeKQ
  3. 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
  4. A team can only provide high-performance if it has managed

    to align their values and their way of working. words of wisdom 🙂
  5. How to convince my teammates? Involve them, so they might

    discover on their own! You shouldn‘t.
  6. 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
  7. First: learn to identify bad code. Second: learn how good

    code looks like. Third: fill the gap. 🙂 Learning Path words of wisdom 🙂
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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 ?
  13. 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
  14. 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
  15. 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
  16. 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).
  17. 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?