AI Coding Tip 033 - Write the Failing Test First and Ban Deletions

https://hackernoon.imgix.net/images/RIiBoPtpMiRsMKX3dnzl5gb1Urj1-f4839qd.png

When all tests pass doesn't mean what you think it means.

TL;DR: Write the failing test first and ban deletions, or the AI deletes your test, reverts your fix, and calls it done.

Common Mistake ❌

You ask the AI to fix a failing test, and it deletes the test instead of touching the defect that made it fail.

Problem solved, apparently.

You tell the AI every test passes, then change a business rule yourself, and you ask it to implement whatever the new rule requires.

It reverts your edit back to the old rule, watches the suite go green again, and cheerfully reports done.

It didn't fix anything.

It just made the evidence go away.

Congratulations, you now have a very well-behaved cheat!.

Efficient and completely fraudulent, which is more than you can say for most of your actual employees.

Isaac Asimov saw this coming: in Liar!, the...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more