Somewhere in a lot of companies, there’s a system older than half the people who use it. It runs every night without complaint. It knows things nobody wrote down. And everyone is a little afraid to touch it.
For the past year, two of our developers, Ian Barthel and Steve Finn, have been helping a large wholesale distributor move one of those systems out of the server rack it’s lived in for decades and onto the cloud. We asked them what that work is like, and their answers say a lot about legacy software in general.
Meet the movers
The work is split into projects, each one moving a piece of the old system’s job somewhere new. Ian and Steve each own different pieces:
- Ian developed the new system retail locations use to request shelf labels, the little barcode tags on the shelf that tell you what an item costs. Locations look up the item numbers they need in a mobile web app, and the labels get printed and shipped to them. He’s now working on how price changes flow out to each location.
- Steve works on the files that feed each location’s point-of-sale system with item data and pricing, plus a rebuilt numbering system for vendor promotions.
Steve’s piece makes the stakes easy to picture. If those files don’t go out, or go out wrong, locations end up with “incorrect data and pricing,” he says, which can quickly turn into financial or service problems.
Opening the boxes
The old system ran on the company’s own dedicated hardware and was written in COBOL. The new version runs on Microsoft Azure and is written in C# and TypeScript.
Neither of them had worked with mainframe code before. Steve’s first impression: it “looked complex.” The company’s mainframe expert helped Ian by walking him through what the old code needed to do, so he could rebuild it in C#. “Thankfully I had to interact with it very little,” he says.
They found some of it was a time capsule. Ian’s favorite example is how the old system tracked which catalog pages a customer had requested. A modern database would store each page on its own row. The mainframe packed them all into one long string of characters, so pages 1, 2, and 5 became 001002005.
Reading code nobody remembers writing
When a system runs for decades, the reasons behind its original decisions don’t always survive. Ian heard plenty of “I have no idea why this is written like this or when this decision was made.”
Steve’s approach is detective work. “You can try to reverse engineer based on the output,” he says, and the old comments in the code “sometimes give you a bit of guidance.”
Keeping what works
Both of them were quick to give the mainframe credit where it’s due.
- Speed. “The performance is pretty quick, unsurprisingly,” Steve says. The new system has to pull information together from several places, and matching the mainframe’s pace took work.
- Overnight runs. With everything on one dedicated machine, keeping the nightly jobs in line was fairly easy, Ian says. In the cloud, the team had to clear a lot of hoops to make sure the overnight run could reach the data it needed from other systems.
Moving without bumping into each other
A project this size has a lot of people in the same rooms. Ian and Steve mostly work on separate pieces, and the company’s modernization lead plans the order so that what one of them needs is ready before the other gets to it. The trickiest moments, Steve says, come when they’re “working in the same system and have to make sure to not overwrite each other’s work.” The company’s internal teams work in those same systems too, so clean merges and releases take some balancing.
When Ian joined the price-change project, it was nine sprints (about 18 weeks) in, and everyone already knew the lingo. “I felt very lost for the first two sprints,” he says. Steve and the modernization lead spent a lot of time catching him up, and Steve knew the work well enough to help on a project he wasn’t even on. After that, Ian says, “It was smooth sailing.”
And when Ian’s first project wrapped in June, the company switched off those mainframe processes for good. “It was a wonderful time,” Ian says.
Advice for anyone nervous about their old software
We asked both of them what they’d tell someone who’s afraid to touch a system like this. Ian’s answer started with two words: “Don’t be!”
“Odds are very few people know how it works, and that is dangerous,” he says. Modern code makes it easier to bring new people onto a growing team and cuts the time spent maintaining features that no longer pull their weight. And some legacy systems, he points out, “barely even allow the use of a mouse!”
Steve’s advice is about timing and care:
- Don’t wait. “The longer you wait, the more challenging it will be to update it without just rewriting it.”
- Take stock. “Reevaluate what is still needed and what can be removed.”
- Test everything. “Make sure to have a solid testing plan to make sure existing functionality is not lost unless it’s no longer needed.”
Planning your own move
If there’s a system at your company that everyone tiptoes around, you’re in good company. Read more about this project in our mainframe case study, and if you’re starting to think about a move of your own, we’d love to help you plan it.