AI Is Dumb — And You Should Be Too (Here’s Why)


In a world where AI is becoming more prevalent, it’s more necessary than ever for us as junior developers to ensure we’re using AI responsibly. One key approach to achieving this is by understanding and applying core clean code principles — not just in our coding, but also in how we communicate with AI tools.
Why? Because writing great prompts is a lot like writing clean, maintainable code. Whether you're using ChatGPT, GitHub Copilot, or any other AI assistant, the way you ask matters. Prompts are the new code comments. They direct behaviour, define logic, and determine results.
Here are 5 essential clean code principles you can apply to your prompting style and AI usage — they’ll help you get better, more useful responses and cleaner, more maintainable code.
1. 🧠 KISS – Keep It Simple, Stupid
"Complex prompts confuse both AI and humans."
When prompting AI, avoid long-winded or overly complex instructions. Break big questions into smaller ones. This mirrors how you'd break a large function into smaller, more manageable pieces.
✅ Example Prompt:
“Write a function in Go to check if a number is prime. Use a loop.”
❌ Avoid:
“Write a fully optimised algorithm that determines prime status using multiple approaches and benchmark them with edge cases for performance analysis in Go.”
Simple wins. Start small, build up.
2. 🧱 SRP – Single Responsibility Principle
"A prompt should do one thing well."
Just like functions shouldn’t do multiple unrelated tasks, prompts should focus on one clear request at a time. This reduces ambiguity and improves the quality of the AI’s response.
✅ Example Prompt:
“Explain how to use Tailwind CSS to create a responsive navbar.”
If you also want to add dark mode, ask that as a separate prompt.
3. ✂️ YAGNI – You Aren’t Gonna Need It
"Don’t overprompt for things you don’t need yet."
Sometimes we’re tempted to ask for all possible use cases, error handling, and optimisation at once. But just like in coding, this leads to bloated, harder-to-read output.
✅ Prompt only what you need now. You can always refine it later. This also keeps your output manageable, especially when you're learning.
4. 🧪 Write Testable Code (or Prompts!)
"Prompt in a way that allows you to validate and understand the output."
A good prompt should generate output you can test, tweak, and reuse. Ask for small code chunks or explanations with comments so you can follow along and learn, not just copy-paste.
✅ Better Prompt:
“Can you add inline comments to explain what this function is doing?”
This makes debugging and learning easier a win for responsible AI use.
5. 📦 Prefer Composition Over Inheritance
"Build complex prompts from simple, reusable parts."
AI thrives when you build prompts step-by-step. Instead of asking for an entire app or full module, ask for small building blocks (like reusable components or services), then compose them.
✅ Example Flow:
Ask for a login form UI
Then ask for a function to handle login
Then ask how to connect that logic to an API
This mirrors good development practices — modular, maintainable, understandable.
🌱 Final Thoughts
AI isn’t a magic wand. It’s a tool and like every tool, its value depends on how you use it. As junior developers, it’s not just about getting the job done with AI, it’s about learning how to do the job better.
By applying these clean code principles to your prompting, you’ll write better code, understand your tools more deeply, and develop habits that will future-proof your career, even in an AI-driven world.
Let’s build with intention, not just speed. AI is powerful but clean, thoughtful input is still king. 👑
Subscribe to my newsletter
Read articles from m13ha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

m13ha
m13ha
Welcome to my little corner of the internet where business savvy meets coding prowess, all wrapped up in the day-to-day adventures of yours truly. Whether you're here to level up your programming skills, gain some business insights, or just enjoy a slice of life through my eyes, you're in the right place! #CodeLife #BusinessMinded #TechEntrepreneur #ProgrammingAdventures #StartupJourney #DeveloperDiaries #LifeInCode #BusinessAndBytes #TechLifeBalance #CodeEntrepreneur