You have 0 further articles remaining this month. Join LeadDev.com for free to read unlimited articles.

Partners

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, and the associated pressure from our stakeholders. This is a real problem, and in this talk I will discuss ways of addressing it.

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. We think it's all or nothing. We mutter about the trail of bad code left by our forbears and feel guilty about the bad code we leave behind ourselves.

Refactoring shouldn't be something that happens after the fact - it should be, and can be, part of every day development. But before we write good code we have to write bad code, and that's OK. As with most creative endeavours if you insist on making the first draft perfect you will never get anything out the door.

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.