Free course › Module 1
Lesson 2 of 10 · 5 min
The magic of LLMs and code generation.
(see above - a nice and tidy file structure created under some initial guidance)
You can build some seriously complicated apps with AI coding tools, but the more you develop your app, the harder it gets to manage it all. You see, AI will help you build all kinds of things rather quickly. Many AI influencers on social media say you can do amazing things in minutes! Don't believe the hype! Sure, you can mockup something really quick, but you haven't deployed it, it mostly won't work, it won't be secure, can't scale, and you haven't yet paid any money towards hosting it, or the APIs you might need to make it work. So, to do things the right way, you need to follow some structure, some process and some discipline!
It's far too easy for an AI to just add lines and lines of code allowing you to lose track of what you're doing, and then you just end up with messy software that doesn't work well due to too many bugs.
Think of it like building a house and instead of fixing your errors, you just keep building more and more. The first bedroom leaks so we built another one. The next room was too small so we built another one! The windows weren't large enough in that one so we built another one.
Before you know it, you have a bloated house (application) that doesn't run well (slow), is prone to issues (bugs), and can easily fall apart (crash). It doesn't meet building codes (insecure), has lots of special quirks you have to keep track of (hard-coded addreses and settings), and it can't hold a huge house-warming party (not scalable)!
(see above, in Cursor) A classic example of an AI not checking before it runs a task. Every tool can do this, so read what it's about to do.
So, the magic is in how you utilise these LLMs to work for you and build the way you want. If you're not familiar with building apps, don't stress, we will help you with that. We will discuss these components in future sections but to best guide you as you build. You can simply ask the LLM to help you get started! Just keep in mind that your results depend significantly on how effectively you communicate with the AI. This skill, known as "prompt engineering," is about crafting clear, precise prompts to achieve the best results. Like a conversation with a developer, the clearer your instructions, the better the output you'll get. See our following sections on this that go into that into a lot of depth.
Here's an example: Sarah, an event planner with no coding experience, wanted a straightforward app to manage event attendees. That means, a way to scan in people by their QR code when they register, categorise them by industry, and allow for a way to send out notifications and alerts to their mobile phone numbers if they opt in to let them know about training sessions and activities.
By clearly articulating her needs through a product requirements document, Sarah quickly got a working prototype from an LLM. This is because she and the LLM went through various components of the application taking into consideration the user experience, the problem they were trying to solve, and the securty needed for the app to get off the ground. Along the way, Sarah kept saying she didn't know all the questions to ask and so if the LLM would ask her any questions she could answer them with her expertise. Over several weeks, she refined her app based on feedback, and soon it became an essential tool, all without writing a single line of traditional code herself. Granted it doesn't do everything, but it was never designed too. The goal was to get a major issue resolved for her with low cost and just her desire to try and learn.
Questions to consider:
- Have you had experience crafting instructions or prompts for an AI? What strategies helped you get better results?
- Take your app idea to Claude or ChatGPT and ask it to interview you, one question at a time, to build a product requirements document. Then ask a different AI to spot what's missing.