Ai Coding Tools

How to Use GitHub Copilot to Improve Your Code in 30 Minutes

By BTW Team4 min read

How to Use GitHub Copilot to Improve Your Code in 30 Minutes

If you’ve ever found yourself staring at a blank screen, unsure of how to tackle a coding problem, you’re not alone. As indie hackers and solo founders, we often juggle multiple roles and responsibilities, making it tough to stay focused on coding. Enter GitHub Copilot, an AI-powered coding assistant that can help you write code faster and more efficiently. In this guide, I’ll walk you through how to use GitHub Copilot effectively in just 30 minutes, so you can get back to building your projects.

Prerequisites: What You Need to Get Started

Before diving in, make sure you have the following:

  • GitHub Account: You’ll need an account to use Copilot.
  • Visual Studio Code: The Copilot extension works best here.
  • GitHub Copilot Subscription: As of April 2026, it costs $10/month or $100/year for individual developers.
  • Basic Understanding of Coding: Familiarity with at least one programming language will be beneficial.

Step 1: Setting Up GitHub Copilot

  1. Install Visual Studio Code: If you haven’t already, download and install VS Code.
  2. Install GitHub Copilot Extension: Open the Extensions view in VS Code (Ctrl+Shift+X), search for “GitHub Copilot,” and click install.
  3. Sign In: After installation, you’ll be prompted to sign in with your GitHub account. Follow the on-screen instructions to authenticate.

Expected Output

Once you’re signed in, you’ll see a Copilot icon in the lower-right corner of your editor, indicating that it’s ready to assist.

Step 2: Writing Your First Lines of Code

Now, let’s write some code using GitHub Copilot. Here’s how:

  1. Start Typing a Comment: Describe what you want to achieve in plain language. For example, type // Function to calculate factorial of a number.
  2. Let Copilot Suggest Code: After typing your comment, hit Enter. Copilot will provide a suggestion based on your comment.
  3. Accept or Modify: You can accept the suggestion by pressing Tab or modify it as needed.

Example Output

If you typed the comment mentioned above, Copilot might generate a function like this:

function factorial(n) {
    if (n === 0) return 1;
    return n * factorial(n - 1);
}

Step 3: Using Copilot for Refactoring

Copilot can also help improve existing code. Here’s how:

  1. Highlight Code: Select a block of code that you think could be optimized.
  2. Ask for Suggestions: Type a comment above it, like // Refactor this code.
  3. Review Suggestions: Copilot will suggest a refactored version. Again, you can accept or modify.

Limitations to Consider

While Copilot is powerful, it’s not perfect. It sometimes generates incorrect or suboptimal code, so always review suggestions carefully.

Step 4: Learning from Copilot

One of the best ways to improve your coding skills is to learn from the suggestions Copilot provides.

  1. Study the Suggestions: If you see a solution you didn’t think of, take time to understand it.
  2. Experiment: Modify the suggestions and see how small changes affect the output.

Troubleshooting: What Could Go Wrong

  • No Suggestions: If you don’t see suggestions, ensure you’re signed in and the extension is enabled.
  • Poor Quality Code: If the suggestions are consistently poor, try providing more context in your comments.

What’s Next: Progressing Beyond Copilot

Once you’re comfortable with Copilot, consider integrating it with other tools:

  • Code Quality Tools: Combine Copilot with tools like ESLint for JavaScript or Prettier for formatting.
  • Version Control: Use Git alongside Copilot to manage your code changes effectively.

Conclusion: Start Here

To wrap it up, GitHub Copilot can be a fantastic ally in your coding journey, especially when you’re short on time. Spend 30 minutes following this guide, and you’ll have a solid foundation for using Copilot to improve your code. Remember, always review and learn from the suggestions it provides.

What We Actually Use

In our experience, we use GitHub Copilot primarily for generating boilerplate code and refactoring existing functions. It’s a time-saver, but we always double-check the output for accuracy.

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

Cursor vs GitHub Copilot: Which AI Coding Assistant Saves You More Time?

Cursor vs GitHub Copilot: Which AI Coding Assistant Saves You More Time? As an indie hacker or solo founder, time is your most precious resource. You want to ship products fast, it

Apr 12, 20263 min read
Ai Coding Tools

How to Create an API in 2 Hours Using AI Coding Assistants

How to Create an API in 2 Hours Using AI Coding Assistants Building an API can feel daunting, especially if you're a solo founder or indie hacker with limited coding experience. Bu

Apr 12, 20264 min read
Ai Coding Tools

How to Get Started with AI-Powered Coding in 30 Minutes

How to Get Started with AIPowered Coding in 30 Minutes If you’re a solo founder or indie hacker, the thought of using AI for coding might feel overwhelming. But here's the truth: y

Apr 12, 20264 min read
Ai Coding Tools

Supabase vs Firebase: The Ultimate Showdown for AI Coding in 2026

Supabase vs Firebase: The Ultimate Showdown for AI Coding in 2026 As we dive into 2026, the landscape of AI coding tools is evolving rapidly, and if you're building a project, you

Apr 12, 20263 min read
Ai Coding Tools

How to Implement AI Coding Tools for Faster Development in 2 Hours

How to Implement AI Coding Tools for Faster Development in 2026 As a solo founder or indie hacker, you know that time is your most precious resource. You need to ship products quic

Apr 12, 20264 min read
Ai Coding Tools

How to Build Your First App Using AI in 2 Hours

How to Build Your First App Using AI in 2 Hours Building your first app can feel like a daunting task, especially if you’re a beginner. The good news? With the rise of AI coding to

Apr 12, 20265 min read