Ai Coding Tools

How to Use GitHub Copilot to Write Your First Program in 30 Minutes

By BTW Team3 min read

How to Use GitHub Copilot to Write Your First Program in 30 Minutes

If you’re a solo founder or an indie hacker, you probably know that coding can feel like a daunting task. Learning to program can take weeks or even months, but what if I told you that with GitHub Copilot, you could write your first program in just 30 minutes? Yes, it sounds ambitious, but with the right approach, it's totally achievable. In this guide, I’ll walk you through the steps to get started with GitHub Copilot and write a simple program, all while keeping it practical and straightforward.

Prerequisites: What You Need Before You Start

Before diving in, there are a few things you'll need to set up:

  1. GitHub Account: Sign up for a free account if you don’t have one already.
  2. Visual Studio Code: Download and install Visual Studio Code, which is a free code editor.
  3. GitHub Copilot Subscription: GitHub Copilot costs $10/month after a 60-day free trial. Make sure to activate it within VS Code.
  4. Basic Understanding of Programming: While Copilot can assist you, having some foundational knowledge will help you understand the code it generates.

Step 1: Setting Up GitHub Copilot

  1. Install the Extension:

    • Open Visual Studio Code.
    • Go to the Extensions view by clicking on the Extensions icon in the Activity Bar.
    • Search for “GitHub Copilot” and click “Install”.
  2. Sign In:

    • After installation, you’ll be prompted to sign in to GitHub. Follow the on-screen instructions to authorize Copilot.
  3. Activate Copilot:

    • Once signed in, activate GitHub Copilot by clicking on the Copilot icon in the sidebar.

Step 2: Writing Your First Program

Let’s create a simple program that adds two numbers together. Here’s how to do it:

  1. Create a New File:

    • In VS Code, create a new file and name it add_numbers.py.
  2. Start Coding:

    • Type a comment to describe what you want to do. For example:
      # This program adds two numbers
      
  3. Let Copilot Assist You:

    • Start coding the function by typing:
      def add_numbers(a, b):
      
    • Wait for Copilot to suggest the next lines of code. You should see a suggestion pop up. Press Tab to accept it.
  4. Complete the Program:

    • Add a few lines to call your function and print the result:
      print(add_numbers(5, 3))
      
    • Accept any suggestions Copilot provides to complete the program.
  5. Run Your Program:

    • Open your terminal in VS Code and run the command:
      python add_numbers.py
      
    • You should see the output 8.

Troubleshooting: What Could Go Wrong

If you encounter issues, here are some common pitfalls:

  • Copilot Doesn’t Suggest Code: Ensure you’re connected to the internet and that your GitHub Copilot subscription is active.
  • Errors in Code: Double-check the syntax. Copilot can make mistakes, so it’s good practice to understand what the code is doing.
  • VS Code is Slow: Sometimes, extensions can slow down your editor. Try disabling other extensions to see if performance improves.

What’s Next?

Now that you’ve written your first program, consider the following steps:

  • Explore More Features: Try writing different functions or creating a small project. Use Copilot to assist you in learning new programming concepts.
  • Join a Community: Engage with other builders who are learning to code. Platforms like Discord or Reddit can be invaluable.

Conclusion: Start Here!

Using GitHub Copilot can drastically reduce the time it takes to start coding. In just 30 minutes, you can write a simple program and gain confidence in your coding abilities. Just remember to keep learning and exploring as you go.

If you’re ready to dive deeper into programming, GitHub Copilot is a tool worth investing in, especially with its affordable pricing of $10/month after the trial.

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

5 Costly Mistakes Developers Make When Using AI Coding Tools

5 Costly Mistakes Developers Make When Using AI Coding Tools In 2026, AI coding tools are all the rage, promising to streamline workflows and supercharge productivity. But as devel

Apr 10, 20264 min read
Ai Coding Tools

How to Integrate GitHub Copilot for Your Solo Projects in 60 Minutes

How to Integrate GitHub Copilot for Your Solo Projects in 60 Minutes If you’re a solo founder or indie hacker, you know that every minute counts. The promise of AI tools like GitHu

Apr 10, 20264 min read
Ai Coding Tools

Why Many Developers Overrate AI Coding Tools: Debunking Myths

Why Many Developers Overrate AI Coding Tools: Debunking Myths In 2026, the buzz around AI coding tools is louder than ever. Many developers tout these tools as the ultimate solutio

Apr 10, 20264 min read
Ai Coding Tools

Lovable AI vs GitHub Copilot: Which Tool Will Accelerate Your Development in 2026?

Lovable AI vs GitHub Copilot: Which Tool Will Accelerate Your Development in 2026? As a solo developer or indie hacker, choosing the right coding assistant can feel like a daunting

Apr 10, 20263 min read
Ai Coding Tools

Bolt.new vs GitHub Copilot: Which AI Coding Aid to Choose in 2026?

Bolt.new vs GitHub Copilot: Which AI Coding Aid to Choose in 2026? As a solo founder juggling multiple side projects, the need for efficient coding aids is more pressing than ever.

Apr 10, 20263 min read
Ai Coding Tools

Supabase vs Firebase: Which Backend Solution is Best for Your AI Projects?

Supabase vs Firebase: Which Backend Solution is Best for Your AI Projects? As builders in 2026, we often find ourselves caught in the whirlwind of choices when it comes to backend

Apr 10, 20264 min read