this post was submitted on 24 Jul 2026
519 points (98.1% liked)
Programmer Humor
32462 readers
737 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I've actually found a lot of success with the opposite where I write the code and AI writes the unittests. I would have otherwise written a few unit tests, but AI makes typically 20x that many. Since my code is already documented, it can get lots of good context. I typically instruct it to check the branch's diff relative to main and test only those changes. I might skim them over, delete some that don't make sense in context and would never pass, and update one or two. Typically after a few rounds of iteration, I have tons of tests I would never have written on my own, and a human-made feature.
You could also have it write your tests first from the requirements and use red green tdd as you write.
In a perfect world yes, but even after all the solution in and planning, once a developer gets into the request and looks at the code things often change.
Requirement only written test steps are rarely going to be enough to cover every scenario. Saying this as a 10 year ba veteran