Ai Coding Tools

How to Use GitHub Copilot to Write Your First 10 Lines of Code in Under 15 Minutes

By BTW Team3 min read

How to Use GitHub Copilot to Write Your First 10 Lines of Code in Under 15 Minutes

If you're a beginner developer staring at a blank screen, the thought of writing your first lines of code can be daunting. You might wonder where to start or if you’ll even be able to get something working. But what if I told you that you could write your first 10 lines of code in under 15 minutes? With GitHub Copilot, it’s not just possible; it’s actually straightforward. In this guide, I'll walk you through how to harness the power of this AI coding assistant effectively.

Prerequisites: What You Need to Get Started

Before diving in, here’s what you need:

  • GitHub Account: You’ll need an account to access Copilot.
  • Visual Studio Code (VS Code): This is the code editor we'll be using. It’s free and widely used.
  • GitHub Copilot Subscription: As of March 2026, Copilot costs $10 per month after a 60-day free trial.

Step 1: Set Up GitHub Copilot in VS Code

  1. Install Visual Studio Code: Download and install it from here.
  2. Install GitHub Copilot: Go to the Extensions view in VS Code (Ctrl+Shift+X), search for "GitHub Copilot," and click install.
  3. Sign in to GitHub: Once installed, you'll need to sign in to your GitHub account to activate Copilot.

Expected Output

After installation, you should see a GitHub Copilot icon in the sidebar, indicating it's ready to assist.

Step 2: Start Writing Code

  1. Create a New File: Open a new file in VS Code and set the language (e.g., JavaScript, Python).
  2. Prompt Copilot: Start typing a comment that describes what you want to do. For example, type // Function to add two numbers.
  3. Accept Suggestions: Copilot will suggest code. Press Tab to accept the suggestion.

Example Code

// Function to add two numbers
function add(a, b) {
    return a + b;
}

Step 3: Write Your First 10 Lines

Continue prompting Copilot with comments for the next lines of code. For instance, you could write:

  • // Call the add function with sample numbers
  • // Log the result to the console

Example Code Completion

// Call the add function with sample numbers
let result = add(5, 10);

// Log the result to the console
console.log(result);

Troubleshooting: What Could Go Wrong

  • No Suggestions: If Copilot isn’t providing suggestions, ensure you’re connected to the internet and logged into your GitHub account.
  • Incorrect Code: Copilot is not perfect. Always review the generated code and make adjustments as needed.

What’s Next?

Now that you’ve written your first lines of code, consider:

  • Experimenting with More Complex Functions: Try adding more functions or using different programming languages.
  • Learning the Basics: Use online resources or courses to understand the fundamentals of the language you’re coding in.
  • Join Coding Communities: Engage with other developers on forums or platforms like GitHub itself.

Conclusion: Start Here

Using GitHub Copilot can make writing your first lines of code a breeze. By following these steps, you can leverage AI to jumpstart your coding journey in just 15 minutes. Don’t forget to keep practicing and exploring the capabilities of Copilot as you grow your skills.

In our experience, Copilot is an excellent tool for beginners, but remember that it’s not a substitute for understanding the basics. Use it as a learning aid, and you'll find yourself coding with more confidence.

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

How to Improve Your Coding Skills with AI Tools in Just 2 Weeks

How to Improve Your Coding Skills with AI Tools in Just 2 Weeks If you're like many indie hackers or solo founders, you probably feel that your coding skills aren't quite where the

May 11, 20264 min read
Ai Coding Tools

Raycast vs Cursor: Which AI Coding Companion is Right for You?

Raycast vs Cursor: Which AI Coding Companion is Right for You? (2026) As a solo founder or indie hacker, you're always on the lookout for tools that can save you time and boost you

May 11, 20263 min read
Ai Coding Tools

How to Build a Chatbot with AI Coding Tools in 1 Hour

How to Build a Chatbot with AI Coding Tools in 1 Hour Building a chatbot might sound like a daunting task, but with the right AI coding tools, you can whip one up in just about an

May 11, 20264 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Which AI Coding Assistant is Superior for Developers?

Cursor vs GitHub Copilot: Which AI Coding Assistant is Superior for Developers? As a developer, finding the right coding assistant can feel like navigating a minefield. With so man

May 11, 20263 min read
Ai Coding Tools

How to Generate Code with AI in Under 1 Hour: A Step-by-Step Guide

How to Generate Code with AI in Under 1 Hour: A StepbyStep Guide In 2026, the landscape of coding has shifted dramatically thanks to AI coding tools. As indie hackers and solo foun

May 11, 20264 min read
Ai Coding Tools

Cursor vs GitHub Copilot: The Ultimate Coding Assistant Battle

Cursor vs GitHub Copilot: The Ultimate Coding Assistant Battle As a solo founder or indie hacker, finding the right coding assistant can feel like searching for a needle in a hayst

May 11, 20263 min read