2102
the beautiful code (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] Xerxos@lemmy.ml 87 points 2 months ago

All programs can be written with on less line of code. All programs have at least one bug.

By the logical consequences of these axioms every program can be reduced to one line of code - that doesn't work.

One day AI will get there.

[-] gmtom@lemmy.world 13 points 2 months ago

All programs can be written with on less line of code. All programs have at least one bug.

The humble "Hello world" would like a word.

[-] Amberskin@europe.pub 21 points 2 months ago

Just to boast my old timer credentials.

There is an utility program in IBM’s mainframe operating system, z/OS, that has been there since the 60s.

It has just one assembly code instruction: a BR 14, which means basically ‘return’.

The first version was bugged and IBM had to issue a PTF (patch) to fix it.

[-] umbraroze@slrpnk.net 3 points 2 months ago

Reminds me of how in some old Unix system, /bin/true was a shell script.

...well, if it needs to just be a program that returns 0, that's a reasonable thing to do. An empty shell script returns 0.

Of course, since this was an old proprietary Unix system, the shell script had a giant header comment that said this is proprietary information and if you disclose this the lawyers will come at ya like a ton of bricks. ...never mind that this was a program that literally does nothing.

load more comments (2 replies)
load more comments (4 replies)
load more comments (8 replies)
this post was submitted on 27 May 2025
2102 points (99.5% liked)

Programmer Humor

25802 readers
3054 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