When “What idiot wrote this?” is replaced by “I should call my mom.”
I’m sitting here looking at C files that have existed for well over a decade, and this thread makes me feel like I’m living in luxury and only one notch below vibe coding.
Any COBOL program is closer to vibe-coding than a C program that works.
But not dealing with vibe-coding is the luxury.
I’ve got Java code older than a decade I have to deal with too…
I’ve worked with C code from the late 70s… that was cool.
I remember reading a fascinating article (or Reddit post, at the time when those were sometimes awesome) from this guy interviewing his mom, a COBOL programmer… Wondering if it’s related…
Update: found it but it was deleted
Update: found it on the waybackmachine: https://web.archive.org/web/20160719020302/https://medium.com/@Svenskunganka/interviewing-my-mother-a-mainframe-cobol-programmer-c693d40d88f7#.kiw240b6p
The smaller banks however are better off which usually runs something like Java without mainframes.
I’m not so sure about that…
Great read, thanks for that!
Tangential, but I’m working with some code that started out in the punch card era (I’m doing particle physics, it’s in fortran)
My condolences.
My first coding experience was as a kid on punch cards (and I’m not even 60 yet). This was in the late 70s and I had an older neighbor friend who was in high school but taking some classes at the local university. The intro programming class that he took still used punch cards on mainframes (though this was being phased out even then) and my friend sort of Tom-Sawyered me into helping him with his homework. It was actually kind of fun to sit there punching the holes in the cards, and then we’d take the stack of cards over to the CS building and leave it in his mail slot, and then a few days later you’d get a giant stack of that old green- and white-striped computer printout paper deposited there with the program’s results.
It’s interesting, it really taught me to check and recheck my own code extremely thoroughly and carefully before “running” it, rather than pumping out some slop quickly and relying on the compiler and/or the output to identify any problems. Because with multiple days between submitting the code and seeing the results, you really had to make sure stuff was working from the get-go. In my career as a programmer, I subsequently ran into many similar situations that required basically just your own eyeballs to make sure the code was right. When I was writing Blackberry applications circa 2010 (!) for example, RIM’s utterly fucked-up developer environment meant that the delay between starting to compile an application and having it running on a test device could be 30-45 minutes or more (if it finished compiling at all) even if I’d only made a single one-line code change. So I had to get back in the habit of very carefully writing a lot of code before attempting to compile, and making sure it was going to work correctly just by inspection.
haha me too. although it was ported to fortran 4, 77 and 2003 respectively. still the logic remained in its core.
But i must admit. working on such organic grown is harder then doing yourself. comments was devils work at that time. variables shortened to 3 chars for memory sake. really a pain in the ass.
I was on a project where a co-worker left and his son was onboarded a few years later; he seemed much more chill than I when we were both working on an issue and it dawned on me that he was literally fixing (well, not really a defect just an update) his Dad’s code. Heh.
“This is what my parents raised me for. Step aside!”
‘Fixing his dad’s code’ sounds Freudian ngl
Had a friend who father was a FORTRAN programmer and teach him since he was a child. At 17, he was already working on a oil company making bank. He was obsessed with synthesizers and everytime you went to his house he showed you the new ones he bought. At 25 he “retired” with his own house and a fully equipped recording studio and nowadays it’s a music producer doing some consulting to pay the bills.
COBOL isn’t hard to read, it’s just hard to understand why someone made that decision. Context is key.
I didn’t think COBOL had inheritance.
Hence the roundabout route I guess. Programmers really should stop using it. https://xkcd.com/583/
Carlos!
For some reason, COBOL has had OOP features since 2002.
For some reason
It’s because “every language must do OOP”.
Every SQL engine does it… SWI Prolog seems to have escaped, but COBOL had no chance.
cobol’s mom has got it going on
Impressive to work that long on something and not change the code at all. The mom('s team) was either very competent at writing configurable code or very good at pretending to work.
With such a codebase, once it is settled to a certain point, you stop adding things. You write new things, and carefully interface with the old stuff.
Imagine a bank. Their software core is usually neolithic, i.e. written in COBOL or even worse, FORTRAN. You don’t add the “online banking” or “web client” interface in the original language. You add them in something more contemporary, which interfaces to the neolithic core via files, pipes, libraries, whatever, and translate it into a frontend as needed. As long as the core works, nobody needs to touch it.
You don’t add the “online banking” or “web client” interface in [FORTRAN]
Don’t kink shame.
My first network stack was written in assembly for a Motorola 68k. It was hot.
The extreme masochists begin to back slowly away in alarm.
I wrote a web app for a client back in the late '90s that is still in (heavy) use at the company. It was actually a “Classic ASP” app and they kept one old PC around to act as the server for it for a couple of decades (they eventually replaced that with a virtual machine and the app is still going). The output is straight HTML + CSS so they’ve never had any problems using it with progressively more modern browsers. Ironically, this app is a front end sitting atop an unbelievably clunky mainframe application that dates to the 1970s, so my app’s continued existence means that mainframe application is still running as well.
COBOL is still on my to learn list.
I can’t recall if it was COBOL or FORTRAN, but I tried learning one of them after being pretty confident in picking up any other programming language I’ve tried to learn, including assembly (wouldn’t want to use that for large projects but I’ve written context switches and such), but I ended up giving up because it felt like the learning materials themselves were in some other language.
Which sucked because I’m the kind of guy that thinks a task like refactoring millions of lines of legacy code into a more modern language would be fun (or satisfying at least). Phase 1 would be a 1:1 conversion (probably involving implementing various old language features in the new language or assembly to do it piece by piece), followed by phase 2 which would be a full redesign and rewrite, using the knowledge from phase 1 to ensue full feature parity. Because “we rewrote software but the new version doesn’t do x, y, z that the old one did” sucks. Glances at Blizzard.
FORTRAN is godawful, I can only image what COBOL is like. They’re my counter to the people think languages essentially don’t matter. No guys, there has been progress over the eras.
Opencobol or gnucobol is good. You vmcam install it on any Debian based system no issues.
He got COBOLd.
Not code, but right now I’m having fun making a new electrical schematic based off an old drawing marked 1978. I will say, it’s drawn lovely, but so many of these parts haven’t been made in decades and finding replacements has been a challenge.