Live data from Hacker News

How I write code using Cursor

arguingwithalgorithms.com

251–260 of 426 posts

Re: How I write code using Cursor

#251
post #206

Earlier quoted context omitted.

And how do you trust that it didn't just alter or omit some sentences from your blog post? I just use Pandoc for that purpose and it takes 30 seconds, including the time to install pandoc. For code generation where you'll review everything, AI makes sense; but for such conversion tasks, it doesn't because you won't review the generated HTML.

Re:trust. It just works using Sonnet 3.5. It's gained my trust. I do read it after (again, I'm more a code reviewer role). People make mistakes too, and I think it's error rate for repeititve tasks is below most people's. I also learned how to prompt it. I'd tell it to just add formatting without changing content in the first pass. Then in a separate pass ask it to fix spelling/grammar issues. The diffs are easy to r…

Why are you comparing its error rate for repetitive tasks with most people? For such mechanical tasks we already have fully deterministic algorithms to do it, and the error rate of these traditional algorithms is zero. You aren't usually asking a junior assistant to manually do such conversion, so it doesn't make sense to compare its error rate with humans.

Normalizing this kind of computer errors when there should be none makes the world a worse place, bit by bit. The kind of productivity increase you get from here does not seem worthwhile.

Re: How I write code using Cursor

#252
post #198

Earlier quoted context omitted.

I've noticed that tools like Cursor doesn't really seem to make difference in the end. The good software developers are still the good software developers, regardless of editors. I don't think you should be upset or worried that people aren't adopting these tools as you think they should. If the tool really lives up to its hype then the non-adopters will fall behind and, for example, be forced to switch to Cursive. T…

> The good software developers are still the good software developers Correct. Because they know they need to use the correct tools for the job. > If the tool really lives up to its hype then the non-adopters will fall behind This is already happening. I'm able to out-deploy many of my competitors because I'm using Cursor. Have you actually spent much time with Cursor? The comparison to "Jump to definition" is pretty…

> I'm able to out-deploy

This is a very poor metric for your efficacy as a software engineer and if you optimize for this, you're gonna have a bad time long term.

Re: How I write code using Cursor

#253

Earlier quoted context omitted.

Well, the context is the problem. LLMs will really become useful if they 1.) understand the WHOLE codebase AND all it's context and THEN also understand the changes over time to it (local history and git history) and finally also use context from slack - and all of that updating basically in real time. That will be scary. Until then, it's basically just a better autocomplete for any competent developer.

What you describe would be needed for a fully autonomous system. But for a copilot sort of situation, the LLM doesn't need to understand and know of _everything_. When I implement a feature into a codebase, my mental model doesn't include everything that has ever been done to that codebase, but a somewhat narrow window, just wide enough to solve the issue at hand (unless it's some massive codebase wide refactor or co…

I use copilot daily and because it lacks context it's mostly useless except for generating boilerplate and sometimes converting small things from A to B. Oh, also copying functions from stackoverflow and naming them right.

That's about it. But I spend maybe 5% of my time per day on those.

Re: How I write code using Cursor

#254

I've been using AI to solve isolated problems, mainly as a replacement of search engine specifically for programming. I'm still not convinced of these "write whole block of code for me" type of use case. Here's my arguments against the videos from the article. 1. Snake case to camelCase. Even without AI we can already complete these tasks easily. VSCode itself has command of "Transform to Camel Case" for selection. I…

Completely agree. I find it fails miserably at business logic, which is where we spend most of our time on. But does great at generic stuff, which is already trivial to find on stack overflow.

> But does great at generic stuff, which is already trivial to find on stack overflow.

The major difference is that with Cursor you just hit "tab", and that thing is done. Vs breaking focus to open up a browser, searching SO, finding an applicable answer (hopefully), translating it into your editor, then reloading context in your head to keep moving.

Re: How I write code using Cursor

#255

Someone experienced enough could give some insights about how does it work with big monorepos and/or legacy code?

Cursor will use embeddings to figure out if it needs more files for additional context, or you can manually add them. It’s one of the weakest parts of the experience. Probably varies from repo to repo. Still not really capable of large scale automatic refactors.

Re: How I write code using Cursor

#256

I've been using AI to solve isolated problems, mainly as a replacement of search engine specifically for programming. I'm still not convinced of these "write whole block of code for me" type of use case. Here's my arguments against the videos from the article. 1. Snake case to camelCase. Even without AI we can already complete these tasks easily. VSCode itself has command of "Transform to Camel Case" for selection. I…

I started like this. Then I came around and can’t imagine going back. It’s kinda like having a really smart new grad, who works instantly, and has memorized all the docs. Yes I have to code review and guide it. That’s an easy trade off to make for typing 1000 tokens/s, never losing focus, and double checking every detail in realtime. First: it really does save a ton of time for tedious tasks. My best example is test…

Maybe a TLDR from all the issues I'm reading in this thread:

- It's gotten way better in the last 6 months. Both models (Sonnet 3.5 and new October Sonnet 3.5), and tooling (Cursor). If you last tried Co-pilot, you should probably give it another look. It's also going to keep getting better. [1]

- It can make errors, and expect to do some code review and guiding. However the error rates are going way way down [1]. I'd say it's already below humans for a lot of tasks. I'm often doing 2/3 iterations before applying a diff, but a quick comment like "close, keep the test cases, but use the test fixture at the top of the file to reduce repeated code" and 5 seconds is all it takes to get a full refactor. Compared to code-review turn around with a team, it's magic.

- You need to learn how to use it. Setting the right prompts, adding files to the context, etc. I'd say it's already worth learning.

- I just knows the docs, and that's pretty invaluable. I know 10ish languages, which also means I don't remember the system call to get an env var in any of them. It does, and can insert it a lot faster than I can google it. Again, you'll need to code review, but more and more it's nailing idiomatic error checking in each language.

- You don't need libraries for boilerplate tasks. zero_pad is the extreme/joke example, but a lot more of my code is just using system libraries.

- It can do things other tools can't. Tell it to take the visual style of one blog post and port to another. Take it to use a test file I wrote for style reference, and update 12 other files to follow that style. Read the README and tests, then write pydocs for a library. Write a GitHub action to build docs and deploy to GitHub pages (including suggesting libraries, deploy actions, and offering alternatives). Again: you don't blindly trust anything, you code review, and tests are critical.

[1] https://www.anthropic.com/news/3-5-models-and-computer-use

Re: How I write code using Cursor

#257

Earlier quoted context omitted.

seems simple and obvious but not when the columns have different keys, and there could be one or more keys to match upon. i would be curious to see how you can prompt that? and you are correct, you just need to know how to prompt it correctly by going back to first principles, just like what i did.

Tossing in the first few rows of the CSV in the prompt helps.

no kidding?

this industry should stop telling people: "you are just prompting wrong" when they've never seen the prompting session.

Re: How I write code using Cursor

#258
There's a lot of people in these comments who are talking about the state of off-the-shelf LLMs for writing code, and they are missing the point of this article. The article is about Cursor, the IDE.

It is much, much more than a ChatGPT wrapper. I'd encourage everyone to give it a shot with the free trial. If you're already a VSCode user, it only takes a minute to setup with your exact same devenv you already have.

Cursor has single-handedly changed the way I think about AI and its capabilities/potential. It's truly best-in-class and by a wide margin. I have no affiliation with Cursor, I'm just blown away by how good it is.

Re: How I write code using Cursor

#259

I think AI is still nowhere near where it needs to be to provide business value in software development. As an experiment, some time ago, I tried to build a TODO app entirely with AI prompts. I used a special serverless platform on the backend to store the data so that it would persist between page refreshes. I uploaded the platform's frontend components README file to the AI as part of the input. Anyway, what happen…

> I think AI is still nowhere near where it needs to be to provide business value in software development.

And you go on to say that your experiment was to build a TODO app "some time ago" in a single file of code.

Re: How I write code using Cursor

#260

I use and am happy with Cursor and Chatgpt. Cursor will write out the syntax for me if I let it, sometimes wrong, sometimes right, but enough to keep a flow going. If there are larger questions, I just flip over to chatgpt and try and suss out what is going on there. Super helpful with tailwind and react, speaking as a dba and backend systems person.

Curious why you don't just use Cursor's built-in chat?
Post reply on HN