3 ms·
I’ve been playing around recently trying to do a bit of refactoring work with copy pasting in Claude and using Cursor. This week I tried a task where I had a sm
by aidos 2y ago
I’ve been playing around recently trying to do a bit of refactoring work with copy pasting in Claude and using Cursor. This week I tried a task where I had a small script that used jquery (one Ajax call and a bunch of dom manipulations).
I found that it was pretty easy to get cursor into a place where it had decimated the file and each tab complete suggestion became more and more broken.
Claude was given the task wholesale and did a reasonable job but introduced a subtle bug by moving a tracking call outside of the Ajax promise and I could not convince it to put it right. It kept apologising and then offering up more incorrect code.
I’d say that the original result was good enough that I could pretty much take it and fix it, but only because I knew all the code and libraries well enough. It was only about 150 lines of simple code and by the time I’d finished I was joking with the team that I could have spent all the time wrestling vim macros instead and come out about the same.
What’s your experience been with correctness?
- StefanWestfal 2y agoNot op but a similar experience. I used cursor with claud to generate a small bash script to set up a Postgres container, iterate over local migration files, and apply them using psql. The generated code did all correct but called psql from within the container. Even when feeding the errors back in it could not correct the code or identify the bug.
- simonw 2y agoI treat the LLM like a weird kind of pair-programming partner: I fully expect to have to review everything it writes, and I often prompt it with that in mind - I'll tell it exactly what I want it to write, "write a function that takes X and Y and does Z and returns ..." kind of stuff. I've spent so much time with them now that 90% of the time I get back exactly what I needed, because I can predict what prompt will get me the right result.