Live data from Hacker News

How I write code using Cursor

arguingwithalgorithms.com

351–360 of 426 posts

Re: How I write code using Cursor

#351

It's amazing how little of my colleagues don't use Cursor simply because they haven't taken the 10 minutes to set it up. It's amazing how many naysayers there are about Cursor. There are many here and they obviously don't use Cursor. I know this because they point out pitfalls that Cursor barely runs into, and their criticism is not about Cursor, but about AI code in general. Some examples: "I tried to create a TODO…

I am slow to take on new tools and was coding in Notepad for far too long... but I am already on the Cursor boat. Right now, I use it for two things - code completion and pasting error messages into chat.

When people complain about LLMs hallucinating results, that doesn't really apply because it is either guessing wrong on the autocomplete (in which case I just keep typing) or it doesn't instantly point out the bug, in which case I look at the code or jump to Google.

Re: How I write code using Cursor

#352
post #45

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…

> Boilerplate are tedious, but not really time-consuming. In the aggregate, almost no programmer can think up code faster than they can type it in. But being a better typist still helps, because it cuts down on the amount you have to hold in your head. Similar for automatically generating boilerplate. > If I don't know, how can I trust the generated code to be correct? Ask the AI for a proof of correctness. (And I'm…

> In the aggregate, almost no programmer can think up code faster than they can type it in.

And thank god! Code is a liability. The price of code is coming down but selling code is almost entirely supplanted by selling features (SaaS) as a business model. The early cloud services have become legacy dependencies by now (great work if you can get it). Maintaining code is becoming a central business concern in all sectors governed by IT (i.e. all sectors, eating the world and all that).

On a per-feature basis, more code means higher maintenance costs, more bugs and greater demands on developer skills and experience. Validated production code that delivers proven customer value is not something you refactor on a whim (unless you plan to go out of business), and the fact that you did it in an evening thanks to ClippyGPT means nothing—-the costly part is always what comes after: demonstrating value or maintaing trust in a competitive market with a much shallower capital investment moat.

Mo’ code mo’ problems.

Re: How I write code using Cursor

#353

Earlier quoted context omitted.

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…

> Instant and pretty great code review: it can understand what you are trying to do, find issues, and fix them quickly. Just ask it to review and fix issues. Cursor’s code review is surprisingly good. It’s caught many bugs for me that would have taken a while to debug, like off by one errors or improperly refactored code (like changing is_alive to is_dead and forgetting to negate conditionals)

> changing is_alive to is_dead and forgetting to negate conditionals

No test broke?

Re: How I write code using Cursor

#354

Earlier quoted context omitted.

What is the best workflow to code with an AI? Copy and paste the code to the Claude website? Or use an extension? o something else?

I personally use copilot, which is integrated into my IDE, almost identical to this Cursor example.

Copilot is about as far away from Cursor with Claude as the Wright Brothers' glider is to the Saturn V.

Re: How I write code using Cursor

#355
post #324
post #232

Earlier quoted context omitted.

For me it's the same. It's usually just some hallucinated garbage. All of these LLM's don't have the full picture of my project. When I can give them isolated tasks like convert X to Y, create a foo that does bar it's excellent, but for unit testing? Not even going to try anymore. I write 5 unit tests manually that work in the time I write 5 prompts that give me useless stuff that I need to add manually. Why can't we…

"It's usually just some hallucinated garbage. All of these LLM's don't have the full picture of my project." Cursor can have whole project in the context, or you can specify specific files that you want.

> Cursor can have whole project in the context

Depends on the size of the project. You can’t shove all of google’s monorepo into an LLMs context (yet)

Re: How I write code using Cursor

#356
post #26

Earlier quoted context omitted.

> LLMs seem like magic unless you remember when search worked. Yikes. I didn’t even think about this, but it’s true. I’m looking for the kinds of answers that Google used to surface from stack overflow

Kagi… Fully switched over more than a year ago and never looked back.

I had a kagi account for a year, but it’s just bing with some admittedly nice features on top.

I don’t get the results because there’s just not a lot of people talking about what I’m interested in.

Re: How I write code using Cursor

#357

Earlier quoted context omitted.

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.

The benefits of exploring is finding alternatives and knowing about gotchas. And knowing more about both the problem spaces and how the language/library/framework solves it.

Re: How I write code using Cursor

#358

Earlier quoted context omitted.

That’s why I use Rails for work. But I also had to write a small Nodejs project (vite/react + express) recently for a private project, and it has a lot of nice things going for it that make modern frontend dev really easy - but boy is it time consuming to set up the basics.

I can't imagine having nice things to say about node after working in Rails. Rails does so much for you, provides a coherent picture of how things work. Node gives you nothing but the most irritating programming tools around

I thought node was great until I had to upgrade some projects, and then realizing that those frameworks maintainers never maintain their dependencies. While in the C world, lot of projects treat warnings as errors.

Re: How I write code using Cursor

#359

Earlier quoted context omitted.

Not in the same way. Places like Cursor and Continue have their own tuned and minimal models which can work really fast. In an interview, Cursor people also mentioned some extra magic they do like streaming the changes/context in as you type and potentially doing some speculative processing before you even type things. You would need to write lots of new code which, as far as I understand, doesn't exist in the open s…

Anthropic have a streaming API (incrementally stream responses back to client) that I believe Cursor uses.

That's the basic part. Cursor people talked about effectively streaming in and other ideas. See https://youtu.be/oFfVt3S51T4

Re: How I write code using Cursor

#360

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’m slightly worried that these AI tools will hurt language development. Boilerplate heavy and overly verbose languages are flawed. Coding languages should help us express things more succinctly, both as code writers and as code readers. If AI tools let us vomit out boilerplate and syntax, I guess that sort of helps with the writing part (maybe. As long as you fully understand what the AI is writing). But it doesn’t…

Maybe it's a rectangle between:

   seniors
   copilots
   juniors
   new languages
Wondering. Since the seniors pair with LLMs, world needs much less juniors. Some juniors will go away to other industries, but some might start projects in new languages without LLM/business support.

Frankly, otherwise I don't see how any new lang corpus might get created.

Post reply on HN