Live data from Hacker News

How I write code using Cursor

arguingwithalgorithms.com

161–170 of 426 posts

Re: How I write code using Cursor

#161
> Subsequently, but very infrequently, I will accept a totally different completion and the previously-declined suggestion will quietly be applied as well.

This sounds like a nightmare.

I think the biggest problem with AI at the moment is that it incorrectly assumes that coding is the difficult part of developing software, but it's actually the easiest part. Debugging broken code is a lot harder and more time consuming than writing new code; especially if it's code that someone else wrote. Also, architecting a system which is robust and resilient to requirement changes is much more challenging than coding.

It boggles the mind that many developers who hate reading and debugging their team members' code love spending hours reading and debugging AI-generated code. AI is literally an amalgamation of other peoples' code.

Re: How I write code using Cursor

#162
post #139

Earlier quoted context omitted.

Disagree. I still spend a good amount of time on boilerplate. Stuff that's not thinking hard about the problem I'm trying to solve. Stuff like units tests, error logging, naming classes, methods and variables. Claude is really pretty good at this, not as good as the best code I've read in my career but definitely better than average. When I review sonnets code the code is more likely to be correct than if I review my…

Unit tests are boiler plate ?

Quite often, yes. That's why I prefer integration tests.

Re: How I write code using Cursor

#163
post #125

Earlier quoted context omitted.

We do it all the time. I can type while talking to people. I can also read/process the text ahead while saying out loud what I read a few words back. We do a lot of things concurrently when dealing with text - I'm not staring at the cursor when writing code either. (Unless you meant it literally. No, I didn't mean actual peripheral vision. Just noticing things beyond what I type.)

I did mean it literally. the solid angle covered by the fovea is tiny.

The eye also doesn't literally stay 100% static when you look at something.

Re: How I write code using Cursor

#164
post #25

This last month I decided to try the Jetbrain equivalent of Cursor, for their IDEs ( https://www.jetbrains.com/ai/ ). It's a pluging well integrated in the code editor that you can easily summon. I work in Rust and I had to start working with several new libraries this month. One example of them is `proptest-rs`, a rust property testing library that defines a whole new grammar to define the tests. I am 100% sure that…

Wondering how the JetBrains gets the context of the library? Is it fetching cargo docs somehow or are you having to paste docs into a context window?

Re: How I write code using Cursor

#165

I recently started using Cursor for all my typescript/react personal projects and the increase in productivity has been staggering. Not only has it helped me execute way faster, similar to the OP I also find that it prevents me from getting sidetracked by premature abstraction/optimization/refactoring. I recently went from an idea for a casual word game (aka wordle) to a fully polished product in about 2h, which woul…

I would love to see the world where you didn't use AI and instead invested the time to make yourself a stronger programmer. A react wordle clone isn't something most developers would need 2 hours to make (sure maybe the styling / hosting AROUND the wordle clone might take longer) - I'm not saying you're a bad programmer or a bad person but what is the opportunity cost of using AI here? Are you optimising yourself int…

they said 90% of it was spent on ideation and exploration

they didnt specifically mean they built a wordle clone, just a game like it. if they wanted just a wordle clone, they wouldve gotten one within a few minutes of using codegen tools.

Re: How I write code using Cursor

#166

> Subsequently, but very infrequently, I will accept a totally different completion and the previously-declined suggestion will quietly be applied as well. This sounds like a nightmare. I think the biggest problem with AI at the moment is that it incorrectly assumes that coding is the difficult part of developing software, but it's actually the easiest part. Debugging broken code is a lot harder and more time consumi…

Wow reasons I can think of are the emotional overhead of not being a total dick to the person who's coffee is being reviewed is, if you're not an asshole, is higher than for an unfeeling bot. (Unless that bots name is Roku.) The other thing is you just go in and fix said code instead of writing a comment and then waiting an undetermined amount of time for a reply.

Re: How I write code using Cursor

#167
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 happened is that it was able to create the TODO app quickly; it was mostly right after the first prompt and the app was storing and loading the TODOs on the server. Then I started asking for small changes like 'Add a delete button to the TODOs'; it got that right. Impressive!

All the code fit in a single file so I kept copying the new code and starting a new prompt to ask for changes... But eventually, in trying to turn it into a real product, it started to break things that it had fixed before and it started to feel like a game of whac-a-mole. Fixing one thing broke another and it often broke the same thing multiple times... I tried to keep conversations longer instead of starting a new one each iteration but the results were the same.

Re: How I write code using Cursor

#168

Earlier quoted context omitted.

I've spent a good amount of time in my career reading high quality code and slop. The difference is not some level of intelligence that sonnet does not possess. It's a well thought out design, good naming, and rigor. Sonnet is as good if not better than the average dev at most of this and with a some good prompting and a little editing can write code as good as most high quality open source projects. Which is usually…

> with a some good prompting and a little editing can write code good I agree with a good developer "baby-sitting" the model it's capable of producing good code. Although this is more because the developer is skilled at producing good code so they can tell an AI where it should refactor and how (or they can just do it themselves). If you've spent significant time refitting AI code, it's not really AI code anymore its…

I've spent soo much time in my life reviewing bad or mediocre code from mediocre devs and 95% of the time the code sonnet 3.5 generates is at least as correct and 99% of the time more legible than what a mediocre dev generates.

It's well commented, the naming is great it rarely tries to get overly clever, it usually does some amount of error handling, it'll at least try to read the documentation, it finds most of the edge cases.

That's a fair bit above a mediocre dev.

Re: How I write code using Cursor

#169

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…

The article is about Cursor. You don't need all your code to fit in a single file. It sits in your IDE. You don't need it to create your app entirely. I just tell it what I need, and where, and it makes me 20x faster. It solves the problem you're describing exactly.

Re: How I write code using Cursor

#170

Earlier quoted context omitted.

I would love to see the world where you didn't use AI and instead invested the time to make yourself a stronger programmer. A react wordle clone isn't something most developers would need 2 hours to make (sure maybe the styling / hosting AROUND the wordle clone might take longer) - I'm not saying you're a bad programmer or a bad person but what is the opportunity cost of using AI here? Are you optimising yourself int…

they said 90% of it was spent on ideation and exploration they didnt specifically mean they built a wordle clone, just a game like it. if they wanted just a wordle clone, they wouldve gotten one within a few minutes of using codegen tools.

No, what they said was

> I estimate that 90% of the time was spent thinking about the product, directing the AI, and testing

In other words 90% of the time was spent in the proompt-test-proompt loop. Not ideation and exploration.

> they didnt specifically mean they built a wordle clone, just a game like it. if they wanted just a wordle clone, they wouldve gotten one within a few minutes of using codegen tools.

If you really believe that I'm not sure what to say other than: have you tried to use an AI to make a full wordle clone? (not just the checking logic, or rendering - the entire thing)

Post reply on HN