Live data from Hacker News

How to effectively write quality code with AI

heidenstedt.org

61–70 of 321 posts

Re: How to effectively write quality code with AI

#61

Earlier quoted context omitted.

Oh I'm well aware of this. I admitted defeat in a way.. I can't compete. I'm just at loss, and unless LLM stall and break for some reason (ai bubble, enshittification..) I don't see a future for me in "software" in a few years.

Yep, its a rather depressing realization isnt it. Oh well, life moves on i suppose. I think we realistically have a few years of runway left though. Adoption is always slow outside of the far right of the bell curve.

i'm sorry if I pulled everybody down .. but it's been many months since gemini and claude became solid tools, and regularly i have this strong gut feeling. i tried reevaluating my perception of my work, goals, value .. but i keep going back to nope.

Re: How to effectively write quality code with AI

#63
post #55

Remember having to write detailed specs before coding? Then folks realized it was faster and easier to skip the specs and write the code? So now are we back to where we were? One of the problems with writing detailed specs is it means you understand the problem, but often the problem is not understand - but you learn to understand it through coding and testing. So where are we now?

Astronaut 1, AI-assisted developers: You mean, it's critical to plan and spec out what you want to write before you start in on code?

Astronaut 2, Tim Bryce: Always has been...

Re: How to effectively write quality code with AI

#64
post #9

Too bad that software developers are carrying water for those who hate them and mock them for being obsolete in 6-12 months, while they are eating caviar (probably evading sanctions) and clink the champagne glasses in Davos: https://xcancel.com/hamptonism/status/2019434933178306971 And all that after stealing everyone's output.

Underground Resistance Aims To Sabotage AI With Poisoned Data https://news.ycombinator.com/item?id=46827777

Textile workers sabotage mechanical looms. History repeats itself.

Re: How to effectively write quality code with AI

#65

> Use strict linting and formatting rules to ensure code quality and consistency. This will help you and your AI to find issues early. I've always advocated for using a linter and consistent formatting. But now I'm not so sure. What's the point? If nobody is going to bother reading the code anymore I feel like linting does not matter. I think in 10 years a software application will be very obfuscated implementation c…

That's the opposite. I've never read and re-read code more than i do today. The new hires generate 50 more code than they use to, and you _have_ to check it or have compounding production issues (been there, done that). And the errors can now be anywhere, when before you more or less knew what the person writing code is thinking and can understand why some errors are made. LLMs errors could hide _anywhere_, so you have to check it all.

Re: How to effectively write quality code with AI

#66

That sounds like the advice of someone who doesn't actually write high-quality code. Perhaps a better title would be "how to get something better than pure slop when letting a chatbot code for you" - and then it's not bad advice I suppose. I would still avoid such code if I can help it at all.

Man, you are really missing out of the biggest revolution of my life. This is the opinion of someone who has not tried to use Claude Code, in a brand new project with full permissions enabled, and with a model from the last 3 months.

Claude code is great at figuring out legacy code! I dont get the «for new systems only» idea, myself.

Re: How to effectively write quality code with AI

#67
I found an easier way that Works For Me (TM). I describe the problem to LLM and ask it to solve it step by step, but strictly in the Ask mode, not Agent. Then I copy or even type the linws to the code. If I wouldn't write the line myself, it doesn't go in, and I iterate some more.

I do allow it to write the tests (lots of typing there), but I break them manually to see how they fail. And I do think about what the tests should cover before asking LLM to tell me (it does come up with some great ideas, but it also doesn't cover all the aspects I find important).

Great tool, but it is very easy to be led astray if you are not careful.

Re: How to effectively write quality code with AI

#68
post #35

Sounds like an awful lot of work and nannying just to avoid writing code yourself. Coding used to be fun and enjoyable once...

I’m finding it to be the opposite. I used to love writing everything by hand but now Claude is giving me the ability to focus more on architecture. I like just sitting down with my coffee and thinking about the next part of my project, how I’d like it to be written and Claude just fills it in for me. It makes mistakes at times but it also finds a lot of mine that I hadn’t even realized were in my code base.

Yep, I get that some people love the act of literally typing "x = 2;" but to me coding is first and foremost problem solving. I have a problem (either truly mine or someone else's), I come up with a solution in my head and slowly implement it.

Before I also had to code it and then make sure it had no issues.

Now I can skip the coding and then just have something spit out something which I can evaluate whether I believe is a good implementation of my solution or not.

Of course, you need the skill to know good from bad but for medium to senior devs, AI is incredibly useful to get rid of the mundane task of actually writing code, while focusing on problem solving with critical review of magically generated code.

Re: How to effectively write quality code with AI

#70

Earlier quoted context omitted.

Do you think Rust will end up getting a boost from LLM adoption?

It definitely has for me! I just replied to the parent explaining why. Tl;Dr I don't mind reading rust I hate writing it and the compiler meets me in the middle.

Same here. I had to do a lot of being in the loop with Python, but with rust - compiler gives Claude all the information it may need and then it figures things out without me.

Writing rust scares me, but I can read it just fine. I've come up with super masochistic linting rules that claude isn't allowed to change and that has improved things quite a bit.

I wish there was a mature framework for frontend that can be configured to be as strict as rust.

Post reply on HN