On a recent project, we were refactoring an application toward some modern Laravel practices. Along the way, we kept running into blocks of commented-out or unreachable code.
We had to stop and figure out whether it was relevant to the refactor. Was it an old approach that was intentionally replaced? Was it something half-finished that we needed to preserve? Was it a failed experiment, or a working feature that was temporarily disabled?
Each time, we had to stop and trace through the application to verify it was truly dead, and in some cases we needed to check with the client to confirm. These little research detours add up, and they add up to real money.
This is the first cost: it wastes contractor time. Whether you're paying them hourly or a flat fee, this eats into efficiency and makes the project take longer.
The second cost is less obvious: it wastes your team's time as well. Even with their increased familiarity with the project compared to a contractor, they still face some friction sorting out real code from dead code.
The fix is straightforward. Reject commented-out blocks and dead code in code review. And if your codebase already has a lot of dead code, resolve now to clean it up as you encounter it.
You don't need a big cleanup effort. Just stop letting new dead code in, and chip away at the old stuff over time.
Here to help,
Joel
P.S. Want devs on your team who will point out problems like this and not just close tickets? Schedule a call and let's talk about how we can help.