Ai Coding Tools

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

By BTW Team4 min read

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

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.

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

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for Beginners

10 Common Mistakes When Using AI Coding Tools for Beginners As a beginner in coding, diving into AI coding tools can feel like a doubleedged sword. On one hand, these tools promise

Oct 8, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back As a solo founder or indie hacker, you might be considering leveraging AI coding tools to boost your produc

Oct 7, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools That Will Hurt Your Learning

5 Common Misconceptions About AI Coding Tools That Will Hurt Your Learning As a beginner in coding, diving into the world of AI coding tools can feel like stepping into a futuristi

Oct 6, 20263 min read
Ai Coding Tools

10 AI Coding Tools Beginners Overlook in 2026

10 AI Coding Tools Beginners Overlook in 2026 As a beginner in coding, diving into the vast ocean of AI tools can feel overwhelming. While flashy tools often grab the spotlight, ma

Oct 6, 20265 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools That Beginners Believe

5 Common Misconceptions About AI Coding Tools That Beginners Believe As a solo founder or indie hacker, diving into the world of AI coding tools can feel overwhelming, especially i

Oct 5, 20263 min read