Bonus frame:
The 2000 line file is one function
I didn’t even know we were hiring …
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
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)
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)
Allow me to introduce a shit ton of jQuery into all the jsp files you got.
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.
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.
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.”
I don’t know that I could have stopped myself from asking whose nephew they are and I’m just a hobbyist
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
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.
I can live without documentation and comments, but then you’ve got to write really well-structured, self-documenting code. Which means long variable names (or better: local constants) that describe exactly what’s in them, and function names that describe clearly what the function is for, and readable code that shows what it does.
But perhaps expecting that kind of discipline from people who lack the discipline to write documentation, was not entirely realistic.
This is the dram. Since the entire codebase is shit, you basically have to rewrite it basically in its entirety.
Which means you can do it with an actual good design.
And if you mess up on something, you have a working version you can consult.
A few years ago I had to port a tool from HTBasic (a proprietary BASIC dialect) to Python. The original source only runs in their proprietary IDE. Of course, no comments whatsoever and a lot of GOTO magic and matrice calculations some of which have no other purpose as to confuse the reader. The variables had only cryptic and meaningless three digit letters. My theory is that they intentionally wrote it in a way that it would be a nightmare to reverse engineer. And they succeeded.
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
Fork the repo.
Ask an LLM to rename all the variables and add comments and docstrings. Give it your style guide (assuming you have one).
Ask another LLM to check their work.
Done.
Disclaimer: I’m not a programmer, I’m a network engineer who dabbles in automation and scripting. But it seems to me that grunt work like this is what LLMs are really good for.
Also I only use short variable names inside of loops (for i in iterable…). Is that not how it should be done?
i and I are acceptable in small loops. But it depends a lot on the language used. If you’re in C or bash maybe it’s fine. But if you’re in a higher level language like C# you usually have built on functions for iterating over something.
For example you have a list of movies you want to get the rating from, instead of doing
for (i = 0; i < movies.length; i++) var movie = movies[i] ....Its often more readable to do
movies.forEach { movie -> var rating = movie.rating .... }Also if you work with tables it can be very helpful to name your iteration variables as row and column.
It’s all about making it readable, understandable, and correct. There’s no point having comments if you forget to update them when you change the code. And you better make sure the AI comments on the 2000 lines of three letter variables is correct!
Yeah I script more than anything…python, bash, powershell, etc.
Only terrible code I inherit is the stuff I wrote >=3 months ago. I’ll keep saying that three months from now, too.
In Go, the recommended convention for variable name length is to be proportional to their scope. It is common to use one or few letters long variables if they are local to a few lines loop or a short function.
“Documenting the code base will be your first task for the next month to help show us how well you understand the codebase.”
Translation: please help us understand our codebase. We’re paralyzed by fear.






