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

Agile Manchester '24, Compassionate Refactoring

Agile Manchester '24, Compassionate Refactoring

[This talk was delivered at Agile Manchester '24, on Fri 17th May '24]

Most coders wish they were refactoring their code more than they are. Many things stand in our way (or so we think): The obvious one is time. But one constraint that isn't often discussed is a lack of compassion. This doesn't only come from others, it comes from ourselves.

We don't forgive ourselves when we write bad code. But before we write good code we have to write bad code, and that's OK.

This talk is about kindness and forgiveness, and the paradox that the more you accept and handle bad code, the more likely it is that you will end up with good code.

Participant takeaways:

- Lack of compassion can be a constraint in software development, and it can come from both ourselves and others
- Refactoring should be an integral part of everyday development, rather than an afterthought.
- Time pressure from stakeholders is a real problem in software development, but there are ways to address it.

Themes: Refactoring, Compassion, Psychological Safety, Test Driven Development

Clare Sudbery

May 22, 2024
Tweet

More Decks by Clare Sudbery

Other Decks in Technology

Transcript

  1. @ClareSudbery Refactoring • What it is • What it isn’t

    • Why it’s desirable • How to do it Why it doesn’t happen How to make it happen • COMPASSION
  2. @ClareSudbery What refactoring isn’t • Rewriting from scratch • Performance

    gains • Improving user experience • Adding new features • Bug fixing
  3. @ClareSudbery @ClareSudbery Useful refactoring principles • Refactor in small chunks

    • Make testable first • Always keep tests green • Refactor the parts that have an impact
  4. @ClareSudbery How Use compassion to… • Mitigate external pressure •

    Balance impatience • Embrace imperfection • Believe in ourselves • Seek joy How to facilitate refactoring
  5. @ClareSudbery "There are things that I think are good but

    that I don’t always do, and things that I think are not so good, that I sometimes do.“ – Ron Jeffries https://ronjeffries.com/articles/-z022/0222ff/my-mistakes/
  6. Ilianna: Terraform Kirsty: Hadoop Mircea: iOS Native Esra: SonarQube Georgia:

    Golang Rob: AWS Scott: AiOps Andy: Encryption Anik: PySpark Jon: CentOS 7 THE WHEEL OF CONFUSION
  7. Terraform CentOS 7 Hadoop iOS Native SonarQube Golang AWS AiOps

    PySpark Recursion THE WHEEL OF CONFUSION
  8. Terraform CentOS 7 Hadoop iOS Native SonarQube Golang AWS AiOps

    Recursion Encryption THE WHEEL OF CONFUSION
  9. Terraform CentOS 7 Hadoop iOS Native Golang AWS AiOps 398373

    Encryption PySpark THE WHEEL OF CONFUSION
  10. @ClareSudbery Refactoring: Easier to understand / cheaper to modify •

    Continuous • Tiny low-risk steps • Testable Less likely when… • Low compassion • Unreasonable deadlines • Unrealistically high standards • Feeling guilt or shame More likely with… • COMPASSION • Time • Embrace imperfection • Focus on tiny improvements (MMMSS) • Believe in ourselves • Find ways of enjoying what we do Summary
  11. • Emily Bache - Refactoring • Geepaw Hill - Test

    Driven Development • Meri Williams - Changing legacy systems • Paula Paul – Transformation I hosted a podcast… @ClareSudbery madetech.com/podcast/
  12. Sudbery Software Engineering Ltd Does your team want help to

    improve their software delivery? Coaching, keynotes & workshops Events and info: tinyurl.com/csudbery Mastodon: mastodon.social/@ClareSudbery LinkedIn: tinyurl.com/lin-csudbery Podcast: tinyurl.com/tech-better-pod