this post was submitted on 22 Oct 2026
961 points (98.6% liked)

Programmer Humor

33774 readers
2973 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 3 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] merc@sh.itjust.works 6 points 1 day ago

C: You build a horse. Well, it's not really a horse, but it can do almost all the essential horse-things. It's incredibly fast and compact. Oh, and now someone else owns it.

[–] GreenKnight23@lemmy.world 4 points 1 day ago

ruby: you built a horse that builds a horse to build your horse. your barn is too small. it crashes. everyone is dead.

[–] yukichigai@kbin.earth 121 points 2 days ago (1 children)

When I first saw this comic I was a relatively new COBOL programmer. It felt accurate.

I am now my employer's senior COBOL dev. It still feels accurate.

[–] Madagaskar_sky@lemmy.world 17 points 2 days ago (4 children)

What's the biggest hurdle to porting old systems written in COBOL to newer languages? Besides the glaring conflict of interest for you.

[–] Fmstrat@lemmy.world 49 points 2 days ago

Hahaha port. Get a load of this person thinking COBOL is being ported! I bet they like the number 4.

[–] yukichigai@kbin.earth 11 points 2 days ago

Mostly it's two things:

  1. COBOL is very good at some specific things that other languages can't do as well. Not that other languages do them badly, not at all, but COBOL is absurdly efficient for certain operations. You need to do basic math operations on millions of rows of data every minute? COBOL can do that easily. Many other languages can get close to that speed - maybe a few seconds off - but COBOL is often used in environments where a hundred millisecond delay can mean everything breaks. Are there other languages which can match that speed? Absolutely. Are they any of the languages every company wants to upgrade to? No.

  2. COBOL's best practices are sometimes the literal opposite of what every other language expects, especially when it comes to optimizing code for efficiency. You ever seen Evaluate, COBOL's equivalent of a switch statement? Rather than being used to Evaluate a variable to check its values, its most commonly used to "EVALUATE TRUE" and then use the WHEN clauses (basically case statements) to check statements or variables that you want to be true. That can be converted to another language directly, yes, but it absolutely will not be efficient best-practices code. Most likely you're going to need someone - not an AI, not an automated process - to do one-off rewrites to keep the code performance the same. As it is I have never seen any automated tool (LLM or otherwise) convert COBOL without falling victim to this issue.

There's also a third issue in that COBOL has some specific minor capabilities that other languages just do NOT, or not to the level of flexibility and efficiency COBOL has. The most common one is COBOL's "88" picture type (variable) definitions. Think of it like being able to set an automatic evaluation on a variable that returns true if the condition is met, e.g. the variable "05 WS-ERROR-STAT PIC X." with an 88 of "88 FATAL-ERROR VALUE 'F'." would mean you could check "FATAL-ERROR" anywhere in your code to see if the value of WS-ERROR-STAT has been set to "F". The thing is, this is done basically for free (resource wise) as part of allocation, and furthermore it can be used to get or set, i.e. "SET FATAL-ERROR TO TRUE" will change the value of WS-ERROR-STAT to "F". You can also use 88s for ranges, e.g. "88 ANY-ERROR VALUES 'F' THRU 'N'.", though you can't use them for set operations that way.

Bottom line: there's nothing that perfectly recreates its efficiency, the specific way it performs efficiently, and some of its more esoteric capabilities. Anything still running COBOL probably depends HEAVILY on one or all of these things.

[–] Lyrl@lemmy.dbzer0.com 21 points 2 days ago

I think just the size of the projects. My employer has had a team of ten-ish people working full time on porting a piece of our COBOL program (the full thing was deemed not possible to port to a single modern application, so it's getting split up) for about a year now. I was peripherally involved in four rounds of increasingly integrated testing environments. Go live was yesterday. They rolled it back three hours in.

It's hard for a company to invest multiple people's salaries for many years on reworking software that currently mostly works.

[–] WhyJiffie@sh.itjust.works 6 points 2 days ago

the cobol system was already tested for years or decades, important bugs are already fixed, it's other quirks have became part of the workflow for people using it, and for other systems interacting with it, some of them likely also cobol. if you write a new system, it has to work the exact same way. same features, same bugs, same everything. but realistically it will have brand new bugs, it will miss some functions and do some others differently enough that it sometimes causes problems, and nobody knows why.

[–] Diplomjodler3@lemmy.world 52 points 2 days ago (3 children)

Python:

from horses import Horse 

my_horse = Horse(color="brown")

There. Done.

[–] marcos@lemmy.world 47 points 2 days ago (4 children)

horses was last released in 2024, and can only run on python up to 3.12.

horses depends on iron-making, that is up to date. That means the current version of iron-making depends on python >= 3.14, and that all the versions prior to 2025 were taken offline due to a CVE where if you run the library as root in a web backend that uses the make_nail function, people can open your barn doors without authorization when inside it.

[–] nibbler@discuss.tchncs.de 1 points 1 day ago

I'm really having trouble recognizing if @marcos@lemmy.world started talking ~~bull~~horeseshit, or if the post by @Diplomjodler@lemmy.world is the first to be just trolling...

[–] anewfox@lemmy.zip 17 points 2 days ago

and also the most recent horses release on pypi includes a crypto miner and credential stealer.

I cannot up vote this enough.

load more comments (1 replies)
[–] surewhynotlem@lemmy.world 46 points 2 days ago (3 children)

You built a horse in Python. There's too much space between you and the horse so it dies.

[–] Diplomjodler3@lemmy.world 12 points 2 days ago

I'll just instantiate a new one.

load more comments (2 replies)
load more comments (1 replies)
[–] Null42x86@lemmy.world 6 points 1 day ago

you could say that it aged well

[–] OwOarchist@pawb.social 66 points 2 days ago (5 children)

Needs a python horse in there.

Probably something about "why build a horse when you can just import horse from field?"

[–] MoffKalast@lemmy.world 37 points 2 days ago (1 children)

"The horse turns out perfectly average, but boy it can't run"

[–] Diplomjodler3@lemmy.world 13 points 2 days ago (1 children)

But it still gets there faster than all the other horses on account of how easy it was to implement.

[–] Axolotl_cpp@lemmy.dbzer0.com 16 points 2 days ago (1 children)

Sadly, it gets so long to go from point A from B that you wish you made the horse in something else...

[–] Neverclear@lemmy.dbzer0.com 2 points 1 day ago

It was so easy to make the first horse that you decide your field is big enough for three more horses, but somehow the second horse says it needs three more pastures to function properly.

[–] fxdave@lemmy.ml 15 points 2 days ago

But it's built 10 years ago using conda so the installation process is more complicated than building a new horse.

[–] muhyb@programming.dev 19 points 2 days ago
load more comments (2 replies)
[–] gnuplusmatt@reddthat.com 10 points 2 days ago (2 children)
[–] ulterno@programming.dev 0 points 12 hours ago

It is perfect and will run for a million years.
Dodges all traps and jumps over all ditches whether you see them or not.
But you are already too old to ride it.

[–] muhyb@programming.dev 11 points 2 days ago
[–] DreadPirateShawn@lemmy.blahaj.zone 65 points 2 days ago (1 children)

The LISP parentheses are not equally balanced. There are more ( than ).

[–] muhyb@programming.dev 41 points 2 days ago (1 children)
[–] sneezycat@sopuli.xyz 48 points 2 days ago (1 children)

)))))) There, the horse is contained now.

[–] caseyweederman@lemmy.ca 11 points 2 days ago (1 children)

You thought so, but there was a teleporter

[–] sneezycat@sopuli.xyz 13 points 2 days ago
[–] ohshit604@lemmy.halstead.host 7 points 2 days ago (2 children)

As a non-programmer, TIL Java and JavaScript are two different languages.

[–] BCsven@lemmy.ca 11 points 1 day ago

Person1: I built a script in Java.

Person2: So Javascript?

Person 1: NO!

[–] Nowtayneicangetinto@thelemmy.club 8 points 1 day ago (1 children)

When JS was being developed, Java was all the rage and it merely was riding it's coattails. At the time of its creation it was nothing like Java either.

[–] GreenKnight23@lemmy.world 4 points 1 day ago

the only thing they have in common is how insufferable it is to develop with them.

[–] dasrael@lemmy.zip 10 points 2 days ago (1 children)

This is no time for joking around......I just wanna know if I can turn my webserver back on yet?! Hello?!? Anyone?!

[–] NotAnOtter@lemmus.org 16 points 2 days ago* (last edited 2 days ago)

If you keep it off, it's significantly harder to get hacked.

Until your hosting service gets pwned..

[–] GardenGeek@europe.pub 16 points 2 days ago (5 children)
[–] Axolotl_cpp@lemmy.dbzer0.com 25 points 2 days ago (2 children)

This might be a client issue, eg: when images are too big, Thunder pixelate 'em

load more comments (2 replies)
[–] MehBlah@lemmy.world 8 points 2 days ago

Looks big enough to me.

[–] muhyb@programming.dev 9 points 2 days ago (7 children)

Well, this is the original as it gets, direct from the source.

load more comments (7 replies)
load more comments (2 replies)
[–] j_z@feddit.nu 5 points 2 days ago (1 children)

Is it a dig against C# only being good when using it from F#, i.e. OCaml for .Net or am I overthinking this?

[–] ElDuderino@lemmus.org 2 points 1 day ago

I don't know. I thought it was a dig with certain C# dev products trying to mimic how other technologies behave, like WebForms.

[–] tetris11@feddit.uk 11 points 2 days ago* (last edited 2 days ago)

The Fixed Point Expression / Y Combinator expressed in horses:

    Y = (λ f. (λ x. f(xx))(λ x. f(xx)))
    ;; so then, give Y a horse argument with apple parameters:
    Y🐎️ = (λ f. (λ 🍎.  f(🍎🍎)) (λ 🍎. f(🍎🍎))) 🐎️   ;; [1]
        =       (λ 🍎. 🐎️(🍎🍎)) (λ 🍎. 🐎️(🍎🍎))      ;; [2]
        = 🐎️(   (λ 🍎. 🐎️(🍎🍎)) (λ 🍎. 🐎️(🍎🍎))   )  ;; [3]
        = 🐎️(Y🐎️)                                       ;; [4]

Explanation

  • 1: x is 🍎, but could be anything. It's just a function parameter nested within another.
  • 2: λf gets executed and vanishes from the left, substituting f internally with 🐎️. This is now a new function, with left group as the function body, and right group as the function argument, despite being identical.
  • 3: λ🍎 gets executed and vanishes from the left, substituting 🍎 with (λ 🍎. 🐎️(🍎🍎))
  • 4: Everything within the main brackets at [3] has been seen before at [1], but with f being 🐎. Thus we have bred a new horse. We can breed infinite horses this way
[–] Tja@programming.dev 7 points 2 days ago (1 children)

Ctrl-F "rust" - > 0 matches

I sense a pertubance in the force

[–] Afaithfulnihilist@lemmy.dbzer0.com 13 points 2 days ago (1 children)

Well duh, Ctrl f doesn't work on pictures!

load more comments (1 replies)
[–] somegeek@programming.dev 12 points 2 days ago (1 children)

But notice that lisp was the only one where you actually built a horse.

[–] MonkderVierte@lemmy.zip 10 points 2 days ago* (last edited 2 days ago)

Also assembly. And the dangling parts.

load more comments
view more: next ›