Ai Coding Tools

How to Use GitHub Copilot to Write Your First Line of Code in 2 Hours

By BTW Team4 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step tutorial for beginners on getting started with GitHub Copilot to enhance coding efficiency and productivity.

If you’re a beginner looking to dive into coding, the thought of writing your first line of code can be both thrilling and terrifying. But what if I told you that you could get a head start with GitHub Copilot? This AI-powered tool can help you write code faster and with more confidence. In this guide, I’ll show you how to leverage GitHub Copilot effectively to write your first line of code in just 2 hours.

What is GitHub Copilot?

GitHub Copilot is an AI pair programmer that suggests code and entire functions in real-time as you type. It’s designed to help you code faster and learn as you go. The tool is built on OpenAI's Codex and integrates seamlessly with Visual Studio Code, making it accessible for beginners.

Pricing Breakdown

  • Free Trial: 60 days for new users.
  • Individual Plan: $10/month after the trial.
  • Business Plan: $19/user/month, with advanced features and team management.

Best for

  • Beginners: It simplifies coding by providing suggestions.
  • Intermediate coders: Helps speed up development tasks.

Limitations

  • Accuracy: It may suggest incorrect or suboptimal code.
  • Context: Sometimes struggles with understanding complex requirements.

Prerequisites

Before you get started, make sure you have the following:

  1. Visual Studio Code: Download and install it from here.
  2. GitHub Account: Sign up for a free account if you don’t already have one.
  3. GitHub Copilot Extension: Install the Copilot extension in Visual Studio Code.

Step-by-Step Guide to Your First Line of Code

Step 1: Set Up Your Environment (30 minutes)

  1. Install Visual Studio Code: Go through the installation process.
  2. Create a New Project Folder: Name it something like MyFirstProject.
  3. Open the Terminal: Use the integrated terminal in VS Code to navigate to your project folder.

Step 2: Install GitHub Copilot (15 minutes)

  1. Open Extensions: Click on the Extensions icon in the sidebar.
  2. Search for GitHub Copilot: Type “GitHub Copilot” in the search bar.
  3. Install the Extension: Click on the Install button.

Step 3: Start Coding (1 hour)

  1. Create a New File: Click on New File and name it hello.js.
  2. Write Your First Line: Start typing console.log( and wait for Copilot to suggest the completion. It should suggest something like console.log('Hello, World!');.
  3. Accept the Suggestion: Press Tab to accept the suggestion.
  4. Run Your Code: Open the terminal and run node hello.js. You should see “Hello, World!” printed in the terminal.

Expected Output

When you run your code, you should see:

Hello, World!

Troubleshooting Common Issues

  • Copilot Not Suggesting: If you don’t see suggestions, ensure that you’re logged into GitHub within VS Code and that Copilot is enabled in settings.
  • Output Errors: If your code doesn’t run, double-check for typos or syntax errors.

What’s Next?

After writing your first line of code, consider exploring more complex coding tasks with Copilot. Try building a simple web app or a small project that interests you. Copilot can assist you with various programming languages and frameworks, so don’t hesitate to experiment.

Tool Comparison: GitHub Copilot vs. Alternatives

| Tool | Pricing | Best For | Limitations | Our Verdict | |------------------|---------------------------|------------------------------|----------------------------------|----------------------------------| | GitHub Copilot | $10/mo, $19/mo for teams | Beginners, quick coding help | Context limitations | Great for rapid prototyping | | Tabnine | $12/mo, $49/mo Pro | JavaScript, Python | Less comprehensive suggestions | Good for specific languages | | Codeium | Free, Pro at $10/mo | All programming languages | Still in beta, may lack polish | Worth trying, especially free | | Replit | Free tier, Pro at $7/mo | Collaborative coding | Limited features in free version | Good for team projects | | Kite | Free, Pro at $19.90/mo | Python, JavaScript | Only supports certain languages | Solid for Python developers |

What We Actually Use

In our experience, we primarily use GitHub Copilot for quick prototyping and learning new coding styles. It's particularly useful for generating boilerplate code and exploring new libraries.

Conclusion: Start Here

Ready to write your first line of code? Start by setting up your environment and installing GitHub Copilot as outlined above. Spend a couple of hours experimenting, and you’ll be amazed at how quickly you can get up to speed. Remember, the key is to practice consistently and leverage tools like Copilot to make your coding journey smoother.

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

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