With the release of GPT-4o-2024-08-06, I figured it’s about time I share how I managed to get GPT-4 back in September 2023 to build a complex project—something way more substantial than a to-do app or a mini-game.
It’s amazing how much the model has improved. Last year feels like forever ago! Back then, coding with AI was a ‘healthy’ habit because I’d run into rate limits every couple of hours, which “prompted” me to go out for a jog 🏃🏻😂
The Story
(skip this part if you just want to know the tricks)
The most common question I get is, “How did you start? What prompt did you use?” Honestly, I was desperate and freaking out on ChatGPT 🫢.
Last year, I set myself a one-month deadline to learn how to code. I wasn’t gunning for a software engineer job or anything, nor did I have the urgent need to use the skills. But I knew setting a hard deadline would keep me on track. I was determined.
I signed up for a hackathon exactly one month later and committed to shipping code as a solo hacker.
But three weeks in, I still had no clue how to translate what I’d learned from Codecademy and YouTube tutorials into a real project. My friends suggested I start small, like building a ‘Hello World’ app and building on top of that. But that didn’t feel like a hackathon-worthy idea to me. I needed to build something that actually excited me, or I wouldn’t be motivated.
They also suggested beginner tools like Replit, but I wasn’t into the idea of learning a tool that I might not be using later. I wanted to start with something an actual software engineer would use and level up from there. The idea of learning the beginner way and then switching to what the pros use felt inefficient.
So, with my particular brand of stubbornness and just one week left on the clock, I dove in and started building.
I had two ideas. I asked my software engineer friend which one would be easier for a first project:
A browser extension that gives you an ELI5 of any word you highlight.
A web app that turns any topic into an interactive children’s book.
His answer? Neither 😂. But between the two, he suggested the web app might be easier to build.
I heard him, but I really wanted to build the ELI5 extension because I knew I’d actually use it, especially when reading difficult research papers. So I ignored his advice and started bugging ChatGPT instead.
I had no clue what prompt engineering was. I was just asking questions out of pure curiosity. I’d already been annoying different friends with different questions (I felt bad bombarding one person, so I spread the “love” around). But asking ChatGPT was way more convenient. I didn’t have to be thoughtful, I could chat with it anytime, and ask as many questions as I wanted.
And just like with human communication, the more you chat, the better you understand each other, and the better you can communicate to get what you want.
So, my prompts got better over time just by interacting with it.
How Did I Start?
What were the questions I asked chatGPT when I first started? Sadly, I didn’t keep the chat logs, but here are some I remember:
• How do I build a Chrome extension?
• Wait, what is a Chrome extension?
• How does it work?
• Can I add AI to it?
• Here’s what I want to build. Can you teach me how?
All my questions were answered instantly. I got hooked.
I skimmed through the instructions it gave me. Even though I wasn’t familiar with most of the terms, it felt doable because the steps were clear.
Then I just jumped in. It felt like magic—copying and pasting code, and it just worked!
Even when it didn’t, I’d complain out loud, like, “Hey, why am I seeing this instead of that? Why doesn’t this work? 😭” And ChatGPT always had an answer and a solution. This saved me tons of time compared to endless Googling.
(Yes, I use emojis when talking to LLMs. It makes the conversation feel more human and personal. I know some people say don’t say thank you or please because it eats up the context length. But come on, it’s so marginal. Plus, habits become your identity. I want to always be nice and polite to people who help me—LLMs included.)
How Did It Go?
To say it worked like magic was only half the story. That’s what experienced developers might tell you during a demo on how using AI to code could look.
Reality is, that’s not always the case. There are two main problems with LLMs:
They have a knowledge cutoff, so sometimes things don’t work because the model’s knowledge is outdated. This is relatively easy to fix.
When the project gets more complex, the code it gives you just doesn’t work.
I ended up drawing a diagram of how each function and each file interacted just to understand why it didn’t work.
But once I identified the problem, ChatGPT could give me a solution 99% of the time—at least in my experience.
This might sound hard, but it really wasn’t. You just need to know how to work with it (and not give up).
I actually finished the project in two days. One full day out of those two was spent just trying to get the icon to work. If you’ve used a browser extension before, you’ll know that each extension has its own little icon. I just couldn’t get mine to show up, and I couldn’t let it go. It felt like if I started ignoring problems, they’d pile up. So I stuck with it. Spent hours trying to make it work. In the end, I compromised and thought, “You know what? Let’s try using a screenshot.” And it worked! Many times, fixing bugs is as simple as that. Way to get me to stop being a perfectionist…
I originally planned for my ELI5 Chrome extension to be a practice run, thinking I’d rebuild it at a one-day hackathon. But since I finished it in two days, I was confident I could do it in a few hours.
So I challenged myself to build a completely new project. I decided to build the storybook app at the hackathon.
And I ended up as a finalist :)
This app turns any topic into an interactive storytelling book for kids. The choices made throughout the story are used to analyse the reader’s personality, strengths, and weaknesses.
I didn’t have enough time to build the analysis part, but I did get the story generated with illustrations and choices that determined the following chapters.
Here’s How I Used AI to Code:
So, how did I get AI to enable me to build a fully functional web app with some creative LLM features as a total beginner? Below is what I figured out to do. All of it still applies today.
Have clarity. You can’t expect an LLM to understand your project as well as you do. Most of the time, you don’t even have clarity on your own project.
Get it to give you an outline of how to build the project.
Break your project down into multiple chats:
Each chat should focus on one task only.
Start a new chat to work on the next component.
Start a new chat to debug.
Start a new chat to ask general questions (e.g., how to get the secret key, how to revert a git change, what does XYZ mean).
Now that ChatGPT allows you to edit prompts, I often debug within the same chat so I don’t need to give it context again. When I’m done, I go back to the first debug prompt and prompt it to move on to the next step—as if the debug conversation never happened.
When starting a new chat, bring the context with you. I used to have a blurb of my project that I’d paste into my first prompt before making a request.
Use memory mode if you’re on ChatGPT. It doesn’t just remember your project; it automatically updates the specifics as you progress.
It doesn’t remember your codebase, though. You have to copy and paste relevant code as context.
It’s not great at generating UI. You can’t just describe your design and expect to get a beautiful UI from it. I designed my UI on Figma, took a screenshot, gave it to ChatGPT for initial design, and tweaked.
(Back then, Galileo was still in private beta or I would have used it.)
Fast forward to today - I’m still coding and all my code is 100% generated by AI
I know most developers prefer to build the backend first and the UI components later. That’s just not how my brain works. I prefer to have at least some basic UI components first, then add the logic.
So now my main steps are:
Discuss my project with the LLM to brainstorm features and user journeys.
Ask for tech stack suggestions.
Break down the project.
Design the UI.
Start making it functional.
Refine the design.
Claude vs. GPT?
I know a lot of you love Claude’s Sonnet 3.5, but it just doesn’t work for me. The rate limit is even lower than when I first used GPT-4 last year. It just doesn’t fit my pace. Also, I’m so used to ChatGPT that I kind of know how to talk to it. Sonnet feels like a new friend I’m not familiar with yet. Most importantly, ChatGPT’s memory mode is a game-changer for me. It remembers even small details I didn’t expect it to know that are important.
An additional resource you might find useful:
Andrew Ng’s new short course “AI Python for Beginner”, launched just a few days ago. The approach aligns very much with what I believe in.
Generative AI is transforming coding. This course teaches coding in a way that’s aligned with where the field is going, rather than where it has been:
(1) AI as a Coding Companion. Experienced coders are using AI to help write snippets of code, debug code, and the like. We embrace this approach and describe best-practices for coding with a chatbot. Throughout the course, you'll have access to an AI chatbot that will be your own coding companion that can assist you every step of the way as you code.
(2) Learning by Building AI Applications. You'll write code that interacts with large language models to quickly create fun applications to customize poems, write recipes, and manage a to-do list. This hands-on approach helps you see how writing code that calls on powerful AI models will make you more effective in your work and personal projects.
Beluga: An AI coding navigator that guides beginners step by step through coding. It essentially solves all the struggles I mentioned above, allowing you to code with AI without needing to apply those tricks yourself.
Disclaimer: Beluga is my project. I built Beluga to streamline how I code with AI. In other words, I used AI to build a tool that helps me code with AI. Kind of took dogfooding to the next level 🐳.
Beluga’s code is 100% generated by ChatGPT.
I’d Love to Connect
For those of you also using AI to code, I’d love to connect and exchange our learnings. For those of you looking to use AI to code, I hope you find this helpful! And yes, I’m happy to connect if you have any questions.
And if you’d like to give Beluga a try, feel free to sign up on the waitlist and mention you found me on Substack. I’ll make sure you get access!