this post was submitted on 20 May 2025
197 points (94.2% liked)

Programmer Humor

23402 readers
1585 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
 

who wants pasta in their computer?

you are viewing a single comment's thread
view the rest of the comments
[–] palordrolap@fedia.io 10 points 2 days ago (3 children)

For writing loops, many early BASICs had FOR/NEXT, GOTO [line] and GOSUB [line] and literally nothing else due to space constraints. This begat much spaghetti. Better BASICs had (and have) better things like WHILE and WEND, named subroutines (what a concept!) and egads, no line numbers, which did away with much of that. Unless you were trying to convert a program written for one of the hamstrung dialects anyway, then all bets are off.

Assembly style often reflects the other languages people have learned first, or else it's written to fit space constraints and then spaghettification can actually help with that. (Imagine how the creators of those BASICs crammed their dialect into an 8 or 16K ROM. And thus, like begetteth like.)

C code style follows similarly. It is barely concealed assembly anyway.

COBOL requires a certain kind of masochist to read and write. That's not spaghetti, it's Cthulhu's tentacles. Run.

[–] dosuser123456@lemmy.sdf.org 0 points 1 day ago (2 children)

i mean old c

legacy cide is always pasta

[–] palordrolap@fedia.io 2 points 1 day ago (1 children)

A lot of the original C coders are still alive or only very recently gone (retired, or the ultimate retirement, so to speak), and they carried their cramped coding style with them from those ancient and very cramped systems. Old habits die hard. And then there's a whole generation who were self-taught or learned from the original coders and there's a lot of bad habits, twisted thinking and carry-over there too.

(You should see some of my code. On second thought, it's probably best you don't.)

[–] dosuser123456@lemmy.sdf.org 1 points 1 day ago* (last edited 1 day ago)

You should see some of my code. On second thought, it’s probably best you don’t.

thats the same warning i give to anyone looking at ~/scripts. particularly ~/scripts/bas, ~/scripts/js and ~/scripts/bat_bkp (which is copy of /mnt/msdos/jp/batch)

all code in those folders is like that