this post was submitted on 25 Nov 2025
328 points (99.4% liked)
Programmer Humor
27506 readers
2006 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I basically fix other people shitty voice for a living (replacing it with my own shitty code), the "best" one was by a guy, I suppose he was a self taught c programmer from how he wrote code, writing a complex python program. I saw:
if a == a: (I left it there because lol)And many other things...
In another project I saw a backend running on the frontend, as in, this guy wrote the logic for a machine on the Javascript running the user interface of the screen
If we're very charitable, there's a micro-optimization w/ Python (or at least, older Python) where assigning to a local variable like this inside a method is faster than the full
self.varlookup, so you'll see it in Python's library code while setting up some loops, etc. as a small speedup. "lots of copied variables", though, is likely an anti-pattern if not in a heavily used piece of library code, imo.What's really crazy is when people write modified Python language pre-processors where:
var = varis a necessary thing (to bring thevarinto the right context for the pre-processor to recognize it; yes, I've seen this...)oh my sweet summer child.
I was once charged with maintaining an application with a median line count of 40k. The largest file was 87kLOC with 2nd place going to a 69kLOC (nice) file filled with interwoven C and inline assembly. My favorite was a 51kLOC file with a 32,621 line function.
Miracle I didn't develop alcoholism during that job.
Pretty sure there was one over 100k file at one of my old workplaces. It kept growing and growing and was the most critical file in the business. Like if that file suddenly vanished, the business would be done or shut down for at least a year, maybe two kinda thing. Re-certifying the output of that file would probably take 6 months alone.
It had a partner file, also very important, but not as, which was much smaller around 20k-25k