Live data from Hacker News

How I write software with LLMs

stavros.io

401–410 of 544 posts

Re: How I write software with LLMs

#401

Earlier quoted context omitted.

You did see the part about my unit, integration and scalability testing? The testing harness is what prevents the fragility. It doesn’t matter to AI whether the code is spaghetti code or not. What you said was only important when humans were maintaining the code. No human should ever be forced to look at the code behind my vibe coded internal admin portal that was created with straight Python, no frameworks, server s…

> It doesn’t matter to AI whether the code is spaghetti code or not. What you said was only important when humans were maintaining the code. In my experience using AI to work on existing systems, the AI definitely performs much better on code that humans would consider readable. You can’t really sit here talking about architecting greenfield systems with AI using methodology that didn’t exist 6 months ago while confi…

> Well you can, and most consultants do tend to do that

Yeah they do.

I'm familiar enough with the claims to feel confident there is plenty of nefarious astroturfing occurring all over the web including on HN.

Re: How I write software with LLMs

#402

> I’ll tell the LLM my main goal (which will be a very specific feature or bugfix e.g. “I want to add retries with exponential backoff to Stavrobot so that it can retry if the LLM provider is down”), and talk to it until I’m sure it understands what I want. This step takes the most time, sometimes even up to half an hour of back-and-forth until we finalize all the goals, limitations, and tradeoffs of the approach, an…

Small features or bugfixes generally take a minute or two of conversation.

Re: How I write software with LLMs

#403

> One thing I’ve noticed is that different people get wildly different results with LLMs, so I suspect there’s some element of how you’re talking to them that affects the results. It's always easier to blame the prompt and convince yourself that you have some sort of talent in how you talk to LLMs that other's don't. In my experience the differences are mostly in how the code produced by the LLM is reviewed. Develope…

I dunno, I have extensive experience reviewing code, and I still review all the AI generated code I own, and I find nothing to complain about in the vast majority of cases. I think it is based on "holding it right."

For instance, I've commented before that I tend to decompose tasks intended for AI to a level where I already know the "shape" of the code in my head, as well as what the test cases should look like. So reviewing the generated code and tests for me is pretty quick because it's almost like reading a book I've already read before, and if something is wrong it jumps out quickly. And I find things jumping out more and more infrequently.

Note that decomposing tasks means I'm doing the design and architecture, which I still don't trust the AI to do... but over the years the scope of tasks has gone up from individual functions to entire modules.

In fact, I'm getting convinced vibe coding could work now, but it still requires a great deal of skill. You have to give it the right context and sophisticated validation mechanisms that help it self-correct as well as let you validate functionality very quickly with minimal looks at the code itself.

Re: How I write software with LLMs

#404

Earlier quoted context omitted.

>If you can build things, AI coding agents will let you build faster and more for the same amount of effort. But you aren't building, your LLM is. Also, you are only thinking about ways as you, a supposed builder, will benefit from this technology. Have you considered how all previous waves of new technologies have introduced downstream effects that have muddied our societies? LLMs are not unique in this regard, and…

Would you say the general contractor for your home isn’t a builder because he didn’t install the toilets?

I think this argument would be make more sense if you were talking about an architect, or the customer.

A contractor is still very much putting the house together.

Re: How I write software with LLMs

#405

Earlier quoted context omitted.

Would you say the general contractor for your home isn’t a builder because he didn’t install the toilets?

I think this argument would be make more sense if you were talking about an architect, or the customer. A contractor is still very much putting the house together.

The general contractor is not doing the actual building as much as he is coordinating all of the specialist, making sure things run smoothly and scheduling things based on dependencies and coordinating with the customer. I’ve had two houses built from the ground up

Re: How I write software with LLMs

#406
post #309

Earlier quoted context omitted.

> Developers who have experience reviewing code are more likely to find problems immediately and complain they aren't getting great results without a lot of hand holding this makes me feel better about the amount of disdain I've been feeling about the output from these llms. sometimes it popsout exactly what I need but I can never count on it to not go offrails and require a lot of manual editing.

Exactly my experience. Sometimes it's brilliant, sometimes it produces crap, often it produces something that's a step in the right direction but requires extra work, and often it switches between these different results, producing great results at first until it gets stuck and desperately starts spewing out increasingly weird garbage. As a developer, you always have to check the code, and recognise when it's just be…

Question: are you manually making those changes to the "stupid" code? I've been having success with Claude using skills. When I see something I wouldn't do I say what I would have done, ask it for why it did it they way it did, then have it update the skills with a better plan. It's like a rubber duck and I understand it better. I have it make the code improvements. Laughing as it goes off the rails is entertaining though.

Re: How I write software with LLMs

#407

Earlier quoted context omitted.

And that’s no different than human developers

The difference is that a human is that a human can reason about their code changes to a much higher degree than an AI can. If you don't think this is true and you think we're working with AGI, why would you bother architecting anything all or building in any guard rails. Why not just feed the AI the text of the contract your working from and let it rip.

You give way too much credit to the average mid level ticket taker. And again, why do I care how the code does it as long as it meets the functional and none functional requirements?

Re: How I write software with LLMs

#408

Earlier quoted context omitted.

Yeah I figured that. You think society is going to collapse because of AI. I don't. But I do think that stupid narrative is prevalent in the media right now and the C-suite happily proclaiming they're going to lay people off and replace them with AI got the ball rolling in the first place. Now it has momentum of its own with lunatics like Eliezer Yudkowsky once again getting taken seriously. Fortunately, the other 95…

I don't think society is going to collapse because of AI because I don't think the current architectures have any chance of becoming AGI. I think that if AGI is even something we're capable of it's very far off. I think that if CEOs can replace us soon, it's because AGI got here much sooner than I predicted. And if that happens we have 2 options Mad Max and Star Trek and Mad Max is the more likely of the 2.

What's with all the catastrophic thinking then? Mad Max? Collapse of Society because 45% unemployment? I really hate people on principle but I have more faith in them looking out for their own self interest than you do apparently. Mad Max specifically requires a ridiculous amount of intact infrastructure for all the gasoline (you know gasoline goes bad in 3-6 months? Yeah didn't think so), manufacturing for all the parts for all those crazy custom build road warrior wagons, and ranches of livestock for all the leather for all the cool outfits (and with all that cow, no one needs to starve but oh the infrastructure needed to keep the cows fed).

If doom porn is your thing, try watching Threads or The Day After, especially Threads. That said, I don't think Star Trek is possible, maybe The Expanse but more likely we run out of cheap energy before we get off world.

As for the AGI, it all depends on your definition. We're already at Amazon IC1/IC2 coding performance with these agents (I speak from experience previously managing them). If we get to IC3, one person will be able to build a $1B company and run it or sell it. If you're a purist like me and insist we stick to douchebag racist Nick Bostrom's superintelligence definition of AGI, then we agree. But I expect 24/7 IC3 level engineering as a service for $200/month to be more than enough and I think that's a year or two away. And you can either prepare for that or scream how the sky is falling, your choice.

Re: How I write software with LLMs

#409

Earlier quoted context omitted.

I have never known a human that could or did write 100K lines of bug free working code without running parts of it first and testing. So humans also don’t write bug free code or tests that cover all use cases - how is that an argument that humans are better?

Not that humans can't write 100k line programs bug free or without running parts of it. An AI cannot write a 100k line program on its own without external guard rails otherwise it spins out. This has nothing to do with whether the agent is allowed to run the code itself. This is well documented. Look at what was required to allow Claude to write a "C compiler". This has nothing to do with whether it's bug free. It li…

Absolutely no one is arguing that you shouldn’t have a combination of manual and automated tests around either AI or human generated code or that you shouldn’t have a thoughtful design

Re: How I write software with LLMs

#410

Earlier quoted context omitted.

I wasn’t born into consulting in 1996. AI for coding is by definition the worse today that it will ever be. What makes you think that the complexity of the code will increase faster than the capability of the agents?

You might have maintained large systems long ago, but if you haven't done it in a while your skill atrophies. And the most important part is you haven't maintained any large systems written by AI, so stating that they will work is nonsense. I won't state that AI can't get better. AI agents might replace all of us in the future. But what I will tell you is based on my experience and reasoning I have very strong doubts…

Well seeing that Claude code was just introduced last year - it couldn’t have been that long since I didn’t code with AI.

And did I mention I got my start working in cloud consulting as a full time blue badge, RSU earning employee at a little company you might have heard of based in Seattle? So since I have worked at the second largest employee in the US, unless you have worked for Walmart - I don’t think you have worked for a larger company than I have.

Oh did I also mention that I worked at GE when it was #6 in market cap?

These were some of the business requirements we had to implement for the railroad car repair interchange management software

https://www.rmimimra.com/media/attachments/2020/12/23/indust...

You better believe we had a rigorous set of automated tests in something as highly regulated with real world consequences as the railroad transportation industry. AI would have been perfect for that because the requirements were well documented and the test coverage was extreme.

And unless your experience coding is before 1986 when I was coding in assembly language in 65C02 as a hobby, I think I might have a wee bit more than you.

I think you should probably save your “I have more experience” for someone who hasn’t been doing this professionally for 30 years for everything from startups, to large enterprises, to BigTech.

Post reply on HN