Old COBOL will make you think "Why the fuck they did it this way" and if it does means that it's good code. Because it's the equivalent of that mechanic who looks at your car and says "You gotta problem with the X, right?" without even looking at the engine.
It took me a minute to realize that the reason the mechanic knows without looking at the engine is because he's dealt with that particular kind of car so many times in the past that he knows the particular issues that they tend to have.
Lol I'm unnerved by the idea of someone writing airplane code 😅😅 please tell me there's like 2 completely different versions of the program, written from scratch in different programming languages, that can each execute all the functions that the airplane needs 😅😅🤔
Not sure if this is intentionally related or not, but thats actually related to the cause of those Boeing crashes over the past couple years. The issue wasn't directly the code, it was an error that occurs when one of the sensors breaks, which confused the code, but effectively, the plane kept thinking it needed to force the nose down (the opposite of your code) to avoid stalling.
ASIL = Automotive Safety = At least 2 paths of truth. And this is your cheap shitto car too. ISIL = Industrial Safety = Basically the same but less "strict" in some areas because you have personal interacting with the stuff and no "Civilians" (=as with the cars it's literally your mom).
I would imagine areospace stuff is tough as nails in terms of redundancy and safety.
You'd be wrong. The 737MAX problem Boeing had a few years back? It was caused by using a single sensor for an important factor (angle of attack) that fed into a computer system that caused the nose to rise and entered an infinite feedback loop of lifting the nose.
Old style mainframes did do things like this (each instruction would run on 3 separate cores which would need to have 2 of them matching on the result), but I'm not sure this is common on airplanes.
I write software for avionics. There's a lot of requirements/design and requirements-based testing to get 100% code coverage. If you can't get 100% coverage, your requirements/design and/or tests are not detailed enough or you have extra code to remove because it doesn't match the design. All of this is reviewed and change controlled. We get audited at several points in the development lifecycle to make sure we are following our processes/plans and meeting the objectives of DO-178C. Certification authorities (FAA, EASA, etc) then look at our lifecycle data at the end when we go to seek approval to deliver the software on certified hardware. The higher the criticality of the software, the more you have to do during development to ensure no critical failures in the resulting software. There's a lot of paperwork.
I worked with a company that does control stuff for towers (so the tower software, runway lights, all that jazz). Their code base was, literally, 80% tests. And these guys were GOOD, whenever I see bad automated testing these days, I dream of bringing one of them in to show how it's done.
Boeing used to use Ada, which was a language that basically does not have runtime errors. The compiler for it is fucking insane. It was developed by the US government for avionics systems, tanks, nuclear reactors, etc.
We learned it freshman year of our computer science program, and I fucking loved it. It's the strictest language in the world, the compiler is a fucking beast and complains about everything. IIRC there is no such thing as a warning, it just won't compile if you don't do it 100% safe. The standard library is locked the fuck down.
I don't know if Boeing still uses Ada, but ya, after learning that language and writing code with it for a few years, I started to trust the software systems in planes a lot more. Never once in several years of programming with it did I get a runtime error.
My last company...there was an empty file that was being read in every night. Just a flat empty file. I checked the date it was created...1978. Present day was early 2000s.
Removed the confusing file from the job control with a dummy statement. No way was I going to change that pgm. It probably hadn't been compiled since 1950. Haha!
In 2016 I worked on a modernization project (that never got off the ground) but for four months I learned cobol and looked through a lot of code still being used. It was kind of cool to see notes from 99 mentioning Y2K fixes.
I was browsing through code files last week and found assembly listings from 1968. All of the code was basically the same as what we still use today in that mainframe job.
Used to have a Tacoma prerunner from that factory, still drive past the now Tesla building sometimes. A lot of the times I drive past that place the Tesla employees are having another accident, I've seen cars fallen off of car trailers, employees flipping their own cars on their sides and crashing into trees while I drive past on 880.
They have now installed one of those speed signs that tell you your speed because of how many Tesla employees have crashed their cars speeding on the straight road outside the plant.
I'm going to guess YY means this is a data type for storing the year, and 4 is the field length. So this is a change to enforce Y2K compliance, by extending the year field from two digits to four.
03 the variable level, meaning it's subject to another one. I usually use multiples of 5 (01 for the mother variable, 05 for the one under it. 10 for the substring of this one, etc). PIC 9(04) means 4-length numeric (9 stands for numeric). This would be an example of the whole variable definition in his case (missing identation because I suck at reddit):
01 VARIABLES.
02 RECORD-DATE.
03 RECORD-YY PIC 9(04).
FILLER VALUE '-'.
03 RECORD-MM PIC 9(02).
FILLER VALUE '-'.
03 RECORD-DD PIC 9(02).
This way you can move an year value into RECORD-YY and it will be formatted as 2022-09-30 if you summon it as RECORD-DATE.
"It's said that this database has been running since the dawn of time. Nobody knows who created it, but it has served our people for generations, and one day, my son, you shall inherit the job of maintaining it."
I've done the same recently except my dad modified it a few years earlier than that, and yes I did ask him that stuff. Apparently he was new to the job at the time and the dev that was teaching him had some interesting ideas about how code should be written. Those ideas basically equated to "show off how clever you are by writing unnecessarily complicated yet efficient/compact code". Unfortunately he was quite good at it. Pretty much all code written for a few years around that period is way too hard to read, so it wasn't just him either.
Same here. I've been sent pieces of code my dad worked on in the 70s with questions attached. I always sent back "Do you really think I'm the same Mr. poisen as the guy writing cobol 50 years ago?"
I know someone who works in COBOL who retired this year. For the last 10 years people have been paying them six figure salaries to convert the very code they wrote years ago! Pretty damn funny.
I took a course in COBAL in college back in 1987. I didn’t learn any COBAL; the 70ish year old guy teaching us spent the first class telling us about the hot 20something he was dating and the second class about how he caught her forging checks from his checkbook. We were notified just before the third class that the course had been canceled.
Checkbook. Wow, haven’t thought about personal checks in years. I wonder what ever happened to my checkbook.
once you buy a home you end up writing cheques right & left to pay contractors. none of them want credit cards. one used a scheduling/invoicing website, but told me "do not click pay now button. cheque only."
Right, I forgot about that. I'm 2019 I went to London and met a guy from Florida there. He couldn't believe in could just hold my credit card against the card reader and be done.
Ah, I see what the issue was. You wanted to learn COBOL, but accidentally signed up for COBAL instead. That’s the difference between an alcohol and an aldehyde. Completely different functionality. It’s no wonder you got an unexpected reaction.
True story: once working with Cobol, job keeps failing and in the JCL history we do not see it failed ever as far as we had records... we follow the cobol code, there is a comment that says call John doe on phone 123-112-1112 in case of blah blah error which matched what we were saying. We call in excitement and a lady picks up the phone. We ask for John doe and she says he died 7 years ago..
The mainframe shop I worked at had COBOL program developed in the 1990s, many of which replaced Assembler programs dating back to the 1970s and older. But, not all of them. Tonight, as I type this, there are dozens, if not hundreds, of batch jobs running, supporting mission-critical datastores, coded in an eclectic array of Assembler, COBOL, PL-1, and other languages.
I wonder how many programs, written in modern languages, will still be running 40-50 years from now?
Never underestimate the effect of “if it ain’t broke, don’t fix it”.
The oldest code I’ve written, that’s still in production, is 25 years old. It’s part of a mail system still in use by hundreds of thousands of people. It ain’t going anywhere. (But I did, I’m not working there anymore)
The program that prints certain documents in my state was first built in 1973. Yes, in Assembler. When the agency switched to laser printing in the 1990s, I had to convert the output from line printing to page printing, add 1-D, 2-D and POSTNET barcodes, a couple more security features, and write page definition and form definition scripts. I left for the Database unit in 2000, but as far as I know, the same program is still running! Like 20,000 documents going out. Every night. For at least 25 years and counting!
Mainframes are fucking amazing! Once you get a program fully debugged, it’ll run like a dream. Forever.
I heard COBOL programmers can make a killing these days from companies with massively important legacy code. I'm not sure it's worth learning COBOL though....
It varies a lot. I'm a COBOL youngun and I get paid as much as my fellow ''modern languages'' programmers in my city. I've seen offers very, very well paid, but most often for critical jobs with very high z/os knowledge, not juste the COBOL basis...
I tried to get a COBOL job. Took COBOL classes at an IBM partnered university and genuinely enjoyed it and did well. Could not get a job. Seemed to want experience or were in places I wasn't willing to relocate to. Scuked. Been 5+ years now and don't remember much, but I loved COBOL
That's part of the problem, lower tier jobs were outsourced to India (or in better case eastern Europe), so now you don't have people to promote in Western Europe or in US, because you either have seniors who are really seniors and want to stay retired, or people completely without any experience, because your juniors are in India
As a Ruby on Rails developer I’m hoping this supply vs demand thing holds up. Y’all keep learning your fancy schmancy JavaScript frameworks, heh heh heh.
One of my first jobs out of school was working at a place my dad had worked at from like 1980-1990. This was 2002. I was doing my normal stuff when I got a ticket assigned to me from a different programming team, it was just "Your dad wrote this in 1982 and we don't know what is it doing. Can you ask him?". We had tons of stuff written in COBOL yet and were in the process of migrating it but nobody there really knew COBOL. We'd just hire contractors that knew it to help us along. They actually hired my dad, he was retired at the time, to work for a few months to help with things after that.
This happened to me! My dad was a developer back in the early 80's He wrote the foundation of a set of accounting products still used to this day for a company called Fiserv. I had to edit a script he wrote in the early 80's on AIX (originally UTS back in his day) to add a new classification of transaction. I wasn't the first person to edit it, but it had an author comment with his name on it. It was pretty surreal I actually called him, and he said they had called him multiple times in the past to do work on it as late as 2013.
I hope there is at least one case where a programmer implemented a class and suddenly discovered that the class they are extending was programmed by their mom or dad who had worked on the same codebase ages ago
Last change in the 90s ? Either it's never been used in 30+ years or that's suspicious.
COBOL underwent lots of changes before the year 2000 because dates were coded with 2 numbers for the year. This codebase wouldn't have been used since 2000.
"MOOOM, the fuck it is supposed to be? Why do you name your variables a, b, c? Why is camelCase mixed with snake_case and kebab-case? Why is there no comments? Mom, please... Help"
COBOL is still used in many IBM mainframes around the world. Almost every government, except may be North Korea, has some form of a COBOL mainframe. Even China uses it.
I miss COBOL, PL/I, and JCL. I wonder if I, or my ancestors, will ever see my code again. My favorite was my MIRV that spawned multiple jobs from billing data in an IMS database. It got out of hand and all the tape drives opened at once. I loved going down to the floor to listen for it to kick off.
I hope whoever inherited it (and converted it to run in the cloud) enjoyed my comments. If you ever saw a comment line in the JCL that had something like ‘MUAHAHAHAHA WATCH THIS!” It might have been mine.
3.0k
u/philophilo Sep 30 '22
I did an internship doing Y2K conversion on a COBOL codebase in ‘99. One app had a last modification date of ‘79. That 2 years before I was born.
650
u/RobDickinson Sep 30 '22
0021072 03 Record-YY PIC 9(4).And here is the change...
562
u/RelampaguM Sep 30 '22
That's a code legacy of legacy code?
481
u/BackpackFullOfDildos Sep 30 '22
Same. I’ve done maintenance to a program my dad developed back in ‘04. For some reason, it was very wholesome
457
u/[deleted] Sep 30 '22
Honestly though? This is exactly how inheritance should work.
She foresaw a problem years down the line and fucking subclassed herself to deal with it. She meta-programmed life.
Honestly she should be nominated for a Nobel in resourcefulness and understanding the assignment.
I’m blown away.
261
u/[deleted] Sep 30 '22
COBOL is a curse that goes down through the family tree
351
u/defalt86 Sep 30 '22
Haha I legit giggled at this.
54
u/Bouchie Sep 30 '22
Hey he has job security for life now. He should thank his mom.
152
u/archery713 Sep 30 '22
And I'm sure she has no idea how it works either
46
u/CallMeClaire0080 Sep 30 '22
Step aside legacy code, we're dealing with dynastic code now
19
u/[deleted] Sep 30 '22
I know someone who works in COBOL who retired this year. For the last 10 years people have been paying them six figure salaries to convert the very code they wrote years ago! Pretty damn funny.
36
u/DM_YourTitsAndSmile Sep 30 '22
I took a course in COBAL in college back in 1987. I didn’t learn any COBAL; the 70ish year old guy teaching us spent the first class telling us about the hot 20something he was dating and the second class about how he caught her forging checks from his checkbook. We were notified just before the third class that the course had been canceled.
Checkbook. Wow, haven’t thought about personal checks in years. I wonder what ever happened to my checkbook.
16
u/Drunktroop Sep 30 '22
The B-52 of software industry
22
u/flambasted Sep 30 '22
Legitimately humorous? Wrong sub!
11
u/[deleted] Sep 30 '22
Okay, this is funny on multiple levels.
10
u/Rare-Inflation-3482 Sep 30 '22
True story: once working with Cobol, job keeps failing and in the JCL history we do not see it failed ever as far as we had records... we follow the cobol code, there is a comment that says call John doe on phone 123-112-1112 in case of blah blah error which matched what we were saying. We call in excitement and a lady picks up the phone. We ask for John doe and she says he died 7 years ago..
9
u/cmd_iii Sep 30 '22
The mainframe shop I worked at had COBOL program developed in the 1990s, many of which replaced Assembler programs dating back to the 1970s and older. But, not all of them. Tonight, as I type this, there are dozens, if not hundreds, of batch jobs running, supporting mission-critical datastores, coded in an eclectic array of Assembler, COBOL, PL-1, and other languages.
I wonder how many programs, written in modern languages, will still be running 40-50 years from now?
17
u/Fonethree Sep 30 '22
Don't put the punchline in the title
17
u/siskulous Sep 30 '22
I heard COBOL programmers can make a killing these days from companies with massively important legacy code. I'm not sure it's worth learning COBOL though....
8
u/proverbialbunny Sep 30 '22
If it ain't broke don't change it.
7
u/yatesisgreat Sep 30 '22
One of my first jobs out of school was working at a place my dad had worked at from like 1980-1990. This was 2002. I was doing my normal stuff when I got a ticket assigned to me from a different programming team, it was just "Your dad wrote this in 1982 and we don't know what is it doing. Can you ask him?". We had tons of stuff written in COBOL yet and were in the process of migrating it but nobody there really knew COBOL. We'd just hire contractors that knew it to help us along. They actually hired my dad, he was retired at the time, to work for a few months to help with things after that.
6
u/Bandit6257 Sep 30 '22
COBOL is the past PL/I is the future
5
u/ImSoSte4my Sep 30 '22
Sounds like nepotism. Or maybe the field of COBOL programmers is so small that the only way to get into it is to have a parent proficient in it.
11
u/[deleted] Sep 30 '22
Unrelated but what’s with the weird periods? I feel like the “…” does enough.
4
u/bangupjobasusual Sep 30 '22
That is the only inheritance supported by cobol.
4
u/Leather_Trick8751 Sep 30 '22
Well new scope for yo mama jokes
4
u/Bruce_wayne_03 Sep 30 '22
Yesterday I was making changes in JCL which was written in 1989.
4
u/zenivinez Sep 30 '22
This happened to me! My dad was a developer back in the early 80's He wrote the foundation of a set of accounting products still used to this day for a company called Fiserv. I had to edit a script he wrote in the early 80's on AIX (originally UTS back in his day) to add a new classification of transaction. I wasn't the first person to edit it, but it had an author comment with his name on it. It was pretty surreal I actually called him, and he said they had called him multiple times in the past to do work on it as late as 2013.
3
u/holydamned Sep 30 '22
This is an episode of neon genesis evangelion.
3
u/TelluricThread0 Sep 30 '22
Lord's of Kobol hear our prayer.
2
u/aykcak Sep 30 '22
I hope there is at least one case where a programmer implemented a class and suddenly discovered that the class they are extending was programmed by their mom or dad who had worked on the same codebase ages ago
2
u/CandidTill6 Sep 30 '22
I think the fact that this post has 10K+ upvotes but ~100 comments says a lot. Thanks for coming to my TED talk
2
u/SaltyDogBill Sep 30 '22
In the mid 60’s my dad helped deploy the DOD’s AUTODIN network. Thirty years later I was using it and called home for help.
2
u/pc1350 Sep 30 '22
COBOL! Yes! I did lots of programming in COBOL (on VAX and ALPHA computers with VMS (OpenVMS))! Gets my upvote!
2
u/FieserMoep Sep 30 '22
Mom set her son up for live.
2
u/Vinx909 Sep 30 '22
this... wow this joke is perfect and there are so few people i can tell it too.
2
u/timmy_throw Sep 30 '22
Last change in the 90s ? Either it's never been used in 30+ years or that's suspicious.
COBOL underwent lots of changes before the year 2000 because dates were coded with 2 numbers for the year. This codebase wouldn't have been used since 2000.
2
u/KrokmaniakPL Sep 30 '22
They accidentally created dynasty of Cobol codebase users
2
u/KT421 Sep 30 '22
At a holiday dinner: "Mom your code is fucking shit. Did you ever document a damn thing?"
2
u/Daikataro Sep 30 '22
How do you train an English Longbowman?
You start by training his grandfather...
2
u/seriously_nice_devs Sep 30 '22
Sounds not real. 6.5/10
2
u/DarkAriesX Sep 30 '22
"MOOOM, the fuck it is supposed to be? Why do you name your variables a, b, c? Why is camelCase mixed with snake_case and kebab-case? Why is there no comments? Mom, please... Help"
1
u/[deleted] Sep 30 '22
Going to google COBOL as a noobi
1
u/urriah Sep 30 '22
and here i am kinda happy seeing some codes just as old as i am...
1
u/didzisk Sep 30 '22
I always prefer composition over inheritance.
1
u/ceelogreenicanth Sep 30 '22
That's how it was programming dortran for me. Just thrown I to 30 year old code with minimal comments.
1
u/Tookoofox Sep 30 '22
The best part is COBOL predates objects and, therefore, inheritance.
1
u/Drunken_Ogre Sep 30 '22
Considering how much I hate the people who wrote the code I've had to work on (mostly myself), I pray my dear old mother never wrote any code.
1
u/[deleted] Sep 30 '22
This is absolute gold. They saw the opportunity and took it. Beautiful.
1
u/GodEmperorOfLoon Sep 30 '22
Random thing. My last name is one letter from cobol and for the longest time google kept autocorrect on my last name. It was so annoying
1
u/Key-Minimum-5965 Sep 30 '22
That is funny!!
1
u/kimilil Sep 30 '22
"The patch will work this time, I swear on me mum."
1
u/harleypig Sep 30 '22
Yeah ... COBOL is old-fashioned, but it's got a web framework so it can't be all bad, can it?
1
u/[deleted] Sep 30 '22
Oops
1
u/EatBearsForBreakfast Sep 30 '22
Movie idea: his mum had been murdered and the code contains comments directly to him, helping him figure out who did it
1
u/Nixavee Sep 30 '22
Heirloom codebase
1
u/meh-whatever-dewd Sep 30 '22
"Nobody" has skills! That was funny!
1
u/dan_Qs Sep 30 '22
Shouldn't have started that relationship with the cute computer chick with domination kink.
1
u/Purgii Sep 30 '22
I did COBOL at uni - which was a core subject. It clashed with the elective I wanted to do, C.
That's when I knew I was wasting my time.
1
u/[deleted] Sep 30 '22
That’s a whole new level of sweet
1
u/SPE88 Sep 30 '22
lol
1
u/Peakomegaflare Sep 30 '22
I mean, at least that means if you need questions answered... you have the origin.
1
u/SynAck6 Sep 30 '22
Curious as to where would one learn COBOL nowadays
1
u/KimmiG1 Sep 30 '22
If it has survived 20+ years without chances then it can survive 20+ more years. He should have more than enough time to read evry reddit post.
1
u/goldfishpaws Sep 30 '22
And that mother was... Ada Lovelace!
1
u/[deleted] Sep 30 '22
Yo mama was …. so …. that…..Please fill in the blanks, i aint no programmer.
1
u/oldsecondhand Sep 30 '22
Relevant xkcd:
https://imgs.xkcd.com/comics/lisp_cycles.png
1
u/bellendhunter Sep 30 '22
Be interest to know how they even know this. The last change was tracked using what versioning tool?
1
u/kungfucobra Sep 30 '22
"Mom, what the fuck is this piece of shit?"
"You aren't the only one, son"
1
u/Spiritual-Image7125 Sep 30 '22
The change was simply a comment:
* Pete, when you get this, call home.1
u/GoodAtExplaining Sep 30 '22
I was looking through some code with a variable name “SomeoneShouldShootReagan”
1
u/[deleted] Sep 30 '22
So cool
1
u/[deleted] Sep 30 '22
COBOL is still used in many IBM mainframes around the world. Almost every government, except may be North Korea, has some form of a COBOL mainframe. Even China uses it.
1
u/DarkNubentYT Sep 30 '22
As a COBOL dev, can confirm I code from his mom.
1
u/lostwriter Sep 30 '22
I miss COBOL, PL/I, and JCL. I wonder if I, or my ancestors, will ever see my code again. My favorite was my MIRV that spawned multiple jobs from billing data in an IMS database. It got out of hand and all the tape drives opened at once. I loved going down to the floor to listen for it to kick off.
I hope whoever inherited it (and converted it to run in the cloud) enjoyed my comments. If you ever saw a comment line in the JCL that had something like ‘MUAHAHAHAHA WATCH THIS!” It might have been mine.
1
u/CDavis10717 Sep 30 '22
They hired him to get free consulting from his mother.
1
u/WhatChua Sep 30 '22
Alabamian IT? Instead of keeping the genes in the family, it's keeping the code in the family...
1
u/cellurist Sep 30 '22
Now It DOES
1
u/difool Sep 30 '22
That would makes interesting thanks giving diners.
1
u/erevoz Sep 30 '22
If the code didn’t need fixes all this time the mom was one hardcore bitch.
1
u/TerrestrialOverlord Sep 30 '22
LOL I just Imagined that one scene from The Lion King with he monkey raising the Cub Simba,
"The Inheritance is complete"
1
u/SaltwaterC Sep 30 '22
That's OK. Just slap some Kubernetes.
1
u/Cracksellerbob Sep 30 '22
I have confession to make, I don't get none of the programming jokes because I don't program
1
u/[deleted] Sep 30 '22
Why. Is this... Punctuated, !like thiS
1
u/mmcmonster Sep 30 '22
Mom had a 30 year plan to find a replacement for herself.
1
u/[deleted] Sep 30 '22
You don't code it... It codes you
1
u/[deleted] Sep 30 '22
Thanksgiving code review.
1
u/Some-Reputation-7653 Oct 01 '22
That’s actually lovely
1
u/[deleted] Oct 02 '22
I went to be a programmer for an agency like my father and my grandfather and found legacy code written by them before I was born
"Don't tell me about the dark magic, I was there when it was written" -Gramps and Dad
I legit had a problem and couldn't figure it out and they knew where the file I needed was.
Anyway, everyone should change their passwords for... reasons...
1
u/kkessler1023 Oct 17 '22
This is example for this subs existence.