Skip to content

The Cost of Complexity · Article 8 of 8

Rewrite the monolith or keep patching it

The current inputs cost $1,458,000 a year above the work. A second run with a smaller change surface costs $172,800 a year. The gap is $1,285,200.

David Vartanian6 min read

Run A, the current surface, returns 7.75x, $46,500 per feature, and $1,458,000 a year. Run B, the smaller surface, returns 1.80x, $10,800 per feature, and $172,800 a year. The gap is $1,285,200. Both runs share 40 hours of vacuum effort, a rate of 150, and 36 features. Module count, interdependence, and coordination hours are what change.

Why it happens

Patching keeps the wide change surface, so every later feature pays the first run. How an extraction is priced is in What Started as an Extraction Plan Became a Permanent Trap. The figures on this page come from the two calculator runs below. Both runs price the ongoing features. Run A prices them on the wide surface. Run B prices them on the smaller one. The calculator does not price the rewrite project. The gap between the runs is what sits next to the rewrite budget.

The module term is what moves when the module count changes between the runs. Connascence degree is that count. On run A the degree is 10 and the interdependence weight is 0.6. Each added module on that surface adds 0.6 into the module term. On run B the degree is 2 and the weight is 0.3. The same vacuum effort, at the same rate, shipped the same number of times a year, goes through a different module term on each run. The wide surface keeps the higher degree. Patching leaves that degree in place, so the next feature pays run A.

The coordination term does not move just because the module count moved. It is coordination hours divided by vacuum effort, and vacuum effort stays at 40 hours on both runs. Run A uses 30 coordination hours. Run B uses 8. A wide surface on this page carries more modules and more hours around each feature, but those are two different inputs. You can raise the degree and leave the coordination hours where they are, and only the module term moves. You can cut the meetings and leave ten modules in the diff, and only the coordination term moves. The worked example moves both, because that is the difference between the current surface and the smaller one.

On a codebase the reader sees the current diff. If a feature still touches ten modules, the degree is the 10 in run A, and the weight to read is 0.6. If the hours of review and alignment around that feature are 30, coordination overhead is the 30 in run A. A smaller surface, two modules at a weight of 0.3 and 8 coordination hours, is run B. The reader is looking at which of those diffs the next feature will be. The rewrite project itself is a budget beside that comparison. The calculator prices the features that continue after the choice. It leaves the cost of doing the rewrite off the page.

Features per year stays at 36 on both runs, so the annual figures differ because the multipliers differ. The vacuum work is the shared baseline. What the patch preserves is the ten-module diff and the 30 hours around it. What the smaller surface changes is the degree, the weight, and the coordination hours. That is why a patch that leaves the ten-module diff in place keeps run A on the next feature, and on the 36 features in the year.

A worked example

Run A keeps the current surface. Connascence degree is 10. Interdependence factor is 0.6. Coordination overhead is 30 hours. Vacuum effort is 40 hours. Blended rate is $150. Features per year is 36.

The multiplier is 1 + (0.6 * 10) + (30 / 40) = 7.75. Vacuum cost is 40 hours times $150, which is $6,000. Feature cost is $6,000 times 7.75, which is $46,500. The annual figure is ($46,500 minus $6,000) times 36, which is $1,458,000.

Run B uses the smaller surface. Connascence degree is 2. Interdependence factor is 0.3. Coordination overhead is 8 hours. Vacuum effort stays at 40 hours. The blended rate stays at $150. Features per year stays at 36.

The multiplier is 1 + (0.3 * 2) + (8 / 40) = 1.80. Feature cost is $6,000 times 1.80, which is $10,800. The annual figure is ($10,800 minus $6,000) times 36, which is $172,800.

The gap between the two annual figures is $1,458,000 minus $172,800, which is $1,285,200. The calculator does not price the rewrite project. Set that gap next to the rewrite budget.

How to measure yours

Open the Engineering Cost Calculator and run it twice. First set Connascence Degree to 10 and Coordination Overhead to 30, with Interdependence Factor at 0.6. Then set Connascence Degree to 2 and Coordination Overhead to 8, with Interdependence Factor at 0.3. Those are the inputs that change between the runs. Vacuum Effort stays at 40 hours on both. Features per year stays at 36.

The first run is the current surface. The second run is the smaller surface. Move Connascence Degree and the module term moves. On the first run each added module adds the interdependence weight of 0.6. On the second run the degree is 2 and the weight is 0.3. The coordination term does not move with the degree. It moves when Coordination Overhead moves: 30 hours on the first run, 8 hours on the second, both divided by the same 40 hours of vacuum effort.

Vacuum effort and features per year stay put across both runs, so the baseline hours and the year’s feature count are the common ground. The annual figures move because the multipliers move. The calculator does not price the rewrite project. The number it does price is the gap between staying on the first run and shipping on the second.

Cost is the vacuum work times the multiplier, so the work is one divided by the multiplier of what you pay. Above 2.00x, more than half of every feature’s cost is overhead. Run A sits at 7.75x, past that line, because the current surface is ten modules at an interdependence of 0.6 with 30 coordination hours. Run B sits at 1.80x, under that line, because the smaller surface is two modules at an interdependence of 0.3 with 8 coordination hours. The line to watch is which run the next feature will pay. Set the gap between them next to the rewrite budget.

← Previous: Measuring engineering productivity in a language finance accepts

Frequently asked questions

Rewrite the Monolith or Keep Patching It

What is the gap between patching and a smaller change surface?

Run A costs $1,458,000 a year above the work. Run B costs $172,800 a year. The gap is $1,285,200. Set that gap next to the rewrite budget.

Does the calculator price the rewrite project?

The calculator prices the two annual figures. It does not price the rewrite project.

What does the current surface return?

Connascence degree 10, interdependence 0.6, and 30 coordination hours return 7.75x and $46,500 per feature.

Which inputs change between the two runs?

First set Connascence Degree to 10 and Coordination Overhead to 30, with Interdependence Factor at 0.6. Then set Connascence Degree to 2 and Coordination Overhead to 8, with Interdependence Factor at 0.3.

Newsletter

Be the first to get next articles in this series.