Live data from Hacker News

Write code like a human will maintain it

unstack.io

281–290 of 325 posts

Re: Write code like a human will maintain it

#281
post #181
post #55

Earlier quoted context omitted.

> I can do projects in 3 days what would take 6 months. The hyperbole on this keeps growing every time I see it. Soon we’ll be having people claiming they can do in 12 seconds what used to take them 17 years. What is never presented is proof. People (and programmers are no exception) are notoriously bad at estimating. We already did studies where people thought they were being faster with LLMs when they were in fact…

That one does sound like hyperbole, or maybe he just works slowly as a human? People are different. Likewise, I think they're having wildly different results. Look at how differently humans drive vehicles, and realize they're doing the same with compute. Some people probably are working at light speed, and some people are actually slower like in the study.

> Look at how differently humans drive vehicles, and realize they're doing the same with compute.

I’m not sure that comparison is evoking the image you intended. Hands down the best driver I know—the one I’m sure won’t get me car sick, won’t ever have me worrying for my safety, the most fuel efficient, the smoothest rider—is by no means the fastest but the most thoughtful and methodical.

I don’t care how fast you develop your software. Is it good? Is it carefully considered? Will it not bite me in the ass? Those are the things that matter.

Re: Write code like a human will maintain it

#282
post #54

Earlier quoted context omitted.

It’s bizarre to me that so many people feel the need to keep parroting this corporate talking point. What do you care? If you think people who eschew LLMs for coding “are not going to make it” or “are going to get left behind”¹, then let them. More opportunities for you, right? Go do your own thing. ¹ As if “moving forward” or “progress” were always a positive. It’s not. Just look at how many regulations we have to f…

they're calling this the most european comment ever

It’s both hilarious and a bit sad that you seem to believe that is in any way a meaningful dig.

Re: Write code like a human will maintain it

#283

Write yourself a /review command. That is an empty markdown file at `.claude/commands/review.md`. In it, put a checklist of things the agent should look for. When you’re ready to have your agent review the code, type `/review`. The checklist will be examined and it’ll plan out some findings to ask you if you want them fixed. Mine starts with “Enter plan mode. Examine the differences on this branch vs. main. Consider:…

> Any time I notice something in code review and have to get the agent to fix it.. I throw it on the list! My list is like 200 items now. This is a gripe I've had with AI tools for a while now. Though it's gotten somewhat better in time, but we don't really know what to expect from the tool in terms of quality. Ex. I'd expect a human engineer to probably not use a brand new assertion library for a new test when there…

My review command isn’t an AI tool, it is is a text file.

You don’t need a SaaS when you can use a text file instead.

Just be incrementally aware of and closing gaps in the list of things you care about, and make it part of your day!

Re: Write code like a human will maintain it

#284

Write yourself a /review command. That is an empty markdown file at `.claude/commands/review.md`. In it, put a checklist of things the agent should look for. When you’re ready to have your agent review the code, type `/review`. The checklist will be examined and it’ll plan out some findings to ask you if you want them fixed. Mine starts with “Enter plan mode. Examine the differences on this branch vs. main. Consider:…

> My list is like 200 items now. Know what? Agents don’t care that they just got a wall of generic feedback, they happily look into all the bullet points. Yes, yes, there has been a library of information on HN by now about how to use agents effectively. (And I'm grateful for that, because I can keep current and in the loop without feeling enslaved to the new style of development.) None of that is a reason not to do…

This technique incrementally codifies the subset of my personal definition of code quality that can be codified. I’ve found a discovery based approach is better than anticipatory, because it forces everything you spend tokens to prove its worth.

I still do code review - how else would I know what to codify! But since starting this about a year ago, I don’t review menial dumb AI mistakes anymore.

Re: Write code like a human will maintain it

#285

Write yourself a /review command. That is an empty markdown file at `.claude/commands/review.md`. In it, put a checklist of things the agent should look for. When you’re ready to have your agent review the code, type `/review`. The checklist will be examined and it’ll plan out some findings to ask you if you want them fixed. Mine starts with “Enter plan mode. Examine the differences on this branch vs. main. Consider:…

Given all the hype that LLMs have got and the valuations these AI companies are getting, I am disappointed at how even the "best" coding agents degrade over time. WTF - I need to implement a review command to guide to do its job properly. Can you imagine any other industry charging people money for a product like this ? When you are charging people money - scratching the surface cannot be an excuse.

There’s a saying for this - “don’t ship your first draft”.

Its first attempt WILL be crap. You can refine its output in the loop as a human, or let it go and then do a quality pass post-hoc.

The beauty of the latter is you can codify and automate a subset of the work, and the agent can loop until those bars are cleared then you get a higher quality work product to look at.

Re: Write code like a human will maintain it

#286

Earlier quoted context omitted.

>> AI isn’t always faster It is always faster if you don't care about quality and need to churn out code as fast as possible to close tickets.

And as time goes on?

You get promoted and let other people deal with the mess.

The truth is that no one in management cares about your perfect code, they only care about the projects you deliver, the features you push out and the meeting KPIS.. Your customers don't care about your perfect abstractions either, they just want the button to work when it's clicked.

You can always argue about maintenance, but who is going to listen? By the time it's an issue, the business is throwing money at the problem to make it go away. Heck, even major security issues are a nothing burger.. I've lost count on the number of breaches big companies have had in the last decade..

Such is the plight of our industry.

Re: Write code like a human will maintain it

#287
post #170

Crazy how many engineers in here just say they are using another prompt on top. From my experience that makes things worse. It does abstractions, but the wrong ones. It overcomments, confusing future calls of the LLM. To me building on multiple scalable systems this has been the most dangerous part of LLMs. On a good codebase it will work good, but it will maek it worse, so you keep using it, till it doesnt work and…

> I write the code myself. I find it hard to believe why so many engineers try to avoid it. Gradually over its recent booming years, software work went from one of several practical engineering refuges for curious tinkers and puzzle-addicts to a career path for financially ambitious bright people akin to finance, law, or medicine. Many people carrying a "software engineer" title now never really enjoyed that part of…

[deleted]

Re: Write code like a human will maintain it

#288

Write yourself a /review command. That is an empty markdown file at `.claude/commands/review.md`. In it, put a checklist of things the agent should look for. When you’re ready to have your agent review the code, type `/review`. The checklist will be examined and it’ll plan out some findings to ask you if you want them fixed. Mine starts with “Enter plan mode. Examine the differences on this branch vs. main. Consider:…

My experience is the more things you add to the list, the worse agents perform (I'm not exactly the first person to notice this) I actually have a pretty simple set of instructions right now and Claude still regularly messes them up. Like, my first instructions are: - Never commit to git without permission. - Never sign commit messages You know what it constantly does? Commits without permissions and signs commit mes…

> You know what it constantly does? Commits without permissions

You know what solves this? A deny rule. That’s right, you can solve it committing without permissions by.. not giving it permissions.

> it's quietly messing up on a lot of that list.

If only there was some way to know. But alas, code review won’t be invented until 50 years ago.

Re: Write code like a human will maintain it

#289

Write yourself a /review command. That is an empty markdown file at `.claude/commands/review.md`. In it, put a checklist of things the agent should look for. When you’re ready to have your agent review the code, type `/review`. The checklist will be examined and it’ll plan out some findings to ask you if you want them fixed. Mine starts with “Enter plan mode. Examine the differences on this branch vs. main. Consider:…

Just one thing A model might be able to follow 200 different instructions at the same time, while another model will choke on it

Yes and this is a really important point.

I actually have no data on how other models do - feeling very spoiled by Claude to be honest.

Would love to hear how it goes if you try it with other models!

Re: Write code like a human will maintain it

#290

Write yourself a /review command. That is an empty markdown file at `.claude/commands/review.md`. In it, put a checklist of things the agent should look for. When you’re ready to have your agent review the code, type `/review`. The checklist will be examined and it’ll plan out some findings to ask you if you want them fixed. Mine starts with “Enter plan mode. Examine the differences on this branch vs. main. Consider:…

> My list is like 200 items now Do human developers check for 200 items when they do code review? How long would that take? It's quite clear that AI code review could be better even with some error. What's easy for human to review is also easy for AI (small code base, small PRs). What's hard for AI is also hard for human, if not more. But the time cost is so different that it's almost a nobrainer to choose AI to code…

Humans pattern match against thousands upon thousands of criteria subconsciously.

AI is a different intelligence - a 200 point list shoved in its face all at once doesn’t overwhelm it. That’s only 5-10k tokens!

Bear in mind though, because I added all the items on the list I’ve seen the reasons they’re there & act as a backstop against it missing things. There’s always got to be a quality bar, it’s part of being a professional and signing your name on your work.

Post reply on HN