Ai Coding Tools

How to Use GitHub Copilot to Write Your First Program in Under 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot to Write Your First Program in Under 2 Hours

Looking to write your first program but feeling overwhelmed? Trust me, you’re not alone. Many indie hackers and solo founders face the same challenge. Coding can seem daunting, especially when you're starting from scratch. But here’s the kicker: with tools like GitHub Copilot, you can write a functional program in less than two hours. Yes, really.

In this guide, I’ll walk you through the process of using GitHub Copilot to build a simple program, from setup to execution. Let's dive in!

Prerequisites: What You Need Before Starting

  1. GitHub Account: Sign up for a free account if you don’t have one.
  2. Visual Studio Code: Download and install VS Code, which is the code editor we'll use.
  3. GitHub Copilot Subscription: It costs $10/month after a free trial.
  4. Basic Understanding of Programming Concepts: Familiarity with variables, loops, and functions will help, but isn’t essential.

Step 1: Setting Up GitHub Copilot

You can finish this setup in about 30 minutes. Here’s how:

  1. Install VS Code: Open VS Code and go to the Extensions marketplace (Ctrl+Shift+X).
  2. Search for GitHub Copilot: Type "GitHub Copilot" in the search bar and click "Install".
  3. Log into GitHub: After installation, you’ll need to authenticate with your GitHub account.
  4. Start a New File: Create a new file and save it with a .py extension for Python, for example.

Expected Output: You should see a prompt asking for Copilot to help you code.

Step 2: Writing Your First Program

Now, let's write a simple program that takes user input and prints a greeting. This step should take about 30 minutes.

  1. Type a Comment: Start by typing # Create a simple greeting program. GitHub Copilot will suggest some code.
  2. Accept Suggestions: You can press Tab to accept suggestions or keep typing to refine them.
  3. Run Your Code: After writing the full program, run it using the terminal in VS Code. Type python filename.py.

Expected Output: You should see something like:

Hello, what's your name?
[User types their name]
Hello, [User's Name]!

Troubleshooting: What Could Go Wrong

You might run into some common issues:

  • Copilot Not Suggesting Code: Make sure you’re in a file with the correct extension and that you’re logged into GitHub.
  • Errors When Running: Double-check syntax and ensure you’ve saved your changes before running the program.

What’s Next: Building on Your Knowledge

Once you’ve completed this simple program, you can expand it further:

  • Add error handling for empty inputs.
  • Create a user interface using libraries like Tkinter.
  • Explore more complex projects with Copilot’s suggestions.

Conclusion: Start Here

Using GitHub Copilot, you can create your first program in under two hours, even if you have minimal coding experience. If you follow these steps and use the tool effectively, you’ll be on your way to building more complex applications in no time.

What We Actually Use

While GitHub Copilot is fantastic for rapid prototyping, we also use other tools to complement our coding efforts, like:

| Tool | Pricing | Best For | Limitations | Our Take | |-----------------------|---------------------------|-----------------------------------|--------------------------------------|------------------------------------| | GitHub Copilot | $10/mo | Code suggestions & completions | Not perfect, can suggest incorrect code | We use this for quick iterations. | | Replit | Free tier + $20/mo Pro | Collaborative coding | Limited free tier features | Great for team projects. | | CodeSandbox | Free tier + $12/mo Pro | Frontend development | Backend support is limited | We don't use this because of the backend limitation. | | StackBlitz | Free | Rapid prototyping | Requires internet connection | We use this occasionally for quick tests. |

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