9 Rules of Coding with LLMs
• 6 min read
On March 14, 2023, GPT-4 was released and my first instinct was to try to make an iOS app. Two hours later, when "Hello World" finally appeared in my Xcode simulator, I felt like I'd just discovered fire. The models have since then done the heavy lifting in graduating from junior to senior developers and coding an app no longer requires the same endless prompting and patience as it used to, but they aren't the only ones who've upped their game. Through 2.5 years of trial, error, and countless late-night coding sessions, here's what I've learnt about being a great AI collaborator.
1. Be Outcome-Driven
Start every new project with outlining your goal. What is it that you are building? For whom? Why? Let it know what's important and not in terms of functionality, quality and speed. If you know what tech stack you want to use, tell it. Have it share its plan and reasoning behind its prioritizations. Agree on a plan before moving into coding. I always have a short version of this plan ready to copy into a new instance of my LLM for whenever I run out of context or want to start over.
2. Start Small
First create a basic version that compiles and runs, then add features and refine. Don't try to build the perfect solution in one shot. Define an MVP and user stories you can add later. Keep a proper backlog, even for small projects.
3. Be Vulnerable
Let your LLM know your knowledge gaps and limitations, your experience with the coding language and platform at hand. If you need an explanation mid-way, ask. Tell it to explain like you are 5 if you need to. 3 years ago I could almost sense my LLMs disappointment when it realized I hadn't even opened the terminal to input the commands it had printed for me. Coding is a lot about setting up and configuring your environment. Share screenshots to have it explain where you should click next.
4. Be Specific
Put effort into finding the words for describing your desired outcome. Learn the lingo needed to increase specificity in the domain you are tackling. Say that you want the text horizontally-left aligned and vertically mid-aligned with slightly more padding above than below the text. Instead of saying, "make it look better", share screenshots of what you like. Same goes for bugs and code that doesn't compile - do not say "fix it" or "it's not working", share error logs and proper bug reports on what issue you experience.
5. Be Curious
Ask for the reasoning behind recommendations. This is the opposite of just trusting the LLM and taking its word, but serves a different purpose. It helps you learn and ensures the solution fits your context. Why would you refactor to use dependency injection here? What benefit would we get from adding a caching layer here? Challenge suggestions. Sometimes LLMs invent solutions where there's no problem and introduce unnecessary complexity.
6. Be The Guide
You are a senior manager and your LLM is your development team. Use code reviews as teaching moments. When the solution doesn't work, don't just ask for a fix. Explain why it's wrong, what the expected behavior is and ask for understanding. Clarify misconceptions and often steer back towards simpler solutions. It's powerful having the full solution in mind, but can lead to more spaghetti, sometimes less actually is more. Great product managers ask their team for pros and cons in order to inform the decision rather than just trusting them. Be clear on what matters most: is it performance, maintainability, user experience, speed to market or something else?
7. Be Real
Use domain specific words, accurate technical terms. Be the expert that you are for your business and bring the LLM to your level. Don't dumb yourself down, don't take away its ability to impress and add value. Upload product specs, API documentation, style guides for it to understand.
8. Trust But Verify
Test at every change. Run the code when you add a feature and take notes when it doesn't work. Don't trust the LLM if it claims it'll work - compile and test. If you've taken previous advice on being vulnerable, expect that it tries to over-protect you from complexity. This is typically a good thing, but could create inefficiencies or bugs if not supervised.
9. The AI Product Manager Mindset
The qualities that make great product managers are exactly what makes great AI coders. Outcome-driven thinking. Clear prioritization. Understanding tradeoffs. Managing technical work without being technical. Great PMs don't tell engineers how to code - they clarify what needs to be built and why. They ask intelligent questions, push back on complexity, and ensure the solution actually solves the user's problem.
You're not just prompting an AI - you're managing a brilliant but sometimes misguided development team. The magic isn't in the models anymore. It's in how you lead them.
Remember: The best coders aren't those who know every syntax detail. They're those who can think clearly about problems and communicate effectively about solutions.
Welcome to the era where product thinking beats coding knowledge. Where clarity beats cleverness. Where being a great manager beats being a great coder.