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

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read
Ai Coding Tools

5 Surprising Ways AI Coding Tools Like Cursor Transform Your Debugging Process

5 Surprising Ways AI Coding Tools Like Cursor Transform Your Debugging Process Debugging is often the most frustrating part of software development. It’s a black hole where hours c

Nov 12, 20264 min read
Ai Coding Tools

5 Signs You're Not Using Your AI Coding Tools Effectively

5 Signs You're Not Using Your AI Coding Tools Effectively In 2026, AI coding tools have become a staple in the software development landscape. However, many indie hackers and solo

Nov 8, 20264 min read
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