Hacker News new | ask | show | jobs
by written-beyond 135 days ago
You don't, and as long as you're comfortable with that you keep prompting to dig yourself out of holes.

The problem is unless your ready to waste hours prompting to get something exactly how you want it, instead of spending those few minutes doing it yourself, you start to get complacent for whatever the LLM generated for you.

IMO it feels like being a geriatric handicap, there's literally nothing you can do because of the hundreds or thousands of lines of code that's been generated already, you run into the sunk cost fallacy really fast. No matter what people say about building "hundreds of versions" you're spending time doing so much shit either prompting or spec writing that it might not feel worth getting things exactly right in case it makes you start all over again.

It's literally not as if with the LLM things are literally instantaneous, it takes upwards or 20-30 minutes to "Ralph" through all of your requirements and build.

If you start some of it yourself first and you have an idea about where things are supposed to go it really helps you in your thinking process too, just letting it vibe fully in an empty directory leads to eventual sadness.

4 comments

That's also how you get security nightmares.

The way I use LLM's is that I design main data structures, function interfaces etc. and ask LLM's to fill them. Also test cases and assertions.

This. I find bringing in the LLM when there is a good structure already in place is better. I also use it sparingly, asking it for very specific things. Write me tests for this, or create me a function that does this or that. Review this, extend that etc.
They are pretty good at "scaffold this for me" and you adapt as a second step.

That is one of the three uses I give them.

The other two are: infra scripting, which tends to be isolated: "generate a python script to deploy blabla with oarameters for blabla...". That saves time.

The third use is exploring alternative solutions, high level, not with code generation, to stimulate my thinking faster and explore solutions. A "better" and more reasoned search engine. But sometimes it also outputs incorrect information, so careful there and verify. But at least it is successful at the "drop me ideas".

For big systems, generating a lot of code that I have no idea of what I end up with, that when I get bugs is going to be more difficult to modify, understand and track (Idk even the code, bc it outputs too much of it!).

Or for designing a system from zero, code-wise is not good enough INHO.

oh, a fourth thing it does well is code review, that one yes. As long as you are the expert and can quickly discard bs feedback there is always something valuable.

And maybe finding bugs in a piece of code.

Definitely, for designing from scratch it is not reliable.

Yes, I agree on all points. Also, I keep finding new use cases all the time. So, going all poetic; part of me laments the death of my craft, and the other rejoices at the superpowers of what rises from the ashes...
This reminds me of how some famous artists would paint via their studios wherein assistants put most of the pant on the canvas, under the direction / modeled off an example, and with the signature / embellishments of the named artist.
LLMs would not be popular if "spending those few minutes doing it yourself" part was true. In actuality it can be hours, days, or weeks depending on the feature and your pickiness. Everyone acts as if they are the greatest developer and that these tools are subpar, the truth is that most developers are just average, just like most drivers are average but think of themselves as above average. All of the sudden everyone that was piecing together code off of stackoverflow with no idea how to build the damn thing is actually a someone who can understand large code bases and find bugs and write flawless code? Give me a break.

To the degree that those same people are now writing 10-100x more code...that is scary, but the doom and gloom is pretty tiring.

The SO copy-pasting is actually quite accurate. The same folks are now just blindly generating code. That's why most software in the world is shit, and will continue to be in the future. There might just be more of it.
There will most definitely be much more of it, maybe machines are doing this on purpose to increase dependency on them haha. Ultimately, wagging a finger at someone will have no outcome, allowing someone to make real mistakes while vibe coding will be a much better learning experience. Someone that drops a prod database using Claude will have a very lasting memory of that(not saying that should be the goal, critical thinking obviously matters A LOT). Cars didn't used to have seatbelts, a lot of people died, then they got seatbelts and now the world is a better place.
The problem is maintenance and understanding code in the presence of bugs.

It looks very productive at first sight but when you start to find problems it is going to be a lot of fun on a production system.

Because basically you cannot study all the output that the LLM throws line by line if what you want is speed.

Which leaves reliability compromised.

Also, sometimes LLMs throw a lot of extra and unncessary code making things more barroquw than if you had sat down and thought a bit about the problem a bit.

Yes, you can deliver faster code with LLMs, maybe. But it is going to be good enough for maintenance and bug fixing?

I am not sure at all.

I never said anything against using LLMs. You're projecting.

Any engineer worth their weight will always try to avoid adding code. Any amount of code you add to a system, whether is written by you or a all knowing AI is a liability. If you spent a majority of your work day writing code it's understandable to want to rely heavily on LLMs.

Where I'd like for people to draw a line on is not knowing at all what the X thousand lines of code are doing.

In my career, I have never been in a situation where my problems could be a solved by piecing together code from SO. When I say "spend those few minutes doing it yourself" I am specifically talking about UI, but it does apply to other situations too.

For instance, if you had to change your UI layout to something specific. You could try to collect screenshots and articulate what you need to see changed. If you weren't clear enough that cycle of prompting with the AI would waste your time, you could've just made the change yourself.

There are many instances where the latter option is going to be faster and more accurate. This would only be possible if you had some idea of your code base.

When you've let an agent take full control of your codebase you will have to sink time into understanding it. Since clearly everyone is too busy for that you get stuck in a loop, the only way to make those "last 10%" changes is *only* via the agent.

I didn't say anything about your beliefs in AI, my statement was general. You're projecting.

It is still possible to write code with AI AND educate yourself on what the codebase architecture is. Even better, you can educate yourself on good software engineering and architecture and build that into making better specs. You can understand what the code is doing by having good tests, observability, and actually seeing it work. But if you're after peeping what every character is doing, I am not going to stop you!

LLMs are not reliable to fix bugs and when they do they often introduce new ones in my experience.

In fact, humans do targetted bug fixing reasonably well and knowing they did not change the structure of other code better than LLMs currently do in my experience.

I do not find them reliable enough TBH to leave such delicate tasks in a production system in their hands.

Yeah… I wonder how you write complex software without something that looks like a spec, other than slowly. It seems like the prep work is unavoidable, and this contrarian opinion you are offering is just that.
Writing the spec is becoming the default for pet projects. Which would be a good thing if the spec wasn't also partly written by an LLM.

You can already see people running into these issues, they have a spec in mind. They work on the spec with and LLM, the spec has stuff added to it that wasn't what they were expecting.

And again, I am not against LLMs but I can be against how they're being used. You write some stuff down, maybe have the LLM scaffold some skeleton for you. You could even discuss with the LLM what classes should be named what should they do etc. just be in the process so the entire code base isn't 200% foreign to you by the time it's done.

Also I am no one's mother, everyone has freewill they can do whatever they'd like. If you don't think you have better things to do than to produce 3-5 pieces of abandonware software every weekend then good for you.