Live data from Hacker News

Write code like a human will maintain it

unstack.io

81–90 of 325 posts

Re: Write code like a human will maintain it

#82
post #69

[flagged]

AI is trained on a various range of code quality, including very low one. I'm paid to provide good quality code and not flood my company with more average code than it should. In my previous job, I could regularly reduce a PR code down to 10-20%% of its size because someone overlooked something or was just "overengineer" a feature. AI are such "bullshiters" that they produce more text than necessary. Code bloat was a…

blah blah blah YOU ARE GOING TO BE REPLACED

Re: Write code like a human will maintain it

#83

[flagged]

Just this morning I was trying to scrape nitter, for funsies. One hour and neither gemini nor kimi were able to write something working, despite trying selenium (or playwright), beautiful soup, and a specific library that can be used to scrape it. I eventually read the library docs and managed to build a scraper for what I wanted in a few mins. Llms are great for a lot of things, but sometimes you stumble in somethin…

gemini is a terrible model... my cat also can't scrape nitter, try using something with actual intelligence

Re: Write code like a human will maintain it

#86
post #64

I have good results with this prompt after every larger change: Now do a final code check. Is everything tidy and do the components adhere to the principle of separations-of-concerns. Is everything in an understandable and maintainable state? Do we make any assumptions that may not be true anymore? Is any code left over from previous edits or experiments that does not belong into the codebase? Is the documentation st…

good, but this is just a verbose "make no mistakes"; it'd probably make more sense to just setup a nightly cron job that loops through the prior days' work and writes some morning tasks of the same character.

The models will interpret this willynilly; but nonetheless, it's often a better than doing nothing.

Re: Write code like a human will maintain it

#87

[flagged]

It's unlikely that AI will get to the point where it makes handwritten coders redundant, and then not immediately be at the point where vibe coders are redundant too. So if you earnestly take the position that handwriting code is a "ngmi" type activity, you also need to take the position that the vibe coder (or agent- assisted-developer/loop-architect, or whatever its nom de guerre is this week) is "ngmi".

you are very smart
Post reply on HN