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

Why Most Developers Overrate GitHub Copilot: Unpacking the Myths

Why Most Developers Overrate GitHub Copilot: Unpacking the Myths As a developer, you’ve probably heard all the buzz surrounding GitHub Copilot. It’s often hailed as the ultimate co

Apr 30, 20264 min read
Ai Coding Tools

How to Increase Your Coding Efficiency with AI in Just 1 Hour

How to Increase Your Coding Efficiency with AI in Just 1 Hour If you’re a solo founder or indie hacker, you know that coding can be a time sink. It’s not just about writing code; i

Apr 30, 20264 min read
Ai Coding Tools

How to Utilize GitHub Copilot for Faster Code Reviews in 30 Minutes

How to Utilize GitHub Copilot for Faster Code Reviews in 2026 Code reviews can often feel like a bottleneck, especially when you're juggling multiple projects or working on a tight

Apr 30, 20263 min read
Ai Coding Tools

Bolt.new vs Cursor: Which AI Coding Assistant Is Worth Your Money in 2026?

Bolt.new vs Cursor: Which AI Coding Assistant Is Worth Your Money in 2026? As a solo founder or indie hacker, choosing the right AI coding assistant can feel like navigating a laby

Apr 30, 20263 min read
Ai Coding Tools

5 Advanced Techniques for Leveraging AI Coding Tools in 2026

5 Advanced Techniques for Leveraging AI Coding Tools in 2026 As an indie hacker or solo founder, you know that coding can be both a blessing and a curse. In 2026, the rise of AI co

Apr 30, 20264 min read
Ai Coding Tools

How to Automate Your Coding Workflows with AI in Just 60 Minutes

How to Automate Your Coding Workflows with AI in Just 60 Minutes If you're a solo founder or indie hacker, you probably find yourself bogged down by repetitive coding tasks that ea

Apr 30, 20265 min read