Live data from Hacker News

Using AI for Coding: My Journey with Cline and LLMs

pgaleone.eu

31–40 of 97 posts

Re: Using AI for Coding: My Journey with Cline and LLMs

#31
post #23

Earlier quoted context omitted.

> 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.

A 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…

Have you seen this: https://news.ycombinator.com/item?id=42845933

Re: Using AI for Coding: My Journey with Cline and LLMs

#32
I 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

Re: Using AI for Coding: My Journey with Cline and LLMs

#33
post #15
post #12

Earlier quoted context omitted.

Except 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…

The 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.

Begs 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.

Re: Using AI for Coding: My Journey with Cline and LLMs

#34
post #33
post #15

Earlier quoted context omitted.

The 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.

Begs 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 juni…

"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?"

Because it's faster.

Here's an example: https://tools.simonwillison.net/ocr

That's an entirely client-side web page you can use to open a PDF which then converts every page to an image (using PDF.js), then runs each image through the Tesseract.js OCR program and lets you copy out the resulting text.

I built the first version of that in about 5 minutes while paying attention to a talk at a conference, by pasting in examples of PDF.js and Tesseract.js usage. Here's that transcript: https://gist.github.com/simonw/6a9f077bf8db616e44893a24ae1d3...

I wrote more about that process here, including the prompts I used: https://simonwillison.net/2024/Mar/30/ocr-pdfs-images/

That's why I'm bothering: I can produce useful software in just a few minutes, while only paying partial attention to what the LLM is doing for me.

Re: Using AI for Coding: My Journey with Cline and LLMs

#36
post #14

Earlier quoted context omitted.

LLMs 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.

So you would say typing speed matters?

Yes. Here's a neat essay that helps capture why I believe that. https://www.scattered-thoughts.net/writing/speed-matters/

Re: Using AI for Coding: My Journey with Cline and LLMs

#37
post #23
post #5

Yeah 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 hol…

> 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.

Like I said, I’m using Zed’s AI integration, which means I can easily reference other files, and have it edit code inline. I also reuse the bulk of the prompt across usages. There’s no finding and no pasting, in general.

Re: Using AI for Coding: My Journey with Cline and LLMs

#38
post #15
post #12

Earlier quoted context omitted.

Except 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…

The 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.

Yeah thats the trick I've been using too, but by that point I get a better result by implementing it myself... of course, I've had two decades of practice and I don't have to communicate what I want lossily to myself, so it's an unfair comparison, but perhaps I've just not found the right use-case yet. I'm sure it exists, I've just not had much luck over the past couple years yet (including just this past weekend).

Re: Using AI for Coding: My Journey with Cline and LLMs

#39

I 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

It'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
Post reply on HN