Fixing Legacy Code: Missing The Forest For The Trees

Fixing Legacy Code: Missing The Forest For The Trees

Sometimes I wonder if we are missing the point by fixing legacy code. It’s not that we shouldn’t fix bad code when we encounter it, but it’s more a feeling of we’re missing an important opportunity. Let’s start with something that you may be familiar with, Conway’s Law:

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure.Things will revert back to the way they were. Poor code is only the sypmtom. The problem is cultural/organizational.

Melvin E. Conway

It says basically that your design mimics your communication structure. If you have a bunch of independent teams working on a project, then your project is going to have a bunch of independent parts. Intuitively it makes sense. But the part most people miss is that we can also turn that around.

The structure of a design is indicative of the communication structure of the organization that designed it.

My rewording of Conway’s Law

Your code is a reflection of the state of your organization. So if you encounter some legacy code that could be better organized or communicate better, you should rearrange the code, but don’t just stop there. Your code is trying to tell you something. Don’t miss the bigger opportunity! It is an opportunity to improve the way your team is organized and communicates. Simply fixing the code is missing out on the lesson it is trying to teach you. Do the hard work of making your team better!

HELP!

If you’d like help changing the culture of your organization, we’d be happy to talk to you about how we can help.