Ai Coding Tools

How to Write Your First Program Using AI Assistants in Under 2 Hours

By BTW Team5 min read

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

In short

A step-by-step guide for beginners to create a simple application from scratch with the help of AI coding tools, making programming accessible and quick.

If you've ever thought programming was out of your reach, I'm here to tell you that with the rise of AI assistants, you can write your first program in under two hours. As a builder who’s wrangled with code and struggled through countless tutorials, I’ve found that AI tools can be surprisingly effective at bridging the gap for beginners. In 2026, these tools have evolved to be more accessible and user-friendly, making them perfect for indie hackers and solo founders looking to dip their toes into coding.

Prerequisites: What You Need Before You Start

Before diving into writing your first program, make sure you have the following:

  • A computer: Windows, Mac, or Linux will all work.
  • An internet connection: Most AI coding tools are cloud-based.
  • A clear idea of what you want to build: Even a simple project like a to-do list or a calculator will work.

Time Estimate: 2 Hours

You can finish this in about two hours if you follow the steps closely and don’t get too sidetracked by exploring every feature.

Step-by-Step Guide to Writing Your First Program

Step 1: Choose Your AI Coding Tool

There are plenty of AI coding tools out there. Here’s a quick comparison to help you pick one that suits your needs:

| Tool Name | Pricing | Best For | Limitations | Our Take | |-------------------|-------------------------------|--------------------------------------|----------------------------------------|------------------------------------------------------| | GitHub Copilot | $10/mo, no free tier | Code suggestions in VS Code | Limited to VS Code | We use this for quick code suggestions. | | Replit | Free tier + $7/mo pro | Collaborative coding | Free tier has limited features | Great for beginners to code together. | | Codeium | Free | AI code suggestions | May not support all languages | We don’t use this, but it’s worth checking out. | | Tabnine | Free tier + $12/mo pro | Autocompletion for various editors | Limited features on free tier | We find it useful for JavaScript projects. | | Ponicode | Free tier + $15/mo pro | Unit testing and code quality | Can be a bit complex for beginners | We use this for ensuring our code has tests. | | AI Dungeon | Free, premium options | Game development with AI | Not suited for traditional programming | Skip if you’re looking for serious coding tools. | | Sourcery | Free tier + $19/mo pro | Python code improvement | Limited to Python | We don’t use this, but it’s great for Python devs. | | Codex | $20/mo | Natural language to code | Requires API usage knowledge | Very powerful, but a steeper learning curve. | | ChatGPT | Free tier + $20/mo pro | General programming queries | May give incorrect code suggestions | We use this for brainstorming and troubleshooting. | | CodeSmith | $29/mo, no free tier | Automated code generation | Limited customization | We don’t use it because it’s a bit pricey. |

Step 2: Set Up Your Environment

  1. Install the AI coding tool: Follow the installation instructions specific to the tool you chose.
  2. Create a new project: Start a new project in your chosen IDE (Integrated Development Environment) or web-based platform.

Step 3: Define Your Program

Let’s say you want to build a simple calculator that adds two numbers. Write down the basic requirements:

  • Input: Two numbers
  • Output: Their sum

Step 4: Use AI to Generate Code

  1. Prompt the AI: In your coding tool, type something like “Write a simple calculator in Python that adds two numbers.”
  2. Review the generated code: The AI will provide you with a snippet. Check for any errors or improvements.

Step 5: Test Your Program

  1. Run the program: Execute the code in your IDE.
  2. Check outputs: Ensure it correctly adds the numbers. If it doesn’t work, ask the AI for troubleshooting help or clarification.

Step 6: Refine and Expand

  1. Add features: Once you have the basic functionality, consider adding more features like subtraction or multiplication.
  2. Ask the AI for suggestions: Use prompts like “How can I add multiplication to my calculator?”

Troubleshooting: What Could Go Wrong

  • Code Errors: If the AI generates code that doesn’t work, double-check syntax and logic. AI isn’t perfect and may not always follow best practices.
  • Confusing Outputs: If you get unexpected results, ask the AI for clarification or examples to understand better.

What’s Next?

After you’ve successfully created your first program, consider expanding your knowledge:

  • Explore more complex projects: Try building a small web app or mobile app.
  • Learn a programming language: Resources like Codecademy or freeCodeCamp can be helpful.
  • Join a community: Engage with other builders and coders to share experiences and tips.

Conclusion: Start Here

Using AI assistants to write your first program is not only possible but can be a fun and rewarding experience. Start by choosing the right tool from the list above, follow the steps, and you’ll be coding in no time. Remember, the key is to keep it simple and build on what you learn.

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