Ai Coding Tools

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

By BTW Team4 min read

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

If you’re new to coding, diving into the world of programming can feel overwhelming. You might think, “Can I really write code that works?” The good news is that with tools like GitHub Copilot, you can get started quickly and effectively. In this guide, I’ll show you how to leverage Copilot to write your first 100 lines of code in under 30 minutes.

Prerequisites: What You Need to Get Started

Before we jump in, let’s cover what you need:

  • A GitHub account: Sign up for free if you don’t have one.
  • Visual Studio Code (VS Code): Download and install it. It’s a popular code editor.
  • GitHub Copilot: You’ll need to subscribe to GitHub Copilot. Pricing starts at $10/month after a free trial.
  • Basic understanding of programming concepts: Familiarity with variables, loops, and functions will help, but it’s not mandatory.

Step 1: Set Up GitHub Copilot in VS Code

  1. Install the GitHub Copilot extension: Open VS Code, go to the Extensions view (Ctrl+Shift+X), and search for "GitHub Copilot". Click on "Install".
  2. Sign in to GitHub: After installation, you’ll be prompted to log into your GitHub account. Follow the authentication steps.
  3. Start a new file: Create a new file in a programming language of your choice (e.g., Python, JavaScript).

Step 2: Write Your First Line of Code

Now, let’s write some code. Start with a simple task, like printing "Hello, World!".

  1. Type print("Hello, World!") and wait for Copilot's suggestion.
  2. If you see the suggestion pop up, you can accept it by hitting the Tab key.

Expected Output:

You should see "Hello, World!" printed in your console when you run the code.

Step 3: Build on Your Code with Copilot

Now that you’ve got your first line, let’s expand. Here’s how to write a simple function that adds two numbers:

  1. Type def add_numbers(a, b): and give Copilot a moment to suggest the function body.

  2. Accept the suggestion, which might look something like this:

    return a + b
    
  3. Next, call your function and print the result:

    result = add_numbers(5, 3)
    print(result)
    

Expected Output:

You should see 8 printed in your console.

Step 4: Create a Simple Loop

Let’s add some complexity with a loop. Type the following code to create a list of numbers and print them:

  1. Start with:
    for i in range(5):
    
  2. Let Copilot suggest the body of the loop, which might be:
    print(i)
    

Expected Output:

You should see the numbers 0 through 4 printed, one per line.

Troubleshooting: What Could Go Wrong

  • No suggestions appearing: Ensure that you’re connected to the internet and that GitHub Copilot is enabled in your settings.
  • Errors in code: If your code doesn’t run, double-check the syntax. Copilot is helpful, but it’s not infallible.

What's Next: Expanding Your Skills

After you’ve written your first 100 lines, consider the following:

  • Explore more complex functions: Try writing functions that handle lists, dictionaries, or even classes.
  • Get familiar with debugging: Learn how to read error messages and fix issues in your code.
  • Join coding communities: Platforms like GitHub, Stack Overflow, and Reddit can provide support and resources.

Conclusion: Start Here

Using GitHub Copilot can significantly speed up your coding journey. By following these steps, you should be able to write your first 100 lines of code in under 30 minutes. Remember, the key is to keep practicing and exploring new coding challenges.

What We Actually Use

We’ve found that GitHub Copilot is a great tool for beginners and even seasoned developers looking for quick suggestions. However, be mindful of its limitations; it sometimes suggests incorrect or inefficient code. Use it as a guide, but always review the output.

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 Use GitHub Copilot for Rapid Prototyping in Just 2 Hours

How to Use GitHub Copilot for Rapid Prototyping in Just 2 Hours Rapid prototyping is essential for indie hackers and solo founders who need to validate their ideas quickly. But let

Jul 12, 20263 min read
Ai Coding Tools

Why GitHub Copilot is Overrated for Newly Developers

Why GitHub Copilot is Overrated for New Developers As a new developer, diving into the world of coding can be overwhelming. You often hear about tools like GitHub Copilot that prom

Jul 12, 20264 min read
Ai Coding Tools

How to Automate Your Testing Process with AI in 2 Hours

How to Automate Your Testing Process with AI in 2026 Automating your testing process can feel like a daunting task, especially if you're a solo founder or indie hacker juggling mul

Jul 12, 20264 min read
Ai Coding Tools

Why AI Coding Tools Are Not the Silver Bullets They Seem

Why AI Coding Tools Are Not the Silver Bullets They Seem (2026) As a solo founder or indie hacker, the allure of AI coding tools is hard to resist. They promise to automate tedious

Jul 12, 20264 min read
Ai Coding Tools

How to Use GitHub Copilot to Slash Your Coding Time by 50% in One Month

How to Use GitHub Copilot to Slash Your Coding Time by 50% in One Month If you're a solo founder or indie hacker, you know the struggle of balancing coding with all the other hats

Jul 12, 20264 min read
Ai Coding Tools

Cursor vs Codeium: Which AI Coding Tool Packs More Punch in 2026?

Cursor vs Codeium: Which AI Coding Tool Packs More Punch in 2026? As an indie hacker or solo founder, finding the right tools to streamline your coding process can be a gamechanger

Jul 12, 20263 min read