Web Dev with Cursor: the best AI coding tool yet?
Web Dev with Cursor: The Best AI Coding Tool Yet?

Web Dev with Cursor: the best AI coding tool yet?

After getting several personal recommendations to try the Cursor IDE (an AI focused fork of Visual Studio Code), I’ve finally given in and made the switch.

In short, having an LLM that can search, analyse and change my codebase has completely changed the way I work.

So, are we all ‘vibe coders’ now?

At this point there is probably more scepticism and fear associated with prompt based coding than there is hype and optimism.

In my view, it is now undeniable that LLMs will dramatically change what it means to be a developer (for many it already has). Even if we assume that the abilities of AI will plateau at this point, the tools available right now open up levels of productivity that, if you don’t use them, you’ll be left behind.

But, of course, some fears around this should be taken seriously. To touch on a few:

Won’t generating code make us lazy, bad developers?

I quite like the comparison between the current explosion of LLMs to the invention of the affordable, portable calculator. At the time people feared that calculators would ruin children’s maths education. And, up to a certain age, this is still the view (with calculators being permitted from around age 10-11 in the UK).

I think the same precaution should apply to learning to code: if you never learn what a ‘class’ or a ‘scope’ is, just like if you never learn your times tables, you won’t get far.

However, beyond mastering the basics, developers must learn continuously throughout their careers. And, now more than ever, it will vital for us to carefully curate our own learning: if we lean too heavily on our new “co-pilots”, and don’t turn them off once in a while, we might just forget our times tables.

Will our codebases be flooded with AI generated slop?

Until we actually have AGI , developers will remain the gatekeepers for the code that actually get’s released into the wild. Luckily we already have the tools to help us maintain the quality of code we did not write ourselves - peer review and testing.

If we treat reading generated code as a peer review, i.e. asking questions of anything you don’t understand; pushing back on code that is not easily expandable and testable; and demanding that precedents are followed etc, then there is little difference from reviewing a colleague's code.

As for writing tests, this is definitely something an LLM can excel at, especially Claude 3.5 within Cursor (you can choose from several LLMs within Cursor, but Claude 3.5 is my preference). The key proviso here is that, just like humans, the AI will struggle to test code that has not been written to be easily testable. However if you give Claude 3.5 something that has clear inputs and outputs, for example a strictly typed pure function, it will produce excellent tests.

A new kind of pair programming

For the moment, I’m starting off every coding task with the question: “Do I know how to do this?”. Depending on the answer, here’s my approximate workflow:

Article content
There are certain tasks where I know Cursor/Claude will still fall down, please see "Cursors Limitations" below.

A: I know how to do this

If I know how I’m going to do task before I start it, this can serve as a welcome break from more challenging things, but if you have to do this kind of thing over and over, it can become a chore.

In fact, developers famously avoid doing the same things over and over, and love to make tools to automate away such tasks; because it is making the tool that is the interesting challenge!

Without healthy challenge in our work - if our jobs become repetitive - we stop learning. I see Prompt development as the latest way for us to spend more of our time on the interesting stuff!

On a related note, having regular novel challenges might just be the secret for robotic learning as well… Bernt Børnich, founder of humanoid robotics company 1X, gave a (fascinating) TED talk where he said:

(for fostering intelligence, artificial or otherwise) “you need diversity, you need to challenge yourself, you need to do new tasks every day that you don’t know how to do”

B. I don’t know how to do this

For any novel task, I start in the same way as above, describing the requirements to Claude the best that I can and seeing if it can get a working solution.

Assuming Claude was successful, I switch to teaching myself about its solution. I believe that with any form of learning, you need to be asking as many questions as possible. So, although Claude will always explain its reasoning as it makes the changes, I will often ask it to only do things one step at a time, pausing to wait for any feedback or questions I have.

If you don’t want Claude to make code changes, change the “mode” selector from “Agent” to “Ask”; this way the AI only has read access to the codebase.


Article content

It also has a “Teach” mode.

This seems like a good time to emphasise that LLMs are a black box. Becoming complacent about them being capable of doing ‘easy’ tasks is a mistake. I’ve seen Claude successfully make complex changes across several files, but I’ve also seen it make ridiculous mistakes with very small changes. Although it is usually quite consistent, its abilities can vary wildly at times, so it’s always best to assume that it’s hallucinating. Additionally, if anything Claude has introduced involves external code libraries you’re not familiar with, it of course makes sense to double check the documentation.

Finally, after I’m satisfied I’ve understood the changes, I simply follow the same test & verify process as above.

What is Cursor good at?

1. Writing tests.

I can’t emphasise enough how amazing Claude is at producing unit/integration tests (at least for Jest tests written for JavaScript helper functions)


Article content
Sample tests written by Claude


2. Taking custom instructions

Like most LLMs chat apps, you can create custom “modes”, that are essentially preambles that you always include at the start of your prompts. I am particularly fond of my “keep it concise” one.

Article content
Custom modes in Cursor

3. Following Precedent

As we know, LLMs are trained on what is publicly available, and so the more commonly used your language and coding precedent are, the more success you’ll have.

What’s great about Cursor is that you can directly show it the patterns you’d like it to emulate in your codebase.


Article content
An example of guiding the LLM with existing precedent

Cursor’s limitations

1. Extensions

It seems that Microsoft has closed the door to forks of it’s IDE using its extensions.

Given that I primarily work with React and Flutter, I haven’t had any issues. But this is bad news for Cursor, I don’t know if they’ll have any grounds to push back on Microsoft’s decision.

🔥Hot off the press: as of the 9th April, VS Code have announced their answer to Cursor “VS Code Agent Mode” . I haven’t tried this yet, but it looks very similar to Cursor.


Article content
Example extension is no longer working with Cursor

2. Running out of context

Even though LLMs are getting better at coping with long conversations and large files, they all still have a breaking point of too-much-information.

It's not a sudden crash, more like a slow fade into gloriously confident nonsense. Just keep your chats on point, and open new chat windows when you can and you should avoid this.

3. Boilerplate

Setting up the boilerplate code to get a new project up and running has never been my favourite task.

Sadly, at least with a React project, I think the sheer quantity of possible setups a project can have can overwhelm LLMs for now. If you stick to a common precedent, you might get away with it, but I’ve found it can introduce bugs that are very difficult to find. I’d stick to following the docs for now.


Ultimately, using Cursor is like pairing with a very fast, very knowledgeable, but occasionally overconfident junior developer. Yes, you are still responsible for the code. Yes, you still have to read, review, and learn. But the shift is undeniable: we’re entering an era where knowing your coding “times tables” is just the beginning, and knowing how to work with AI tools becomes the real multiplier. For those willing to embrace this change thoughtfully—treating AI not as a crutch but as a collaborator—it’s an incredibly exciting time to be a developer.



Article content
Written by Ross Mawdsley, Front-End Developer


To view or add a comment, sign in

Others also viewed

Explore topics