Ai Coding Tools

How to Write Your First Code Using AI in Under 2 Hours

By BTW Team4 min read

How to Write Your First Code Using AI in Under 2 Hours

If you’ve ever felt overwhelmed by the idea of coding, you’re not alone. Many aspiring builders worry they lack the technical skills to bring their ideas to life. But here’s the good news: with the rise of AI coding tools, you can write your first lines of code in under two hours, even if you have zero experience. In this guide, I’ll share how you can leverage these tools effectively and what to expect along the way.

Prerequisites: What You Need Before You Start

Before diving in, make sure you have the following:

  • A computer: Windows, Mac, or Linux will work.
  • An internet connection: Most AI coding tools are cloud-based.
  • Basic understanding of coding concepts: Familiarity with terms like variables and functions will help, but is not required.

Step-by-Step: Writing Your First Code

1. Choose Your AI Coding Tool

Here’s a list of popular AI coding tools you can use to write code quickly:

| Tool Name | Pricing | Best For | Limitations | Our Take | |-------------------|-----------------------------|-------------------------------|--------------------------------------|----------------------------------| | OpenAI Codex | Free tier + $20/mo pro | Quick code snippets | Limited language support | We use this for quick prototypes. | | GitHub Copilot | $10/mo | Integrating with GitHub | Requires a GitHub account | Great for collaborative projects. | | Replit | Free tier + $7/mo pro | Learning and experimentation | May slow down with complex projects | We use this for coding challenges. | | Tabnine | Free tier + $12/mo pro | Autocompletion | Limited to certain languages | We don’t use this because we prefer Codex. | | Codeium | Free | General coding assistance | Lacks advanced features | Worth trying for beginners. | | Ponicode | Free tier + $15/mo pro | Testing and code quality | Not ideal for complete projects | We don’t use this due to complexity. | | Katalon Studio | Free tier + $39/mo pro | Automated testing | Steeper learning curve | Skip if you're just starting out. | | Glitch | Free | Building web apps | Limited functionality | We love it for quick web prototypes. | | AI Dungeon | Free | Interactive storytelling | Not a traditional coding tool | Fun for creative coding exercises. | | CodeSandbox | Free tier + $9/mo pro | Frontend development | Requires some JavaScript knowledge | We use it for front-end projects. | | Jupyter Notebooks | Free | Data science and ML | Not ideal for web apps | Great for data projects. | | PyCharm | Free tier + $199/mo pro | Python development | Pricey for casual use | We recommend it for serious Python developers. | | Visual Studio Code| Free | General purpose coding | Requires extensions for full power | Our go-to for every project. |

2. Set Up Your Environment

Once you’ve chosen a tool, set up your environment. For example, if you’re using OpenAI Codex, simply create an account and access the platform. Most tools will have straightforward onboarding processes.

3. Start Coding

Use the AI tool to generate code snippets. For instance, if you want to create a simple “Hello World” program, type in a prompt like “Write a Python program that prints ‘Hello World’.” The AI will generate the code for you.

Expected Output:

print("Hello World")

4. Test Your Code

Copy the generated code into your tool’s code editor and run it. Make sure it works as expected. If you encounter any issues, check for syntax errors or consult the tool's help resources.

5. Iterate and Experiment

Once you’ve successfully run your first code, try modifying it. Change the text, add more print statements, or experiment with loops. This is where you’ll learn the most.

Troubleshooting: What Could Go Wrong

  • Code doesn’t run: Double-check for syntax errors. AI-generated code can sometimes include mistakes.
  • Unexpected outputs: Review your code carefully and make sure you understand each line. Modify the inputs or code as needed.

What’s Next: Progressing Your Skills

After you’ve written your first code, consider diving deeper into programming. Here are some suggestions:

  • Take online courses: Platforms like Udemy and Coursera offer affordable coding courses.
  • Join coding communities: Engage with others on forums like Stack Overflow or GitHub.
  • Build small projects: Start with simple apps or scripts to solidify your skills.

Conclusion: Start Here

If you’re looking to dip your toes into coding, using AI tools is the most accessible way to get started. Choose one or two tools from the list, and follow the steps outlined here. Remember, the key is to practice and experiment as you go. You’ll be surprised at how quickly you can pick up coding skills.

What We Actually Use

In our experience, we primarily use OpenAI Codex for quick prototyping and Visual Studio Code for more extensive projects. These tools strike a balance between ease of use and functionality, making them perfect for indie hackers and side project builders.

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

How to Automate Your Development Workflow with AI in 3 Easy Steps

How to Automate Your Development Workflow with AI in 3 Easy Steps (2026) As indie hackers and solo founders, we often find ourselves buried under a mountain of repetitive tasks tha

Sep 3, 20264 min read
Ai Coding Tools

How to Boost Your Coding Velocity with AI in 30 Minutes

How to Boost Your Coding Velocity with AI in 30 Minutes As a solo founder or indie hacker, you know that time is your most precious resource. The idea of boosting your coding veloc

Sep 3, 20264 min read
Ai Coding Tools

Why Most Developers Get GitHub Copilot Wrong: 5 Myths Busted

Why Most Developers Get GitHub Copilot Wrong: 5 Myths Busted As we dive into 2026, GitHub Copilot has become a staple in many developers' toolkits. However, despite its popularity,

Sep 3, 20263 min read
Ai Coding Tools

How to Use AI Coding Tools to Boost Productivity in Under 2 Hours

How to Use AI Coding Tools to Boost Productivity in Under 2 Hours As indie hackers, we all know the struggle of trying to stay productive while juggling multiple projects. The prom

Sep 3, 20265 min read
Ai Coding Tools

Vercel vs GitHub Copilot: Which AI Tool is Right for Your Project?

Vercel vs GitHub Copilot: Which AI Tool is Right for Your Project? As a solo founder or indie hacker, choosing the right tools can be a makeorbreak decision for your project. With

Sep 3, 20263 min read
Ai Coding Tools

Why GitHub Copilot is Not the Magic Bullet for Every Programmer: Debunking the Myths

Why GitHub Copilot is Not the Magic Bullet for Every Programmer: Debunking the Myths As a programmer, I’ve been there: staring at a blank screen, hoping for a burst of inspiration

Sep 3, 20264 min read