Legacy Code Conundrum: A Developer's Tale (Inspired by true events)
Photo by Gratisography: https://www.pexels.com/photo/black-and-white-car-vehicle-vintage-474/

Legacy Code Conundrum: A Developer's Tale (Inspired by true events)

What is Legacy? As per the dictionary, it means "money or property that is inherited" but in IT industry it refers to outdated computing systems, hardware, or software that are still in use.

The key word here is – ‘still in use’. This means we are still using it either fully or partially. Why are we?using it, is it something that cannot be replaced or is it fear of touching the running system that is sufficing our business requirement? How many of us felt the cold shivering when there was a requirement to touch it for some production fix or enhancement?

I still remember the day when I was enjoying a coffee in the company's?pantry and my phone rang. The call was from my manager Meera Meetingswami and there was a requirement to put one extra validation on an old Regulatory Report. The change was very small i.e. validating a numeric character in one of the Reporting fields. It was a change in a legacy Ab Initio graph, let's call it Legasus MP. No one dared to touch it since its inception. There were legends that it was developed by some Java developer who learned Ab initio and it was believed that traces of Java still exist in the graph. I knew that there was a complementary non-generic graph that runs just after Legasus. Developers used to prefer updating this alternate code instead of challenging the Legasus. Touching the Legasus meant updating its current version, adding new functionality, and snatching "Legacy" title from it.

With so many years of experience, I found an opportunity in fixing the Legasus and felt pride in putting my name in the version history.

Anyway, after checking all my weapons like Unix session, AbInitio GDE, and SQL session, I opened “The” Legasus. That was the first time we had seen each other. We both were confident that something different would happen in the upcoming release that is planned for Saturday. From my perspective the upcoming?release was a time to add one more star to my collar and from Legasus perspective it was another opportunity to maintain its legacy in case it trounced me.

From the version history, it was around 12 years old table-driven generic validation graph but it could be older because there were chances that the version history itself got deleted. Then, I verified the cksum and fortunately, it was matching in all the environments. And ideally, it should match as no one touched it for years. Still, no cobwebs inside it, guess that's because it was running in Production. Inside me, I was a little terrified to make a change in the Legasus but dint want to show my fear in front of it or else it might think that I am weak. Luckily, I found the name "Ram" inside the documentation subgraph and thought it might be the name of a Java developer who developed it initially or someone who might have dared to understand its functionality. I was hoping that Ram would still?be there in the organization.?As you know IT is a very dynamic industry and people with gratuity are a rare species. I dug into my company's directory and tried to find a person with the name Ram whose characteristics are similar to the Legasus. i.e. he should be a Java developer plus Ab Initio learner cum developer. He should have at least 12 years plus experience. Might be good in the documentation that's why he left his footprints on the graph. Now my whole focus was on finding the person matching the graph characteristics. I believe we developers leave our characteristics in the code that we build and all it requires is observation skill to find it out. It's like, each code says something about who has developed it.

Legasus might be happy with this as it proved that people were still afraid to touch him but his happiness won’t last long. After two days, I located a person in the US whose characteristics matched exactly with Legasus. As it was already Wednesday, without further delay I called him and enquired if he was the lost father of Legasus or a midwife who helped with the delivery of Legasus. After talking for about 5 mins on the ongoing issue in Legasus, there was silence on the other side. Not even a single word was uttered. In that dead silence, I think I got my answer. On that day, I understood why non-verbal communication is more effective than verbal communication.

The same non-verbal communication was being made by Legasus, he knew about his birth details and functionality but was not ready to share due to its Legacy attitude. Still lying open in my GDE version 4x with ab_compatibility of 2x.

Saturday was the Release date, I was sitting on Wednesday, or rather Wednesday night, totally devasted and thinking about my next step. I knew Legasus was happy as 3 days had already passed with nothing been done.

Thursday morning, I went into Agile mode, I recalculated the timelines i.e. if Saturday is the release date, we have to get the UAT signoff by Friday EOD. This meant that the updated Legasus should be in UAT by Friday morning. I had no doubt about the capability of our testers, they can test anything within any timeframe. I knew if you give them 2 hours, they would be able to test Legasus in that window. Just in order not to compromise on quality and give sufficient time for snacks and rest, I was fair enough to give them 1 whole day for testing. But that would mean pushing Legasus to UAT by Friday morning. So, I had only 1 day i.e. ?24 hours to fix Legasus and put my name in golden words in its version history.

Thursday morning, I received a casual call from Meetingswami. She advised me to make changes to the non-generic graph and close this minor enhancement. Businesses anyway would not be worried about what code changes were made; they are concerned about the result. But this was a war between me and the Legasus and I didn't want?to lose it. Still, I had 24 hours left. When we software developers are on tight deadlines, 8 hours of working culture take a back seat, and we end up following nature’s 24 hours window. Anyway, I assured Meetingswami that with tomorrow's sunlight, Legasus would see itself in the UAT server.

Thanks to my team who took care of all the side works like raising CRs and getting approvals etc. This is something that we developers have to deal with in our day-to-day work schedule. Sometimes, the process is more important than the actual work itself and some so-called engineers survive on the process itself. No hard feelings against them as it's part of their job. And our job is to skip such processes and ensure the code is up and running. This tug of war is part and parcel of IT life.

Now with each hour, I started opening the unturned pages of the graph, its subgraphs, and little components. As I moved into different corners of the graph in the hope of finding a place for a new logic, I saw many disabled components that were lying around. They looked like unattended vacant rickety cars or bikes that we often see on the roadside. No owners, no legends, nothing, just lying around. One can easily guess they must be one of the critical components during their active years. There were tons of lines of code inside it but as everything has a lifespan, they might have completed their lifespan. Now only their body is lying in the hope that someday, part of their code will be used for analysis or to fix some new requirements and they will get new life out of it. We know that, that day would never come but “Hope” is something that keeps them disabled alive.

Anyway, I finally found a corner where I could build a validation check. With a lot of analysis and effort, by late Thursday night, I had a new version of the Legasus with new functionality in place and a sense of achievement in my mind. It was like a winning moment for me when I could put my name in the historical version of the Legasus as well as in its legend. I was unable to sleep that night, as I had done something which no one dared to even think of.

Friday morning, the brand new Legasus was in UAT. Testers started their 3rd-degree torture with test cases that they assembled in the past one week. They wanted to torture the Legasus to the extent that he speaks out about some anomaly and if this happens, it would give rise to a bug, that we call a UAT defect. In some companies, UAT bugs are?often more dangerous than Production Issue. Thanks to UAT Test managers who think that UAT environment is much more sacred than Production environment. For them, even a small bug in the UAT is a sin. We developers know that Testers are dangerous species and Developers turn Testers are “disastrous”. I had a few in my team who were testing Legasus. But thanks to our UAT environment that is more in line with Development. Both environments are in sync and work synchronously. So, if anything works in Dev it will always work in UAT and vice versa. That's called bonding. By the way, the Production environment is the one that is always out of sync.

The whole Friday went off with a cup of tea at a tapri. I refreshed Outlook multiple times, checked mobile phone network, and Jira portal. I was restless and didn't know what was happening on the other side of the world, how they were treating Legasus in their torture chamber.?The whole day passed and at around 9 PM, a mail popped up in?my inbox. That's one of the messages that filled my eyes with a sense of achievement.

Finally, UAT signoff was in place, CR is ready, the arena was set, Legasus was going to have the new version in Production. With loads of enthusiasm and excitement, we deployed it in Production and took the first run. Everything was as expected. As I was working from home, I had the liberty to have a beer bottle. We had a final call with the Business/Operations team. In the call, we had Meetingswami, all the stakeholders, testers, Production Support team and of course the Judiciary Business Users who were about to pass final judgment. All went fine but they looked worried about a small issue. The issue was that Validation Report used to generate 100 records but after the changes, it generated only 20 records. Ideally, it should generate more records as new validation was in place. After multiple backend checking, I knew that something was not in place. In the call many things were discussed, the best question arose again "Why was it?not caught in the UAT?" and the standard answer was given "UAT environment does not have as much variety of data as Production". In this hustle and tussle, I knew I had lost against the defending champion Legasus. He again was going to hold the "Legacy" title in years to come and we were moving towards Emergency CR with a new code change in the non-generic graph.

But suddenly a voice jolted me, and it was the voice of Meetingswami. She said that there is a different version of Legasus available with new functionality that can be deployed. I lost ground, still understanding what had happened. How could we have the new version of Legasus? The fight was between me and the Legasus, how come Meetingswami came into our picture as a Protagonist? She asked testers to test the new version within 2 hours and as expected our testers completed the testing within the given timelines. This time everything went fine and we received Production Signoff as well.

I had mixed feelings. On one hand, I was a little gloomy that I was not able to defeat Legasus but on the other hand, was content that at least someone from my team conquered him and snatched his “Legacy” title. And that’s what teamwork is.?

Ankit Gaur

Global Data & Analytics Leader @ Arrow Electronics

1 年

I like the story telling format ??

Ankur Nigam (he/his)

Senior Oracle Consultant in Deloitte in office time | Father to two kids

1 年

Well, that is life in IT

要查看或添加评论,请登录

社区洞察

其他会员也浏览了