Published on

Bug Fixing with AI: Calm Steps to Find and Fix

Authors
  • Mehdi Akiki avatar
    Name
    Mehdi Akiki
    Twitter

Bugs happen. With a simple method, AI can help you find the cause faster and propose a safe fix.

A calm method

  1. Describe the bug in one sentence (what you see, what you expected).
  2. Share the smallest code and inputs that reproduce it.
  3. Ask: “List 3 likely causes and 3 quick checks.”
  4. Try one check, report the result, repeat.

Helpful prompts

  • “Explain the error message like I’m a teammate. What does it mean in this file?”
  • “Suggest a minimal change that fixes this and why.”
  • “What tests should I add to avoid this in future?”

Keep control

  • Change one thing at a time
  • Keep diffs small and reversible
  • Add a test that fails first, then passes

Common pitfalls

  • Sharing too much context at once
  • Accepting big refactors during a fix
  • Skipping the repro step

Takeaways

  • Clear reproduction is power
  • AI gives options; you choose the safe path
  • Always leave a test behind

I build and scale reliable production systems. Open to full-time and freelance work with U.S.-based teams that value ownership and execution.

Got something in mind?

Book a Discovery Call