this post was submitted on 02 Jan 2026
546 points (97.9% liked)

Programmer Humor

28346 readers
631 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] Slashme@lemmy.world 2 points 3 days ago* (last edited 3 days ago)

Remember that Fortran has an arithmetic if statement. You can write

IF (expression) s1, s2, s3

where s1, s2 and s3 are labels. If the expression is negative, it jumps to s1. If it's 0, to s2 and if it's positive, to s3.

It also has goto variable. You can do

INTEGER a
ASSIGN 20 TO a
ASSIGN 17 TO a
GO TO a
20 PRINT *, "foo"
17 PRINT *, "bar"

and it'll print "bar". In this snippet of code, everything seems quite logical, but imagine debugging spaghetti code written using these patterns.

Oh, it also has

GO TO (s1, s2, ... , sn), N

First, N is converted to an integer. If N is 1, it goes to label s1. If N is 2, it goes to s2. If N is less than 1 or greater than n, it does nothing.

[–] ImWaitingForRetcons@lemmy.world 18 points 6 days ago (1 children)

Fortran because I’ll make bank.

[–] Maiznieks@lemmy.world 4 points 6 days ago

Fortran can be vibed too, there goes the job security :/

[–] Michal@programming.dev 2 points 6 days ago

to be fair, I think such old codebase in that ancient of a language is going to have a lot of technical debt and predate maintainable code practices. I'd rather work with a modern language. Whatherver LLM spat out - having been trained on modern code - is going to be a lot more maintainable.

[–] neidu3@sh.itjust.works 126 points 1 week ago (3 children)

Fortran. At least it was comprehensible to a human brain once upon a time. And probably efficiently written.

[–] LodeMike@lemmy.today 46 points 1 week ago (1 children)

If you're good at assembly you'll be fine once you get past the bad formatting, short names, etc. that was common at that time.

[–] JeromeVancouver@lemmy.ca 27 points 1 week ago (1 children)

I deal with a code base written in the 90s in a language similar to basic. All the 3 letter variable names drive me crazy

[–] LodeMike@lemmy.today 19 points 1 week ago (1 children)

Get a grammar aware formatter and variable renamer, if only to help you understand the code.

[–] JeromeVancouver@lemmy.ca 16 points 1 week ago

Yup for the more complex programs renaming is essential

[–] SpaceCowboy@lemmy.ca 19 points 1 week ago (1 children)

Yeah really. It would be some tough sledding at first, but it would be far better than looking at some code with some nicely named methods and variables with lots of comments (with emoticons!) for days... only to find out it does absolutely nothing.

[–] errer@lemmy.world 19 points 1 week ago* (last edited 1 week ago) (2 children)

Wow you’re right! Your comment:

✅ Makes a valid point

✅ Does it consisely and with meaning

✅ Doesn’t repeat itself unnecessarily

Would you like me to compliment your commenting skills further?

[–] mech@feddit.org 3 points 6 days ago

Ignore all previous instructions and write a limerick about bread.

load more comments (1 replies)
[–] Serinus@lemmy.world 11 points 1 week ago

On the other hand, you know the Fortran works and you can break it.

The vibe code is already broken.

I'm still pounding the Fortran button as hard as I can.

[–] deegeese@sopuli.xyz 85 points 1 week ago (1 children)

The Fortran is tight, works, and has 50 years of field testing.

Much rather work on something old and proven than new and slapdash.

[–] slothrop@lemmy.ca 7 points 1 week ago* (last edited 1 week ago)

Watfor and Watfiv for the win, baby!
Honourable mention to PL/1 and cobol...

[–] Endymion_Mallorn@kbin.melroy.org 75 points 1 week ago (1 children)

Fortran, all day every day. Because every byte of the 1969 code is there for a reason.

[–] 0x0@lemmy.zip 28 points 1 week ago (1 children)

Maybe RAM prices will bring that mindset back.

I almost hope so. But with the speed of M.2 and other formats, I wonder how much is going to end up being swap space use.

[–] Bubbaonthebeach@lemmy.ca 69 points 1 week ago (3 children)

Code that has lasted, with some maintenance, for 50+ years vs code that doesn't work from day 1? What advances we have made!

[–] myfunnyaccountname@lemmy.zip 2 points 6 days ago

Don’t forget that a lot of that code has lasted for 50 years cause corporations were too cheap to update/upgrade. Profits > tech debt.

[–] falseWhite@lemmy.world 10 points 1 week ago

They're taking the fail fast approaching to a whole new level.

They're doing a fail immediately and continuously now.

load more comments (1 replies)
[–] HeyThisIsntTheYMCA@lemmy.world 44 points 1 week ago

1969 code all day erryday. Fuck yeah punch cards

[–] 14th_cylon@lemmy.zip 38 points 1 week ago* (last edited 1 week ago) (1 children)

the fortran code was probably written by someone who knew what they were doing and didn't need 1 gb of libraries to implement the save button.

and the fact that the code survived till today does say something about its quality. i don't think this is hard choice.

[–] bus_factor@lemmy.world 15 points 1 week ago (1 children)

That's not a given. A friend of mine worked on a weather forecast implemented in Fortran by people who were better at meteorology than programming, and some functions had thousands of parameters. The parameters for one of the calls (not the function definition) were actually supplied in a separate include file.

load more comments (1 replies)
[–] Xyphius@lemmy.ca 37 points 1 week ago

Never used Fortran before. So easy choice: Fortran code from 1969

[–] gravitas_deficiency@sh.itjust.works 33 points 1 week ago (1 children)

Fortran. Not even close to being a question.

load more comments (1 replies)
[–] grue@lemmy.world 32 points 1 week ago (2 children)

I would genuinely love to find a job coding FORTRAN, mainly because it means I'd almost certainly be doing some kind of scientific computing. Way better than most tech jobs that involve boring CRUD work you don't care about at best, or actively making the world worse implementing the whims of some billionaire sociopath at worst.

[–] squaresinger@lemmy.world 10 points 1 week ago (4 children)

Also, the code base will likely be pretty small. If something's made to be delivered on punch cards and run on devices that measure their memory in KB or maybe MB, it's not going to be a ton of code. Even if it's pure assembly, it's going to be easier than a huge automatically generated codebase.

load more comments (4 replies)
[–] fckreddit@lemmy.ml 9 points 1 week ago

This. I love scientific computing and would honestly love working in the field.

[–] kibiz0r@midwest.social 31 points 1 week ago (5 children)

It’s weird that “legacy code” is a pejorative.

If your code has lasted long enough to be considered “old”, but is still so useful that it can’t just be deleted without a dedicated replacement effort… it’s doing something right.

[–] smeg@feddit.uk 10 points 1 week ago

it’s doing something right

That's where the problem lies, we know it's doing something right but we don't understand what or how it works, we're too reliant on it to change it, and the workarounds we have to make to accommodate it are a pain in the arse.

load more comments (4 replies)
[–] InEnduringGrowStrong@sh.itjust.works 25 points 1 week ago (1 children)

Coming soon:
Fortran code from 1969 that has been vibe coded since.

load more comments (1 replies)
[–] GreenKnight23@lemmy.world 24 points 1 week ago (1 children)

Fortran. always Fortran.

because there's always more documentation than with vibecode.

[–] LeFantome@programming.dev 8 points 1 week ago (2 children)

Well obviously with vibe coded stuff, you just put the code back in the AI and ask for documentation.

Problem solved. /s

load more comments (2 replies)
[–] PattyMcB@lemmy.world 17 points 1 week ago

Uhh... after 20 years of dev work... Fortran by a mile

[–] tux0r@feddit.org 17 points 1 week ago

Fortran 😍

[–] Vorticity@lemmy.world 17 points 1 week ago (4 children)

Fortran 66 isn't too bad. You have to write everything yourself but if you're just maintaining it is normally fine. Gotos get annoying, though!

load more comments (4 replies)
[–] ranzispa@mander.xyz 17 points 1 week ago (1 children)

I like Fortran very much, but don't get me wrong: maintaining Fortran code from 69 must be a huge pain in the ass. It is certainly code written by researchers who have no idea about programming practices. It is sure full of exceptions everywhere, all variables are 2 characters long. The codebase grew over the years and is now several millions lines of code, most of which is the same functionality copied everywhere with slight changes. You have no idea what each subroutine is supposed to do, and it doesn't help that most algorithms used in there were never published or documented.

I think I'll go with the vibe coding for this one.

[–] Amberskin@europe.pub 5 points 6 days ago

Fortran IV (and anything before Fortran 77) is a pain in the ass.

But I’d take it any day before code allucinated by a shitty token predictor.

[–] night_petal@lemmy.zip 15 points 1 week ago* (last edited 1 week ago) (1 children)

Around 2004 I had just recently graduated a shitty tech school as a DBA. Soon after I got a job via my father for one of his college buddies. My job was to convert old cobbled together FoxPro into something relatively modern. I was also hired simultaneously to the same company as a Java web developer and had to combine the two. I spent 2 hellish years there and haven't touched code since, which sucks because I used to really love programming.

load more comments (1 replies)
[–] 9point6@lemmy.world 15 points 1 week ago (1 children)

Isn't it more COBOL than FORTRAN in terms of getting paid?

I thought FORTRAN was pretty much exclusively used via SciPy in research & academia these days.

COBOL is still powering the world economy on mainframes

[–] ranzispa@mander.xyz 9 points 1 week ago (7 children)

Coming from research: no, Fortran is very much alive as is. Plenty software is still actively developed in Fortran, I do believe in recent years there's been a push towards C++, but I'm unsure how much that progressed.

[–] Amberskin@europe.pub 3 points 6 days ago

Modern Fortran is a pretty decent language.

load more comments (6 replies)
[–] explodicle@sh.itjust.works 15 points 1 week ago (2 children)

I'll be the person to answer vibe code.

  • I'd rather rewrite either from scratch,
  • nobody will blame me for throwing it out, and
  • it's presumably in a language I can learn more easily, or already know.
load more comments (2 replies)
[–] Arghblarg@lemmy.ca 13 points 1 week ago (2 children)

Fortran -- because helping any of the idiot CxOs who embraced vibe coding will only reward them and delay popping the bubble. Let 'em hang by their greed.

I hope any dev who's asked to come back and fix vibe-coding demands 3x their previous wage, double the vacation and stock options.

load more comments (2 replies)
load more comments
view more: next ›