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

How to Improve Your Coding Efficiency by 50% with AI Tools in 2 Weeks

How to Improve Your Coding Efficiency by 50% with AI Tools in 2 Weeks (2026) If you're like me, you often feel like there aren’t enough hours in the day to get your coding done. Be

Apr 9, 20264 min read
Ai Coding Tools

Bolt.new vs Cursor: Which AI Coding Tool Offers More Value in 2026?

Bolt.new vs Cursor: Which AI Coding Tool Offers More Value in 2026? As a solo founder or indie hacker, you know that coding tools can make or break your productivity. With so many

Apr 9, 20263 min read
Ai Coding Tools

Why Gen AI Tools Are Overrated: A Reality Check for Developers

Why Gen AI Tools Are Overrated: A Reality Check for Developers As a developer, you’ve probably been bombarded with promises of how Generative AI (Gen AI) tools can revolutionize yo

Apr 9, 20264 min read
Ai Coding Tools

How to Automate Coding Tasks in Just 2 Hours Using AI Tools

How to Automate Coding Tasks in Just 2 Hours Using AI Tools If you're a solo founder or indie hacker, you know that coding can be a timeconsuming part of building your product. Aut

Apr 9, 20264 min read
Ai Coding Tools

How to Build Your First App in 30 Minutes with AI Tools

How to Build Your First App in 30 Minutes with AI Tools Building your first app can feel like a monumental task, especially if you’re not a developer. But what if I told you that w

Apr 9, 20264 min read
Ai Coding Tools

The $50 Coding Kit: Best Affordable AI Tools for Budget-Conscious Developers

The $50 Coding Kit: Best Affordable AI Tools for BudgetConscious Developers As a budgetconscious developer, finding the right tools can often feel like a daunting task. You want po

Apr 9, 20264 min read