Ai Coding Tools

How to Write 100 Lines of Code in 2 Hours Using AI Tools

By BTW Team4 min read

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

In short

A step-by-step guide for leveraging AI coding tools to boost productivity and write efficient code quickly.

If you’re a solo founder or indie hacker, you know that time is your most precious resource. Writing code can feel like a daunting task, especially when you're trying to juggle multiple roles. The good news is that AI coding tools have matured significantly, allowing you to crank out code faster than ever before. In this guide, I’ll show you how to leverage these tools to write 100 lines of code in just 2 hours.

Prerequisites: What You Need Before You Start

Before diving in, make sure you have the following set up:

  • Basic coding knowledge: You should be comfortable with the programming language you’re using (Python, JavaScript, etc.).
  • An IDE or code editor: Tools like Visual Studio Code or JetBrains will work well.
  • Access to AI coding tools: Sign up for at least one of the tools we'll discuss below.
  • A clear project scope: Know what you want to build, even if it's a rough idea.

Step-by-Step Workflow to Write 100 Lines of Code

Step 1: Define Your Project (15 minutes)

Spend about 15 minutes outlining what you want to build. Write down the main features, functions, and expected outputs. This clarity will guide your use of AI tools.

Step 2: Choose Your AI Coding Tools (15 minutes)

Select 2-3 AI coding tools that fit your needs. Here’s a comparison table of some popular options available in 2026:

| Tool Name | Pricing | Best For | Limitations | Our Take | |------------------|-------------------------|------------------------------|-------------------------------------|-------------------------------| | GitHub Copilot | $10/mo | Code suggestions in IDE | Limited to supported languages | We use this for quick snippets. | | Tabnine | Free tier + $12/mo pro | Autocompletion and suggestions| May not understand context fully | Good for enhancing productivity. | | Codeium | Free | Free AI pair programming | Requires good initial code context | We don’t use it, but it’s worth a try. | | Replit | Free tier + $20/mo pro | Collaborative coding | Limited features on free tier | Great for team projects. | | Sourcery | $19/mo | Code refactoring suggestions | Can be too opinionated on style | We find it helpful for cleaning up code. | | OpenAI Codex | $20/mo | Natural language to code | Performance varies by task | We use it for generating boilerplate. |

Step 3: Start Coding with AI Assistance (60 minutes)

Now, get coding! Use your selected AI tools to generate code snippets based on your project outline. Here’s how to do it effectively:

  1. Input Specifications: Use natural language to describe what you want. For example, "Create a function to calculate the area of a rectangle."
  2. Iterate: Review the generated code. Don't just copy-paste; make adjustments based on your understanding.
  3. Combine Outputs: Often, you’ll get better results by merging outputs from different tools.

Step 4: Test Your Code (20 minutes)

Once you’ve written about 100 lines, run your code to check for errors. Use your IDE’s built-in testing tools or frameworks suited for your language.

Expected Outputs

By the end of this step, you should have a functional piece of code that meets your initial project scope. This could be a simple web app, a data processing script, or whatever you decided to build.

Troubleshooting: What Could Go Wrong

  • Code Errors: If the AI generates code that doesn't work, don’t get discouraged. Use debugging tools to identify issues and consult documentation for the language you’re using.
  • Incomplete Features: If you find your code lacking, revisit your project outline and adjust your AI prompts for better results.

What's Next?

Once you’ve successfully written and tested your code, consider the following next steps:

  • Deploy Your Project: Use platforms like Heroku or Vercel to get your project live.
  • Gather Feedback: Share your project with peers or potential users to get insights and improve.
  • Iterate and Expand: Use the feedback to add features or refine your code.

Conclusion: Start Here

To write 100 lines of code in 2 hours using AI tools, focus on defining your project clearly, selecting the right tools, and using them efficiently. In our experience, tools like GitHub Copilot and Tabnine have been particularly helpful for speeding up the coding process while still allowing for personal input and creativity.

If you're looking for a solid starting point, I recommend trying GitHub Copilot; it integrates well with most IDEs and provides context-aware suggestions that can save you a lot of time.

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