Ai Coding Tools

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

By BTW Team3 min read

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

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.

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

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
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