https://martinfowler.com/articles/exploring-gen-ai/i-still-care-about-the-code.html
I'm a fan of AI. However at the end of the day what we do is build features.
Martin notes that focusing on tests first is a great way to go in the AI age, and I strongly agree.
If feature code doesn't have tests, that's fine. As a team we don't pay for writing and maintaining the test. However if we get "bad" tests, that's SO MUCH WORSE than no tests at all!
If AI writes a test, and a human merges it without thinking, or without thinking enough, that's bad. The entire feature is now at risk. Business and the tech team are lulled into a false sense of safety and security.
The way we as developers know what and how to test, is by writing tests. We slowly gain experience and more deeply understand the business and their requirements. If we delegate easy tests to AI, we're letting our testing and understanding skills weaken. We're at risk of not understanding the test, not understanding the code, and not understanding the business requirements.
Recently a client complained that their test suite had too many "flaky" tests. They were spending a lot of time debugging the tests. Fortunately I had a simple solution: delete flaky tests with prejudice. See my previous post.
Tests only value is in critiquing the feature code. It has no other value nor function. Delete it if it's not creating value.
Top comments (0)