Ai Coding Tools

How to Use GitHub Copilot to Write Your First 50 Lines of Code in 30 Minutes

By BTW Team3 min read

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

In short

A hands-on tutorial to help beginners leverage AI to jumpstart coding projects quickly.

If you're a solo founder or indie hacker, you're likely juggling many tasks at once, and coding can feel like a daunting mountain to climb. Enter GitHub Copilot, an AI-powered code assistant that can help you write code faster and with less hassle. The best part? You can get your first 50 lines of code down in about 30 minutes. Sounds too good to be true? Let's break it down step-by-step.

Prerequisites: What You Need to Get Started

Before diving into GitHub Copilot, here’s what you need:

  1. GitHub Account: Free to sign up.
  2. Visual Studio Code (VS Code): Download and install it from here.
  3. GitHub Copilot Subscription: As of June 2026, it costs $10/month after a free trial.
  4. Basic Understanding of Coding: Familiarity with programming concepts will help, but you don’t need to be a pro.

Step 1: Install GitHub Copilot

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side.
  3. Search for "GitHub Copilot" and click "Install."
  4. Sign in to your GitHub account when prompted.

Expected Output: You should see GitHub Copilot icon enabled in the sidebar.

Step 2: Start a New Project

  1. Create a new folder for your project.
  2. Open that folder in VS Code.
  3. Create a new file, for example, app.js.

Expected Output: You should now have a blank JavaScript file ready for coding.

Step 3: Prompt GitHub Copilot

Start typing a function or a comment about what you want to achieve. For example, type:

// Function to add two numbers

Expected Output: GitHub Copilot will automatically suggest code. Press Tab to accept the suggestion.

You can repeat this process for more functions or features you want to implement.

Step 4: Write Your First 50 Lines

Here’s a quick list of code snippets you might write:

  1. Adding two numbers
  2. Subtracting two numbers
  3. A function to multiply numbers
  4. A function to divide numbers

Expected Output: You’ll have a basic calculator app with about 50 lines of code in no time.

Troubleshooting: What Could Go Wrong

  • Copilot Doesn't Suggest Anything: Make sure you're providing enough context in your comments or code.
  • Code Doesn't Work: GitHub Copilot's suggestions may not always be perfect. Test each function after acceptance and tweak as necessary.

What's Next: Building on Your Foundation

Once you’ve got your first 50 lines down, consider the following next steps:

  1. Explore More Functions: Expand your calculator with additional features like handling edge cases.
  2. Integrate with a Frontend: If you're feeling adventurous, try linking it to a simple HTML page.
  3. Learn About Testing: Start writing tests for your functions to ensure they work as expected.

Conclusion: Start Here

Using GitHub Copilot can significantly speed up your coding process and help you overcome the initial hurdles of writing code. If you're just starting, I recommend you dive into this tool and experiment with it. You'll be surprised at how quickly you can produce functional code.

In our experience, GitHub Copilot is best for solo founders and indie hackers who want to prototype quickly without getting bogged down in syntax errors or boilerplate code.

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