Codelyzer Offers Relief from Application Maintenance Burdens
March 17, 2009 Dan Burger
For as long as programs have been written there has been program maintenance. And for as long as there has been program maintenance, there has been a laundry list of fixes and patches and revisions that over many years have made application maintenance into something like being in a row boat in the middle of a very large lake and having only one oar. It’s not unique to the IBM i environment, but it is a frequent occurrence.
Maintenance programmers sometimes struggle with the structure of programs that have had numerous changes during many years in service. Often those changes were made by a variety of people with differing programming styles. Sorting it out can be very time consuming. And, as we’ve often heard, time is money. By some estimates, 50 percent of the average IT budget is being spent on application maintenance.
You won’t get an argument on that from Steve Kilner. He’s been a software consultant in the AS/400 market for 20 years and filled the role of project manager many times. “I saw what a nightmare it was to maintain legacy code,” Kilner says. “I thought there had to be a way you could drill down into programs and make sense out of them.” About a year and a half ago, he started developing a product; just this month he’s made it generally available.
Kilner’s product is called Codelyzer and it comes from his company called vLegaci, which is based in Walnut Creek, California.
Codelyzer is an RPG source-exploration and program-comprehension tool and it’s designed to tackle large and complex programs. Its features include RPG code complexity measurement and trace execution analysis, which provide developers and programmers with additional tools for program maintenance. In short, it improves a programmer’s ability to understand the structure of complex programs by finding statements within a program that relate to planned changes. Then it analyzes the potential impacts of those changes and ensures that no surprises occur after the changes are made.
When developers are wrestling with large and complex programs, especially unfamiliar programs, this tool promises huge benefits in time saved.
The complexity measurement function provides complexity metrics for RPG code at the program and subroutine level. Programmers use these statistics to help plan, estimate, design, and test existing programs. For example, it can determine the conditional logic complexity of a program and display the count and depth of such logic. Other values provided include software engineering metrics such as a maintainability index and information content statistics. These metrics are used to predict work effort, defect rates, and code degradation.
Trace execution analysis allows a programmer to import System i trace data and view it graphically and statistically. This is another key component in comprehending the large volume of data typically gathered from program traces. The feature also allows the comparison of two sets of trace data so that differences can be analyzed, which provides a means of locating statements that comprise sought after features.
“My goal is to improve the effectiveness of maintenance programming for legacy systems. ROI increases when developers can quickly comprehend unfamiliar programs and maintain them faster with fewer mistakes,” Kilner says.
Some of the algorithms that have been developed for measuring the complexity of code have been previously used in tools created for languages other than RPG. The algorithms are language-independent and Kilner applied them to RPG to provide a complexity assessment for RPG applications.
“You might, for example, run all the code through a code converter,” he says, “and find 20 modules where the complexity level is excessive. Those modules become the focus of work to rewrite or refactor to eliminate complexity.”
Kilner says a very high percentage of application lifecycle costs are associated with maintenance–as much as 80 to 90 percent–and that approximately 50 percent of a maintenance programmer’s time is spent trying to figure out the programs he is maintaining.
One large project that Kilner managed involved a system that was developed about 20 years ago and was heavily maintained through the years. The constant maintenance activity involved numerous employees and contractors. Over time the code became tangled and difficult to interpret. It was not uncommon to be dealing with 10,000-statement programs.
“I found some of this code added a lot of unpredictability and uncertainty into the project.” Kilner says. “A programmer would give me an estimate of what it would take to make a particular enhancement and I would put it in the project plan. Then the programmer would find that the code was much more complex than anticipated. Defects were found. It sometimes took the programmer three times as long as he thought it would. Maintaining these big programs was very unpredictable.”
Frequently the programs had been touched 50 to 100 times over the course of 20 years. Some of the code was brought up to date, but typically it was only partially modernized.
“One of the measurements of solving software complexity is volatility,” Kilner says. “The number of changes to programs over time directly relates to the maintainability. The more changes, the less maintainable it becomes.”
The benefits of Codelyzer, Kilner says, is that it helps find what needs to be changed and it provides a high degree of certainty that everything that needs to be changed has been found. Finding 80 percent of what needs change is good. Finding 100 percent is a whole lot better.
“Let’s say you have a program with 10,000 statements,” Kilner says. “You’ve never seen it before, and you want to put in a new piece or pieces? How do you figure out what it does? You don’t just read 10,000 statements.”
There’s no doubt that a great number of RPG applications are going to be around for many years. They will need to be maintained and organizations will continue to maintain a lot of these applications in order to get the best value from them.
Kilner says his focus is on organizations that are “staying where they are on the AS/400 platform. I want to help them lower costs and deal with a gradual attrition of programmers who know their systems.”
Codelyzer has been in a limited beta free trial version since October 2008. It became generally available as a free trial download March 1, and Kilner says that will last at least through the end of April. The purchase price is $950 per seat or $7,500 for a site license; however, early adopters that agree to become reference accounts can get special pricing arrangements.