6 ms·
Using AI for Coding: My Journey with Cline and LLMs
- ivoras 2y agoI did a similar thing but with backend-heavy code, and I agree with this assessment: > In particular, I asked ChatGPT to write a function by knowing precisely how I would have implemented it. This is crucial since without knowing the expected result and what every line does, I might end up with a wrong implementation. In my eyes, it makes the whole idea of AI coding moot. If I need to explain every step in detail - and it does not "understand" what it's doing; I can virtually the statistical trial-and-error behind its action - then what's the point? I might as well write it all myself and be a bit more sure the code ends up how I like it. link: https://www.linkedin.com/feed/update/urn:li:activity:7289241001691377664/ https://www.linkedin.com/feed/update/urn:li:activity:7289241...
- doug_durham 2y agoBecause as op pointed out it's faster. It has ready access to the correct usage of different libraries.
- WD-42 2y agoSo does the language features of basically any modern editor.
- rfw300 2y agoNot really - there's a difference between having the docstring of a function available for you to read, and a model which has learned from thousands of examples how to use a particular API and integrate it into a larger set of instructions. The latter is vastly faster and takes much less human work than the former.
- girvo 2y agoExcept when it consistently gets said particular API wrong. I was using it to do basic graphql-yoga setup with R1 and then Claude Sonnet 3.5 and they both output incorrect usage, and got stuck in a loop trying to fix it. If it can’t do something that basic and that common using a language and toolset with that much training data, then I’m pessimistic personally. I’m yet to see Copilot be useful for any of my juniors when we pair, it gets in the way far more than it helps and it is ruining their deeper understanding, it seems. I’ll continue trying to use these tools, but I swear you’re overselling their abilities even still.
- simonw 2y agoThe way to fix that is to find an example of correct usage of that API and paste that example in at the start of the prompt. This technique can reliably make any good LLM fluent in an API that it's never seen in its training data.
- throwup238 2y agoAt this point with Cursor you can have it index the online docs by giving it a base URL and have it automatically RAG the relevant content into the chat (using the @ symbol to reference the docs). Both Windsurf and Cursor also support reading from URLs (iirc Aider does too). I’ve had better luck with manually including the page but including the indexed docs is usually enough to fix API mistakes.
- WD-42 2y agoBegs the question again: if you need to go out of your way to find an example of correct usage of the api to paste into the prompt, why are you even bothering? I find copilot useful when I already know what I want and start typing it out, at a certain point the scope of the problem is narrowed sufficiently for the LLM to fill the rest in. Of course this is more in line of “glorified autocomplete” than “replacing junior devs” that a keep hearing claims of.
- 2y ago
- sneedle 2y ago[dead]
- simonw 2y agoLLMs are way, way faster at typing code than I am. I often dictate to them exactly what I need and it saves me a bunch of time.
- bcrosby95 2y agoSo you would say typing speed matters?
- onemoresoop 2y agoSometimes it does. If typing slows you down enough to take you out of the zone then it probably does.
- rubslopes 2y agoand, for tasks that take the LLM a minute, you can grab some coffee while it works and come back just to review. It's a great feeling.
- simonw 2y agoYes. Here's a neat essay that helps capture why I believe that. https://www.scattered-thoughts.net/writing/speed-matters/ https://www.scattered-thoughts.net/writing/speed-matters/
- guelo 2y agoIt’s a better, faster, personalized Stack Overflow. Just like SO you might be led down the wrong path by an answer, but if you’re a programmer and you say you don’t get value out of Stack Overflow I don’t believe you.
- deleted 2y ago[deleted]
- alkonaut 2y agoThere are tons of use cases. E.g. if you know an algorithm (take any pseudocode description from a moderately complex algorithm on Wikipedia for example) and you know the programming language, you still may be looking at an hour or two of typing just to get that pseudocode down into code using your own language, variable names, libraries. But this is the kind of thing a LLM excels at. It gives you 200 lines of impl right away, you have a good understanding of both what it should look like and how it should work. Slow and error prone to type but, but quick and easy to verify once done, that's the key use case for me.
- cyanydeez 2y agoAnyone got a line on a local first AI Tooling. Happy to pay100$. Don't want a subscription.
- cube2222 2y agocontinue.dev, aider, Zed’s AI assistant are all free and will work with a local Ollama installation. You will of course need an insanely beefy and expensive machine to run any useful models at reasonable speeds, which would likely cover API usage costs for many, many years (an entire lifetime, likely).
- baq 2y agoUnless you want to fine tune your custom model and/or have strict on prem requirements… shit gets expensive fast, but it’s probably worth it for some
- magic_hamster 2y agoCline also supposedly supports Ollama but it doesn't work that well with most models. There are some models dedicated to cline.
- mkw5053 2y agoYou could try OpenHands + OpenRouter + Llama (https://docs.all-hands.dev/modules/usage/llms/openrouter https://docs.all-hands.dev/modules/usage/llms/openrouter) I haven't tried it and don't know how it would go.
- tomrod 2y agoLlama.vscode and llama.vim look promising.
- 8thcross 2y agoCline or Roo Cline allows for local LLMs to be used. OpenRouter.ai - has made both Google Gemini 2.0 flash and thinking free!
- 2y ago
- cube2222 2y agoYeah this seems to be similar to my experiences. I use Zed’s AI assistant with Sonnet, and will generally give it 10-20k tokens of sample code from elsewhere in the codebase, shared libraries, database schema, etc. and more or less have a very specific expectation of exactly the code I want to get. More often than not, it will succeed I’ll get it faster than typing myself. However, it’s also pretty good at poking holes in your design, coming up with edge cases, etc. Sure, most of its observations will likely be moot somehow, but if it lists 10 points, then even if only 2 are valid and I didn’t think of, it’s already valuable to me. I’ve also used Cline a bit, it’s nice too, though most of the time a single run of Claude works just fine, and I like Zed’s AI Assistant UX (I actually don’t use it for coding other than that).
- dgfitz 2y ago> More often than not, it will succeed I’ll get it faster than typing myself. Like, all told? The whole bit where you need to find code, paste it in, find more code, paste it in, prompt a good question and most likely iterate on it, for an answer you say you had already expected, is faster than typing it out? I don’t understand.
- dwaltrip 2y agoA lot of the new tools are embedded in your editor so you don’t have to copy paste in either direction. My experience is that it can still be tricky to get high quality results when letting the AI actually edit the code for you. A few of my attempts went rather poorly. I’m hoping tweaks to how I use the tools improve this. Or I’ll just wait until better versions are released :) I use Claude in the web interface quite often though. It’s very helpful for certain queries. And I can usually abort quickly when it gets lost or starts hallucinating.
- dgfitz 2y agoHave you seen this: https://news.ycombinator.com/item?id=42845933 https://news.ycombinator.com/item?id=42845933
- AgentMatrixAI 2y agoPrompt quality and knowing your domain is critical. One issue I had early on was experimenting with LLMs to generate a frontend application in a brand new framework I was unfamiliar with (Svelte at the time) which lead to situations where I would cruise along and get stuck in a loop. The other issue came from the increasing context size that led to more unpredictable behaviors (i would ask it to change the color of a button and it would completely change the entire page). almost all the tools i've used to date for designing frontend framework, none really replaces using cursor and being able to dive deep, however cline does seem to have gotten significantly better. the day where you can come back to a fully working web app with moderate complexity after cleaning the gutter is still some way off but thats the dream
- m3kw9 2y agoBy that time you can have your personal humanoid robot clean your gutter. You just do nothing but prompt, what a life that’s gonna be.
- ImHereToVote 2y agoCan't prompting be automated?
- baq 2y agoWelcome to the agentic age, where prompting can be just barely automated, but tokens are so cheap it doesn’t matter. Fresh off the presses as of last week
- ilrwbwrkhv 2y agoSo basically you use only tab completion fill in the middle?
- energy123 2y agoSame experience with context size and prompt quality. Some other things I picked up: - If you formulate a good prompt with small (but sufficient) context and it still makes mistakes after one attempt to feed the error message back to it, it's probably not going to be able to ever get it, no matter how many iterations you do with it. It will get stuck in a rut forever. Better not to argue with it. - o1-2024-12-17 is genuinely a big step change.
- deleted 2y ago[deleted]
- outside1234 2y agoThis is a pretty basic write up. Is there anything out there that does a survey of all of the things people have found to be successful in an engineering system for a project? (eg. Github Copilot for PR reviews, etc.)
- jansan 2y agoThe only thing that I have been using AI for was to translate a localization file. And it was pretty good at that.
- 8thcross 2y agoThis was my finding as well - I now use Roo Cline tho....
- potatoicecoffee 2y agoI like looking at stack overflow for coding examples and seeing a couple of nerds getting angry at each other about the best way to do stuff. or some interesting other ways of doing stuff. this is also why i come to HN! so its weird when people want to drop that small joy from their workday
- jack_pp 2y agoIt's hard to keep that mindset after a while. People get tired of the same old pattern that's just ever so slightly different than last time. When something becomes repetitive you get bored of it. Or if the complexity of the solution you're working on is brought by a lot of moving parts it isn't a problem of figuring out the best programming truth so much as just being able to focus on the issue and keep all those moving parts in your head. That's tiring so you try to offload as much as you can on another brain
- joseda-hg 2y agoIt is lovely when doing exploratory research, less so when in a hurry and you don't want to take the extra mental effort to figure out which of the nerds is right or if one of them is talking out of left field
- frogsRnice 2y agoAs opposed to wondering if the llm is hallucinating? You have to expend a mental effort to think about your solutions anyway; I guess it’s pick your poison really.
- zwnow 2y agoThats the issue, people just copy and paste code from llms thinking "yeah, looks fine to me". It might be a skill issue, but personally it takes me a while to understand the code its giving me and even more on how to actually implement it with all the edge cases that might happen.
- 2y ago
- numba888 2y agoLooks outdated by now. Try R1. Seriously, I've been using LLMs for coding for a while and can say early experience was disappointing, but they get better and better fast. The latest o1 looks a lot better than 4o. It's reasonable to expect with proper human supervision and interface they will be able to handle big files and projects in a year or two. Interesting times...
- bandrami 2y agoThey also said that a year or two ago
- baq 2y agoImpossible of yesterday became mundane today and obsolete tomorrow. Pace of progress is borderline debilitating, when you aren’t deafened by the woosh of goalposts flying past you. I can confidently say the way I code today is completely different from the way I was coding in late 2022 and it changed a couple times in between then and now, too.
- bandrami 2y ago"Isn't Lean just the same Six Sigma stuff you were selling us a year ago?" "No no no no no. This has a totally different name"
- 2y ago
- ItsBob 2y agoAnecdotal but here's how I described using the likes of Copilot to my sceptical colleagues (they were late to the party!): It's like having a senior software dev over your shoulder. He knows pretty much everything about coding but he often comes to work drunk... And that was the best analogy I could come up with: I think it's sped up my work enormously because I limit what it does, rather than let it loose... if that makes sense. As an example, I was working on a C# project with a repository layer with a bunch of methods that just retrieved one or two values from the database, e.g. GetUsernameFromUserGuid, GetFirstnameFromUserGuid and so on. They each had a SQL query in them (I don't use ORM's...). They weren't hard to write but there were quite a few of them. Copilot learned after the first couple what I was doing so I only needed to type in "GetEmail" and it finished it off, (GetEmailAddressFromUserGuid) did the rest, including the SQL query and the style I used etc. To me, that's where it shines! Once you figure out where it works best and its limits, it's brilliant imo.
- jpt4 2y agoIf that analogy is remotely accurate, it strikes me as a strictly negative value proposition for the tool.
- SkyBelow 2y agoDepends upon the user. Are you fast (and confident) at evaluating the output and discarding the bad suggestions? This is why I think using AI hurts some developers and helps others, and the usefulness is best for those who already have a good deal of experience.
- lopuhin 2y agoI find it strange that the author is really happy with the quality of string comparison here https://pgaleone.eu/ai/coding/2025/01/26/using-ai-for-coding-my-experience/#backend-development-insights https://pgaleone.eu/ai/coding/2025/01/26/using-ai-for-coding... and while it would kind of work, it's a very weird piece of code from ML standpoint, e.g. it's training a TF-IDF vectorizer on just two strings being compared, which at best won't change anything (unless the same word is repeated within one product), and is a super weird thing to do as for better quality you'd probably want to train that on some corpus, or not bother at all. And also it compare two strings as bags of words, which again is not the end of the world but maybe not what the author wants here, and if they want this then it's not the easiest way of doing it. So it's taking some things which can be useful when comparing texts (tf-idf and cosine similarity) but then applying them in a weird way which does not let them show their strengths.
- KarraAI 2y ago[dead]
- mzhaase 2y agoThere is an enormous difference for me between inline suggestions and using chat. If you use chat it's work, and then you have to debug and understand something you didn't write yourself. Using inline suggestions is the closest I have come to plugging my brain directly into the computer. I type 5 characters and in 80% of cases the suggestion is character by character exactly what I would have written. It speeds me up enormously.
- koinedad 2y agoWas this blog also written by LLM?
- SunlitCat 2y agoWell, my experience with using an LLM (ChatGPT) for coding in a nutshell: (asking Chatgpt after getting a very cut together looking example-ish example): Me: You simply read various examples from the D3D12 documentation and mixed them together without really understanding them? Admit it! :D ChatGPT: Haha, I admit it, that was a bit of a ‘best of DirectX 12 documentary’! But hey, I tried to build you a solid base that covers both window handling and the basics of DirectX 12.