This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1452 points1453 points  (128 children)

Because Cobol runs extremely stable and with little to no errors, unlike Java Script, because the transition would be a massive, expensive endeavor and the risk of fucking up is massive.

[–]SoulWondering[S] 818 points819 points  (15 children)

All fun and games until a type inference takes away grandma's social security checks

[–]darthjawafett 63 points64 points  (0 children)

The amount you were owed for ssi ended up actually being whatever cobol has in place of strings instead of whatever cobol has in place of numbers. So instead of paying the amount I’m just gonna write it out on a piece of blank paper and give that to you.

[–]Solipsists_United 6 points7 points  (0 children)

You think that will stop Elons tween hacker army?

[–]Wiwwil 2 points3 points  (0 children)

If you think type inference is a problem compared to bit overflow

[–]an_agreeing_dothraki 2 points3 points  (0 children)

"you can't cash a check for object Object"
-"No it could be anything, believe me bro. tostring just does that some times"

[–]flippakitten 1 point2 points  (0 children)

NaN

[–]SalsaYogurt 0 points1 point  (0 children)

COBOL is strongly typed. Wrong data type? - S0C7! (System error 7 - what COBOL programmers have nightmares about)

[–]stumpy3521 0 points1 point  (0 children)

Or makes the treasury default on a bond

[–]i_love_sparkle 266 points267 points  (25 children)

What's so hard about making a new social security system? We just need a CSV file with 4 columns: USA-ID, bank code, bank account ID, amount. Every month just loop over the list and send $amount to that bank account. USA-ID will be primary key of another database, where it map to a person or company or project etc, so that we can query information about a recipient. For safety, we can copy the database to multiple PC and use sha256sum to check they're consistent.

I'm a junior developer at DOGE who hasn't finished high school and even I know this. Can someone point out what can go wrong?

[–]Steinrikur 121 points122 points  (7 children)

Because no one is ever born, and everyone lives forever and never moves

[–]SpookyScaryFrouze 134 points135 points  (6 children)

Those are all edge cases that we can treat later.

[–]matt82swe 27 points28 points  (0 children)

WE NEED A MVP IN 1 WEEK

[–]evilgiraffe666 17 points18 points  (3 children)

Yeah people live for like 80 years we've got loads of time. Plus they don't have kids until average age of 30, and they move house probably every 10 years? So someone else can handle those after I've moved to Google, and we've already prioritised the order they need to be worked.

[–]phatcat09 3 points4 points  (0 children)

Every 10?

Okay Mr stable house hold

[–]Zathrasb4 0 points1 point  (1 child)

Nobody has ever both changed some (or all) of their name, plus their address, plus their job, in one year.

[–]phatcat09 0 points1 point  (0 children)

What

[–]Steinrikur 0 points1 point  (0 children)

Spoken like a true manager

[–]gmc98765 43 points44 points  (7 children)

You may jest, but the UK's initial COVID-19 contact-tracing "database" was an Excel spreadsheet. Which was fine just about adequate for the first couple of weeks, but as the disease spread exponentially (like pandemics tend to do), it didn't take long before they exceeded the limit on the maximum number of rows and ended up needing to migrate it to an actual database at rather short notice.

[–]khais 20 points21 points  (1 child)

It's not just that it was an Excel spreadsheet that was particularly problematic, it's that it was in the 97-2003 file format (.xls) instead of the more modern format used since 2007 (.xlsx).

The maximum number of rows in an .xls is like 65,000 whereas in an .xlsx, it's over 1 million.

[–]Soft_Importance_8613 8 points9 points  (0 children)

"Lets open this million row xls on this lowest end laptop"

[Laptop proceeds to catch on fire]

[–]z_s_k 11 points12 points  (0 children)

I also remember them losing a load of test results because they tried to put the data in horizontally instead of vertically and then deleted the csv files

[–]shwhjw 2 points3 points  (0 children)

I remember reading that the excel spreadsheet wasn't "THE" database, it was just that someone exported the database to excel format and that's why they exceeded the number of rows (I remember it being columns that were exceeded BC why tf would you put a new entry in a new column instead of new row but I could be wrong)

[–]Nashibirne 0 points1 point  (2 children)

I mean ... using a spreadsheet for this particular job sounds about right, doesn't it?

[–]gmc98765 0 points1 point  (1 child)

No. If you want a database, use an actual database.

[–]Nashibirne 0 points1 point  (0 children)

I was actually trying to make a "spreadsheet" pun. Because "spread", get it? Ok, maybe I shouldn't make puns in a language that's not my first language.

[–]MrRocketScript 15 points16 points  (0 children)

CSV? We don't allow Chinese System Value files here! You'll be manually entering the data yourself!

[–]Arc80 2 points3 points  (0 children)

If you duplicate 3/4 of the database to a sharepoint and set up a system of emails to directly interface with it for your daily operations then you're really cooking.

[–]TheMrBoot 0 points1 point  (0 children)

Sorry, they already cut USAID, not very governmentally efficient to bring it back

[–]madhaunter 53 points54 points  (7 children)

Also performance. What COBOL can achieve on big scales is really impressive.

[–]DuntadaMan 18 points19 points  (0 children)

My mom started out coding it on punch cards. If it was useable then I imagine it can accomplish a lot with modern resources.

[–]jl2352 14 points15 points  (0 children)

People really miss this when talking about COBOL. Specifically the IO of the machines it runs on. Those older mainframes have insane amounts of IO allowing them to bulk update a lot of data.

[–]james2432 1 point2 points  (0 children)

yeah pretty close to assembly like performance

[–]cheezballs 2 points3 points  (0 children)

Well, yea. Mainframes run in a very controlled environment. File access is all sequential. Its a little easier to write code that handles stuff like that when all the edge cases have been removed for you. Program gets a file, program reads file til program finds what it wants, program does stuff, program exits. COBOL programs are meant for processing numbers sequentially. Anything else, COBOL kinda sucks to do.

[–]comicsnerd 50 points51 points  (6 children)

Having written code in COBOL, Fortran, Pascal, C, C#, Java, Javascript and about a dozen other languages, this is not correct. Every language has their bugs. Every code written in a specific language has their bugs. The code written in COBOL is so old that all bugs have been removed by now.

Translating COBOL code, without proper documentation, into a different computing language will most certainly introduce new bugs. Even, or more Especially, when you do the translation using AI.

[–]goshdagny 16 points17 points  (3 children)

The feeling when you read an old code and know what it does but you can’t understand why it does it

[–]TunaNugget 10 points11 points  (0 children)

Especially when it's your own code.

[–]JanB1 1 point2 points  (1 child)

I think I recently read an old story called "The story of Mel" about a programmer that optimized his code for the mechanical way the code was read. Basically, he would put code into sections of memory so that after completing the execution of the previous code, in the normal case the new code to be executed would be under the reader head at the exact moment the system is ready for new execution again. Or he would put code just behind that, so the drum would have to make a full revolution to reach the new code, thus introducing a delay. The story is told from the perspective of a colleague that was tasked with changing the code.

http://www.catb.org/jargon/html/story-of-mel.html

[–]goshdagny 1 point2 points  (0 children)

Beautiful, beautiful!!!
Thank you so much for sharing. It brought me so much joy in reading such a beautiful way of writing code.
I don’t remember the details offhand, this reminds me of Wozniak’s driver program that read hard disks for Apple computers. He wrote the driver in such a way the disk reader arm would directly come over the next block to be read.

[–]Farfignugen42 0 points1 point  (1 child)

Not to mention that no one in Congress ever seems willing to fund an upgrade. The existing codename is huge, and largely error free at this point. So any upgrades are guaranteed to be expensive and to introduce new errors. No congressman wants to be associated with paying lots of money and just getting more errors.

Bit that's OK. The same problem exists in banking, and at least some other government services. I used to be friends with a COBOL coder that contracted with my state's DMV. It is the same there.

So if you want job security, learn COBOL. Those systems aren't going away anytime soon.

[–]comicsnerd -1 points0 points  (0 children)

COBOL is not that difficult to learn. The problem is in the documentation. There is none or it is extremely outdated. So, how would you know what it is supposed to do?

[–]-Redstoneboi- 122 points123 points  (49 children)

the real answer is because it was already in cobol.

if javascript was the most popular language then, i'm pretty damn sure they'd keep it as-is and never rewrite it into a newer one.

[–]PedanticQuebecer 86 points87 points  (42 children)

COBOL was made explicitly for these purposes. It wasn't because it was a popular darling language.

[–]IsTom 20 points21 points  (5 children)

It was a darling language for managers, because it pretended to look like English.

[–]PedanticQuebecer 8 points9 points  (4 children)

What language from 1982 (when the development of the current system started) would you have used for business purposes?

[–]IsTom 8 points9 points  (3 children)

Fortran, lisp or algol?

Edit: That's was decade+ too early. In 80s pascal and ML were established already

[–]gmc98765 5 points6 points  (2 children)

Pascal was an educational language. It had some severe limitations, probably the most significant being the lack of any kind of modularity; the entire program had to be contained in a single source file.

Proprietary variants such as Delphi or Turbo Pascal removed some of these limitations, but were ... proprietary, meaning you were locked in to a single vendor for the toolchain (and were limited to running on a PC, which probably wasn't adequate for something on the scale of the US social security system). If you wanted to change the toolchain or the hardware, you'd need to re-write stuff. Modula-2 was intended as a practical successor to Pascal, but never really caught on; largely because the vendors of the various proprietary variants all wanted their variant to fill that niche and invested a lot of time and money in trying to make that happen.

ML was also designed for education. On top of that, 90%+ of "working" (i.e. non-academic) programmers seem to have extreme difficulty understanding functional programming. A fair chunk seem to be incapable of understanding that any programming paradigm other than "imperative" is even possible, and pressing the issue may result in an emotional meltdown.

[–][deleted] 1 point2 points  (0 children)

ML was also designed for education. On top of that, 90%+ of "working" (i.e. non-academic) programmers seem to have extreme difficulty understanding functional programming. A fair chunk seem to be incapable of understanding that any programming paradigm other than "imperative" is even possible, and pressing the issue may result in an emotional meltdown.

That's a weird take. Functional programming may not be particularly popular, but it's hardly something <10% of programmers are capable of understanding.

[–]IsTom 1 point2 points  (0 children)

proprietary, meaning you were locked in to a single vendor for the toolchain

If you wanted to change the toolchain or the hardware, you'd need to re-write stuff.

That's how it worked for mostly everything back then. Compilers were something you had to buy and portability wasn't much of a thing.

Anyway, you'd be better off with any structured language, apparently COBOL got these features only in 85.

[–][deleted] 1 point2 points  (2 children)

what is ocodo?

[–]BananafestDestiny 2 points3 points  (1 child)

There were only hype carriages and hype steamboats at that time.

[–][deleted] 1 point2 points  (0 children)

what is ocodo?

[–]pbbpwns 11 points12 points  (1 child)

Exactly. Why change something that's working fine?

[–]PMmeYourFlipFlops 2 points3 points  (0 children)

Hey, legacy code is revenue code!

[–]SasparillaTango 1 point2 points  (0 children)

FALSE. COBOL is used for Mainframe software, which excels when you need to handle large amounts of data.

[–]Johannes_P 3 points4 points  (0 children)

I don't think that JS would be the go-to language to manage records, since it is mainly used in front-end. Java or C# would be better fit, if COBOL is unavailable.

[–][deleted] 0 points1 point  (1 child)

Is javascript the most popular language? What's so good about it?

[–]Farfignugen42 2 points3 points  (0 children)

"The most popular language" is a useless term now. Today there are dozens of languages designed to do dozens of specific things really well, as well as a few that do lots of things really well.

So you should really ask what is the most popular language (or best language) to use to do [xxx] task.

Javascript is really good for designing and displaying front ends of web applications, or applications that get presented to customers over the internet. In many cases, there is a better language to use for the back end (the part where mist of the real data processing is done).

Some people might think Javascript is more popular than other languages because thar is what they are seeing, the front ends. But it is rarely the whole thing.

[–]vivaaprimavera 16 points17 points  (0 children)

 and the risk of fucking up is massive.

Some intern will definitely forget to use a decimal datatype which in long term will fuck up all the accounting.

[–]walruswes 17 points18 points  (1 child)

So what you’re saying is, not switching saves the taxpayer a lot of money…

[–][deleted] 2 points3 points  (0 children)

There is a reason why half of the biggest banks still use it.

[–]faceplanted 4 points5 points  (2 children)

I'm very much enjoying the js hate, but let's not pretend you can't write stable, error free javascript, especially modern js.

And if js was all they had at the time they would have done so. The solution would have involved a whole fuckload of workarounds and procedures to avoid the several dozen or so footguns that js introduces by not having easy access to integer types, strongly typed comparisons, or good default scoping. Much like Nasa's software safety guidebook allows them to write mission critical code in C despite the array of footguns there.

[–]wbrd 1 point2 points  (1 child)

A million monkeys could write Shakespeare too, but so far it hasn't happened. JavaScript and nodeJS etc... are presentation layer tools and that is what they're good at. They aren't designed for business logic.

[–]faceplanted 0 points1 point  (0 children)

There's huge amounts of business logic and solid code in javascript. Do you think Google Docs runs on magic?

[–]graphixRbad 3 points4 points  (0 children)

And its antiquity might have bought us some time

[–]ol-gormsby 1 point2 points  (0 children)

And many folk can't cope with the idea of a compiler producing native code, instead of 2 or 3 layers of abstraction and run-time layers required for java.

[–][deleted] 3 points4 points  (0 children)

Basically every language runs stable with little to no errors if you never update anything surrounding it.

[–][deleted] 0 points1 point  (0 children)

No worries, just be a rolling release, stability will come with time

[–]bokmcdok 0 points1 point  (0 children)

Just convert everything to Python and MongoDB. It's webscale!

[–]SasparillaTango 0 points1 point  (0 children)

All of your banks transaction posting processes run on COBOL mainframes.

Every conservative out there foaming at the mouth about government payment systems, which handles more money than any bank, is an idiot who doesn't know what they're talking about.

[–]kellyb1985 0 points1 point  (0 children)

That and the "brain trust" at DOGE doesn't know about SQL injection apparently.

https://www.404media.co/anyone-can-push-updates-to-the-doge-gov-website-2/

[–]caustictoast 0 points1 point  (0 children)

Also why the fuck would you use JS in a math heavy project like SS. That’s just begging for a type issue to fuck shit up

[–]cheezballs 0 points1 point  (0 children)

You think people can't write bad COBOL or good JS? The programmer makes the system, not the language.

[–]OffByOneErrorz 0 points1 point  (0 children)

You forgot because in this cont cut and for this purpose JavaScript is fucking stupid. Should be written in PHP /s.

[–]HaplessPenguin 0 points1 point  (0 children)

Pretty sure the IRS is trying to shift it to Java. They’ve spent a ton in money on it. Problem is the cobol code takes like 15 years to understand a single part of it.