Ai Coding Tools

How to Write Your First Code with AI Assistance in 2 Hours

By BTW Team4 min read

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

In short

A step-by-step guide for beginners on how to create your first coding project using AI tools in just 2 hours.

If you're a beginner looking to get into coding, the idea of writing your first piece of code can feel daunting. What if I told you that you could do it in just 2 hours with the help of AI coding tools? In 2026, AI has made it easier than ever for newcomers to dip their toes into programming without feeling overwhelmed. Here’s how you can get started, along with a roundup of the best AI tools to assist you on your journey.

Prerequisites: What You Need Before You Start

Before diving in, make sure you have the following:

  • A computer: Any modern laptop or desktop will work.
  • An internet connection: For accessing AI tools and tutorials.
  • Basic understanding of programming concepts: Familiarity with terms like variables, loops, and functions will help, but it’s not strictly necessary.

Step-by-Step Guide to Writing Your First Code

Step 1: Choose Your AI Coding Tool

With so many options available, selecting the right AI coding tool is crucial. Here’s a comparison of some of the top choices:

| Tool Name | Pricing | Best For | Limitations | Our Take | |--------------------|-----------------------------|-------------------------------|-----------------------------------|-------------------------------| | GitHub Copilot | $10/mo | Code suggestions in VS Code | Limited to VS Code | We use this for quick fixes. | | Replit | Free tier + $20/mo pro | Collaborative coding | Limited features on free tier | Great for beginners to try out. | | Codeium | Free | Multi-language support | May lack advanced features | Good for quick prototypes. | | Tabnine | Free tier + $12/mo pro | Autocompletion | Limited context understanding | Useful for JavaScript projects. | | OpenAI Codex | $20/mo | Creating complex code | Can be overkill for simple tasks | We don’t use it for simple projects. | | Sourcery | Free | Python code optimization | Limited to Python | Excellent for refining Python code. | | Ponic | $15/mo | Interactive coding lessons | Not suited for all programming languages | Great for learning concepts. |

Step 2: Set Up Your Development Environment

  1. Install Visual Studio Code (VS Code): Download and install it from here.
  2. Add Your Chosen AI Tool: For instance, if you choose GitHub Copilot, follow the installation instructions to add the extension in VS Code.
  3. Create a New Project: Open VS Code, create a new folder for your project, and start a new file (e.g., index.js for JavaScript).

Step 3: Write Your First Code

Using your AI tool, start coding. For example, if you're using GitHub Copilot, you can begin typing a comment like // Create a function that adds two numbers, and Copilot will suggest the code for you.

  1. Write a simple function: This could be a function that adds two numbers.
  2. Run your code: Use the terminal in VS Code to run your code and see the output.

Step 4: Troubleshooting Common Issues

  • Issue: Code doesn’t run.
    • Solution: Check for syntax errors in your code. AI tools often suggest code that needs slight adjustments.
  • Issue: Tool not providing suggestions.
    • Solution: Ensure your AI tool is correctly installed and activated.

Step 5: What's Next?

After you’ve successfully written and run your first piece of code, consider exploring more complex projects. Look into building a small web application or adding functionalities to your existing code.

Conclusion: Start Here

Getting started with coding in 2026 is more accessible than ever with AI tools. I'd recommend starting with GitHub Copilot or Replit since they offer robust features for beginners and are reasonably priced. Take the plunge, and in just 2 hours, you’ll have the basics down!

What We Actually Use

For our projects at Built This Week, we primarily use GitHub Copilot for its seamless integration with VS Code and its ability to save time on repetitive tasks. We also keep Replit handy for quick prototyping and collaborative coding sessions.

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