Wednesday, February 8, 2023

Technical debt horror show

 Once upon a time, a university decided it wanted a computer, so it acquired an IBM 704. One of the first things to be programmed was the payroll system. I don’t know what it was written in but COBOL wasn’t available yet. It may well have been 704 assembly language.


Eventually that computer was outgrown, and the university upgraded to an IBM 709. The 709 had a different architecture from the 704, so the payroll system wouldn’t just transfer over. However, an emulator was available for the 709 that made it act like a 704, so the payroll system could be executed by the emulator.


Sometime later, the 709 was replaced by an IBM 7094. Despite being bigger, faster, and far more reliable, the 7094 shared the 709 architecture, so the university just rolled right along running the emulator that now made the 7094 look like a 704. People kept getting paid.


But change was in the wind. The next upgrade was to an IBM System 360/65. S 360 had different word length, different addressing architecture, different instruction set, different pretty much everything. What was to be done for the poor old payroll system?


Computer people are smart, so someone created an emulator for the S 360 that made it act like a - 704? Oh, hell no. Why would there be any reason to try to run code from a computer that was now 3 generations out of date? However, the emulator would make the S 360 act kind of like a 7094. So now the payroll process was to run the 7094 emulator inside of which a 7094 operating system could run the emulator that made a 709 act like a 704, so that it would accept the ancient 704 based payroll program.


Not all was rainbows and unicorns. This process was now so fragile that 2 computer science PhD students were drafted into spending a night every other week trying to sleep on the computer center floor, so somebody would be there to try to get the process back on track if/when it stumbled off into the weeds. Clearly it was time for a complete overhaul.


One would think that it was a “simple” matter of running the original code through a S 360 compiler and working out the kinks, but. There was certainly no program that ran on the S 360 which knew how to interpret 704 assembly language. Besides, by this time the original source code had been misplaced, and the entire kludge had depended for years on executing a 704 object module, which had survived on punch cards, inside the emulator stack.


The university put together a project team and reverse engineered the original program, then rewrote it, now in COBOL, and successfully got the new payroll system running in an *almost* current environment. You see, by this time the university was already looking into upgrading its 360/65 to a System 370, which introduced virtual memory. We will never know whether the original 704 code could have been coaxed to run when faced with page swaps.


The moral of this story is “Never do today what you can put off for 20 years,” because you *will* be able to make it work then. No matter how long it takes and how much it costs.


No comments:

Post a Comment