Ai Coding Tools

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

By BTW Team4 min read

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

If you're new to coding, the prospect of writing your first lines of code can be daunting. You might feel overwhelmed by syntax, structure, and the sheer volume of information out there. Enter GitHub Copilot, an AI-powered code assistant that can help you write code much faster and with less frustration. In 2026, it's more powerful than ever, but understanding how to leverage it effectively is key to getting started on the right foot.

What is GitHub Copilot?

GitHub Copilot is an AI tool that suggests code snippets and functions as you type, using machine learning to understand context and provide relevant suggestions. It's like having a coding partner who can help you debug, write functions, and even generate boilerplate code.

Pricing Breakdown

  • Free Trial: 60 days free for new users.
  • Individual Plan: $10/month.
  • Business Plan: $19/user/month, with additional features for team collaboration.

Best For

  • Beginners looking to grasp the fundamentals of coding.
  • Experienced developers who want to speed up their workflow.

Limitations

  • It can sometimes generate incorrect or suboptimal code, so you need to review suggestions carefully.
  • It may not understand complex project requirements fully, leading to irrelevant suggestions.

Prerequisites: What You Need to Get Started

Before diving in, ensure you have the following:

  1. GitHub Account: Create one if you don't have it already.
  2. Visual Studio Code: Download and install it; GitHub Copilot integrates seamlessly with this popular code editor.
  3. Basic Understanding of a Programming Language: While Copilot can help, knowing the basics will improve your experience.

Step-by-Step: Writing Your First 100 Lines of Code

Step 1: Set Up GitHub Copilot in Visual Studio Code

  1. Open Visual Studio Code.
  2. Go to the Extensions Marketplace and search for "GitHub Copilot."
  3. Install the extension and sign in with your GitHub account.

Step 2: Start a New Project

  • Create a new file named hello_world.py (or any language you prefer).
  • Begin by typing print("Hello, World!") and observe how Copilot suggests the rest of the code.

Step 3: Explore Copilot's Suggestions

  • As you type, Copilot will automatically suggest completions. Accept suggestions by hitting the Tab key.
  • For example, try typing a function definition like def add_numbers(a, b): and see how Copilot suggests the function body.

Step 4: Build on Your Code

  • Expand your project by adding a few more functions. For instance, after creating add_numbers, try to create subtract_numbers and see what Copilot offers.
  • Keep iterating and adding complexity. Aim for a total of 100 lines by mixing functions and logic.

Expected Outputs

By the end of this exercise, you should have a functional script with various utility functions. Here’s an example of what your code might look like:

def add_numbers(a, b):
    return a + b

def subtract_numbers(a, b):
    return a - b

print(add_numbers(5, 3))  # Outputs: 8
print(subtract_numbers(5, 3))  # Outputs: 2

Troubleshooting: What Could Go Wrong

  • Incorrect Suggestions: If Copilot suggests code that doesn't work, take a moment to check the syntax or logic. Always validate what you accept.
  • Over-reliance: While it can be tempting to accept all suggestions, remember that understanding the code is crucial for growth.

What's Next?

Once you’ve written your first 100 lines, consider:

  • Learning More: Explore additional resources like online coding bootcamps or free platforms like Codecademy.
  • Building Projects: Use your newfound skills to create small projects, such as a personal website or a simple game.
  • Joining Communities: Engage with coding communities on platforms like GitHub or Stack Overflow for support and collaboration.

Conclusion: Start Here

GitHub Copilot is a fantastic tool for beginners, but it's essential to approach it with a critical eye. Use it to enhance your learning, not replace it. If you're ready to write your first lines of code, dive into GitHub Copilot and experiment with the suggestions. Happy coding!

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