The Refactathon: Cleaning up old code


(Dan Mullen) #21

Thanks @oliver, I appreciate your clarification :smiley:


(ross.huggett@gmail.com) #22

@oliver How do you repay technical debt over time? Do you have regular refactathons? Or was this a one off for some old code?


#23

Fantastic to see this. And thanks for the follow up explanations @oliver.

It’s a really important thing to do and kudos for blogging about it. A neat way I’ve heard it explained before is that all code is toxic, but that its toxicity increases over time. Like anything that poses risk, it’s always good to check in on toxic waste, and treat to it should it start becoming a significant threat to health…


(Oliver Beattie) #24

Engineers are encouraged to refactor code whenever they come across it if they think it’s worth paying down the debt at that time (it’s hard to put exact guidelines around when it’s “worth it”, but smart engineers can figure it out :slight_smile:).

It was @daniel’s idea originally to do this refactathon. It’s the first one we’ve ever done, and lots of engineers quickly got excited about and made it into a huge success. I’d love to make them a regular thing.


(ross.huggett@gmail.com) #25

That’s good. I always find that if I refractor as I write, it makes it so much easier than doing it afterwards.