The old code was there for a reason

There is a principle called Chesterton's Fence. It says before you tear something down, make sure you understand why it was built in the first place. G.K. Chesterton, the writer who came up with it, used the image of a fence across a road. If you see a fence and do not understand why it is there, your first instinct might be to remove it. But the smart move is to figure out why someone put it there before you touch it.

When I started my PhD, everything in the lab was written in MATLAB. The preprocessing code, the reconstruction algorithms, the post processing pipelines, all of it.

I came from a computer science background with three years of software engineering. And to me, MATLAB felt outdated. Python was faster, cleaner, had better libraries. My plan was to rewrite everything in Python and modernize the whole pipeline.

So I started.

And then I got stuck.

I could write the code just fine. But when I hit a wall, nobody could help me. My labmates knew MATLAB. My advisor knew MATLAB. The documentation, the legacy scripts, the references, all MATLAB. I was building something nobody else in the lab could read, debug, or maintain.

And my advisor did not care about what language the code was in. He wanted results, papers, data, progress. Rewriting existing code that already worked was a colossal waste of time.

So I stopped. I went back to MATLAB. And I started actually doing the research I came there to do.

The MATLAB codebase was there because it worked, because everyone could read it, because when something broke at 11 PM before a deadline, someone could help you fix it. There were reasons behind it that I did not bother to understand before I tried to tear it down.

I see this everywhere now. A new employee joins a company and immediately wants to change the processes. Someone looks at a system and says "this is inefficient" without asking who built it and what problems it solved. A leader comes in and restructures a team before understanding why it was structured that way.

All I had to do was ask why MATLAB was chosen in the first place.

Subscribe to my newsletter

No spam, no sharing to third party. Only you and me.