Fuller's Rule of Two

  1. At any one time, you may have at most two technologies in use to solve the same problem.
  2. Introducing the second technology is an irrevocable commitment to removing the first or returning to its exclusive use.

Background

I proposed Fuller's Rule of Two (FR2) while working at Atlassian. This web page summarizes most of the key points that I made in the original blog post, but I have heavily edited it to limit references to company-internal activities and struggles. I have also adjusted the content for a more general software development audience.

In proposing Fuller's Rule of Two, I have a very specific goal in mind: to raise awareness of long-standing deficiencies that I see in our engineering practices and help motivate a shift in thinking that will help us fix them. It is my impression that having multiple technologies employed to solve a given technical problem, often with very different behaviors and no clear direction, causes our engineering and management teams considerable pain. That pain can come in the form of frustration for developers (both old and new), reluctance to touch stale portions of the code base, risk of causing incidents, developer time and effort required, the corresponding tax on developer velocity and morale, missed objectives, frustrated customers, and an often unpredictable overall cost to the company.

This is not a new problem, either within Atlassian or at other software companies, and I’ve complained about it on and off for most of the 13 years that I’ve been at Atlassian. But complaints don’t effect change, and while I’ve chipped away at these issues a bit in my spare time, it has only been in the last few years that I’ve felt confident enough to collect my thoughts on this matter and state them formally.

What is the Rule of Two?

  1. At any one time, you may have at most two technologies in use to solve the same problem.
  2. Introducing the second technology is an irrevocable commitment to removing the first or returning to its exclusive use.

Caveats

Perhaps I should define what I mean by “technologies” and “problem” and the like in this rule, but for now I’m deliberately going to leave them open to interpretation. The one clarification I will spell out up front is that the Rule of Two is meant to apply within a given domain, and that means “completely removing” may not mean what you think it means. For example, a low-level database library may be perfectly acceptable to use directly in backup/restore and connection pool portions of the code even if the rest of the application is expected to use a modern query-building library for this purpose, instead. Where there is some clear logical boundary we can set around where “the wrong” technology is used, the Rule of Two is not violated.

Another point worth mentioning is that on this page I have explicitly added "or returning to its exclusive use", which was not present in the original. This is because, there are times when we try to adopt a new technology, find it wanting, and hit ⌘Z instead. The goal is to return to the ideal point of having a single accepted solution.

Since first stating this rule, I’ve gotten fairly positive feedback on it. But there is a big problem with it: The Rule of Two may sound good in principle, but honoring it requires a contract between engineering and management that is often ignored. Support for these ideas tends to hit a wall at second- or third-line management, and the consequences can be subtle. Let’s take a closer look at the two sides of the rule, what they mean, and what our options might be.

Part I: Engineering

  1. At any one time, you may have at most two technologies in use to solve the same problem.

Justification

Further down on this page, I give an example of where engineering has broken this rule by introducing a flurry of technologies to solve the same problem within the same domain. Invariably, this is done with the best of intentions. The new technology is clearly better and does everything that the others do with substantial improvements. We’ve all been here before, but I think if we are honest with ourselves, we know exactly where this inevitably leads:

An XKCD comic sarcastically illustrating how engineers tend to want to create more standards to standardise standards

Interlude: Drama 🌶

This is a hard lesson for engineers to learn, and they often push back on any restrictions on their drive to explore new and exciting technologies with lofty ideas about how much better our lives will be afterward. There is quite a bit of overlap between what I’m proposing here and the reasoning behind the creation of approved technology stacks in general.

I'm not oblivious to the emotion that can back these debates. The key point I want to make is that these decisions are generally not made as blindly or as mean-spiritedly as that are sometimes perceived, and that there are good reasons to keep the proliferation of technologies in check. There are many tools available for doing this. Various tools like deprecation warnings and build tool enforcer rules can help, but most organizations do not create a team to formally guide these decisions or drive changes to completion. I think that they should.

An image mimicking the parental-guidance-suggested logo this content needs 'technical guidance' So here’s my pitch to make myself unpopular with some of my fellow engineers: Initiatives like formal technology stacks are good for the company, even when unnecessarily restrictive to the more adventurous among us. I’m not claiming that there is anything intrinsically wrong with introducing innovative technology choices, but introducing additional solutions with no plan to complete the transition is wrong. There are consequences when we introduce new technologies, from upskilling our teammates to the future maintenance of the code that interacts with it. This is the hard lesson that many inexperienced engineers often have trouble with, particularly if they have only previously worked in small companies or within small, relatively isolated teams. Why shouldn’t they introduce some library they have used before or read about or heard a talk about that would make their job easier?

As I’ve phrased it elsewhere:

We all need to understand that we do not own the code that we write; [our company] does. We have a responsibility to make sure that the code we write is maintainable by others because sooner or later somebody else is going to have to look at it.

We need to look past that immediate payoff to the longer-term health of our code bases, particularly those that are monolithic.

When multiple technologies are employed within the same code base to solve the same problems, it gets a lot harder to do this. The result tends to be confusion, particularly when there are inconsistencies in behaviour and even more so when they interact. Does this XML-escaping code escape interesting characters in a standard way or does it instead do something that is bizarre, application-specific, and arguably insane? What does this option monad do if you map across a function that returns null? What happens if I use Jackson 2's annotations in a place that only Jackson 1's will be recognized?

Keeping track of these things is hard, and the difficulty is multiplicative. We need better discipline around managing our dependencies and technological choices in general so that we can make our lives easier and concentrate on what we want to build, not which of 15 different standards we should follow when doing so. I’ll dive into how I see this working later, but first I want to take a look at the other side of this problem.

Part II: Management

  1. Introducing the second technology is an irrevocable commitment to removing the first or returning to its exclusive use.

Management Should Care

Many large companies develop a track record of getting projects to “good enough” (by some seemingly arbitrary definition), then gutting the team that’s working on it before the work is finished. Companies tend to emphasize (spin?) the positive aspects of reorganizing teams in this way, with industry buzzwords like "agile". It sounds great, and I don’t contest the value that these decisions can have for the company; what I contest is the idea that it is acceptable to litter our code with unexploded ordnance in their pursuit. This creates “technical debt”, and I want to draw attention to the word “debt”, because there are very real parallels with its financial cousin. By accepting technical debt, we forego the immediate cost of completing that work in exchange for a distributed cost over a longer term. This can be an excellent business strategy when used wisely, but there ain’t no such thing as a free lunch.

First, the amortized costs are inevitably higher. The original team working on the problem has context and experience that make them more efficient at solving it than some random other person from some random other team will be, so these distributed costs must be paid back with interest. This is fine as long as it remains in check, but there are often extensive signals that the debt load is not under control. I would love to back this assertion up with hard numbers, but it turns out that the cost of these things is intrinsically difficult to measure. Who records that the reason a given story within a sprint needs to be sized at 8 story points instead of just 2 because it's using a seriously outdated approach to database queries that few team members can even understand at this point? Even if updating it gets split off into a separate task, who puts labels on all of them or otherwise ensures we can track how often this happens?

Anecdotally, I suspect engineers and the lower management levels will readily agree with me that having large amount of detritus in your code base can cause unpleasant inefficiency and risk. To provide a specific example, when writing the original blog post, I found some old code that looked unused. I found that it was still called by a JSP. It looked like that JSP was used, but I could not get it to log anything in production, so initially I was very scared to remove it. It later turned out that the URL was intercepted and directed to a different technology stack, just not while running our CI test suite!

As this example shows, these problems multiplicatively stick to each other. The existence of an old UI page makes it hard to be sure that old, deprecated code it calls can be safely removed. I can't be sure that it is safe to remove because it is called by old tests that still make sure it works in our test environment even though it is not even reachable in production. Ouch!

There are also less tangible costs that we probably couldn’t measure even if we had metrics on everything else. What does it cost us in the way of difficulty finding engineers already able to handle the multiple technologies and/or train them on all of them after they are hired? How frustrating and stressful are these things for our developers to work on? How frequently do bug fixes and security incidents take abnormally long times to resolve because they involve outdated an unfamiliar technology choices, some of which may not even be maintained anymore? Everyone remembers Log4J 1.x, right?

User-facing migrations are particularly problematic because they result in inconsistent and/or slow user experiences. A new user interface is created, and the UI is updated for common tasks, but a decade later there are still many admin pages that remain in the old technology stack. I am convinced that customer pain is not given the weight that it deserves when we fail to prioritize the completion of such projects.

And Yet...

When we start down the path of transitioning technologies, we need to foresee an end state where that transition is complete and formulate a plan for getting there. We can't do that if the effort involved in removing all the old code is never considered within the original project's scope. Whenever I ask about how we plan to finish some project that no longer has anyone working on it or how we will ever complete the move to some new way of working we want to introduce, I tend to get one of two deeply unsatisfying responses:

  1. That is not in scope for MVP.
  2. Maintenance is a normal part of software development and engineers should be including that work in their estimates.

The first answer is not actual an answer at all; it is sticking ones fingers in their ears and shrieking "La la la I can't hear you la la la!" Ignoring the problem in the work’s original scope does not make it go away. As for the second, the reality I observe is that when these considerations are explicitly excluded from DoD's, OKR's, sizings, and other metrics, they just get ignored.

At some point the team who started a fundamental architectural shift is declared to have "finished" even though they clearly haven't. They move on to other things or even disband entirely. This shifts the burden onto future teams doing unrelated work later, generally requiring more effort and risk than if the original team had just been allowed to finish what they already knew how to do. It also tends to impact their own work in ways that are difficult to anticipate and account for, sometimes drastically. Leaving transitional work unfinished sets future teams up for failure; next time, the team that suffers might be yours.

Relying on incidental encounters to clean up the long tail of projects suffers from a few critical problems:

  1. Some parts of the product can be so rarely touched that realistically they will never be countered through random walks; and
  2. Some of the in-progress transitions may require specialized knowledge or skill sets that other team will generally not have and that degrades with time; and
  3. Some chunks of work, even when understood, carry prohibitive costs. Teams running across them later cannot afford to incorporate them into an already aggressive schedule, so they kick the can down the road. This will not self-heal on human timescales.

I hate to be the bearer of bad news, but I think we have all seen many times over that an entirely casual approach to long tail cleanup efforts is ineffective. It just doesn't work. What works is when it remains assigned to a team for active work until completed, or it annoys one particular hero enough that they personally champion it and refuse to give up until it's done.

The second half of the Rule of Two explicitly targets the idea this it is ever acceptable to leave transitional work unfinished. When you approve a project to build a new frontend, you must agree that removing the old one is part of the project's cost. If you introduce a new, simplified way to manage your project, you must agree that it will provide all the functionality of the old way or otherwise deprecate and remove what is no longer supported so that two management systems will not remain in use indefinitely. New features can be the priority, but they do not absolve management of the responsibility to fund the entire effort to completion.

Engineers Managing Engineers

The only way I see to solve this is if the project is at least in some sense not completely closed out until the old technology is removed. It must stay on someone's plate until that job is done. This does not mean that teams can't be moved around, but the work does not go away and must continue to be tracked and owned. I see three potential ways of approaching this:

  1. Properly incorporate cleanup into project planning is refuse to disband teams that have such work still in progress; or
  2. Properly incorporate cleanup into project planning and reassign unfinished work to other teams, even if that means having general-purpose garbage collectors; or
  3. Find some way to drive such efforts without official management or funding.

Option 1 is the healthiest, but unpopular at companies that like having the freedom to shuffle people about according to demand. I have seen Option 2 working in practice (long ago on my team at IBM, of all places!) and found it quite effective, but many companies are not eager to assign headcount to general-purpose garbage collectors. I think the only management path this really leaves is if projects with active work must be assigned to new owning teams and cannot be left unattended.

If management will not do that, then we are left with no other choice than for engineering to manage it themselves in some way. That isn't great, but if you cannot convince your management team to care about these things, there isn't much else you can do. For organizations that have regularly scheduled times for free work, pet projects, or general engineering health, teams can self-organize cleanup projects to address this. If you don't even have that, then I suggest that you gather the evidence and make the case to your management team, as there is realistically no other way for things to improve.

Case Study: JSON

Where Are We?

Let's play a game. You need to be able to turn a simple data object into a string containing its JSON representation and/or parse such a string back into data object form. You start looking through the existing code and find that there are no fewer than ten approaches used in the existing code. You count the number of code references and sort them by frequency, and this is what you get:

Which Way to Go?

I don’t expect much controversy about the old JSON-java fork; it should clearly die in a fire. While Gson, JSON-java, and javax.json all have nice, simple interfaces, bare-bones use of Jackson is not that much more complicated and could always be handled by a thin façade if it’s really that annoying. Those libraries are also less widely used and less powerful than Jackson. Finally, they lack the inertia of the code base, where it will naturally be much easier to adopt Jackson 2 than it would be to move to an entirely unrelated technology choice. The Jackson 1.x Wrapper is largely pointless, but it is also might help make the transition to Jackson 2 easier in some cases. We certainly have bigger fish to fry. Jackson 1 is used more in our code, but it's an old version that is no longer actively maintained. All signs point to a need for us to standardize on Jackson 2.

From this, we can develop a plan:

But here's the rub: I had to go through these and think about all of this. The conclusion is not necessarily obvious even though I have a pretty decent idea what I'm doing (or like to think so, anyway). Imagine being a new developer on this project and stumbling across this mess. Imagine, even knowing the answer, how to explain to such a new developer why things are this way, how we got here, and why we allow this painful situation to persist.

Conclusion

I've spelled out the "what?" and the "why?" but I admit that I haven't done a great job with the "how?" part of this. That's because I don't know, yet. In all honesty, I first wrote this as an internal blog back in March 2022, and despite an enthusiastic response, very little has actually changed. I would love to hear any suggestions.

License

The contents of this website are Copyright 2025 Chris Fuller and provided under the Creative Commons Attribution-NonCommercial 4.0 International Deed except where I have included materials provided by others. See About for details about these exceptions.