Ai Coding Tools

How to Write Your First Code Using Cursor in Just 30 Minutes

By BTW Team3 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step tutorial guiding beginners through writing their first simple code using the AI tool Cursor in just 30 minutes.

If you're a beginner looking to dip your toes into coding, the idea of starting can feel overwhelming. But what if I told you that you could write your first line of code in just 30 minutes? With Cursor, a new AI coding tool that has gained traction in 2026, it's easier than ever to get started. In this guide, I'll walk you through the process step-by-step, making it as painless as possible.

Prerequisites: What You Need to Get Started

Before we jump into writing code, let’s make sure you have everything set up.

  1. Cursor Account: Sign up for a free account at Cursor. The free tier provides enough features for beginners.
  2. Basic Understanding of Programming Concepts: Familiarity with terms like variables, functions, and loops will help, but it's not mandatory.
  3. A Computer and Internet Connection: You’ll need a device to access the web-based tool.

Step 1: Setting Up Your Workspace

First things first, you need to get familiar with the Cursor interface.

  1. Log in to Cursor: After signing up, log in to your account.
  2. Create a New Project: Click on “New Project” and name it something memorable, like “My First Code.”
  3. Choose a Language: For this tutorial, we’ll use Python because of its readability and beginner-friendliness.

Expected Output

At this stage, you should see an empty code editor ready for you to start coding.

Step 2: Writing Your First Line of Code

Now, let’s write a simple program that prints "Hello, World!" to the console.

  1. Type the following code:
    print("Hello, World!")
    
  2. Run Your Code: Click the “Run” button in Cursor.

Expected Output

You should see "Hello, World!" displayed in the output console. Congrats, you’ve just written your first line of code!

Step 3: Adding More Complexity

Let’s make our program a bit more interactive by asking for user input.

  1. Update Your Code:
    name = input("What is your name? ")
    print("Hello, " + name + "!")
    
  2. Run Your Code Again: Click “Run” and enter your name when prompted.

Expected Output

You should see a personalized greeting, like "Hello, [Your Name]!"

Troubleshooting: What Could Go Wrong?

  1. Syntax Errors: If you see an error message, double-check your code for typos. Cursor provides helpful hints for fixing common errors.
  2. Output Not Displaying: Ensure you ran the code after making changes. Sometimes, it might feel like magic, but it’s simply a button click away.

What’s Next?

Now that you've written your first code, you can expand your knowledge. Here’s what to explore next:

  • Learn About Variables: Understand how to store data.
  • Explore Functions: Start writing reusable blocks of code.
  • Dive into Libraries: Use libraries like NumPy or Pandas to handle data more effectively.

Conclusion: Start Here

By following these steps, you’ve successfully written your first code using Cursor in just 30 minutes. Cursor makes coding accessible, especially for beginners. If you're looking to continue your coding journey, I highly recommend checking out more features within Cursor to build more complex projects.

What We Actually Use

In our experience, we find that Cursor is an excellent tool for beginners. For those looking to dive deeper, consider supplementing with resources like Codecademy or freeCodeCamp for structured learning.

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read