Mohamed Sharaf

Before you ship code an AI wrote

AI coding tools are fast and often right. Five checks before that code goes live.

· 1 min read

I use AI coding tools every day. They save real time. They also write code that looks finished and isn’t.

Before AI-written code goes live, I check:

  1. Did I read every line? If I can’t explain it, it doesn’t ship. Same rule as code from a new hire.
  2. Inputs. AI loves the happy path. Look for missing validation, SQL built from strings, and file paths from user input.
  3. Secrets. It sometimes hardcodes keys from examples or asks you to paste yours into the chat. Neither is fine.
  4. Packages. It can suggest a library that doesn’t exist, and attackers register those names. Check every new dependency is real and maintained.
  5. Tests. Ask it to write tests too, then read the tests. A test that checks nothing passes very nicely.

Treat the AI like a fast junior developer with a lot of confidence. Great for a first draft. You still own what ships.

ShareWhatsAppLinkedInXTelegramFacebook