Ai Coding Tools

How to Use GitHub Copilot to Write Your First 100 Lines of Code in 1 Hour

By BTW Team3 min read

How to Use GitHub Copilot to Write Your First 100 Lines of Code in 1 Hour

If you’re a beginner looking to dip your toes into coding, it can be overwhelming. You might feel like you need a degree in computer science just to get started. But what if I told you that you could write your first 100 lines of code in just one hour? With GitHub Copilot, a powerful AI-powered coding assistant, this becomes a reality. In this guide, I’ll share how to leverage Copilot to get you coding quickly and efficiently.

Time Estimate and Prerequisites

You can finish this in about 1 hour. Before diving in, here’s what you’ll need:

  • A GitHub account (free)
  • A code editor like Visual Studio Code (free)
  • The GitHub Copilot extension installed (free trial available, then $10/month)

Step-by-Step Guide

Step 1: Set Up Your Environment

  1. Create a GitHub Account: If you don’t have one, sign up at GitHub.com.
  2. Install Visual Studio Code: Download it from Visual Studio Code.
  3. Install GitHub Copilot: Go to the Extensions marketplace in VS Code, search for "GitHub Copilot," and install it. Start your free trial.

Step 2: Start a New Project

  1. Open Visual Studio Code and create a new folder for your project.
  2. Create a new file (e.g., app.js for JavaScript or app.py for Python).

Step 3: Write Your First Line of Code

  1. Start typing a comment about what you want to do, such as // Create a simple calculator.
  2. GitHub Copilot will automatically suggest code. Press Tab to accept the suggestion.

Step 4: Build on Your Code

  1. Continue with comments for each functionality you want to implement:
    • // Add two numbers
    • // Subtract two numbers
    • // Multiply two numbers
    • // Divide two numbers
  2. For each comment, let Copilot generate the corresponding code.

Expected Output

After following these steps, you should have a simple calculator program that performs basic arithmetic operations, totaling around 100 lines of code.

Example Output

// Create a simple calculator
function add(a, b) {
    return a + b;
}

function subtract(a, b) {
    return a - b;
}

// ... additional functions for multiply and divide

Troubleshooting Common Issues

  • Copilot isn’t suggesting code: Make sure you’re connected to the internet and Copilot is enabled in the settings.
  • The suggestions aren't relevant: Try refining your comments or providing more context.

What’s Next?

Once you have your first 100 lines of code, consider these next steps:

  • Debugging: Learn how to identify and fix errors in your code.
  • Version Control: Familiarize yourself with Git to manage your code versions effectively.
  • Expand Your Skills: Explore other coding languages or frameworks.

Conclusion: Start Here

If you’re ready to start coding, using GitHub Copilot is a fantastic way to streamline the process. Follow the steps outlined above, and you’ll be writing your first 100 lines of code in no time. Remember, the key is to practice consistently and build on what you learn.

To get the most out of your coding journey, listen to our podcast, Built This Week, where we share real experiences and tools we’re using as we build products every week.

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

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read