You own the code. Own and understand what it does.

TL;DR: Never ship AI-generated code you don't understand — ask until you do.

Common Mistake ❌

You ask an AI agent to implement a feature.

It returns 200 lines of code.

You run the tests. They pass. You commit and push.

You think you are the best 'agentic-coder' in the world.

But you never read the code.

Three weeks later, a security issue happens in production.

The AI introduced subtle bugs you could have caught in two minutes.

You didn't catch it because you never looked.

You're accountable but don't understand what the code does, and you can't explain it to others.

There are many fancy video tutorials on using agents without reviewing the code.

Remember, there must always be a human in the loop.

Problems Addressed 😔

https://hackernoon.com/code-smell-313-workslop-in-ai-assisted-programming?embedable=true

How to Do It 🛠️

  1. Read every code line the AI generates or modifies before you accept it.
  2. Ask the AI to explain any part you don't understand.
  3. Ask follow-up questions until the explanation is clear to you.
  4. Identify the assumptions the AI made and verify them.
  5. Check edge cases that the AI might have missed.
  6. Refactor and polish any part that you would not have written that way yourself.
  7. Make the code yours before you commit it.

Benefits 🎯

Context 🧠

AI agents are fast. That speed creates pressure.

You feel like slowing down to read breaks the momentum.

It doesn't. It saves you.

The AI doesn't know your system. It doesn't know your constraints.

It doesn't know what happened last quarter when you made a similar change.

You do. That context is irreplaceable.

When you skip reading, you hand off judgment to a tool that has no judgment. You outsource the one thing only you can do.

Asking questions is not a sign of weakness.

It is how you stay in control.

The AI won't judge you for asking.

It will give you a better answer.

Prompt Reference 📝

Bad Prompt:

Implement user authentication,

add it to the project,

commit and push to the main branch.

*This prompt gives the AI full authority over a critical system. *

*You get a blob of code with no checkpoint for understanding.*

Good Prompt:

Implement a login function using JWT.

Use RS256 signing.

After you write it, ask me questions about each step.

I'd like to understand what you did on every line of code

*This prompt sets expectations.*

*You get code AND an explanation.*

*You know what to verify.*

Considerations ⚠️

Type 📝

[X] Semi-Automatic

Limitations ⚠️

Tags 🏷️

Level 🔋

[X] Beginner

https://hackernoon.com/ai-coding-tip-006-review-every-line-before-commit

Conclusion 🏁

The AI writes fast. You think too slowly. That is not a flaw.

That is the division of labor that makes the combination work.

Speed without understanding is just faster mistakes.

Ask questions. Read the code. Own what you ship. 🏁

More Information ℹ️

https://pragprog.com/titles/tpp20/the-pragmatic-programmer-20th-anniversary-edition/?embedable=true

https://owasp.org/www-project-top-ten/?embedable=true

https://google.github.io/eng-practices/review/?embedable=true

https://arxiv.org/abs/2211.03622?embedable=true

https://cwe.mitre.org/?embedable=true

Also Known As 🎭

Tools 🧰

Disclaimer 📢

The views expressed here are my own.

I am a human who writes as best as possible for other humans.

I use AI proofreading tools to improve some texts.

I welcome constructive criticism and dialogue.

I shape these insights through 30 years in the software industry, 25 years of teaching, and writing over 500 articles and a book.


This article is part of the AI Coding Tip series.

https://maximilianocontieri.com/ai-coding-tips