Ai Coding Tools

How to Use GitHub Copilot to Write Your First Lines of Code in 30 Minutes

By BTW Team3 min read

How to Use GitHub Copilot to Write Your First Lines of Code in 30 Minutes

If you've ever found yourself staring at a blank code editor, unsure of where to begin, you're not alone. Many beginners struggle with the initial hurdle of writing code. What if I told you that you could write your first lines of code in just 30 minutes using GitHub Copilot? In 2026, this AI-powered tool is more accessible and powerful than ever, making it a great companion for budding developers. Here's how you can get started.

Prerequisites: What You Need Before Starting

Before diving into GitHub Copilot, make sure you have the following:

  1. GitHub Account: Create one if you don’t have it already. It's free.
  2. Visual Studio Code: Download and install it. This is where you'll write your code.
  3. GitHub Copilot Subscription: As of August 2026, the pricing is $10/month for individuals after a 30-day free trial.
  4. Basic Understanding of Programming Concepts: Familiarity with variables, functions, and syntax will help, but you can still follow along if you're a complete beginner.

Step 1: Installing GitHub Copilot

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar.
  3. Search for "GitHub Copilot" and click on "Install."
  4. Once installed, sign in with your GitHub account.

Expected Output: You should see a Copilot icon in the status bar, indicating it's ready to assist you.

Step 2: Creating Your First Project

  1. Create a new folder on your computer for your project.
  2. Open that folder in Visual Studio Code.
  3. Create a new file called hello.js (or hello.py, depending on your preferred language).

Expected Output:

You'll have a new file open and ready for coding.

Step 3: Writing Your First Lines of Code with GitHub Copilot

  1. Start typing a simple comment like // This program prints Hello, World! (for JavaScript) or # This program prints Hello, World! (for Python).
  2. After typing the comment, hit Enter, and GitHub Copilot will suggest code. Accept the suggestion by pressing Tab.

Expected Output:

You should see a line of code that prints "Hello, World!" to the console.

Step 4: Running Your Code

  1. For JavaScript, open the terminal in VS Code and run node hello.js. For Python, run python hello.py.
  2. You should see "Hello, World!" printed in the terminal.

Troubleshooting:

  • If you encounter errors, double-check that you have the correct runtime installed (Node.js for JavaScript, Python for Python).
  • Ensure your file has the correct extension.

What's Next: Building on Your Knowledge

Now that you've successfully written and run your first program, consider exploring more complex projects. Here are some ideas:

  • Build a Simple Calculator: Use Copilot to help you write functions for addition, subtraction, multiplication, and division.
  • Create a To-Do List App: Implement basic CRUD operations with Copilot's suggestions.
  • Learn GitHub Basics: If you haven't already, familiarize yourself with Git and GitHub for version control.

Conclusion: Start Here

Using GitHub Copilot can significantly ease the learning curve of programming. It's not just a fancy autocomplete; it helps you understand coding concepts by suggesting useful code snippets based on your input. Follow the steps above to get your first lines of code up and running in 30 minutes.

If you're looking for a practical way to get into coding, GitHub Copilot is a solid choice.

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 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
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for Beginners

10 Common Mistakes When Using AI Coding Tools for Beginners As a beginner in coding, diving into AI coding tools can feel like a doubleedged sword. On one hand, these tools promise

Oct 8, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back As a solo founder or indie hacker, you might be considering leveraging AI coding tools to boost your produc

Oct 7, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools That Will Hurt Your Learning

5 Common Misconceptions About AI Coding Tools That Will Hurt Your Learning As a beginner in coding, diving into the world of AI coding tools can feel like stepping into a futuristi

Oct 6, 20263 min read
Ai Coding Tools

10 AI Coding Tools Beginners Overlook in 2026

10 AI Coding Tools Beginners Overlook in 2026 As a beginner in coding, diving into the vast ocean of AI tools can feel overwhelming. While flashy tools often grab the spotlight, ma

Oct 6, 20265 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools That Beginners Believe

5 Common Misconceptions About AI Coding Tools That Beginners Believe As a solo founder or indie hacker, diving into the world of AI coding tools can feel overwhelming, especially i

Oct 5, 20263 min read