There was once a programmer who wrote software for personal computers. "Look at how well off I am here," he said to a mainframe programmer who came to visit. "I have my own operating system and file storage device. I do not have to share my resources with anyone. The software is self-consistent and easy-to-use. Why do you not quit your present job and join me here?"
The mainframe programmer then began to describe his system to his friend, saying, "The mainframe sits like an ancient Sage meditating in the midst of the Data Center. Its disk drives lie end-to- end like a great ocean of machinery. The software is as multifaceted as a diamond, and as convoluted as a primeval jungle. The programs, each unique, move through the system like a swift-flowing river. That is why I am happy where I am."
The personal computer programmer, upon hearing this, fell silent. But the two programmers remained friends until the end of their days.
The wise programmer is told about Tao and follows it. The average programmer is told about Tao and searches for it. The foolish programmer is told about Tao and laughs at it.
In 1999, a COBOL programmer, tasked with updating bank software for the year Y2K switch, became overwhelmed.
"Look at all of this code!" he exclaimed. "I'll never be able to fix it all in time!"
Horrified by the media depictions of apocalypse brought by financial meltdown and software-launched nuclear warheads, all because of the Y2K bug, he became very anxious.
So, he went to the cryogenic freezing facility and told them, "Wake me up when Y2K is over."
He laid in the cryotube and gently fell asleep as the cold began to overtake him.
The next thing he knew, he was laying on a bed in a warm room, bright lights and white walls giving the room a certain sterility. A doctor in a lab coat was standing over him holding a clipboard.
"Oh, thank heavens!" said the programmer. "We've made it out alive!"
"Yes," said the doctor. "The year is 2999, and it says in your chart you know COBOL?"
And yet, if you didn't mind that kind of work, you could have been making a fortune from 1999 to now. You'll be retired before COBOL is no longer used.
There is a large market for maintaining legacy COBOL, SNOBOL, and various esoteric assembly codebases. Additionally APL and its derivatives are not entirely dead.
And depending on when your brother-in-law made the statement, he stood just as much of a chance or greater of being right than you did. COBOL will always be around (those 80 billion lines of code don't maintain themselves), but microprocessor and PCs could have broken any number of ways. Granted, a good knowledge of C and Unix will go a long way and be applicable to whatever ends up "winning", but it was no guarantee to the exact language and OS that would keep one employed.
My interests in C, compilers, small computers and Unix at the time wasn't driven by career aspirations. I was just genuinely interested those things. Maybe I was "unemployable".
In the late 80's, my academic advisor said he wouldn't sign off on me taking a COBOL class because that was a business department IT class and would not go with the rest of my studies[1]. I wasn't really into the idea anyway and filled my schedule with other classes. I do wonder what other CompSci departments at the time were doing.
1) EE was the sole teacher of FORTRAN and I decided against that also, more from a teacher problem than a lack of desire to learn FORTRAN which I later did (without the all caps).
I once had the pleasure to meet a young person (~30 years old at the time) who had learned to program at a bank, so I had to ask her about COBOL.
Her reply was interesting, if I looked at it as a general-purpose language like C++/C#/Java, then, yes, it sucks really hard. But if you look at COBOL as a DSL for building specific business applications, it does not look all that bad.
Having never used COBOL beyond a simple HELLO-WORLD, I am not sure I can judge it either way. But her reply sounded surprisingly pragmatic to me.
if I looked at it as a general-purpose language like C++/C#/Java, then, yes, it sucks really hard.
Plenty of people get by swinging a hammer all day and not a Swiss army knife. COBOL is one person's hammer. For me, at one point, it was RPG. You think COBOL is "domain specific"? RPG has the DSL right in the name: "Report Program Generator". Yuppers, RPG is a report writer. And when you're writing banking software or the like, which is just inputs munged into outputs, RPG did the job. Why use a language with shitty, dangerous string handling, no syntactic sugar for the task at hand, whose output keyword consists of "printf", dragging along a runtime with crap I'll never use, and other "general purpose" language problems when you can use a language crafted specifically for what you're trying to do?
I made plenty of money back in the day writing FoxPro. FoxPro sucks for embedded systems and writing an operating system. But ya know what it doesn't suck at? Taking some data, transforming it, do a little munging, and print some output. Which was precisely what customers were paying me to do at the time, and not writing a Windows competitor.
That is what that programmer told me, isn't it? COBOL was designed for a specific purpose, and according to her, having used it for that exact purpose, it gets the job done. COBOL seems to be the language hackers love to hate, but there is a reason it is still around.
During my training I once had a supervisor who spent years writing reports in RPG on an AS/400. She had interesting stories to tell, but unfortunately, she was always far too busy to actually tell them. :-(
I don't buy the DSL argument, as it's not more suitable for any domain than any other language unless shuffling COBOL specific data structures from a DL/1 database counts as a domain.
Interestingly, Lisp is (slightly) older than COBOL and is actually truly living up to the DSL thing - at least nowadays.
Both languages are actually centered around data structures - kind of, but while COBOL is massively built on fixed structures and boilerplate, lisp is built around dynamic structures of lists (and pairs - or CONS) .
It's interesting that they were invented more or less at the same time, as COBOL feels as dated as anything can be, and Lisp feels rather ok. Scheme (a dialect) is more than 40 years old and is actually rather fun to program in, and feels modern in more or less every sense.
Lisp source code is built around structures of lists built on cons pairs (and numbers, symbols, string literals, other kinds of literals, ...). (COBOL source code is just characters.)
Lisp data structures are varied. CLOS objects, multi-dimensional arrays, hash tables, strings, bit fields, ...
The Scheme of today is extremely different from the Scheme of 40 years ago. Comparing the language of R0RS and R1RS with R5RS, you'll see just how different they are. I'd say that "modern" Scheme is due more to Clinger than to Sussman & Steele!
My point is that, yes, Scheme as a concept originated in the mid 70s, but it has been updated many times over the years. The Scheme of today isn't 40 years old.
Indeed, it's an excellent language for what it was designed for: mainline data processing, consisting primarily of reading databases and creating reports.
>> the-values hold information about variables received. At the moment, these come from PATH (GET and POST are on the way). You can access them in the same order they occur in path.
Well, this is kinda the crux of the situation isn't it? Query parameter parsing, and POST body parsing, can't do much without these. Is this to be implemented in cobol? I really hope not, parsing anything is quiet untenable in cobol. I believe gnu/open cobol has pretty good .so binding, so you could conceivable use third party utilities like apache apr request parsing.
Why is parsing untenable in cobol? Becuase idomatic cobol doesn't provide dynamic memory allocation, or associative arrays, so you have to build up all that infrastructure from scratch.
But, the absence of dynamic memory allocation is also a characteristic that makes cobol extremely stable and safe, and mainframe applications legendarily bullet proof. All memory is required to be statically declared at compile time (similar to c-sects in assembler). So the runtime can ensure user programs play nice with each other.
You're first I run into saying that who isn't a mainframe programmer. It was an interesting language in summaries I read but I never really dug into it. What was good about Rexx for writing parsers?
> But, the absence of dynamic memory allocation is also a characteristic that makes cobol extremely stable and safe, and mainframe applications legendarily bullet proof.
Of course, it can also make programs curiously limited.
If you have a COBOL program that loads its configuration into memory before processing data, you may find that too much configuration (think things like rules, transaction codes, etc) results in your program no longer running because the array that holds it isn't big enough.
You folks think you're being funny but I have vary off the interface on our iSeries to move it to a different ethernet switch then do an IPL over the weekend.
I remember this from a few years ago. The only recent updates appear to be a change to the tutorial link.
If you haven't clicked through to the inspiration (http://www.coboloncogs.org/HOME.HTM) then it's well worth a look. Although the Rails page doesn't look like that any more, so it's not quite as funny.
"You don't have any Cobol, PL/1, OS360 Assembly Language or APL on here", he observed.
"I am going to focus on C, Unix and operating systems. I want to write compilers for microprocessor based computers".
When he finished laughing, he called me "unemployable" and said, "microprocessors will never be used for anything but toys. Take COBOL!"
Since then, I have made a point of not even looking at COBOL code. I have been in the presence of COBOL, but have averted my eyes.
The mainframe programmer then began to describe his system to his friend, saying, "The mainframe sits like an ancient Sage meditating in the midst of the Data Center. Its disk drives lie end-to- end like a great ocean of machinery. The software is as multifaceted as a diamond, and as convoluted as a primeval jungle. The programs, each unique, move through the system like a swift-flowing river. That is why I am happy where I am."
The personal computer programmer, upon hearing this, fell silent. But the two programmers remained friends until the end of their days.
The Tao of Programming, 8.3 http://www.mit.edu/~xela/tao.html
The Tao gave birth to machine language. Machine language gave birth to the assembler.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
"Look at all of this code!" he exclaimed. "I'll never be able to fix it all in time!"
Horrified by the media depictions of apocalypse brought by financial meltdown and software-launched nuclear warheads, all because of the Y2K bug, he became very anxious.
So, he went to the cryogenic freezing facility and told them, "Wake me up when Y2K is over."
He laid in the cryotube and gently fell asleep as the cold began to overtake him.
The next thing he knew, he was laying on a bed in a warm room, bright lights and white walls giving the room a certain sterility. A doctor in a lab coat was standing over him holding a clipboard.
"Oh, thank heavens!" said the programmer. "We've made it out alive!"
"Yes," said the doctor. "The year is 2999, and it says in your chart you know COBOL?"
They kind of do sometimes. I know a guy who makes part of his living maintaining the emulation system that runs COBOL.
1) EE was the sole teacher of FORTRAN and I decided against that also, more from a teacher problem than a lack of desire to learn FORTRAN which I later did (without the all caps).
Deleted Comment
Her reply was interesting, if I looked at it as a general-purpose language like C++/C#/Java, then, yes, it sucks really hard. But if you look at COBOL as a DSL for building specific business applications, it does not look all that bad.
Having never used COBOL beyond a simple HELLO-WORLD, I am not sure I can judge it either way. But her reply sounded surprisingly pragmatic to me.
Plenty of people get by swinging a hammer all day and not a Swiss army knife. COBOL is one person's hammer. For me, at one point, it was RPG. You think COBOL is "domain specific"? RPG has the DSL right in the name: "Report Program Generator". Yuppers, RPG is a report writer. And when you're writing banking software or the like, which is just inputs munged into outputs, RPG did the job. Why use a language with shitty, dangerous string handling, no syntactic sugar for the task at hand, whose output keyword consists of "printf", dragging along a runtime with crap I'll never use, and other "general purpose" language problems when you can use a language crafted specifically for what you're trying to do?
I made plenty of money back in the day writing FoxPro. FoxPro sucks for embedded systems and writing an operating system. But ya know what it doesn't suck at? Taking some data, transforming it, do a little munging, and print some output. Which was precisely what customers were paying me to do at the time, and not writing a Windows competitor.
I was in the other side of xBase languages, did some dBase III Plus stuff, Clipper Summer '87 followed by OOP with Clipper 5.x, hurray!
High level programming in MS-DOS and were just perfect for crushing out database frontends.
During my training I once had a supervisor who spent years writing reports in RPG on an AS/400. She had interesting stories to tell, but unfortunately, she was always far too busy to actually tell them. :-(
Interestingly, Lisp is (slightly) older than COBOL and is actually truly living up to the DSL thing - at least nowadays.
Both languages are actually centered around data structures - kind of, but while COBOL is massively built on fixed structures and boilerplate, lisp is built around dynamic structures of lists (and pairs - or CONS) .
It's interesting that they were invented more or less at the same time, as COBOL feels as dated as anything can be, and Lisp feels rather ok. Scheme (a dialect) is more than 40 years old and is actually rather fun to program in, and feels modern in more or less every sense.
Lisp data structures are varied. CLOS objects, multi-dimensional arrays, hash tables, strings, bit fields, ...
My point is that, yes, Scheme as a concept originated in the mid 70s, but it has been updated many times over the years. The Scheme of today isn't 40 years old.
>> the-values hold information about variables received. At the moment, these come from PATH (GET and POST are on the way). You can access them in the same order they occur in path.
Well, this is kinda the crux of the situation isn't it? Query parameter parsing, and POST body parsing, can't do much without these. Is this to be implemented in cobol? I really hope not, parsing anything is quiet untenable in cobol. I believe gnu/open cobol has pretty good .so binding, so you could conceivable use third party utilities like apache apr request parsing.
Why is parsing untenable in cobol? Becuase idomatic cobol doesn't provide dynamic memory allocation, or associative arrays, so you have to build up all that infrastructure from scratch.
But, the absence of dynamic memory allocation is also a characteristic that makes cobol extremely stable and safe, and mainframe applications legendarily bullet proof. All memory is required to be statically declared at compile time (similar to c-sects in assembler). So the runtime can ensure user programs play nice with each other.
I'd have thought they're to be implemented in Rexx, which is really great for writing parsers in.
Of course, it can also make programs curiously limited.
If you have a COBOL program that loads its configuration into memory before processing data, you may find that too much configuration (think things like rules, transaction codes, etc) results in your program no longer running because the array that holds it isn't big enough.
You can clearly see how it contains the foundations for more 'modern' languages.
Well done for taking the time to explore something that's now off the beaten path.
If you haven't clicked through to the inspiration (http://www.coboloncogs.org/HOME.HTM) then it's well worth a look. Although the Rails page doesn't look like that any more, so it's not quite as funny.
Deleted Comment