Live data from Hacker News

The hidden cost of AI coding

terriblesoftware.org

231–240 of 475 posts

Re: The hidden cost of AI coding

#231

Earlier quoted context omitted.

yeah i definitely enjoy the craft and love of writing boilerplate or manually correcting simple errors or looking up functions /s. i hate how it's even divided into "two camps", it's more like a big venn diagram.

Who write boilerplate this day? I just lift the code from the examples in the docs (especially css frameworks). And I love looking at functions docs, because after doing it a few times, you develop an holistic understanding of the library and your speed increases. Kinda like learning a foreign language. You can use an app to translate everything, or asks for the correct word when the needs arises. The latter is a bit…

Seriously, I see this claim thrown around as though everyone writes the same starting template 50 times a week. Like, if you've got a piece of "boilerplate" code you're constantly rewriting... Save It! Put it in a repo or a snippet somewhere that you can just copy-paste when you need it.

You don't need a multi-million dollar LLM to give you slightly different boilerplate snippets when you already have a text editor on your computer to save them.

Re: The hidden cost of AI coding

#232
post #157

Earlier quoted context omitted.

I don't think so.How can you be so sure it solves the 'unknown unknowns'?

Because I've used it for problems where it hallucinated some code that didn't actually exist but that was good enough to know what the right terms to search for in the docs were.

I interpreted that as you rushing to code something you should have approached with a book or a guide first.

Re: The hidden cost of AI coding

#233

I don't know man, maybe prompt most of your work, eyeball it and verify it rigorously (which if you cannot do, you should absolutely never touch an LLM!), run a script to commit and push after 3 hours and then... work on whatever code makes you happy without using an LLM? Let's stop pretending or denying it: most of us would delegate our work code to somebody else or something else if we could. Still, prompting LLMs…

> most of us would delegate our work code to somebody else or something else if we could. I saw your objections to other comments on the basis of them seemingly not having a disdainful attitude towards coding they do for work, specifically. I absolutely do have tasks, coding included, that I don't want to do, and find no joy in. If I can have my manager assign the task to someone else, great! But using an LLM isn't t…

A super necessary context here is that I barely use LLM at all still. Maybe I should have said so but I figured that too much nuance would ruin a top-level comment and mostly casually commented on a tradeoff of using or not using LLMs.

Where I use LLMs:

1. Super boring and annoying tasks. Yes, my prompts for those include various coding style instructions, requests for small clarifying comments where the goal of the code is not obvious, tests. So, no OSS license restrictions. Libraries I specify most of the times I used LLMs (and only once did I ask it to suggest a library). Logging and telemetry I add myself. So long story short, I use the LLM to show me a draft of a solution and then mercilessly refactor it to match my practices and guidelines. I don't do 50 exchanges out of laziness, no.

2. Tasks where my expertise is lacking. I recently used an LLM to help me with making a `.clone()`-heavy Rust code to become nearly zero-copy for performance reasons -- it is a code on a hot path. As much as I love Rust and I am fairly good at it (realistically I'm IMO at 7.5 / 10), all the lifetimes and zero-copy semantics I still don't know yet. A long session with an LLM after, I emerged both better educated and with a faster code. IMO a win-win.

Re: The hidden cost of AI coding

#234
post #138

Earlier quoted context omitted.

Aren't stdlib functions the ones you know by heart after a while anyways?

Not everyone works in a single language and/or deep in some singular code base.

I struggle to think how one person is supposed to interact with that many languages on a daily (or even weekly) basis.

I’ve been on projects with multiple languages, but the truly active code was done in only two. The other languages were used in completed modules where we do routine maintenance and rare alterations.

Re: The hidden cost of AI coding

#235

Earlier quoted context omitted.

I replaced "code" for "singing" to make a point. > This comment section really shows the stark divide between people who love singing and thus hate AI-assisted singing, and people who hate singing and thus love AI-assisted singing. > Honestly, I suspect the people who would prefer to have someone or something else do their singing, are probably the singers who are already outputting the worst singing right now. The p…

I love coding - but I am not very good at it. I can describe what I want in great detail, with great specificity. But I am not personally very good at turning that detailed specification into the proper syntax and incantations. AI is like jet fuel for me. It’s the translation layer between specs and code I’ve always wanted. It’s a great advisor for implementation strategies. It’s a way to try new strategies in code q…

This is really interesting to me.

Do you love coding, or do you love creating programs?

It seems like the latter given your metaphor being a microphone to make you seem like you could sing well, i.e. wanting the end state itself rather than the achievement via the process.

"wanted to sound like him" vs "wanted to sing like him"

Re: The hidden cost of AI coding

#236

I don't know man, maybe prompt most of your work, eyeball it and verify it rigorously (which if you cannot do, you should absolutely never touch an LLM!), run a script to commit and push after 3 hours and then... work on whatever code makes you happy without using an LLM? Let's stop pretending or denying it: most of us would delegate our work code to somebody else or something else if we could. Still, prompting LLMs…

I see this "prompting is an art" stuff a lot. I gave Claude a list of 10 objects and asked it to make an adjustment to all of them. It gave me 9 back. When I asked it to try again it gave me 10 but one didn't work. What's "prompt engineering" there, telling it to try again until it gets it right? I'd rather just do it right the first time.

Then don't use it? Nobody is making you.

I am also barely using LLMs at the moment. Even 10% of the time would be generous.

What I was saying is that I have tried different ways of interacting with LLMs and was happy to discover that the way I describe stuff to another senior dev actually works quite fine with an LLM. So I stuck to that.

Again, if an LLM is not up to your task, don't waste your time with it. I am not advocating for "forget everything you knew and just go ask Mr. AI". I am advocating for enabling and productivity-boosting. Some tasks I hate, for some I lack the deeper expertise, others are just verbose and require a ton of typing. If you can prompt the LLM well and vet the code yourself after (something many commenters here deliberately omit so they can happily tear down their straw man) then the LLM will be a net positive.

It's one more tool in the box. That's all there is to it really. No idea why people get so polarizing.

Re: The hidden cost of AI coding

#237

This comment section really shows the stark divide between people who love coding and thus hate AI, and people who hate coding and thus love AI. Honestly, I suspect the people who would prefer to have someone or something else do their coding, are probably the devs who are already outputting the worst code right now.

I started “coding” in 1986 in assembly on an Apple //e and by the time I graduated from college, I had experience with 4 different processor families - 65C02, 68K, PPC and x86. I spent the first 15 years of my career programming in C and C++ along with other languages.

Coding is just a means to an end - creating enough business value to convince the company I’m working for to give me money that I can exchange for food and shelter.

If AI can help me do that faster, I’m going to use it. Neither do I want to spend months procuring hardware and managing building out a server room (been there done that) when I can just submit some yaml/HCL and have it done for me in a few minutes.

Re: The hidden cost of AI coding

#238
post #118

Earlier quoted context omitted.

> That would pretty much be a life crisis, as I'd have to find and train for something else. There's inertia in the industry. It's not like what you're describing could happen in the blink of an eye. You may well be at the end of your career when this prophecy is fulfilled, if it ever comes true. I sure will be at the end of mine and I'll probably work for at least another 20 years.

The inertia argument is real, and I would compare it to the mistaken believe of some at IBM in the 1970s that SQL would be used by managers to query relational databases directly, so no programming was needed anymore. And what happened? Programmers make the queries and embed them into code that creates dashboards that managers look at. Or managers ask analysts who have to interpret the dashboards for them... It rathe…

This echoes my sentiment that LLMs are higher level programming languages. And, as every layer of abstraction, they add assumptions that may or may not fit the use case. The same way we optimize SQL queries by knowing how the database makes a query plan, we need to optimize LLM outputs, specially when the assumptions given are not ideal.

Re: The hidden cost of AI coding

#239

Earlier quoted context omitted.

> most of us would delegate our work code to somebody else or something else if we could. I saw your objections to other comments on the basis of them seemingly not having a disdainful attitude towards coding they do for work, specifically. I absolutely do have tasks, coding included, that I don't want to do, and find no joy in. If I can have my manager assign the task to someone else, great! But using an LLM isn't t…

A super necessary context here is that I barely use LLM at all still. Maybe I should have said so but I figured that too much nuance would ruin a top-level comment and mostly casually commented on a tradeoff of using or not using LLMs. Where I use LLMs: 1. Super boring and annoying tasks. Yes, my prompts for those include various coding style instructions, requests for small clarifying comments where the goal of the…

That's interesting, especially wrt the Rust example. I actually like LLMs as reference docs, I just don't trust their code as far as I can throw it.

Thanks for the follow-up!

Post reply on HN