Ai Coding Tools

How to Use GitHub Copilot to Write 100 Lines of Code in 30 Minutes

By BTW Team4 min read

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

In short

A step-by-step tutorial on leveraging GitHub Copilot's AI capabilities to rapidly generate functional code segments, aimed at novice developers.

If you’re a solo founder or an indie hacker, you know that time is often your most precious resource. Writing code can be a time-consuming task, especially when you’re juggling multiple projects. Enter GitHub Copilot: an AI-powered coding assistant designed to help you write code faster. In this guide, I’ll show you how to leverage Copilot to crank out 100 lines of code in just 30 minutes.

Prerequisites: What You Need

Before diving into the coding session, here are a few things you’ll need:

  • A GitHub account (free).
  • Visual Studio Code installed on your machine.
  • GitHub Copilot extension installed in Visual Studio Code (free trial available; $10/month thereafter).
  • Basic understanding of the programming language you plan to use (JavaScript, Python, etc.).

Step 1: Set Up Your Environment (5 Minutes)

  1. Install Visual Studio Code: If you haven’t already, download and install Visual Studio Code from here.
  2. Install GitHub Copilot: Go to the Extensions Marketplace in VS Code, search for “GitHub Copilot,” and install it. You’ll need to log into your GitHub account and authorize the extension.
  3. Create a New Project: Open a new folder in VS Code and create a new file (e.g., app.js or script.py).

Step 2: Define Your Project Scope (5 Minutes)

Before you start coding, it's crucial to know what you want to accomplish. For this example, let’s say we’re building a simple web application feature—like a to-do list. Outline the primary functions you need:

  • Add a task.
  • Mark a task as complete.
  • Delete a task.
  • List all tasks.

Step 3: Use GitHub Copilot to Generate Code (15 Minutes)

Now comes the fun part. Here’s how to effectively use Copilot to generate code based on your outlined features:

  1. Start with Comments: Write a comment describing what you want to do. For example:

    // Function to add a task
    

    Copilot will suggest code for you based on this comment. Accept the suggestions by pressing Tab.

  2. Iterate for Each Function: Repeat this process for each function:

    // Function to mark a task as complete
    // Function to delete a task
    // Function to list all tasks
    
  3. Review and Edit: After generating the code, review it. Make any necessary tweaks to fit your specific requirements. This is where you refine the AI-generated code.

Step 4: Test Your Code (5 Minutes)

Once you have your 100 lines of code (or close to it), run your application to see if everything works as expected. You can do this in your terminal or through a browser if it’s a web app.

Expected Outputs:

You should see:

  • A working interface for adding, completing, and deleting tasks.
  • No syntax errors or crashes.

Troubleshooting: What Could Go Wrong

  1. Syntax Errors: If Copilot generates code that doesn’t compile, look for mismatched parentheses or incorrect variable names.
  2. Logic Errors: If the functionality isn’t working as expected, check the logic in the generated code. Sometimes, you might need to adjust how functions interact.

What’s Next

Once you’ve built your feature, consider expanding it. You might want to add user authentication, persistence (using a database), or even deploy it using a service like Vercel or Netlify.

Conclusion: Start Here

If you’re new to coding or just want to speed up your development process, GitHub Copilot is a powerful tool worth trying. Set aside 30 minutes, follow the steps outlined above, and you’ll be amazed at how much you can accomplish.

Pricing Breakdown for GitHub Copilot

| Feature | Pricing | Best For | Limitations | Our Take | |-----------------------|----------------------|-------------------------------|-----------------------------------------------|---------------------------------| | GitHub Copilot | Free trial, then $10/mo | Beginners to intermediates | Limited to specific languages and contexts | We use Copilot for rapid prototyping. |

What We Actually Use

In our experience, GitHub Copilot is best for generating boilerplate code quickly, but we still rely on manual coding for critical components to ensure quality. If you find Copilot isn’t working for you, consider alternatives like Tabnine or Codeium.

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