It's quite clever, and it's fun, but "Did my listeners all get called when I dispatch after removing a listener" is a really obvious thing to unit test. The fact that the AI caught this bug highlights how good AI is getting, but it also highlights the need for very basic practises like actually testing your code.
I'm always in favour of tools that help us find bugs earlier and with less effort, because in practice that's how we get fewer bugs, rather than just hoping everyone everywhere will be disciplined. And this seems like it could certainly be able to be in between type checking and unit tests in that sense.
I'm always in favour of tools that help us find bugs earlier and with less effort, because in practice that's how we get fewer bugs, rather than just hoping everyone everywhere will be disciplined.
I disagree. Most bugs in code are entirely valid code. They're things where the developer has written great code that does the wrong thing. Those bugs will be impossible to catch with AI until the AI can understand the requirements, and that can't happen if the requirements aren't clear, and unclear requirements are the source of the bug in the first place. That can't be solved with AI. AI can only ever be as good as the input data. In software development the input data is usually a pile of crap.
If you choose to defer to AI rather than think about the code you write then you will write buggy code, but the AI won't tell you it's buggy because it'll look fine.
The way to build high quality software is to build things with thought and rigour, with good processes like analysing requirements and building tests to cover what the requirements state the code should do.
I don't think I argued for foregoing unit tests in favour of AI. I said that, where AI (or whatever tool, really) is able to find a bug earlier in the process than a unit test can, that seems a win to me.