Ai Coding Tools

How to Use Cursor to Write Your First 100 Lines of Code in Under 30 Minutes

By BTW Team3 min read

How to Use Cursor to Write Your First 100 Lines of Code in Under 30 Minutes

If you're a complete beginner looking to dip your toes into coding, the thought of writing your first 100 lines of code can feel daunting. You might be wondering where to start, what tools to use, and how to make the process as smooth as possible. In our experience, using Cursor—a tool that leverages AI to assist in coding—can significantly shorten the learning curve. In this guide, I’ll show you how to get started with Cursor and write your first 100 lines of code in under 30 minutes.

Prerequisites: What You Need Before You Start

  1. Cursor Account: Sign up for a free account on Cursor.
  2. Basic Understanding of Programming Concepts: Familiarize yourself with basic programming terms such as variables, functions, and loops.
  3. Text Editor: While Cursor has built-in capabilities, using a text editor like VSCode or Sublime can enhance your experience.

Step 1: Set Up Your Environment

Start by installing Cursor. Here’s how to do it:

  1. Go to the Cursor website and sign up for an account.
  2. Download and install the application on your computer.
  3. Open the application and create a new project.

Expected Output: You should see a clean interface ready for coding.

Step 2: Choose Your Language

Cursor supports various programming languages like Python, JavaScript, and Ruby. For beginners, I recommend starting with Python due to its readability.

  1. In Cursor, select Python as your programming language.
  2. Familiarize yourself with the basic syntax: print statements, variable assignments, and simple functions.

Expected Output: You should be able to run a simple print command, such as print("Hello, World!").

Step 3: Write Your First Lines of Code

Now comes the fun part—actually writing code. Here’s a simple program to get you started:

# Simple Python Program
def greet(name):
    return f"Hello, {name}!"

print(greet("World"))
  1. Type the code above into Cursor.
  2. Use Cursor’s AI assistance to help with any syntax errors or suggestions.
  3. Run the code to see your output!

Expected Output: You should see "Hello, World!" printed in the console.

Step 4: Expand Your Code

Once you’ve successfully run your first program, let’s add more functionality. Here’s how you might expand your code to include a simple calculator:

def add(a, b):
    return a + b

def subtract(a, b):
    return a - b

print(add(5, 3))
print(subtract(10, 4))
  1. Add the new functions to your existing code.
  2. Run it again to see your calculator in action!

Expected Output: You should see the results of the additions and subtractions.

Troubleshooting: What Could Go Wrong

  • Syntax Errors: If your code doesn’t run, check for missing colons or parentheses.
  • Logical Errors: If the output isn’t what you expect, double-check your math.
  • Cursor Issues: If Cursor is unresponsive, try restarting the app.

What’s Next: Progressing Beyond 100 Lines

Congratulations on writing your first 100 lines of code! Here’s how to continue your journey:

  1. Explore More Functions: Try creating more functions and combining them.
  2. Learn Data Structures: Start using lists, dictionaries, and loops.
  3. Build a Simple Project: Consider creating a small project like a to-do list or a simple game.

Conclusion: Start Here

Cursor is an excellent tool for beginners, but it’s essential to remain patient and persistent. You won’t master coding in 30 minutes, but using Cursor can help you write your first lines quickly. Remember, practice is key. Start by experimenting with the code snippets provided and gradually expand on them.

What We Actually Use: In our own coding journey, we use Cursor for quick prototypes and learning exercises. Its AI assistance saves us time and helps us avoid common pitfalls.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

Top 5 AI Coding Tools for Experienced Developers in 2026

Top 5 AI Coding Tools for Experienced Developers in 2026 As an experienced developer, you know that coding tools can make or break your productivity. In 2026, the landscape of AI c

Aug 21, 20264 min read
Ai Coding Tools

How I Leveraged GitHub Copilot to Build a Personal Portfolio Site in 48 Hours

How I Leveraged GitHub Copilot to Build a Personal Portfolio Site in 48 Hours Building a personal portfolio site can feel like a daunting task, especially when you’re juggling a fu

Aug 20, 20264 min read
Ai Coding Tools

Bolt.new vs GitHub Copilot: Which AI Tool is Better for Coders?

Bolt.new vs GitHub Copilot: Which AI Tool is Better for Coders? As a solo founder or indie hacker, you know the struggle of writing code efficiently while juggling multiple project

Aug 20, 20263 min read
Ai Coding Tools

How to Build Your First App Using an AI Coding Assistant in Under 2 Hours

How to Build Your First App Using an AI Coding Assistant in Under 2 Hours Building your first app can feel like an overwhelming task. The good news is that, with the right tools, y

Aug 20, 20264 min read
Ai Coding Tools

Bolt.new vs Cursor: Which AI Tool is Best for Solo Developers 2026?

Bolt.new vs Cursor: Which AI Tool is Best for Solo Developers 2026? As a solo developer, finding the right tools can feel overwhelming, especially when it comes to AI coding assist

Aug 20, 20263 min read
Ai Coding Tools

8 Common Mistakes When Choosing AI Coding Tools

8 Common Mistakes When Choosing AI Coding Tools In 2026, the landscape of AI coding tools has exploded, making it both exciting and overwhelming for indie hackers and solo founders

Aug 20, 20265 min read