And then one day it is broke

Landed Underclass managed to push nearly all of my geek buttons this morning with his response to my COBOL post, eventually my dribbling rant grew so long that I moved it here as it seemed rather rude to stuff such a long rant into someone’s comments.

“Does Blind Steve really think that matters would be improved by rewriting all of this software in lavishly copy/pasted C++, and running it under Windows?”

Oh good god NO. Which is why I suggested that when the COBOL foundation stones do eventually crack it will probably constitute TWO disasters. Although I harbour a fondness for C that is common to my generation of programmers I have never thought that C++ was a suitable environment for coding systems at the sort of large enterprise mainframe level that COBOL excels at. C++ lacks all the things that make COBOL so robust.

The core C language is often described as combining the power or raw assembly language with the readability of raw assembly language. Bolting an object orientation paradigm (stolen from Smallatalk, which had a proper runtime environment) on to such a thing is like nitro charging a Vespa. It looks like fun, everyone will want one, all your friends will be really impressed, and sooner or later someone is going to get hurt real bad.

I have no doubt at all that the wide spread adoption of C++ in enterprise systems coupled with the sad demise of the mainframe have been the cause of much pain, no small amount of it mine.

“The language used to achieve this was called FORTRAN-IV.”

Arrgh! You picked a bad day to mention FORTRAN, and not because I don’t like it, FORTRAN is an excellent language, truly fit for purpose. (Unlike most of the code monkeys of my generation I am familiar with most everything back to Algol-60) .

No, it is because I am currently engaged in reverse engineering parts of a sophisticated program for which there is no source code, the core calculation engine of which was written in FORTRAN some years ago and compiled under MS-DOS.

Because it was written in FORTRAN by a proper engineer, it just worked, and worked so well that it was never replaced. Later, windows came along and not wanting to be left behind the original developers bought a Windows compatible FORTRAN compiler. They didn’t want to mess with their engineering code though, because it just worked, so they wrapped a thin graphical layer around it that made it output text to a window and left it at that.

Later still, someone else came along and decided that it would be nice to have a fully point and click GUI so that engineers using the program didn’t have to spend hours and hours constructing their input data sets, so out came the C++ compiler and the incarnation that I’m looking at was born.

At some point during the FORTRAN period some bugger did fiddle with the code, but only to add something else that you mentioned, something that I truly do hate, a dongle. And that’s the reason for my involvement. Because, as is always the case, the company that supplied the software went the way of all things, leaving my client with two very serious problems, firstly that the dongle in question is a parallel port device and parallel ports were obsoleted by USB. You can still by parallel I/O cards, but possibly not for much longer, and you can’t put them in a laptop. So the dongle has to go. Secondly, the software is time locked, and the clock is ticking.

To relate this back to my COBOL rant, what makes this such a dog of a job is the legacy baggage not of the FORTRAN language itself, but of the continual porting of the run time library without updating it. Since this dates way back to pre windows days, it does things in what are now decidedly non standard ways. It isn’t cooperating nicely with the operating system in the way that would had the code been taken out, polished, and recompiled even in a brand new FORTAN compiler. The run time library is obsolete and undocumented, etc, etc.

It aint broke, exactly, but I am still going to have to fix it. And this will be harder than it needs to be because over the years various otherwise sensible chaps have uttered the oh so reasonable sounding mantra “if it aint broke, don’t fix it!” and gone about their business. They have forgotten the words of the Master Programmer

Though a program be but three lines long,
someday it will have to be maintained.”

Same deal with all the silent running COBOL. IT departments have just ignored it on the basis that it aint broke. They’ve ported stuff forward without understanding it, they’ve never trained any of their staff to be maintainers, they no longer have the tools, or the source. What they should have been doing is gradually moving their code and skills base along with the times so at the very least they have one person in their department who owns and knows how to use a current COBOL compiler. But they didn’t, because it wasn’t broke.

Then one day it is broke. Chopping dongles off things I do for like, cheap, but enterprise COBOL hacking is a four figure day rate that will suck all the slack resources out of the average IT budget like a thirsty vampire on prom night.

Just because software doesn’t rust doesn’t mean it doesn’t need looking after.

Thus spake the master

Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?

Advertisements

2 Responses

  1. […] May, 2009 by landedunderclass My irresistible urge to spit in holy water has riled Blind Steve right […]

  2. Good post and I agree.

    Years ago when I was told that JDEdwards threw away and re-wrote all their code every couple of years I thought maybe they were mad.

    Then I discovered BPCS and realised that JD Edwards were the sensible guys. Anyone who’s ever looked at BPCS source code will know what I mean.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: