Ai Coding Tools

How to Use GitHub Copilot to Write Your First Code in Under 1 Hour

By BTW Team3 min read

How to Use GitHub Copilot to Write Your First Code in Under 1 Hour

If you’ve ever stared at a blank code editor and thought, “Where do I even begin?” you’re not alone. Many new coders feel overwhelmed by the sheer amount of knowledge required to write even a simple program. Enter GitHub Copilot, an AI-powered coding assistant that can help you write code faster and more efficiently. In this guide, we’ll walk you through using GitHub Copilot to write your first piece of code in under an hour.

Time Estimate: 1 Hour

You can finish this tutorial in about 60 minutes if you follow the steps closely.

Prerequisites

Before we start, make sure you have the following:

  1. A GitHub account (Free)
  2. Visual Studio Code installed (Free)
  3. GitHub Copilot subscription (Free trial available, $10/mo after trial)

Step 1: Set Up GitHub Copilot

  1. Install Visual Studio Code: If you haven't done this yet, download it from here.

  2. Sign in to GitHub: Open Visual Studio Code and sign in to your GitHub account.

  3. Install GitHub Copilot Extension:

    • Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
    • Search for "GitHub Copilot" and click "Install."
  4. Start Your Free Trial: When prompted, start your free trial to use Copilot.

Step 2: Create a New Project

  1. Open a New Folder: Create a new folder on your computer for this project and open it in Visual Studio Code.

  2. Create a New File: Create a new file named hello_world.py (if you're coding in Python) or hello_world.js (for JavaScript).

Step 3: Write Your First Code

  1. Start Typing a Comment: Begin by typing a comment that describes what you want to do. For example, in hello_world.py, type:

    # This program prints "Hello, World!" to the console
    
  2. Let Copilot Suggest Code: After typing the comment, hit Enter. Copilot will suggest code. You’ll see a suggestion pop up. Just hit Tab to accept it.

  3. Run Your Code:

    • For Python: Open the terminal in Visual Studio Code and run:
      python hello_world.py
      
    • For JavaScript: Run:
      node hello_world.js
      
  4. Expected Output: You should see "Hello, World!" printed in the console.

Troubleshooting

  • No Suggestions?: If Copilot isn’t suggesting anything, try typing a more detailed comment or starting a function.
  • Incorrect Code: If the code doesn't work, check for syntax errors or typos. Copilot is great but not infallible.

What's Next?

Now that you've successfully written your first piece of code, you might want to explore more features of GitHub Copilot:

  • Try More Complex Functions: Experiment with more complex algorithms or projects.
  • Explore Different Languages: Copilot supports multiple programming languages. Try coding in Java, C#, or Go.
  • Integrate with GitHub: Learn how to push your code to a GitHub repository and collaborate with others.

Conclusion

Using GitHub Copilot can significantly reduce the time it takes to write code, especially for beginners. Start with simple projects, and as you grow more comfortable, you can tackle more complex coding challenges.

What We Actually Use

In our experience, we use GitHub Copilot primarily for rapid prototyping and quick code suggestions. It’s great for simple tasks, but we double-check the code for more complex projects.

Start here: If you’re just starting, follow the steps outlined above. Don’t hesitate to experiment and learn as you go!

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 Integrate AI Tools into Your Coding Workflow for Faster Results

How to Integrate AI Tools into Your Coding Workflow for Faster Results (2026) As a solo founder or indie hacker, you’re probably juggling multiple tasks while trying to ship your s

May 18, 20265 min read
Ai Coding Tools

How to Deploy a Web App Using AI Tools in Just 2 Hours

How to Deploy a Web App Using AI Tools in Just 2 Hours Deploying a web app can feel like a daunting task, especially if you're not a seasoned developer. Many indie hackers and solo

May 18, 20265 min read
Ai Coding Tools

The $100 AI Coding Toolkit: Essential Tools for Beginner Developers

The $100 AI Coding Toolkit: Essential Tools for Beginner Developers As a beginner developer, diving into the world of coding can be overwhelming, especially when trying to find the

May 18, 20265 min read
Ai Coding Tools

How to Deploy Your First AI-Powered App in 30 Minutes

How to Deploy Your First AIPowered App in 30 Minutes So, you’ve built an AIpowered app and now you’re staring at the deployment stage, feeling overwhelmed. You’re not alone—many in

May 18, 20264 min read
Ai Coding Tools

AI Coding Assistants: Cursor vs GitHub Copilot — Which One Reigns Supreme?

AI Coding Assistants: Cursor vs GitHub Copilot — Which One Reigns Supreme? (2026) As a solo founder or indie hacker, you’re constantly looking for ways to maximize your productivit

May 18, 20264 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Which AI Tool Is Better for Fast Prototyping?

Cursor vs GitHub Copilot: Which AI Tool Is Better for Fast Prototyping? If you’re a solo founder or indie hacker, you know that speed is everything when it comes to prototyping. Yo

May 18, 20264 min read