6 ms·
I've yet to use an LLM for coding, so let me ask you a question. The other day I had to write some presumably boring serialization code, and I thought, hmm, I
by pron 1y ago
I've yet to use an LLM for coding, so let me ask you a question.
The other day I had to write some presumably boring serialization code, and I thought, hmm, I could probably describe the approach I want to take faster than writing the code, so it would be great if an LLM could generate it for me. But as I was coding I realised that while my approach was sound and achievable, it hit a non-trivial challenge that required a rather advanced solution. An inexperienced intern would have probably not been able to come up with the solution without further guidance, but they would have definitely noticed the problem, described it to me, and asked me what to do.
Are we at a stage where an LLM (assuming it doesn't find the solution on its own, which is ok) would come back to me and say, listen, I've tried your approach but I've run into this particular difficulty, can you advise me what to do, or would it just write incorrect code that I would then have to carefully read and realise what the challenge is myself?
- raddan 1y agoI don’t know if a blanket answer is possible. I had the experience yesterday of asking for a simplification of a working (a computational geometry problem, to a first approximation) algorithm that I wrote. ChatGPT responded with what looked like a rather clever simplification that seemed to rely on some number theory hack I did not understand, so I asked it to explain it to me. It proceeded to demonstrate to itself that it was actually wrong, then it came up with two alternative algorithms that it also concluded were wrong, before deciding that my own algorithm was best. Then it proceeded to rewrite my program using the original flawed algorithm. I later worked out a simpler version myself, on paper. It was kind of a waste of time. I tend not to ask for solutions from whole cloth anymore. It’s much better at giving me small in-context examples of API use, or finding handy functions in libraries, or pointing out corner cases.
- pjerem 1y agoYou really can’t compare free "check my algorithm" ChatGPT with $200/month "generate a working product" Claude Code. I’m not saying Claude Code is perfect or is the panacea but those are really different products with orders of magnitude of difference in capabilities.
- OJFord 1y agoClaude 4? Or is Claude Code really so much better than say Aider also using Claude 4?
- sulam 1y agoThe scaffolding and system prompting around Claude 4 is really, really good. More importantly it’s advanced a lot in the last two months. I would definitely not make assumptions that things are equal without testing.
- phist_mcgee 1y agoIt's both Claude 4 Opus and the secret sauce that Claude Code has for UX (as well as Claude.md files for project/system rules and context) that is the killer I think. The describe, build, test cycle is very tight and produces consistently high quality results. Aider feels a little clunky in comparison, which is understandable for a free product.
- mwigdahl 1y agoYes. The tooling harness of Claude Code is really good, and Claude 4 is well-optimized for it. The combination is very powerful.
- Aeolun 1y agoI think it’s also very nice that CC uses fancy search and replace for it’s edit actions. No waiting hours for the editor to scan over a completely regenerated file.
- 0x457 1y agoThat's pretty much impossible comparison to make. Workflow between two is very different, aider has way more toggles. I can tell you that Aider using sonnet-4 started Node.js library in otherwise rust project given the same prompt as claud code that did finish the task.
- esperent 1y agoI think there's two different cases here that need to be treated carefully when working with AI: 1. Using a well know but complex algorithm that I don't remember fully. AI will know it and integrate it into my existing code faster (often much, much faster) than I could, and then I can review and confirm it's correct 2. Developing a new algorithm or at least novel application of an existing one, or using a complex algorithm in an unusual way. The AI will need a lot of guidance here, and often I'll regret asking it in the first place. I haven't used Claude Code, however every time I've criticized AI in the past, there's always someone who will say "this tool released in the last month totally fixes everything!"... And so far they haven't been correct. But the tools are getting better, so maybe this time it's true. $200 a month is a big ask though, completely out of reach for most people on earth (students, hobbyists, people from developing countries where it's close to a monthly wage) so I hope it doesn't become normalized.
- somenameforme 1y ago> I haven't used Claude Code, however every time I've criticized AI in the past, there's always someone who will say "this tool released in the last month totally fixes everything!"... And so far they haven't been correct. But the tools are getting better, so maybe this time it's true. The cascading error problem means this will probably never be true. Because LLMs are fundamentally guess the next token based on the previous tokens, whenever it gets a single token wrong - future tokens become even more likely to be wrong which snowballs to absurdity. Extreme hallucination issues can probably eventually be resolved by giving it access to a compiler and, where appropriate, you could also probably feed it test cases, but I don't think the cascading errors will ever be able to be resolved. The best case scenario will eventually it being able to say 'I don't know how to achieve this.' Of course then you ruin the mystique of LLMs which think they can solve any problem.
- HeatrayEnjoyer 1y agoIt obviously can be resolved, otherwise we wouldn't be able to self-correct our own selves. When is unknown, but not the if.
- dumah 1y agoYou can embed these requirements into conventions that systematically constrain the solutions you request from the LLM. I’ve requested a solution from Sonnet that included multiple iterative reviews to validate the solution and it did successfully detect errors in the first round and fix them. You really should try this stuff for yourself - today! You are a highly experienced engineer and ideally positioned to benefit from the technology.
- keeda 1y agoThis would be a great experiment to run, especially since many frontier models are available for free (ChatGPT doesn't even require a sign-up!) I'd be very curious to find out how it does. In any case, treat AI-generated code like any other code (even yours!) -- review it well, and insist on tests if you suspect any non-obvious edge cases.
- tezza 1y agoShort answer: Not yet Longer answer: It can do an okay job if you prompt it certain specific ways. I write a blog https://generative-ai.review https://generative-ai.review and some of my posts walk through the exact prompts I used and the output is there for you to see right in the browser[1]. Take a look for some hand holding advice. I personally tackle AI helpers as an 'external' internal voice. The voice that you have yourself inside your own head when you're assessing a situation. This internal dialogue doesn't get it right every time and neither does the external version (LLM). I've had very poor results with One Stop Shop builders like Bolt and Lovable, and even did a survey yesterday here on HN on who had magically gotten them to work[2]. The response was tepid. My suggestion is paste your HN comment into the tool OpenAI/Gemini/Claude etc, and prefix "A little bit about me", then after your comment ask the original coding portion. The tool will naturally adopt the approach you are asking for, within limits. [1] https://generative-ai.review/2025/05/vibe-coding-my-way-to-egyptology-2025-05/ https://generative-ai.review/2025/05/vibe-coding-my-way-to-e... - a 3D scene of ancient pyramid construction . [2] https://news.ycombinator.com/item?id=44513404 https://news.ycombinator.com/item?id=44513404 - Q: Has anyone on HN built anything meaningful with Lovable/Bolt? Something that works as intended?
- zaptrem 1y agoI find it helps me hit these moments faster since I can watch it go and cut it off when I realize the issue.
- 0x457 1y agoUsually it boils down these questions (this is given you have some sorts of AGENTS.md file): - is this code that been written many times already? - Is there a way to verify the solution? (think unit test, it has to be something agent can do on its own) - Does the starting context has enough information for it to start going in the right direction? (I had claud and openhands instantly digging themselves holes, and then I realized there was zero context about the project) - Is there anything remotely similar already done in the project? > Are we at a stage where an LLM (assuming it doesn't find the solution on its own, which is ok) would come back to me and say, listen, I've tried your approach but I've run into this particular difficulty, can you advise me what to do, or would it just write incorrect code that I would then have to carefully read and realise what the challenge is myself? I've had LLM telling me it couldn't do and offered me some alternative solutions. Some of them are useful and working; some of them are useful, but you have a better one; Some feel like they made by a non-technical guy at a purely engineering meetings.
- alwillis 1y agoAre we at a stage where an LLM (assuming it doesn't find the solution on its own, which is ok) would come back to me and say, listen, I've tried your approach but I've run into this particular difficulty, can you advise me what to do, or would it just write incorrect code that I would then have to carefully read and realise what the challenge is myself? Short answer: Maybe. You can tell Claude Code under what conditions it should check in with you. Having tests it can run to verify if the code it wrote works helps a lot; in some cases, if a unit test fails, Claude can go back and fix the error on its own. Providing an example (where it makes sense) also helps a lot. Anthropic has good documentation on helpful prompting techniques [1]. [1]: https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/claude-4-best-practices https://docs.anthropic.com/en/docs/build-with-claude/prompt-...
- panza 1y agoI have tried and failed to get any LLM to "tell me if you don't have a solution". There may be a way to prompt it, but I've not discovered it. It will always give you a confident answer.
- viraptor 1y agoIt always has a solution. A more effective approach is "Start by asking clarifying questions until the task is completely defined".
- pron 1y agoBut the questions I'm interested in cannot be asked until the programmer starts to code. It's not that the task is unclear, but that coding reveals important subtleties.
- viraptor 1y agoYou're thinking about it like a human programmer. It may or may not find that part tricky. There will be subtleties it will solve without even mentioning and there will be other stuff it fails on miserably. You improve the chances by asking to ask questions. But again - just try it. Try it on exactly the thing you've already described and see how it goes.
- fivestones 1y agoThis, exactly
- rozap 1y agoIt would write incorrect code and then you'd need to go debug it, and then you would have to come to the same conclusion that you would have come to had you written it in the first place, only the process would have been deeply frustrating and would feel more like stumbling around in the dark rather than thinking your way through a problem and truly understanding the domain. In the instance of getting claude to fix code, many times he'll vomit out code on top of the existing stuff, or delete load bearing pieces to fix that particular bug but introduce 5 new ones, or any number of other first-day-on-the-job-intern level approaches. The case where claude is great is when I have a clear picture of what I need, and it's entirely self contained. Real life example, I'm building a tool for sending CAN bus telemetry from a car that we race. It has a dashboard configuration UI, and there is a program that runs in the car that is a flutter application that displays widgets on the dash, which more or less mirror the widgets you can see on the laptop which has web implementations. These widgets have a simple, well defined interface, and they are entirely self contained and decoupled from everything else. It has been a huge time saver to say "claude, build a flutter or react widget that renders like X" and it just bangs out a bunch of rote, fiddly code that would have been a pain to do all at once. Like, all the SVG paths, paints, and pixel fiddling is just done, and I can adjust it by hand as I need. Big help there. But for the code that spans multiple layers of abstraction, or multiple layers of the stack, forget about it.
- tptacek 1y agoI'm like 60% there with you: * When it gets the design wrong, trying to talk through straightening the design out is frustrating and often not productive. * I've learned to re-prompt rather than trying to salvage a prompt response that's complicatedly not what I want. * Exception: when it misses functional requirements, you can usually get a session to add the things it's missing.
- pron 1y agoHere's the thing, though. When working with a human programmer, I'm not interested in their code and I certainly don't want to see it, let alone carefully review it (at least not in the early stages, when the design is likely to change 3 or 4 times and the code rewritten); I assume their code will eventually be fine. What I want from a programmer is the insight about the more subtle details of the problem that can only be gained by coding. I want them to tell me what details I missed when I described an approach. In other words, I'm interested in their description of the problems they run into. I want their follow-up questions. Do coding assistants ask good questions yet?
- sixothree 1y agoThe question is really - while this LLM is working, what can you get a second and a third LLM to do? What can you be doing during that time. If your project has only one task that can be completed, then yeah. Maybe doing it yourself is just as fast. Related to correctness, if the property in question was commented and documented it might pick up that it was special. It's going to be checking references, data types, usages and all that for sure. If it's a case of one piece having a different need that fits within the confines of the programming language, I think the answer is almost certainly. And honestly, the only way to find out is to try it.
- viraptor 1y agoYou won't know until you try. Maybe it will one shot the task. Maybe not. There's not nearly enough context to tell you one way or another. Learning about prompting techniques will affect your results a lot though.
- deleted 1y ago[deleted]
- benreesman 1y agoIf you combine models/agents with formal systems, you can get them to come back when they're in a corner today: https://gist.github.com/b7r6/b2c6c827784d4e723097387f3d7e1d8b https://gist.github.com/b7r6/b2c6c827784d4e723097387f3d7e1d8... This interaction is interesting (in my opinion) for a few reasons, but mostly to me it's interesting in that the formal system is like a third participant in the conversation, and that causes all the roles to skew around: it can be faster to have the compiler output in another tab, and give direct edit instructions: do such on line X, such on line Y, such on line Z than to do anything else (either go do the edits yourself or try to have it figure out the invariant violation). I'm basically convinced at this point that AI-centric coding only makes sense in high-formality systems, at which it becomes wildly useful. It's almost like an analogy to the Girard-Reynolds isomorphism: if you start with a reasonable domain model and a mean-ass pile of property tests, you can get these things to grind away until it's perfect.
- econ 1y agoI don't really use the llms but I do enjoy pasting chunks of my code into free models with the question: what is wrong with this? That way it hs no context from writing it itself nor does it try to improve anything. It just makes up reasons why it could be wrong. It goes after the unusual parts it would seem which answers the question reasonably. Perhaps more sophisticated models will find less obvious flaws if that is the only thing you ask.
- com2kid 1y ago> Are we at a stage where an LLM (assuming it doesn't find the solution on its own, which is ok) would come back to me and say, listen, I've tried your approach but I've run into this particular difficulty, Not really. What you would do is ask the model to work through the implementation step by step with you, and you'd come across the problem together. I've seen Claude Code run in endless circles before, consuming lots of tokens and money, bouncing back and forth between two incorrect approaches to a problem. If you work with Claude though, it is super powerful. "Read these API docks and get a scaffolding set up, then write unit tests to ensure everything is installed correctly and the basic use case works, then ask me for further instructions."
- spoaceman7777 1y agoDepends whether you asked it to just write the code, or whether you asked it to evaluate the strategy, and write the code if nothing is ambiguous. My default prompt asks the model to provide three approaches to every request, and I pick the one that seems best. Models just follow directions, and the latest do it quite well, though each does have a different default level of agreeability and penchant for overdelivering on requests. (Thus the need to learn a model a bit and tweak it to match what you prefer.) Overall though, I doubt a current SotA LLM would have much of an issue with understanding your request, and considering the nuances, assuming you provided it with your preferred approach to solving problems (considering ambiguities, and explicitly asking follow up questions for more information if it considers it necessary-- something that I also request in my default prompt). In the end, what you get out is a product of what you put in. And using these tools is a non-trivial process that takes practice. The better people get with these tools, the better the results.
- qingcharles 1y agoA lot of the time you see in its "Thinking" it will say things like "The user asked me to create X, but that isn't possible due to Y, or would be less than ideal, so I will present the user with a more fitting solution." Most of the time, with the latest models, in my experience the AI picks up what I am doing wrong and pushes me in the right direction. This is with the new models (o3, C4, Grok4 etc). The older non-thinking ones did not do this.
- pron 1y agoIn my case, there is no wrong or impossible direction, just a technical detail that you realise you must overcome when you start to code and that I doubt the model will be able to solve on its own. What it should do is start coding, realise the difficulty, and then ask me how to solve it. Do those agents do that kind of thing yet? Mind you, I'm not interested in the code, only in the question that writing the code would allow a programmer to ask.
- csomar 1y agoIt depends on the problem but Claude sometimes does. You need do need an alternative prompt where you make him suspicious to explore other paths. Here is an article I wrote a while back: https://omarabid.com/gpt3-now https://omarabid.com/gpt3-now GPT 4.5 was able to detect a Rust ownership issue, something which requires "ahead of time" thinking.
- oc1 1y agoNo, we're not at this stage. This is exactly the reason why so many of us say that this tools are dangerous in the hands of inexperienced developers. Claude Code will usually try to please you instead of challenging your thoughts. It will also say it did x when in reality it did something slightly else.
- dockercompost 1y agoDo you have proof on that last statement?
- oc1 1y agoWell, i worked +300 hours with Claude Code, and this also a pretty common experience by many others, not just me.