In an ideal world the codebase you work on is a pristine oasis of pure logic, a magnificent expression of the problem domain, a testament to power of rationality. Unfortunately we don’t always live in an ideal world and even the best codebases have some dust in the corners. In our projects we have used a technique borrowed from the Norwegian dugnad to stop the rot before it becomes an issue.
What is a dugnad?
From wikipedia: Noun Singular: dugnad Plural: dugnads
dugnad (plural dugnads)
- Unpaid voluntary, orchestrated community work.
A dugnad is a norwegian tradition of working together to clean something up, usually a communal area. The idea is to get everyone together with a common goal for the common good.
How to run a code dugnad
It’s not hard to have a code dugnad, just follow these simple steps:
- Have everyone on the team in the same room.
- Try to focus on one area to cleanup.
- Have a collection of small cleanup tasks prepared to get the ball rolling, preferably on a whiteboard so that the list can be updated and items ticked off.
- Focus on communication and teamwork.
- End with pizza. :-)
It might be useful to experiment with different durations, although from experience I’m pretty sure the optimum time is between 2 hours – 1 day.
Keep in mind that a dugnad is not a license to forgo essential development practices like refactoring and it is still important to follow the boy scout rule. The dugnad creates a forum to focus on areas of a large codebase that have been neglected or unchanged for some time, including documentation.