AI can write code faster than most developers can type it.
But here's the part we don't talk about enough:
Better code doesn't always come from a better prompt. It often comes from a better question.
You can ask AI:
"Write clean and scalable code for this feature."
And you'll probably get something that looks impressive.
But is it actually the right solution?
Maybe. Maybe not.
The problem isn't always the quality of the generated code.
Sometimes, we simply didn't give AI enough context to make a good engineering decision.
The "Write Better Code" Approach
A common way of using AI is:
- Describe the feature.
- Ask for code.
- Copy the result.
- Fix the errors.
- Ask AI to fix the errors.
- Repeat.
It works.
But it can quickly turn into:
AI writes → developer reviews → AI rewrites → developer fixes → repeat.
You're using AI as a code generator.
That's useful, but you're leaving a lot of its potential unused.
Start Asking Better Questions
Instead of:
"Write a scalable API for user registration."
Try asking:
"What could go wrong with this registration flow when thousands of users are signing up simultaneously?"
Now you're not asking AI to immediately produce code.
You're asking it to think about the problem.
Then you can follow up:
"What architecture would you recommend and why?"
Then:
"What security risks should I consider?"
Then:
"What database constraints would prevent duplicate accounts?"
Then:
"What happens if the email service fails after the user is created?"
Only after understanding these decisions should you ask:
"Now implement it."
The final code is likely to be much more useful because the conversation started with engineering questions, not just code generation.
AI Is Very Good at Finding Things You Didn't Think About
One thing I've started appreciating about AI is its ability to act like a second pair of eyes.
Give it a feature and ask:
"What am I missing?"
That simple question can reveal:
- Edge cases
- Security problems
- Performance bottlenecks
- Race conditions
- Missing validation
- Poor error handling
- Unclear API contracts
- Database issues
- Accessibility problems
You might not agree with every suggestion.
That's fine.
The goal isn't to blindly follow AI.
The goal is to make your thinking better.
Don't Ask AI to Agree With You
This is another trap.
Suppose you've already decided:
"I'm going to use Redis for this."
Then you ask:
"Why is Redis the best choice for this?"
Of course, AI can give you ten reasons.
Instead, try:
"I'm considering Redis for this problem. What are the reasons NOT to use it?"
That's a much better question.
Now you're forcing yourself to consider alternatives.
You can do the same with architecture.
Instead of:
"Give me a microservices architecture."
Ask:
"Would microservices actually make sense for this application? What would I lose by using them?"
Sometimes the best architectural decision is the simpler one.
Ask AI to Critique Your Code
You don't always need AI to rewrite your code.
Sometimes you just need another perspective.
Give it your existing implementation and ask:
"Review this as a senior engineer. Don't rewrite it yet. First identify the biggest risks and explain why they matter."
That's a very different conversation.
You can then decide which issues are actually worth fixing.
This also helps you understand the code instead of blindly replacing it.
Context Matters More Than Fancy Prompts
You don't necessarily need a 500-word prompt full of complicated instructions.
You need useful context.
Tell AI:
- What you're building
- Who will use it
- Your existing architecture
- Your constraints
- Expected traffic
- Database choices
- Security requirements
- What you've already tried
- What you're unsure about
Then ask a specific question.
A simple question with good context is often more valuable than a huge prompt with no context.
The Developer Still Has to Make the Decision
This is the most important part.
AI can suggest an approach.
It can compare technologies.
It can identify potential problems.
It can generate implementation ideas.
But you still need to decide what makes sense for your system.
Because AI doesn't own your product.
It doesn't know every business constraint.
It doesn't have to maintain the code six months later.
It doesn't have to explain the architecture to your team.
And it definitely doesn't get paged at 3 AM when production breaks. 😄
You do.
Use AI as a Thinking Partner
The biggest change isn't learning how to write the perfect AI prompt.
It's learning how to have a better technical conversation with AI.
Ask:
"What am I missing?"
"What could go wrong?"
"What are the trade-offs?"
"What would you choose and why?"
"What assumptions are we making?"
"How would this fail in production?"
"Is there a simpler solution?"
Then ask AI to write the code.
That's when AI becomes much more than a code generator.
The Real Skill Is Asking Better Questions
We're entering a world where writing code is becoming increasingly easy.
The harder skill is deciding:
What should we build?
Why should we build it this way?
What could go wrong?
What are we missing?
AI can help answer those questions.
But only if we actually ask them.
So maybe the future of AI-assisted development isn't about learning how to make AI write better code.
Maybe it's about becoming better at asking the right questions before the code is written.
Don't just ask AI to code. Ask it to challenge your thinking.
Top comments (0)