Skip to content

← All projects

Feature Flag Showdown

A one-day cleanup at Xref where the whole dev team removed outdated feature flags from the codebase: 57 of 66 flags and 331 files cleaned.

The problem

Our codebase at Xref was full of feature flags that had done their job months ago. They slowed everyone down and made the code harder to read, and nobody owned removing them, so they kept piling up.

The idea

Instead of asking people to clean up a little, whenever they had time, we gave it one day. On Monday 7 April 2025 the whole dev team, from our two offices in different time zones, took the day to remove flags.

Everyone had two roles. As a bounty hunter you removed the flags assigned to you, and as a deputy you reviewed a teammate’s work. I was the organiser, or sheriff, of the day. We gave it a western theme so it would feel like an event, not a chore.

How it ran

Before the day, I helped prepare the list of flags with the repositories and files each one touched, and every repository was assigned to a pair spread across the two offices. We met the Friday before so that everyone had their environment set up and their tests running.

On the day, we started with a kickoff meeting, then worked in small pull requests, reviewed each other quickly, and moved to other repositories when one was finished. Nothing went to production that day: the work stayed on the development environment, the testers checked each area over the next two or three days, and the senior developers deployed after QA approval.

Rules that kept it safe

Removing a flag is not enough, so we checked the code around it, especially where several flags lived in the same place, and updated the tests that quietly depended on them.

We also agreed on one habit: small, focused pull requests, ideally one component or one backend file each, and never a pull request you would not enjoy reviewing yourself.

The result

We cleaned 57 of the 66 flags, which meant 331 files cleaned in a single day.

The flags we did not remove were the biggest ones, one of them touching more than 150 files. We left them for the next cleanup instead of rushing them.

What I took from it

A chore nobody owns becomes doable once it has a date, a deadline and a bit of fun. Small, reviewed pull requests do more than one big one, and a plan that shows who reviews whom makes the day run on its own.

Spec

Period
04/2025
Role
Organiser / Sheriff
Status
Delivered
Stack
Feature flags · Pull requests · Code review