Codementor Events

Cursor: Next-level AI-productivity For Developers?

Published Sep 11, 2024
Cursor: Next-level AI-productivity For Developers?

All the early adopters and tech enthusiasts in my X (formerly Twitter) feed and on LinkedIn were already talking about it: Cursor: The AI Code Editor. Some even call Cursor “Copilot on steroids.” All this buzz about this new developer tool intrigued me enough to jump on board as well.

In this article, you’ll read about the AI tools for developers that have become available in recent years and how Cursor fits into the picture. I will explain what Cursor is and whether it’s worth it — and that $20 per month.

⏮️ But first, let’s go back a bit.

Phase 1️⃣

Large language models, like those from OpenAI, were being developed since the end of 2022, but they became really popular in January 2023 with the introduction of the ChatGPT chat interface. This opened the door for (aspiring) developers to ask questions about how to code something, check if their code was correct, create tests, and so on.

Various AI solutions and models emerged, such as Google’s Gemini. Some models became better at solving coding problems with less incorrect information (not perfect, but usable).

For developers, I see this as phase 1 of AI support.

Phase 2️⃣

The next step was tools integrated into so-called IDEs (Integrated Development Environments); these are development tools like Visual Studio, Visual Studio Code, Eclipse, IntelliJ IDEA, etc.

One of the most talked-about tools was Copilot: after Microsoft’s investment and collaboration with OpenAI, they created this tool that allowed developers to get direct AI support during development within their GitHub environment (also acquired by Microsoft) and later from Visual Studio.

The field shifted from a question-and-answer model to a predictive tool where, as a developer, you could expand code with a tab, review selected code, and improve it (refactor).

Thus, in this second phase of AI tools, developers received a tool that could look at their code and help them build faster.

Phase 3️⃣

With Cursor, we have entered the third phase of AI support. With Cursor, you don’t just get suggestions, multi-line autocompletion with a tab, or integrated AI support; Cursor is an AI-first IDE that lets you build even more, even faster.

What can you do with Cursor?
What sets Cursor apart from the rest is that the tool — a derivative of the well-known Visual Studio Code IDE — was built from the ground up to enable AI-driven development. For example, Cursor can see and understand your entire solution (i.e., the entire context of your code). It also learns your intentions by looking at your actions (this is tracked) and predicting what you want to achieve.

With an integrated chat interface that you can summon with Control+K (Command+K on Mac), you can ask questions about your project or a specific piece of code. Cursor will present the changes with an explanation below, and with a click on the “apply” button, these will be implemented in your code.

Using convenient colour coding (red for removed, green for added), you can see which lines have been modified and apply the changes in full or line-by-line.

Correcting errors and reading information about variables or third-party library functionalities is also performed or displayed via AI.

Worried that the AI model is not sufficient? No worries, in Cursor, you can choose from different models for AI support, ranging from claude-3.5-sonnet to gpt-3.5 and gpt-4o. Undoubtedly, more will be added and tracked for future models.

Of course, all of this isn’t free: you get 2 weeks to try it out, after which you pay $20 per month (if you pay annually, you get a $4 per month discount). The question remains: is Cursor worth the money, and is it indeed a handy tool?

Cursor in Practice
As mentioned, Cursor is a spin-off of Visual Studio Code. You can notice this in its setup. The UI looks slightly different, but the shortcuts and placement of the basic components make you feel right at home in this tool. The developers of Cursor have made importing your settings and extensions very simple in the registration flow.

Before you know it, you open the tool and see all the extensions you’re used to. Creating a new project with familiar templates or editing your existing project is certainly not a hurdle.

Where previously you had to develop your entire screen, apply a UI library, and get back “in the zone” with the tech stack you’re using for your project, with Cursor, it’s as simple as asking a question to the AI. I press Control+K on my MacBook and type the following:

“Create a view with an input field (text area) and a button that lets me send the input text to OpenAI’s API along with a prompt to convert the language into another language. Above the input field, I want two dropdown fields that let the user choose between the input language (first option is “recognize”) and the “to” language. The result should be shown beneath the input area so the user can compare the input vs. the translation. Use the Tailwind CSS library for nice styling of the elements.”

(By the way, the instruction doesn’t have to be written in English. By specifying a non-English language in the settings, Cursor will take this into account.)

With a press of the enter key, Cursor gets to work and indicates which files you need to modify and what code to add to make all this happen.

Once you have created the files, you can click on the “apply” button for the suggested code section, and Cursor will apply the change for you.

After generating and checking what Cursor had done a few times, I quickly got into the “accept all” mode, allowing me to see the desired result more quickly after refreshing the page in my browser.

Building a screen like an overview/CRUD screen with styling and various options and controls can quickly take half an hour to an hour instead of half a day.

Is Cursor the end for developers?

Simply put: no. Although this gives a huge boost to developers, and for beginner developers, it can significantly lower the barrier, Cursor — and what I’ve dubbed phase 3 — is still not enough to create an application from a few spoken sentences.

Even though there are examples of Cursor where an 8-year-old girl creates a chatbot application (including a backend with cloud integrations), you will still need (and want) to understand the code and be able to translate the desired functionalities into business rules, a good structure, and a usable UI interface.

Watch an 8-year-old girl code a solution with Cursor AI in 45 minutes (obviously, the girl already knew terms and functional questions that she needed to ask to get the desired results, which are actually things you'll need to understand as a developer to get the right questions in Cursor faster).
What I noticed after using Cursor on a project myself, is that with a more complicated screen with multiple dependencies and interactions, Cursor can also drop the ball. For example, there were buttons that needed to be displayed when an “edit” mode was activated, and fields had to be set from “read-only” to editable.

After implementing 3 or 4 other changes through an AI query, the buttons suddenly were no longer displayed after I clicked the “edit” button: changes and functionality had been undone.

In this specific scenario, I could fix the issue by clicking undo a few times and selectively applying the changes instead of “accepting all” to get the desired result. This is nearly impossible if you have no knowledge of the generated code.

Using a local model is not officially supported yet, so you will always need an internet connection to use Cursor’s AI features.

Beyond everything related to the “usefulness” and “applicability” for developers, there is still the privacy aspect: if you are building software for an Enterprise company and are not allowed to expose the code to AI LLM models of other parties, you can configure Cursor to use a private instance in Azure, but that requires extra effort and money to set up.

If you have no (or little) development experience, a tool like Cursor also brings the danger of taking shortcuts through the learning process of basic skills in software development. While Cursor often provides an explanation of how the suggested solution works, the risk remains that you ask twenty questions and see great results. But if something goes wrong or doesn’t work, skills like understanding code, recognizing structures, and understanding logic are essential to having a solid solution by the end of the day.

Conclusion

Cursor is the first tool (as far as known) with such built-in AI support that it feels “natural” to start implementing everything with AI even after a day.
By asking questions about the structure of your entire solution (for example: “create an MVVM setup for my project”) and then asking clear functional questions (prompts) to create a UI screen with styling according to a certain library, you can quickly achieve a result.

As your application becomes more complex and larger, you will notice that you need to ask more detailed questions and also continually validate through testing that all functionality continues to work. Cursor can certainly help you implement unit tests or functional tests.
Cursor continuously shares examples online of young people or non-techies building an application within a day, but let this not be proof that you don’t need to know anything.

All in all, Cursor — especially if you are familiar with or interested in software development — provides a productivity boost that, if used correctly, gets you to the desired result faster.
It is not a holy grail for developers, and it does not always deliver the output you want.
But for $20 a month, it’s certainly a worthy investment if you want an AI boost to implement functionality faster.

Discover and read more posts from Edwin Klesman
get started