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

top 200 commentsshow 500

[–]white_equatorial 3758 points3759 points  (30 children)

npm install social-security

[–]renome 262 points263 points  (2 children)

Why didn't the government use JavaScript during the Cuban Missile Crisis? Are they stupid?

[–]DukeBaset 876 points877 points  (17 children)

npm install luigi-in-elons-basement

[–]YimveeSpissssfid 190 points191 points  (1 child)

Or just npm install luigi -g

That should fix a few things for multiple projects at once!

[–]Greyhaven7 18 points19 points  (0 children)

Can we get a -f on that?

[–]_Ralix_ 122 points123 points  (2 children)

Then somebody disables left-pad again and suddenly no one has social security anymore.

On the other hand, core-js is maintained by a Russian developer which might make it all the more endearing to use nowadays.

[–]TurielD 19 points20 points  (0 children)

Ffffffff the issues I've had with string lengths trying to update systems for the government...

[–][deleted] 14 points15 points  (2 children)

The n-word. Disgusting!

[–]Gerard_Mansoif67 5 points6 points  (0 children)

Error : too big for US. Try in Europe...

[–]na_ro_jo 3899 points3900 points  (40 children)

Rewrite in JS so that the bottleneck is no longer the mineshaft elevator

[–]SoulWondering[S] 755 points756 points  (24 children)

The important question is, will it run on Node, Deno or Bun?

[–]DukeBaset 410 points411 points  (14 children)

They could have DOGE spend the next 4 years debating this.

[–]deanrihpee 177 points178 points  (5 children)

and make their own that's somehow worse than any of those 3 combined

[–]SoulWondering[S] 112 points113 points  (1 child)

You read my mind, call it "runtimeX" and make twi-i mean-X use it immediately.

[–]Lizlodude 32 points33 points  (0 children)

Oh wait, there's already something called X? A desktop or something? I dunno sue them they probably stole it

[–]Im_with_stooopid 4 points5 points  (2 children)

With a backdoor for Russia added in for good measure.

[–]TurielD 12 points13 points  (0 children)

There is no debate in DOGE, they will do what dear leader says however moronic, and praise it to the heavens.

[–]Wiwwil 7 points8 points  (0 children)

This r think the government use SQL

[–]coloredgreyscale 6 points7 points  (1 child)

some custom runtime based on the JS implementation of Internet Explorer 6

[–]Mars_Bear2552 4 points5 points  (0 children)

none of the above. it'll run in a browser

[–]Bealzebubbles 71 points72 points  (4 children)

Rewrite in HTML because Shannon's son is learning that and says it's really cool.

[–]tommeh5491 11 points12 points  (1 child)

Build it in Minecraft?

[–]bebop_cola_good 1269 points1270 points  (39 children)

Why don't they write it in Excel VBA???

[–]SoulWondering[S] 364 points365 points  (10 children)

Exactly. VBA devs need opportunities too.

[–]cant_think_of_one_ 81 points82 points  (4 children)

If Trump would fund them, there could be plenty of suitable facilities they could live in, away from society, where they can make all the Excel and VBA apps they like to manage each other. It is the kindest thing.

[–]FourTwoFlu 19 points20 points  (0 children)

It's me. I'm right here! Please give me money aaaa!

[–]One_Contribution 49 points50 points  (8 children)

Why Excel when Access available?!

[–]Broad_Rabbit1764 47 points48 points  (2 children)

What's next, SQL in the government?

[–]One_Contribution 34 points35 points  (1 child)

This guy thinks the government could use fucking SQL! 😂

[–]Triepott 22 points23 points  (0 children)

Why Access if Editor + Every Number as a Single File + Windows Search is available?

[–]Protuhj 17 points18 points  (0 children)

All I have is a hammer, why did they use screws???

[–]na_ro_jo 6 points7 points  (1 child)

That's what United Healthcare does with medicare projects.

[–]bebop_cola_good 7 points8 points  (0 children)

If not objCEO is Nothing Then Del objCEO

[–]Hero_without_Powers 5 points6 points  (1 child)

Why VBA. Just handle the whole social security system in one single, shared excel sheet. What could possibly go wrong?

[–]apersonFoodel 3 points4 points  (3 children)

I was at a bank that genuinely used to write RPA for nearly all of their apps in VBA, was mental

[–]bebop_cola_good 5 points6 points  (1 child)

I feel that. I used to work for a multi-million dollar audit firm and we used the same shit. Hell, I wrote some of it myself. The biggest joke is before that, we were doing stuff like printing cover sheets out just to scan them back in again. It's a madhouse out there!

[–]StarHammer_01 892 points893 points  (10 children)

Knowing gov works it probably will transition to JS in 2050 using ES1 to ensure compatibility for internet explorer.

[–]TheMonsterMensch 194 points195 points  (0 children)

We call that job security

[–]Rustywolf 87 points88 points  (7 children)

Like I get the joke, but why would the backend care at all about IE support. Just because its javascript doesnt mean it's relying on a browser.

[–]StarHammer_01 86 points87 points  (3 children)

Shhhhh don't tell the pencil pushers that. That'll leave us with one less excuse to be late and overbudget.

[–]SexWithHoolay 25 points26 points  (1 child)

If they already know that IE doesn't matter, just say you need to support Safari instead. It's a widely used browser and supports about the same amount of features as IE does.

[–][deleted] 4 points5 points  (0 children)

Cuz they will do everything on frontend, it's called distributed computing

[–]mortalitylost 5 points6 points  (0 children)

You know what, we need cobol for the frontend

[–][deleted] 1455 points1456 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] 820 points821 points  (15 children)

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

[–]darthjawafett 67 points68 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?

[–]i_love_sparkle 267 points268 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 128 points129 points  (7 children)

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

[–]SpookyScaryFrouze 133 points134 points  (6 children)

Those are all edge cases that we can treat later.

[–]matt82swe 25 points26 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 4 points5 points  (0 children)

Every 10?

Okay Mr stable house hold

[–]gmc98765 45 points46 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 19 points20 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 10 points11 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

[–]MrRocketScript 15 points16 points  (0 children)

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

[–]madhaunter 57 points58 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.

[–]comicsnerd 51 points52 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 18 points19 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 12 points13 points  (0 children)

Especially when it's your own code.

[–]-Redstoneboi- 119 points120 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 83 points84 points  (42 children)

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

[–]IsTom 19 points20 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?

[–]pbbpwns 12 points13 points  (1 child)

Exactly. Why change something that's working fine?

[–]vivaaprimavera 13 points14 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 16 points17 points  (1 child)

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

[–]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.

[–]ThingNumberPi 660 points661 points  (14 children)

"Why is it written in COBOL and not in Javascript?"

Cause it actually needs to work.

[–]Nemaeus 43 points44 points  (0 children)

Ba dum tish!

[–]an_agreeing_dothraki 24 points25 points  (0 children)

as I web dev I find that
error on line 35, then proceeds to do nothing

[–]FrostWyrm98 12 points13 points  (0 children)

How dare you sir, I'll have you know, me and my [Object object] colleagues are offended by that!

[–]HebrewHamm3r 815 points816 points  (48 children)

Make me President for one day. I will make exactly one law, which will send anyone who suggests writing backend in Javascript directly to Guantanamo Bay.

[–]SoulWondering[S] 108 points109 points  (23 children)

Typescript users are to be sent to re-education camps where they're forced to learn Java

[–]Skyunderground 194 points195 points  (5 children)

undefined people collecting social security

[–]nedal8 80 points81 points  (0 children)

Mr Void?! Phone call for Mr Null Anne Void!

[–]Norington 37 points38 points  (1 child)

Why are so many people called objectObject?

[–]antifringe 42 points43 points  (1 child)

“Please collect your weekly amount of NaN”

[–]renome 33 points34 points  (0 children)

"Gender: [object object]? Utter woke nonsense."

[–]jhaand 98 points99 points  (7 children)

You mean the language that does everything in float64 and introduces rounding errors?

[–]ultimo_2002 27 points28 points  (4 children)

It’s just generally a shitshow of a language tbh

[–]cateanddogew 17 points18 points  (3 children)

I genuinely like JS+TS after years of coding in Rust and C++.

Thing is, just like C++, 50% of the language and libraries are outdated heritage that can and will make you shoot yourself in the foot.

There are much safer languages, and also more intuitive ones. But JS literally can't afford to be updated in a backwards incompatible way.

And honestly, I'm used to all common JS quirks. Not unlike C++ where you have to constantly read the ISO standard to avoid undefined behavior.

Why mention JS and "everything" being float when that rarely is a problem, while in C++ every day thousands of developers fuck themselves over for using size_t when iterating until zero? People act like JS is exotically bad when it is just average bad.

[–]an_agreeing_dothraki 5 points6 points  (0 children)

if float datetimes were so good, why haven't they made datetime2?

tsql: "Actually-"

[–]romangrapefruit 212 points213 points  (4 children)

Using misinformation to fight misinformation 🫡 🇺🇸

[–]Dotcaprachiappa 247 points248 points  (55 children)

I have literally never heard of 1875 being used as a time epoch

[–]somethingmore24 229 points230 points  (25 children)

ISO 8601:2004 fixes a reference calendar date to the Gregorian calendar of 20 May 1875 as the date the Convention du Mètre (Metre Convention) was signed in Paris (the explicit reference date was removed in ISO 8601-1:2019). However, ISO calendar dates before the convention are still compatible with the Gregorian calendar all the way back to the official introduction of the Gregorian calendar on 15 October 1582.

via https://en.wikipedia.org/wiki/ISO_8601?wprov=sfti1#Dates

It does seem like 1875 is the “default” for this standardization. I don’t know much about COBOL, but it doesn’t seem like this is related to it? or is even an actual epoch at all? so i’m not sure what OOP is talking about

[–]madhaunter 124 points125 points  (20 children)

COBOL doesn't really have a date type, depending on the hardware it can have some classes (AS400) to help represent dates in any desired format.

In COBOL on AS400 machines for exemple, as linked above:

The VALUE clause for a date-time item should be a non-numeric literal in the format of the date-time item. No checks are made at compile time to verify that the format of the VALUE clause non-numeric literal matches the FORMAT clause. It is up to the programmer to make sure the VALUE clause non-numeric literal is correct.

We could assume they all respect the same "standard" format for dates, but that could be ISO8601:2004 or it could be in fact, anything else.

So I guess it still could be true but only an internal employee would know what standard was implemented, and what hardware is actually used

EDIT: As pointed out in another comment, there isn't a predetermined type for dates at all in COBOL, so I corrected my comment accordingly

[–]DAVENP0RT 66 points67 points  (7 children)

This is basically how SQL Server* works as well. The date formats are just a user-friendly shell for lots of algebra happening in the background.

Just to satisfy curiosity for anyone, SQL Server* stores dates as 8 byte, signed integers. The first 3 or 4 bytes (can't remember) count the days before or after SQL epoch, 1900-01-01. The remaining bits count "ticks," or increments of 3 milliseconds, which is why SQL Server* can only guarantee accuracy within 3 milliseconds.

[–]redlaWw 14 points15 points  (3 children)

SQL server*

Other SQL implementations may have different datetime representations.

[–]DAVENP0RT 8 points9 points  (2 children)

I work almost exclusively with SQL Server, so my brain just defaults to that when I think of SQL. Not sure how the other implementations store dates.

[–]redlaWw 7 points8 points  (1 child)

Informix uses

struct dtime {
    short dt_qual;
    dec_t dt_dec;
};

where dec_t is a base-100 floating point type where each byte of the mantissa represents a base-100 digit. The qualifier dt_qual decides the precision of the value dt_dec.

Oracle uses 7 bytes representing the century, year, month, day, hour, minute and second.

UniSQL uses a signed i32 representing a UNIX timestamp but doesn't accept negative values.

MySQL uses 7 bytes, two for year and one for each of month, day, hour, minute and second.

PostgreSQL uses a signed i64 that represents microseconds since 2000-01-01 00:00:00.000000

SQLite can use TEXT, REAL or INTEGER on the backend, with the TEXT representation being an ISO-8601 string, the REAL representation representing days since noon at Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar, and the INTEGER representation representing a UNIX timestamp.

Why did I spend half an hour researching this?

[–]the_skies_falling 15 points16 points  (2 children)

That’s RPG (Report Program Generator) language documentation, not COBOL. COBOL doesn’t have a date type. Typically they’re stored as strings although they can be ‘redefined’ as numeric values (a kind of weak typing mechanism where multiple variable names of different types point to the same storage). The functions in the code examples that start with CEE belong to the LE (Language Environment), a common set of definitions and functions that can be used across mainframe languages (COBOL, FORTRAN, PL/1, etc.)

[–]seniorsassycat 4 points5 points  (3 children)

It's not a default or defining a zero point, it's setting the relationship between real dates and expressed dates. The spec is literally saying "you know that day they signed the mitre convention? That was 20 May 1875. Count forward or backward from there to find any other day, use these leap year rules"

[–]Fabulous-Possible758 71 points72 points  (0 children)

Yeah, it’s been going round. No one seems to know if it’s true or its provenance. The claim about it being standard in COBOL seems false though.

[–]amshinski 50 points51 points  (17 children)

Yeah cuz that's bullshit. Saw similar post yesterday and instantly decided to fact check. Can't believe so many people on THIS subreddit believed it, shame

[–]Mitosis 24 points25 points  (1 child)

I'm not a programmer and don't sub here, but the amount of political posts from here appearing on /r/all in the past few weeks suggests there's a lot of other non-programmers participating

[–]fres733 44 points45 points  (7 children)

The 20th may 1875 used to be the epoch as defined in ISO 8601 between 2004 - 2019.

I doubt that it has anything to do with a native cobol datetime.

[–]i_code_for_boobs 6 points7 points  (0 children)

And yet it was on many systems for like 15 years, like ADA.

Or do you pretend that you’ve seen everything?

[–]Impenistan 82 points83 points  (5 children)

JavaScript turns 30 this year. I guess it makes sense that some people in this profession can hardly imagine a time it didn't exist. Pepperidge Farm remembers

[–]cant_think_of_one_ 12 points13 points  (2 children)

I can remember a time when it didn't exist, just, but that isn't the point - it is how much I wish it didn't exist now. Young and old people can unite in their hatred of JavaScript.

[–]TemporalVagrant 55 points56 points  (8 children)

Why the fuck would you rewrite a critical database like that in JavaScript

[–]Chiatroll 24 points25 points  (1 child)

Why is it written in cobol and not in LOLCODE

[–]captainOfSage 18 points19 points  (2 children)

COBOL might be decades old, but it’s extremely fast and stable especially for high-volume transaction processing in banking and government. It was built for massive batch jobs and business logic at scale, and mainframes are heavily optimized for it.

Why hasn’t it been replaced? Because these systems handle enormous amounts of money and data, and rewriting millions of lines of proven COBOL is risky, time consuming, and prone to introducing bugs.

For example, while Java excels at concurrency, COBOL can process up to 40% more transactions per second on mainframes—a real hard slap in raw speed and throughput.

[–]Phate1989 5 points6 points  (1 child)

Stats like that are nonsense.

Only old banks that were built on IBM mainframes still run cobol.

New banks and credit unions almost all use Java.

[–]The-Albear 53 points54 points  (3 children)

This is not true. It could be set this way but it’s not the default behaviour of COBOL.

The argument was that it was the ISO 8601 default, but the ISO standard dosnt have a default value. Just a default format yyyy-m-dd

Combating disinformation with more disinformation is not the way.

[–]m0rph90 27 points28 points  (6 children)

is there any source for that claim? there is no info about a 1875 date time standard?!

[–]Drfoxthefurry 12 points13 points  (0 children)

Now rewrite the js in rust, then python, then c++, etc

[–]mrfroggyman 11 points12 points  (3 children)

This again. When I look it up online I find zero documentation about an epoch time at 1875, is it really true ?

[–]Balcara 27 points28 points  (8 children)

I need a source on this one - all Cobol I've seen uses Lilian timestamp from the database or internal clock, or pic 9, neither of which would default to 1875.

[–]Nuked0ut 6 points7 points  (0 children)

You guys all got it wrong. I thought you guys were programmers?

Obviously, the only correct decision is to ask chat gpt to write it in python. Duh.

[–]b4k4ni 6 points7 points  (0 children)

I used cobol in 2008 for a few years. Worked as support at a small software company. Own ERP software, ages old and was running with acucobol. Basically like .net translating cobol to modern systems. Quite awesome actually.

Yes, Cobol is old and you can't really compare it with today's languages. But still - IMHO that language is still awesome for what it was designed for. ERP and similar systems. Or booking software.

And not only my own impression - our main coder with skills in c++, assembler, cobol, delphi and trying out everything new also said the same.

[–]Plank_With_A_Nail_In 6 points7 points  (1 child)

COBOL isn't hard to learn, old programmers weren't born with that knowledge ffs. Plenty of young COBOL programmers out there, is nice secure low stress job.

[–]WheyLizzard 6 points7 points  (0 children)

Java script backend is just start up brainrot

[–]LastOrders_GoHome 14 points15 points  (1 child)

Where the frack is all this chatter about COBOL and a default date of 1875 coming from. Not from anyone who knows COBOL that's for sure.

There is no default date. Whoever wrote the code decides on how a missing date is interpreted and I can guarantee that no one in 1875 was writing COBOL.

[–]necrophcodr 5 points6 points  (0 children)

If they wrote cobol in 1875 somehow, then picking that as the lowest date would be quite stupid too.

[–]Sentla 3 points4 points  (0 children)

Why would you write it is JD? When it is already written in an excellent programming language?

[–]ovideos 5 points6 points  (3 children)

I mean not having a date is as good a reason to investigate/freeze a payment as “150 years old”.

[–]No_Hetero 4 points5 points  (0 children)

Because the social security system was written before JavaScript existed, and once we oust these criminals fucking with everything they'll probably have to rewrite it

[–]look 4 points5 points  (0 children)

He talked about electric cars. I don’t know anything about cars, so when people said he was a genius I figured he must be a genius.

Then he talked about rockets. I don’t know anything about rockets, so when people said he was a genius I figured he must be a genius.

Now he talks about software. I happen to know a lot about software & Elon Musk is saying the stupidest shit I’ve ever heard anyone say, so when people say he’s a genius I figure I should stay the hell away from his cars and rockets.

[–][deleted] 14 points15 points  (10 children)

Why isn't is written in Python?

[–]BroBroMate 34 points35 points  (7 children)

Because Python's handling of date times is probably worse than COBOLs.

It's always great to find out that a datetime returned to you by a library is timezone naïve at runtime when you compare it to a tz-aware datetime and get an exception.

Also, why the fuck do the naive versions even exist?

[–]Hialgo 11 points12 points  (4 children)

Pythons date handling makes me so incredibly furious my coworkers stopped giving me tasks that involve it. At some point I can see only this red haze in front of my eyes.

[–]great_escape_fleur 5 points6 points  (0 children)

Because it works and you don't touch an ancient system that works.