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 Automate Your Development Workflow with AI in 3 Easy Steps

How to Automate Your Development Workflow with AI in 3 Easy Steps (2026) As indie hackers and solo founders, we often find ourselves buried under a mountain of repetitive tasks tha

Sep 3, 20264 min read
Ai Coding Tools

How to Boost Your Coding Velocity with AI in 30 Minutes

How to Boost Your Coding Velocity with AI in 30 Minutes As a solo founder or indie hacker, you know that time is your most precious resource. The idea of boosting your coding veloc

Sep 3, 20264 min read
Ai Coding Tools

Why Most Developers Get GitHub Copilot Wrong: 5 Myths Busted

Why Most Developers Get GitHub Copilot Wrong: 5 Myths Busted As we dive into 2026, GitHub Copilot has become a staple in many developers' toolkits. However, despite its popularity,

Sep 3, 20263 min read
Ai Coding Tools

How to Use AI Coding Tools to Boost Productivity in Under 2 Hours

How to Use AI Coding Tools to Boost Productivity in Under 2 Hours As indie hackers, we all know the struggle of trying to stay productive while juggling multiple projects. The prom

Sep 3, 20265 min read
Ai Coding Tools

Vercel vs GitHub Copilot: Which AI Tool is Right for Your Project?

Vercel vs GitHub Copilot: Which AI Tool is Right for Your Project? As a solo founder or indie hacker, choosing the right tools can be a makeorbreak decision for your project. With

Sep 3, 20263 min read
Ai Coding Tools

Why GitHub Copilot is Not the Magic Bullet for Every Programmer: Debunking the Myths

Why GitHub Copilot is Not the Magic Bullet for Every Programmer: Debunking the Myths As a programmer, I’ve been there: staring at a blank screen, hoping for a burst of inspiration

Sep 3, 20264 min read