- N-deep loops mixed with gotos, throws, multiple returns, and mixed memory management contracts.
#include “globals.h”
// please help
The link is a proxied image link for some reason.

every programmer I’ve seen who says their code is self documenting writes dogshit code
I think we’re all just dogshit but think we’re better than the next person, it’s like driving. I’m a “comment if there’s no way to make it readable” kinda guy, I work with some “comment and don’t bother to make it readable because there’s comments” people. We all suck. I probably forget to comment on unreadable places sometimes, or overestimate readability he either doesn’t update comments so they’re out of date or the code is so gibberish that a comment didn’t help.
Ideally I guess you comment AND make it readable AND make sure the comments are up to date, but who do you think we are? Superman? And what’s the right level of commenting anyway? Probably depends on who is reading them.
Bonus frame:
The 2000 line file is one function
Oh, so you worked with my ex-coworker.
It implemented a database. Giant branching if/for loop.
That implements a ******* VM in which all of the byte code runs in, and rest of source is just byte code listings that the linker magically gathers into a working program.
What’s a hunter2 VM?
Oh, it’s only the files that have over 2k lines of code? Hell, I’ll take that over what I’m dealing with now. I’ve got multiple FUNCTIONS that are over 2k lines. >:(
Yeah, I dont see a big problem with files over 2000 lines in some cases, as long as things remain well writrej, organized, abstractd.
One piece of garbage that I’ll never touch again hae most functions this size. One was 50,000 lines! Hundreds.of lines of if/else, half of the functions passed the same 60 arguments because he didn’t understand classes or even dictionaries, etc etc. And was used heavily.
well writrej
oh dear
Lol I’m leaving it
Yeah, honestly overly splitting things up is worse sometimes, that’s how you end up in Java land. Any time you want to grok a specific function you end up down 30 abstracted code paths. Essentially need a compiler to unroll it all to actually see what it’s doing.
Java was exactly the negative use case I was thinking of. Trying to track down the flow of things for code I don’t look at regularly drives me insane.
That’s what agentic AI is for! Your OS will figure out by itself what you are doing and weave together a shambolic rococo digital house of cards that will be not just undocumented but utterly incomprehensible.
It’s fine, just get a 5GHz CPU with 48 cores, 1TB of DDR5 HBM super RAM, and maybe a few petabytes of storage (in the cloud in a flatpack Docker that runs on a VM), so that you can finally make that button blue.
Shut up and take my venture capital money! And maybe 2/3 of the whole market cap in stock options! /s
Fucken right, get your agentic AI to get in touch with my agentic AI (with wire transfer deets)
I didn’t even know we were hiring …
There are no comments in the code
At my last job, I was assigned to a project being run by a straight-out-of-college developer who felt that not only were comments unnecessary, they were actually a “code smell”, a sign of professional incompetence on the part of whoever added them. It’s an insane philosophy that could only appeal to people who have never had to take over an old codebase.
I kind of get the idea that code should be self-documenting, but at the same time, there’s so many crazy business rules that comments are basically a necessity if nothing else other than to explain why in the hell the crazed mess that provides the required functionality for the business rules exists.
Yeah some comments are not useful
# returns the value as a string return str(user.id)Some comments are
# returns the user id as a string because ZenDesk's API throws errors if it gets a number. # See ticket RA-1037 # See ZenDesk docs: https://etc/ return str(user.id)That’s typically what people who advocate for less/no comments really mean. The code should self explain “what” it does, but if the “why” isn’t obvious (i.e. confusing business logic) nobody argues that you shouldn’t comment it. That’s how I’ve worked in every company I’ve been at (and all developers around me) from 50 person start ups to >2k people. It’s really common mentality with Ruby developers
Anyone complaining about commenting should be forced to code in assembly for a while.
deleted by creator
Or, it appeals to people that have had had to take over an old codebase where the comments were all lies.
“Code never lies. Comments sometimes do.”
It’s funny, the exact same logic applies to method and variable names. There’s no compiler that ensures that a method’s name accurately describes what the method does or ensures that a variable’s name accurately describes what the variable represents. Yet nobody ever says “you shouldn’t use descriptive method and variable names because they might be misleading”. And this is hardly academic: I can’t count the number of times I’ve run into methods that no longer do what the method name implies they do.
And yet method and variable names are exactly what people mean when they talk about “self-documenting” code.
That’s fair!
I don’t know that I could have stopped myself from asking whose nephew they are and I’m just a hobbyist
I’ve been doing this for years at my current job. It has become a masterpiece of refactoring and comments. They weren’t even asking the right questions. I’m very proud of myself.
So naturally, I’m about to get fired and have the whole thing redone by AI.
I’ll get shit on for suggesting it but this is a great use case for AI: comment the code and generate some basic docs. Even if it’s wrong it’ll give you a sense of where to start looking for flows.
Problem is, you won’t know what the AI screwed up until someone breaks everything.
Those are rookie numbers. We got functions with 5000+ lines and 20 levels of indentation directly in the user-interaction event handlers :)
Well, that’s how you do it!
And if two widgets need to create the same effect, you just copy the 5000 lines around. That’s why copy-and-paste was invented.
(It really shouldn’t be necessary… but in case somebody still needs it, here’s the \s)
This is the right strategy. Storage space costs nothing these days. Why not just clone and go? That’s what I always say.
Why, you can just ‘inherit’ some code by copying a block, pasting it, then making a few small changes. No thinking, no problem.
Ok, I’m off to copy of my code folder for the next release.
Jesus i worked at exactly this kind of project once. The only other dev was also very hostile and protective of this position. He did not want me there in the slightest. Took about 6 months before we cancelled the contract since this dude was just actively harrassing me in Teams DMs on the daily and he just ignored all my concerns regarding maintainability since “he could understand the code” and i was probably just “not experienced enough”.
Don’t downplay what this does to your mental health. 5 years of workplaces like this and I’m now starting to see a therapist due to exhaustion disorder symptoms in my goddamn 20s. Take care our there!
So infuriating when you have some dickhead making themselves unfireable by intentionally convoluting the codebase and chasing out any other hire. And even worse when management bought into it and think the guy’s an actual irreplaceable genius.
Probably even believes it himself. I hate narcissists.
ARGH this triggered a bit of PTSD for me…
“We’re going to convert these COBOL applications to C#, and you need to test that the new application works exactly the same, including the same bugs as the old application.”
“Ok, where’s the specifications and test reports of the old COBOL applications?”
“They were lost to time, we don’t know where they are.”
“Ok, so how are the developers going to write the C# code?”
“They’re going to read the COBOL scripts and recreate them into C#, we advise you do the same.”Cue me spending a month trying to decypher the COBOL gobbledigook into inputs and outputs, and write testcases based on that. And after that month was up, and I had delivered my testcases, they told me that my services were no longer needed.
I had delivered my testcases, they told me that my services were no longer needed.
Gee, I wonder how all those specifications and test reports became “lost to time”…
That time I started a new job and my first task was “fix bash”…and then I discovered a multi megabyte monstrosity called “bash.sh”

omfg that’s over 1 MILLION characters 💀 💀 💀
vomit
Ngl that’s like baby levels of nasty code. The real nasty shit is the stuff with pointless abstractions and call chains that make you question your sanity. Stuff that looks like it’s only purpose was to burn the clock and show off a niche language feature. Or worse than that even is when the project you inherit has decade old dependencies that have all been forked and patched by the old team
If all I had to worry about was organization and naming I’d be over the moon
Git commits with message saying “pushing changes” and there are over 50 files with unrelated code in it.
In the past I had commit messages with change numbers from a system, that was no longer in use.
So the commit just said “CH-12345“. It is the kind of annoying, where you can’t even really be mad at someone.
I put my ticket numbers in my tickets, but i also try to describe the change too (e.g. “Fix bug where xyz happens due to zyx action”). Also, atomic commits: commit only related changes.
Yes, it takes longer to commit large changes, BUT you can easily merge the commits, and rollback only what needs to be rolled back.
“fixed issue”
“Fix for critical issue.”
Followed by an equally large set of files in a commit with just the message:
“Fixup”
And then the actual fix turns out to be mixed in with “Start sprint 57 - AutoConfiguration Refactor” which follows “Fixup”
“stuff, lol”
Stuff1, stuff2 …
Former coworkers: “oh, these two lines are the same in function x and function y. TIME TO ABSTRACT”
Such DRY
Even if the abstractions aren’t pointless, there’s a limit to how many levels of abstraction you can make sense of.
I’ve seen some projects that are very well engineered, with nice code, good comments, well named variables and functions. But, the levels of abstraction and nesting get so deep that you forget why you were digging by the time you get somewhere relevant.
What’s frustrating there is that you can’t blame someone else. It’s just a limit for how much your brain can contain.
The real nasty stuff is not code it’s in proprietary blobs which can only be edited through proprietary software. The documentation is shit (because the editor also sells training) and there are no communities (because implementation specialists think having secrets is having an edge).
My favorite was an abstract class that called 3 levels in to other classes that then called another implementation of said abstract class.
And people wonder why no one on our team ever got shit done.
And hard casting onto the wrong class because a neat function lives in there (who will detect you did that and treat you a little different because you don’t have all the resuired data in that class instance) as a “quick fix”














