this post was submitted on 09 Sep 2026
87 points (86.6% liked)
Programmer Humor
33153 readers
511 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
PirateSoftware doesn't use enums for whatever reason, instead he uses raw integer values with hand comments (and allegedly an Excel doc) on what is what, which is one of the reasons behind his awful code, which in turn lead to him not being able to ship his game.
Actually they're only enums if they're made in the Enümmär region of Germany, otherwise they're just sparkling integers.
Another comment on this post have declared enums outside of Rust being bad for not having tagged union capabilities.
Yeah but that's just edgelord behaviour.
You get those a lot with all kinds of programming languages, and Rust is certainly not know for having less of them.
It just it involves way more programmer socks and HRT jokes when it comes to Rust...
Reminds me of a codebase I used to work on which we had 899 variable limit and we couldn't name them, only number them. These were limitations of the language.
Each variable had to be assigned a 3 digit number but 1-100 were taken by internal stuff so only 101- 999 was allowed. So let's say you wanted to check if power was between 50 and 60 you would end up with like
#301 = 50;
#302 = 60;
#303 = powerSignal;
If #303 < #301 || #303 > #302: Display error
Continue process
Did this cursed language have a name?
It was g-code which as another commentator correctly pointed out was used to control a fanuc cnc system.
That’s… that’s so awful…
If I told you what the purpose of this system was you would be really horrified...
Please, indulge me
Basically we made devices which were surgically implanted into your body to send specific electrical signals to your spine and brain for certain medical issues. The electronics were in a metal case so your icky blood and bodily fluids didn't cause shorts. This system was to weld the metal case closed.
Sounds like someone wanted to avoid needing to recompile for the target, but was either hardware constrained on what they wanted to do or as they thought that implementing their own language was going to be easy, learned it's very much so not, and then took some stupid shortcuts
I totally haven't done that myself, nope....
It's fanuc cnc... Incredibly useful and precise but OLD! They literally still support programs from bubble tape if you need. It was basically hardware constrained initially but fixing it would break backwards compatibility which is a super selling point for them to government and long term industries.
Their controllers are mad expensive (budget version is like 30k last I checked), their support is top notch(tech typically on site within 24 hours with every possible board which may be bad so they can get you running and charge you later), they are incredibly precise and can do things other systems legally can not(a trainer I knew said "if you can move in 5 dimensions at once you can do some interesting things with nuclear energy so those require special clearance to sell"). Basically if you need them you NEED them, if you don't then you don't.
So a FANUC controller?
Did yours spin sideways or vertically?
Lol, yup. Actually it was 4 axis. And connected to a laser instead of a milling bit. The system was also in a controlled gas environment which added extra complications.