I would not have been able to build as many MVPs (minimum viable products) as I have the last year without ChatGPT and Claude. No, I don’t think AI could ever replace a real software engineer but about $40/mo is about what I can afford in the meantime!
These were the top three things that tremendously helped me prompt for my MVPs.
Put on your Product Manager hat, be clear about the intended behavior of your code.
Require your chatbot to ask clarifying questions before proceeding
Be explicit about your desired best practices
1. Put On Your Product Manager Hat
If I’m starting a new project I have one window for the PM (product manager) side and one side for the coding.
First, we need to come up with a product spec. I’ll start with a prompt like this:
You are an expert in product management for B2B SaaS. You need to create a product spec that will be read by AI to implement my landing page. It's a landing page for my company Flying Comet Games, we make daily playables for digital publications.
Ask me all the questions you need to ensure you can satisfy the product spec using best practices.
Normally you’ll get around ~20 follow up questions. You continue to ask questions until the AI is confident to create the product spec.
Continue to repeat until AI has created a product spec that you know aligns with what you want your outcome to be. Then you can share this with your “engineer” chatbot window.
2. Require AI to ask clarifying questions before proceeding
One of my favorite courses on prompt engineering is ChatGPT Prompt Engineering for Developers (free!). Here I learned that ChatGPT tends to favor speed in answering your question over thoughtfulness by default. This is why so often ChatGPT is so quick to confidently give you incorrect answers or bad code.
To combat this I always reiterate to the chatbot to:
Ask follow-up questions if it is ever unsure about a certain requirement
Prefer accuracy over speed, if you are not completely sure about a requirement ask again
Check over its work multiple times
Let me know if what I’m asking for is out of scope for a single prompt for GenAI
Now more LLMs are coming up with chatbots with better reasoning, but I still use this as best practice.
If you’re doing this correctly it should be quite a while before your chatbot gives you any code. Similar to when real engineers work together we need to be 100% certain on expectations before implementation.
3. Be explicit about your desired best practices
There are a million best practice philosophies out there. Whether you prefer TDD, Clean Code, YAGNI or any other “best practice” you need to let your chatbot know.
For example I’m most comfortable with React and using MUI components. I also know very little about UX but have read the Laws of UX and agree with the principles. So if I’m asking ChatGPT to create a landing page for example I’ll include:
Ensure you're building with best practices as outlined by the Laws of UX when designing elements on our landing page.
Ask any questions if you're unsure of how to apply Laws of UX in your implementation.
The more concrete you are with what you want your code to look like the less of a headache it’ll be to rewrite all the code your chatbot just wrote.
Conclusion
In my opinion writing code that works is not the hardest part about being an engineer. If you can provide your chatbot the hard parts (product requirements, choosing best practices, understanding tradeoffs, reducing scope, etc) you can be quite the team to build an MVP. 🌟🤖
Thanks for reading,
Eden