Don’t Be Misled by “5-Minute App Writing”: In-Depth Practice with Cursor

In August this year, I tried out Cursor and was very impressed, so I wrote an article introducing Cursor[1]. Soon after, I completely transitioned my daily work environment from GitHub Copilot + JetBrains to the paid version of Cursor, and after a few months of use, it feels incredibly smooth.

While using it myself, I frequently recommend Cursor to colleagues and friends, but I found that many still have questions, such as:

  • What advantages does it have compared to native ChatGPT and Claude? Or is Cursor’s strength mainly due to Sonnet 3.5?
  • How does it differ from GitHub Copilot? Why is it twice as expensive?
  • Is Cursor only suitable for quickly writing a small demo from scratch?
  • Codeium recently launched Windsurf, and from the blogger’s video, it seems even smoother. Should I switch?
  • Is Coding Copilot only useful for beginners?
  • In the wave of AI Copilots, how should we improve our coding skills? Or will we eventually be completely replaced by Agents?

There are quite a few questions here, and I hope this article can reveal some of the charm and practical insights of Cursor/Coding Copilot.

Introduction and Positioning of Cursor

Cursor is a company founded by several very young MIT students in 2022, at a time when GitHub Copilot already had a substantial presence. When the product was first launched, I briefly tried it and found it very simple, as if it just integrated the process of conversing with ChatGPT/Claude to generate code into VSCode, without anything particularly special…

However, the subsequent development surprised almost everyone. Let’s take a look at the situation at that time:

  • For professional developers, GitHub Copilot undoubtedly has the most advantages, having truly achieved the PMF of Coding Copilot on its own, reaching an ARR of 100 million dollars. GitHub and VSCode are both under Microsoft, and the strongest code model at that time came from OpenAI’s GPT-3.5, Codex, which was also closely partnered with Microsoft.
  • For ordinary people who do not understand programming, products like ChatGPT, Claude, or Replit occupy the largest traffic entry points. For most one-off needs or demo projects, these products can generally accomplish the task well, and it is not clear what advantages there would be in moving this to VSCode.
Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Generate websites with a single line using bolt.new

So why does Cursor have the courage to “magically modify” Microsoft’s IDE and call upon the OpenAI model, which is closely partnered with Microsoft, to compete with these major players?

Based on my personal experience and after watching the interview with Cursor’s founding team[2], I found that they managed to pinpoint several very sharp points for entry:

  • Cursor’s positioning is very clear: it is still for professional developers. So they do not compete with ChatGPT, v0, bolt, etc., and even the visions behind the two may be very different (Will programmers still exist?). If a user cannot distinguish between the two, they are definitely not their target users.
  • Their most unique insights at the time may have been:Writing code is not just about “completion” but about “editing,” which includes deletion + completion. This may seem obvious, but at the time, all Coding Copilots only had simple completion. Even today, the experience of Cursor Tab is unique, and of course, Windsurf has started to imitate it.
  • This thinking about editing is further extended to generating code in chat and then applying it to generate the editing diff for an entire file or even multiple files. The experience process also reflects their deep understanding of the programmer’s workflow.
  • The intelligence of large models has been continuously improving from GPT 3, 3.5 to 4, but the experience of GitHub Copilot seems to have not changed much. Therefore, the problem of slow product iteration in large companies is a real issue. The Cursor team feels they can explore some interesting ideas more quickly and truly unleash the potential of model capability.

This underlying thinking is still very worth learning from, clear positioning, deep understanding of the “workflow,” and rapid iteration have enabled such a small team to shake up a giant like GitHub Copilot.

Cursor Workflow

As mentioned earlier, Cursor’s positioning is for professional developers, and here we can clarify the scenarios where it provides the most value and how it differs from other products:

  • Whether you are a novice programmer or a senior developer, Cursor will be very helpful. Here, I want to especially remind senior developers not to give up trying this new programming paradigm just because of confidence in their own abilities.
  • For professional developers, generally most of the time is spent maintaining existing medium to large projects, rather than writing new projects from scratch every day. Therefore, many online tutorials on “writing an app from scratch” are actually not typical at all and do not reflect the differences between Cursor and products like Claude Canvas.
  • The current model’s capabilities are still insufficient to complete the development of an entire feature in large projects just by a few commands, so if you rely too much on chat for development, your success rate may not be very high. A better approach might be to treat Cursor as a “Copilot Programmer” in pair programming, rather than an “Intern Programmer.”

Next, let’s look at how to actually use Cursor’s features to improve efficiency in real daily work.

Cursor Tab

This is currently Cursor’s core advantage feature. Simply put, it can predict the next code you want to edit and automatically help you complete it. Let’s look at a few scenarios.

Scenario 1: Change print to logger

On a sunny morning, you and your pair programming partner are modifying a piece of code. You might tell your partner that during prototype development, this file used many print statements, and now that it is going live, we should change them all to logger outputs. You may also need to note that different information should choose different logging levels when outputting.

For this request, you can of course bring up the chat window in Cursor with “CMD + L” and type in the whole sentence, waiting for Cursor to generate the entire file’s diff. But this intention can also be implicitly expressed by “writing code”. For example, you can directly write in the file:

import logging

logger = logging.getLogger(__name__)

# Existing code omitted..
Python

Then, you only need to change the first print statement, and your programming partner, Cursor, will understand your meaning. Next, just tab tab tab, and you will be amazed to find that Cursor can “guess” all the places you want to modify and intelligently set the correct logging levels.

Please note the time taken to write the above code compared to the time spent typing the entire request in the chat window. It may be shorter, and it saves the time for the subsequent apply + review + accept. So many times, we can consider whether expressing certain intentions through writing example code/simple comments would be faster.

Scenario 2: Add function parameters

This is also a common scenario. Instead of using natural language to say I want to add a parameter to a function, explaining what this parameter is for, and needing to modify the places where this parameter is used and where the function is called, sometimes you can just edit this function, write the parameter, and Cursor will understand your intention. As seen in an example from Cursor’s official website:

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Automatically understanding parameter change intentions

All you have to do is add the <span>dropout</span> parameter in the <span>__init__span></span> method, and Cursor will automatically help you fill in the places that need to be used. If there are places in the file that call <span>LSTMModel</span>, Cursor will also make initialization modifications accordingly.

Many of these small refactorings that cannot be completed directly with the IDE can be well understood and quickly accomplished using Cursor Tab.

Differences from GitHub Copilot

In fact, the approach of expressing intentions through writing code is likely something you unconsciously use when using other completion products. For example, sometimes when Copilot’s completion is incorrect, you might:

  • Type a few more words to guide Copilot in the right direction.
  • Delete a bit of the previous code to make Copilot forget the later content and regenerate.
  • Change the cursor position, hey Copilot, start completing from here!

You will find that Cursor Tab actually automates the actions of “deleting a bit” and “changing the cursor position.” Thus, the user experience is more “intelligent” compared to GitHub Copilot and others.

Inline Chat

Using “CMD + K” during editing can bring up an inline chat window at the cursor position or on selected code, which offers two main benefits compared to the sidebar chat:

  • Inline chat provides intention information about the cursor position and focuses on the “editing” task.
  • The floating window can open multiple locations for “parallel” tasks, allowing you to work on several tasks without waiting for the previous one to finish.

I personally prefer using inline chat for the following tasks:

  • Template code generation, for instance, writing a new API, DB operation, data model, etc., based on other parts of this file. This type of low-entropy code generation is something Cursor generally handles well, saving a lot of time.
  • Selecting a piece of code and asking Cursor to add some comments, checking if there are any unclear parts.
  • Selecting the name of a function/variable and asking Cursor to suggest a better name.
  • You can also invoke it in the terminal, asking it to help write some complex command line instructions, such as docker, git, etc. So is Warp no longer needed?
Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Generating commands in the terminal

Chat

The standard sidebar chat is the most familiar form for everyone and can easily be compared to products like ChatGPT/Claude. As a professional IDE, the differences when developing existing projects are quite obvious, especially in terms of context acquisition. Let’s look at a few typical scenarios.

Scenario 1: Refactoring/Function Modification

For instance, if we need to work with a programming partner on a refactor, modifying a model in the <span>model</span> layer requires making multiple corresponding changes in the files that call this model, including some complex control flow judgments. If you use ChatGPT to solve this, you need to input the changes made to the model, the current file, and the instructions themselves, then wait for ChatGPT to generate new code, copy it back, and check for any mistakes. Here, the inconveniences of using native ChatGPT become apparent:

  • The context in the prompt needs to be manually searched and organized, requiring multiple copy-pastes.
  • After generating the code, you need to manually copy it back.
  • You need to use a diff tool to check if the copied code has missing, extra, or incorrect modifications.
  • If there is a problem, you have to copy the error message and repeat the above process.

In Cursor, you can very smoothly resolve the above pain points:

  • If you want to tell Cursor which file to reference, you can flexibly specify folders, files, or certain code definitions using <span>@</span>.
  • After generating code, you can apply it with one click, and Cursor will directly apply it to the current file, generating a “pull request” style diff for you to review.
  • If there are issues, you can ask follow-up questions to continue iterating. Of course, like other AI tools, you need to be aware of the “session pollution” issue sometimes and consider reopening a session to describe all the information again.
  • After accepting changes, you may find lint errors or automated test failures. You don’t need to manually copy the error messages; you can directly use AI Fix in Chat (for lint) or Debug with AI (for terminal). Although this is a small feature, the improvement in experience is really delightful.
Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Automatically sending errors to Cursor for fixing

In the example above, I ran <span>mypy</span> in the command line for code checking and encountered two errors. Then, all I needed to do was click the Debug with AI button, and the errors were automatically sent to Cursor Chat, generating the code diff. After acceptance, everything worked fine. This efficiency is incredibly high.

Scenario 2: Unit Test Generation

Whether you are in the TDD camp or prefer to write functionality first and then add tests, you can communicate with Cursor to help quickly build the template code for tests (including various dependencies, mocks, etc.) and continuously iterate to cover more scenarios.

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Generating unit tests

After writing, you can run it directly, and if there are errors, you can use the above Debug with AI feature to let Cursor help quickly fix them.

Scenario 3: Performance Optimization

This is a case from the official website, seemingly working on optimizing some Rust code. We can also use chat to let Cursor quickly review an entire file and propose checks and optimization needs regarding performance, stability, security, etc.

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Rust performance optimization

Scenario 4: Combining Network Search

When debugging some issues and learning new frameworks, we often use devv[3], phind[4] and other code-related perplexity[5]. We can also use the <span>@Web</span> command to let Cursor perform some online searches, gaining more comprehensive and up-to-date knowledge and information, and then providing more targeted solutions based on our codebase. For example, we could try asking Cursor to help us migrate from <span>poetry</span> to <span>uv</span>:

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Combining network search

It can be seen that traditional scenarios that require frequent online searches can also be attempted to be solved using Cursor, including many environment configurations, dependency installations, and troubleshooting.

Additionally, there is a similar feature called <span>@Docs</span>, especially suitable for cases where there are significant version changes that are incompatible among very popular libraries. For instance, Pydantic version 1.x has been around for a long time, and during model training, it may have formed a relatively solid memory. However, if the project is actually using Pydantic version 2.x, it would be very necessary to bring in the URL of the new version documentation for reference, greatly improving the accuracy of the generated code.

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Built-in documentation can also be imported

Scenario 5: Code Review

This was a separate tab in the old version, but in the new version, it seems to have upgraded to “Bug Finder” and requires payment based on usage… However, we can still use <span>@Git</span> in chat to let Cursor help us review the code, which can still discover some potential bugs. For better results, it may require some prompt optimization.

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
AI Code Review

So compared to inline chat, the variety of tasks that can be performed in the chat window is more diverse, and it doesn’t have to be just code editing; it can also be pure chatting, providing emotional support.

Other Context Generation

It can be observed that in chat, using the <span>@</span> operator, you can freely control the current chat context, which is very similar to communicating with a real programmer. Aside from what has been mentioned, you can also:

  • <span>@Recommended</span> to automatically recommend the context to be included.
  • <span>@Codebase</span> to introduce the entire codebase, such as reading and understanding the entire project code or finding the implementation of specific functions.
  • <span>@Notepad</span> is a feature I use less frequently. A common use case is to open a notepad and let AI generate some functional development plans, which can then be referenced in specific code files.
  • <span>@Lint errors</span> to automatically fix code issues detected by the lsp.

This ability to flexibly control context reflects the Cursor team’s deep understanding of programmers’ daily workflows and clearly distinguishes it from generic chatbots.

Additionally, features like uploading design diagrams in chat for Cursor to implement basic functions are also available. However, the current reasoning ability of large models combined with images is still somewhat weak, so the practicality of this feature is not strong yet.

Composer

Many bloggers have recommended this feature. I understand it mainly as expanding single-file editing in chat to multi-file editing and creation. In fact, before version 0.43, I used this feature relatively little because the current model’s capabilities struggle to accurately generate cross-file edits in complex projects (students with different opinions are welcome to provide examples).

So simply put, the complexity of editing tasks can be roughly matched to tab -> inline chat -> chat -> composer, forming a progressive relationship.

Interestingly, with the launch of Windsurf[6], it seems that the previous composer agent workflow was too simplistic, leading to poor results? Although Windsurf’s Cascade requires more time to “think,” it often achieves better results than composer using the same model. Thus, Cursor quickly introduced the composer agent mode in version 0.43.

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Using composer to read open source code

Now, Cursor will also conduct multi-step context retrieval, reading, executing commands (terminal), obtaining return information, and judging the next steps in the process, finally resembling a ReAct agent. In fact, we have already seen that Cursor has embedded AI capabilities at various stages, and using an agent to connect these capabilities is a natural evolution.

Some demonstrations have also shown composer being used in areas outside of code, such as retrieving and querying personal knowledge stored in local markdown files like Obsidian, but in the new version, composer seems to be more focused on coding scenarios. I have tried several times but have not triggered document retrieval. However, in chat, this can be achieved using <span>@Codebase</span>.

Other Tips

Another feature worth mentioning is the <span>cursorrules</span> file, which can be simply understood as a general knowledge description for the current project. For example, it can include:

  • Some regulations regarding the technology stack used in the current project, such as specific framework versions.
  • Code standards agreed upon for the project, such as naming, comments, error handling, logging standards, performance, and security considerations.

You can find some project templates in cursor.directory[7] and modify and use them according to your project.

AI-Assisted Programming Thoughts

From the above introduction, we can see that Cursor can assist in completing some “low-entropy” tasks in our daily work, such as:

  • Habitual writing styles in various programming languages and frameworks. Even in frameworks you are not familiar with, Cursor can help you quickly get started.
  • Common writing styles and expressions in the project library, the clearer your project architecture and the more readable the code, the greater the proportion of this part will be.
  • Running code, encountering errors, searching, and attempting fixes can also be aided by Cursor to improve efficiency.

From the perspective of the “flow state” theory, on one hand, through auto-completion and chat, Cursor helps us complete those low-difficulty “boring” typing tasks very well; on the other hand, the rich knowledge of large models combined with in-depth analysis of the codebase context (aided by RAG) can also greatly enhance programmers’ knowledge, reducing the challenges and anxiety brought about by unfamiliar technologies and code. Daily use feels like truly engaging in pair programming with a virtual programming partner, allowing us to maintain focus and creativity.

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor
Cursor helps you enter the flow state

To better utilize these tools to enhance productivity in the AI era, our focus will increasingly shift towards design and validation in these two stages.

  • As a virtual programming partner, Cursor, like humans, needs to understand the code we write to provide better suggestions. Therefore, the importance of writing clear and readable code has further increased in the AI era.
  • A sufficiently clear code organization will make it easier for us to find suitable context when using <span>@</span> commands, which will be felt deeply during the in-depth use of Cursor. Principles like good naming and single responsibility are very helpful.
  • AI and human programmers have significant differences in intelligence patterns. If you are developing applications related to LLMs, you may pay more attention to some differences in how AI reads code, such as writing more examples and thought processes in comments, avoiding complex “multi-hop retrieval” logic, and occasionally asking AI how it understands a piece of code or letting it try to use your code to complete some tasks to optimize its thinking logic (similar to optimizing prompts).
  • As the AI’s ability to generate code becomes stronger and faster, how to efficiently review and validate this content will quickly become a bottleneck. On one hand, automated testing may become increasingly important; on the other hand, products like Cursor should also gradually begin to provide some auxiliary tools for code review.

Of course, I don’t have many personal thoughts on this yet, and I welcome everyone to share ideas and discuss.

Brief Review of Other Products

Here, we will briefly compare some other AI-assisted programming products:

  • OpenAI Canvas, Claude Artifacts are more aimed at the general public, mainly targeting “one-time” code or MVP building. They generally do not provide context integration with existing codebases or adapt to complex IDE development processes like Cursor.
  • GitHub Copilot, Codeium, Supermaven, and other IDE plugin products still have a significant gap in the experience of completion itself. Cursor Tab is likely a specially trained model, but the technical barriers may not be very high, and it is unclear why GitHub Copilot has not followed suit. The same applies to chat; previously, GitHub Copilot did not have the ability to flexibly control context.
  • “Agent” type products, such as the previously popular devin, replit, bolt, v0, etc. If the positioning is too general, it is currently difficult for these products to achieve good results. If focused on a specific field, such as front-end code generation, it may be somewhat better, but still limited to small demo generation. This may involve everyone’s vision for the future of AI programming and whether the profession of programming will disappear.
  • Windsurf, currently faces the biggest issue of lacking in auto-completion, and because it is relatively new, many features (like Python lsp) and stability are not as good as Cursor. However, it’s worth noting due to its lower price.
  • Cursor’s open-source alternatives, such as aider[8] and cline[9]. Overall, the advantage lies in being able to pay as you go, but the experience is still not as refined as Cursor’s overall polish.
  • JetBrains AI actually has many loyal users in the Java ecosystem compared to VSCode, which prevents many from switching to Cursor. However, JetBrains AI’s market reviews seem quite poor, including the functionality of installing the GitHub Copilot plugin on JetBrains being considerably weaker…

In summary, as of December 2024, if you’re not experimenting, using Cursor is quite good. If you are migrating from JetBrains, it’s not a big issue:

  • Search for recommended plugins for specific languages to install. VSCode supports front-end, Python, Rust, Go, etc., quite well.
  • It’s best to relearn the shortcuts, although you can also install the IntelliJ IDEA Keybindings plugin.
  • Global search with Double shift is gone; you need to combine CMD + P, CMD + T, SHIFT + CMD + F…
  • Graphical Git operations seem to be a bit weaker, but generally sufficient.
  • Customizability is high but also brings many small detail issues, with pros and cons.

More detailed introductions can be found by searching for migration guides on this topic.

Looking to the Future

From the perspective of the Cursor product, we can think about future improvement directions from both the Agent framework and the programmer workflow aspects. However, this article is already quite long, so I won’t elaborate too much. Here are a few points summarized from previous mentions:

  • If we consider Cursor as a virtual programming partner, then integrating real-time voice modalities would be quite interesting, allowing for generating code while describing it.
  • How to efficiently review AI-generated code is an important direction, including our current code review products, which have significant room for improvement in organizing review content, which is very rigid.
  • Can assistance be provided at the code architecture design level? The first step may be to allow Cursor to form some “hierarchical understanding” of the code, rather than a flat context.

Another question worth discussing is how the programmer profession will change.

  • Cursor clearly aims to be a “high-level tool” for professional programmers, believing that the programmer profession will exist long-term and cannot be completely replaced by AI. The way Cursor is used has a relatively high threshold, designed more according to the current working methods of programmers.
  • On the other hand, products like devin, magic.dev, etc., seem to be heading towards a general Coding Agent that can fully replace programmers. Will the future be one where “everyone can develop applications” or “only product managers are enough”?

Last year, when I tried MidJourney and Suno, I had a feeling that perhaps everyone would be a digital artist in the future. But soon I realized that I personally did not have the “creative impulse” in this area, even when shown a lot of others’ creations; I often couldn’t describe what I wanted to paint. In the end, my needs mainly converged to generating a cover image when writing articles. This functionality may be directly integrated into many self-media platforms in the future.

Currently, my thoughts on the future of programming are similar; code creation may cover fewer people compared to art, writing, music, and video. Ordinary people may rarely think about wanting to develop their own app. However, some personalized vertical scenarios that may require code generation might be included as a feature in other vertical products.

What are your thoughts? Feel free to leave comments for discussion.

Benefits

Thanks to Tsinghua University Press for sponsoring 4 copies of “Algorithms Are Not Difficult: Illustrated + Python Implementation.” As usual, leave a comment to receive a book!

Don't Be Misled by "5-Minute App Writing": In-Depth Practice with Cursor

References

[1]

An article introducing Cursor:https://zhuanlan.zhihu.com/p/716192597

[2]

Interview with Cursor’s founding team:https://www.youtube.com/watch?v=oFfVt3S51T4

[3]

devv:https://devv.ai/

[4]

phind:https://www.phind.com/

[5]

perplexity:https://www.perplexity.ai/

[6]

Windsurf:https://codeium.com/windsurf

[7]

cursor.directory:https://cursor.directory/

[8]

aider:https://aider.chat/

[9]

cline:https://github.com/cline/cline

Leave a Comment