Rewrite-vs-Running Cost Analaysis Software

The IT department in which I work as a programmer revolves around a 30-year-old code base (Fortran and C). The code is in poor condition, partly as a result of more than 30 years of unpredictable changes, but I also suspect that a lot of this is due to the capabilities of the programmers who made the changes (and who, by the way, still remains around).

A software-dependent business runs 363 days a year and 20 hours a day. Unfortunately, there are numerous outages. This is the first place I worked when developers call to apply operational code corrections to production systems. When I was the first, the production servers actually had a copy of the source code and development tools so that changes could be applied on the fly; fortunately, this practice is now discontinued.

I advised management a couple of times that the downtime costs of having developers on call, additional operations staff, dissatisfied customers, etc. it costs the business a lot more in the environment, and perhaps even in the short term, than it would have to start all efforts to rewrite / reorganize / replace all this (the code base is about 300 thousand lines).

Ideally, they would be external consultants who could come and manage the rule on the quality of the code and the costs associated with having it work against rewriting / refactoring / replacement. The question that I have is how should a business deal with this analysis of software costs and be sure of this analysis? The first street IT consultants may claim to be able to conduct an analysis, but how could management be managed to feel comfortable with what the internal employees are telling them?

+6
refactoring
source share
6 answers

Firstly, the profile of the consultant that you need is very specific. If you cannot find someone who worked in a similar domain in the same languages, do not hire him.

Secondly, the probability is 99% (I like dramatic numbers), the analysis will be as follows:

  • Consultant explores the application
  • The consultant understands 10% of the application.
  • Time, time for the report
  • The consultant advises full correspondence (without refactoring, simple rewriting).

This way you can save on what the consultant will cost.

Here you have only two solutions:

  • Observe the actual source code, but identify the correct methods for fixing the problems, so you have a very long refactoring promoted by those who know the application.
  • Get an additional command so that the new application replaces the old one

If I talk about the second team, this is because you cannot bring only one architect to create a new application and have an old command with it:

  • They are too busy with the old application.
  • There will be friction, because the beginner will undoubtedly underestimate the task.

I speak from experience, believe me.

If you are on the path of a “new application”, do not set too high expectations. As a result, you will get an application that has less than half the functionality of the current one, simply because you cannot squeeze more than 30 years of special cases and exceptional situations into fresh software.

Oh, also, if your developers tell you that they have a plan, be sure to listen to them. They most likely know what they are talking about.

+7
source share

Recently, we decided to completely rewrite most of our business code from scratch, and that's not how we hoped. I have seen many quotes saying that you should never try to rewrite anything from scratch, and now I understand why. I would recommend starting small - don't try to rewrite it all at once. Identify large problem areas and focus on reorganizing small parts of the system at a time. Since the system has been working for more than 30 years, it will take a long time to return it to a reasonable state. We had about 5-8 years of rewriting work, and it was difficult. I can’t imagine more than 30 years of work!

+8
source share

The first thing that comes to mind is that you access the rewrite / refactor / replace argument prematurely. The first step I would recommend to take is the following:

  • Unit tests
  • OK

This is good in terms of technical capabilities for their implementation. Unit tests are an important preliminary step before any reasonable refactor or rewriting can occur. By "unit test" I mean to wrap each function call with the appropriate code, which proves that the code works for all known conditions. In complex modifications, this may not actually occur at the most granular level, but any automated tests will help a lot.

And QA is an independent (and aggressive) quality assurance team that carefully tests beta versions before production. Their test plans and test procedures are essential to any replacement effort.

Once you get the code under control, you are in a position where a business can reasonably consider massive changes.

Just pay attention to your comment regarding external consultants - no consultation will ever care about the code to provide a realistic guarantee of quality. QA ends up marrying a hip business defending the company's leading position. This is an internal function in the long run, and an external consultant cannot provide much more than getting you started really.

+7
source share

I think that your description provides all the necessary information about the quality of the code (its absence). The fact that so many support resources are required also indicates the high costs associated with maintaining the existing system.

As I answered here , a good approach to consideration is to reorganize one part of the system at a time, until everything works at an acceptable level. I agree that Joel does not throw away existing code (see Things you shouldn't do . Parts of your code work, so you should leave them as much as possible and focus on sections that lead to downtime.

Andy also makes a big conclusion about starting small.

Another thing to try is an overview of the processes around the system. When you do this, you should try to determine which unsuccessful situations are caused directly or indirectly by user action? Are there any problems with the configuration or environment? If you have problems correcting the code directly, you can still support it, more effectively coping with external problems.

+1
source share

Does the code exist for about 30 years?

The development paradigms have changed significantly over the past three decades in many ways, and, in my opinion, the most significant thing for your predicament is the amount of time (in human days) that it takes to create something to input - → output something.

300,000 lines of code 30 years ago, perhaps today you could fit in 100,000 lines or less, and spend less man-hours (?) This may seem optimistic / funny for some, but, on the other hand, is achievable, depending on the type the application in question. You did not indicate the classification of the system — is it a real-time process control system with sensors and actuators attached to it? Airline reservation system? Does it do the subsequent processing of some data lag? In other words, could one rebuild something like Java and quickly with an aggressive, small team? Have the requirements been documented, and if they need to upgrade or reverse engineer from scratch? Is human safety a factor?

Just a quick health check, I think, depends on whether you need to rebuild (any order means the same thing):

  • The number of code flaws required.
  • The level of expertise of these guys.
  • Which languages ​​are not suitable.
  • Which languages ​​are suitable.
  • How much does it cost to use the selected language in terms of hardware and software.
  • How much business depends on it to stay alive.
  • Is it too much downtime, or are you just nitpicking? (maybe they really don't care, but pretend).

Good luck with that!

+1
source share
+1
source share

All Articles