Live data from Hacker News

The highest quality codebase

gricha.dev

181–190 of 409 posts

Re: The highest quality codebase

#181
post #173
post #54

Earlier quoted context omitted.

I think we have different opinions on what's fun and what's boring!

You've really hit the crux of the problem and why so many people have differing opinions about AI coding. I also find coding more fun with AI. The reason is that my main goal is to solve a problem, or someone else's problem, in a way that is satisfying. I don't much care about the code itself anymore. I care about the thing that it does when it's done. Having said that I used to be deep into coding and back then I am…

You are hitting the nail on the head. We are not being hired to write code. We are being hired to solve problems. Code is simply the medium.

Re: The highest quality codebase

#182

Earlier quoted context omitted.

Claude is very good at unfun-but-necessary coding tasks such as writing docstrings and type hints, which is a prominent instance of "laundry and dishes" for a dev.

>writing docstrings and type hints Disagree. Claude makes the same garbage worthless comments as a Freshman CS student. Things like: // Frobbing the bazz res = util.frob(bazz); Or // If bif is True here then blorg if (bif){ blorg; } Like wow, so insightful And it will ceaselessly try to auto complete your comments with utter nonsense that is mostly grammatically correct. The most success I have had is using claude to…

I intentionally said docstrings instead of comments. Comments by default can be verbose on agents but a line in the AGENTS.md does indeed wrangle modern agents to only comment on high signal code blocks that are not tautological.

Re: The highest quality codebase

#184

Earlier quoted context omitted.

Somewhat tangential but interestingly I'd hate for Claude to make any changes with the intent of sticking to "DRY" or "Clean Code". Neither of those are things I follow, and either way design is better informed by the specific problems that need to be solved rather than by such general, prescriptive principles.

I'm not sure how to interpret someone saying they don't follow DRY. Do you meant taking it to the Zealous extreme, or do you abhor helper functions? Is this a "No True Scottsman" thing?

Not GP but I can strongly relate to it. Most of the programming I do is related to me making a game.

I follow WET principles (write everything twice at least) because the abstraction penalty is huge, both in terms of performance and design, a bad abstraction causes all subsequent content to be made much slower. Which I can't afford as a small developer.

Same with most other "clean code" principles. My codebase is ~70K LoC right now, and I can keep most of it in my head. I used to try to make more functional, more isolated and encapsulated code, but it was hard to work with and most importantly, hard to modify. I replaced most of it with global variables, shit works so much better.

I do use partial classes pretty heavily though - helps LLMs not go batshit insane from context overload whenever they try to read "the entire file".

Models sometimes try to institute these clean code practices but it almost always just makes things worse.

Re: The highest quality codebase

#185

Earlier quoted context omitted.

How do you get junior devs if your concept of the LLM is that it's "a principal engineer" that "do[es] not ask [you] any questions"? Also, I'm pretty sure junior devs can use directing a LLM to learn from mistakes faster. Let them play. Soon enough they're going to be better than all of us anyway. The same way widespread access to strong chess computers raised the bar at chess clubs.

I don't think the chess analogy grabs here. In chess, you play _against_ the chess computer. Take the same approach and let the chess computer play FOR the player and see how far he gets.

Maybe. I don't think adversarial vs not is as important as gaining experience. Ultimately both are problem solving tasks and learning instincts about which approaches work best in certain situations.

I'm probably a pretty shitty developer by HN standards but I generally have to build a prototype to fully understand and explore problem and iterate designs and LLMs have been pretty good for me as trainers for learning things I'm not familiar with. I do have a certain skill set, but the non-domain stuff can be really slow and tedious work. I can recognize "good enough" and "clean" and I think the next generation can use that model very well to be become native with how to succeed with these tools.

Let me put it this way: people don't have to be hired by the best companies to gain experience using best practices anymore.

Re: The highest quality codebase

#186
Have you tried writing into the AGENTS.md something like, "Always be on the lookout for dead code, copy-pasta, and other opportunities to optimize and trim the codebase in a sensible way."

In my experience, adding this kind of instruction to the context window causes SOTA coding models to actually undertake that kind of optimization while development carries on. You can also periodically chuck your entire codebase into Gemini-3 (with its massive context window) and ask it to write a refactoring plan; then, pass that refactoring plan back into your day-to-day coding environment such as Cursor or Codex and get it to take a few turns working away at the plan.

As with human coders, if you let them run wild "improving" things without specifically instructing them to also pay attention to bloat, bloat is precisely what you will get.

Re: The highest quality codebase

#187

Claude is really good at specific analysis, but really terrible at open-ended problems. "Hey claude, I get this error message: ", and it'll often find the root cause quicker than I could. "Hey claude, anything I could do to improve Y?", and it'll struggle beyond the basics that a linter might suggest. It suggested enthusiastically a library for and it was all " Recommended " about it, but when I pointed out that the…

>> "Hey claude, I get this error message: ", and it'll often find the root cause quicker than I could.

Back in the day, we would just do this with a search engine.

Re: The highest quality codebase

#189

Earlier quoted context omitted.

Dragging UI components into a WYSIWYG editor is Else Visual Basic and Dreamweaver would have killed software engineering in the 90s. Also, I didn't make them. A clanker did. I can see this topic brings out the claws. Honestly I used to have the same reaction, and in a large way I still hate it.

It's not bringing out claws, it's just causing certain developers to out themselves.

Outs me as what, exactly?

I'm not sure you're interacting with single claim I've made so far.

Post reply on HN