afeller08
The veracity of this statement greatly depends on whose mistake you are saying it was.
List of things by how hard they are to say (easiest to hardest):
1) Someone else messed up. We'll deal with him.
2) Our code is bad. We'll fix it.
3) I messed up. I'm sorry.
It has nothing to do with accuracy or the repetitiveness of the mistake. It has to do with managers preferring to make sure that they can somehow avoid being personally blamed for their subordinate's mistakes, because most companies are designed to absolve everyone at the top and blame everyone at the bottom.
I've worked in an industry (prop trading) where the costs of mistakes were real, and it is the most heavily automated industry there is. I've also worked in another part of the finance industry (hedge funds) where mistakes are paid for in other people's money, and it's super obvious that managers there are way more interested in passing off blame than fixing problems relative to how interested they are in doing these things in prop trading, and there is correspondingly less automation.
It's not about people in the population at large believing that machines are more prone to repeating mistakes than humans. Look at how many people are excited about the concept of self driving cars. It's about managers trying to convince themselves that this is true, so they can go on being unethical.
A huge amount of stuff can and should be automated by mundane programming. Since that hasn't been done yet, AI isn't about to automate all of the stuff that shouldn't be automated by mundane programming.
You don't even need AI to automate a lot of these tasks. Good old fashioned programming can automate anything truly menial better than AI can, but if you're going to solve a real problem through code there are only two ways to do it: 1) write the code yourself, or 2) spend millions of dollars hiring other people to do it.
Same is true for AI. In contrast, you can very often hire people to solve the same tasks for minimum wage, or if its a sufficiently digital task, even less than that, through a service like mechanical chimp.
AI isn't used to automate away menial tasks because the economics of it doesn't make sense. None of the problems raised by that article are difficult to overcome, it's just expensive to hire people who solve them well.
This has nothing to do with technology and everything to do with the current organization of society and its economy.
Write automated tests to hit each part of your API and test the functionality of each thing in isolation. If you find the tests frustrating to write, your users will find the API frustrating to use.
I've written more about this here:
https://bad-code-considered-harmful.blogspot.com/2020/05/tes...
By the way, I am not an advocate for TDD. I write my tests at the point when I'm ready to start running them. But I strongly agree with the general claim that TDD makes that says that good unit tests are the closest thing to a panacea you will ever encounter in software development. However, I've also seen projects where the unit tests were just more bloat. Unit tests need to be written to test your API to help you design a better API.