Ai Coding Tools

How to Write Your First AI-Powered Code Using Cursor in Under 30 Minutes

By BTW Team3 min read

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

In short

A step-by-step tutorial for beginners on how to create a basic application using Cursor, allowing them to harness AI coding capabilities quickly.

As a beginner in coding, diving into AI can feel overwhelming. You might be thinking, "How can I leverage AI to make coding easier without getting lost in complex frameworks?" If you’re like me, you want to build something functional quickly without spending weeks on setup. That's where Cursor comes in. With its intuitive interface and AI capabilities, you can write your first AI-powered code in under 30 minutes. Let's jump in!

Prerequisites

Before you start, make sure you have the following:

  • A Cursor account (free to sign up)
  • Basic understanding of programming concepts (variables, functions)
  • A code editor installed (like VS Code)

Step 1: Set Up Your Cursor Account

  1. Go to the Cursor website and sign up for a free account.
  2. Verify your email to activate your account.
  3. Log in to your Cursor dashboard.

Expected Output: You should see a clean dashboard with a "New Project" button.

Step 2: Create Your First Project

  1. Click on "New Project."
  2. Choose a project type (for beginners, I recommend starting with a "Console Application").
  3. Name your project (e.g., "AI-Powered Hello World").

Expected Output: A new project page with an editor window.

Step 3: Write Your First Code Using AI

  1. In the editor, type a comment like // Create a simple greeting function.
  2. Highlight the comment and click the "AI Suggest" button in the toolbar.
  3. Cursor will generate a basic function for you.

Expected Output: A code snippet that defines a function to return a greeting.

Step 4: Test Your Code

  1. Click the "Run" button in the Cursor interface.
  2. Check the output in the console window.

Expected Output: Your greeting function should display a message like "Hello, World!" in the console.

Troubleshooting: What Could Go Wrong

  • Issue: The AI doesn't generate the expected code.

    • Solution: Try rephrasing your comment to be more specific. For example, instead of just // Create a greeting function, try // Write a function that returns 'Hello, [name]'.
  • Issue: The code doesn’t run.

    • Solution: Double-check for syntax errors or missing function calls.

What's Next

Now that you’ve successfully written your first AI-powered code, consider exploring more complex projects. Cursor allows you to:

  • Integrate APIs for dynamic data
  • Build web applications with frameworks like React or Flask
  • Experiment with machine learning models

Tool Comparison: Cursor vs. Other AI Coding Tools

| Tool | Pricing | Best For | Limitations | Our Verdict | |-------------|---------------------------------|------------------------------|-------------------------------------------|--------------------------------| | Cursor | Free tier + $20/mo pro | Beginners who want quick AI | Limited advanced features in free tier | Easy to start with AI coding | | GitHub Copilot | $10/mo | Experienced developers | Can be expensive for solo founders | Powerful, but a steep learning curve | | Tabnine | Free tier + $12/mo pro | Team collaborations | Limited context understanding | Good for teams, less for solo | | Replit | Free + $7/mo pro | Online collaborative coding | Slower performance on complex projects | Great for quick iterations | | Codeium | Free | General coding assistance | Limited to specific languages | Good for quick fixes |

What We Actually Use

In our experience, we primarily use Cursor for quick prototypes and GitHub Copilot for more advanced projects. Cursor's simplicity makes it a no-brainer for beginners, while Copilot is great once you’re ready to tackle more complex coding tasks.

Conclusion: Start Here

If you’re a beginner looking to dip your toes into AI-powered coding, Cursor is the best place to start. With just 30 minutes and a little curiosity, you can write functional code and pave the way for more complex projects. Don’t overthink it; dive in and start creating!

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