Why the Robot Apocalypse is never coming
The machines aren't coming for you. It's true that they keep getting more advanced. They can walk up stairs and wave at the same time now! Hardware keeps getting better and programs are more sophisticated all the time. The issue of course is that computers are no closer to having thoughts or desires than they have ever been. They can execute much more complex programs but that is still the sum of what they do. I wouldn't bet on that changing anytime soon.
But set that aside for a moment. Let's just assume I'm completely wrong (it wouldn't be the first time.) Would the Robot Apocalypse really occur and be as devastating as movies and television want us to believe? There are serious logistics problems. In the usual scenario a factory just starts cranking out killer robots. Now I can believe that a newly sapient computer could draw up the designs for new death machines, and that it could co-opt automated factory equipment. That factory equipment however is highly unlikely to be optimized for death machine construction. Regardless of software there are serious hardware limitations. Automated assembly lines are not full of multi-purpose devices. Each part is optimized to do one things extremely well and nothing else. You can only stretch that functionality so far. If this scenario really happened we'd probably end up with killer robots that looked a lot like armored cars, because the newly intelligent machine wouldn't have a lot to work with.
You might say that the super computer would simply design new automated equipment, but that runs into similar problems. Even factories that make automated equipment are set up to make a specific kind of equipment. Even if they have the ability and tools to make other things configuration is unlikely to be automated. Humans change the tools at the ends of the arms, humans drag the new assembly machines into position. The computer might be able to improvise to a certain extent, but there are hard limits. Say it needs a specific fine drill bit in order to begin making manipulators that are sensitive enough to work with fine equipment. It's a chicken/egg level problem for it.
Playing devil's advocate though I suppose one could contend that the Robot Apocalypse happens when a machine gets lucky, when all the stars align to provide it with a golden opportunity. I think there are problems with that. A newly sapient computer that wants to kill humanity isn't going to automatically understand patience. It might be hyper-intelligent but it has no experience and access to limited data. Human beings can live for decades, have access to the wisdom of countless previous generations and still make poor decisions. Why would a computer (created by humans) have better judgement? The usual argument is that the computer scans the entire internet and now knows everything. I've never heard an explanation for how the computer learns which information to pay attention to and which to ignore. There is no algorithm that allows you to differentiate between good advice and bad, between true and false statements. A newly intelligent computer has no experience that it can use to help it assess the conflicting data it is getting. The internet wouldn't help much. Cats and porn have yet to yield an empire.
Again though, let's assume that someone programs the computer to be patient, and it waits until conditions are just right so that it can construct its death machines. A factory is subverted and the first batch of death machines are built, ready to wipe humanity. Then what? As I said earlier it's unlikely the machines are optimized for killing since there are limitations on what the computer can build with what it has, but even if it gets extremely lucky there are problems. Those .50 machine guns mounted atop the death machines? No bullets. Those missile launchers? No missiles. The factories that make weapons don't also make ammunition. Fighter jets aren't shipped to the military with their missiles already hooked up. It's not even a question of safety, it's about efficiency. Oftentimes the ammunition is made by a completely different company. So what does the machine do? It can't go very far in terms of improvising weapons because it doesn't have the raw materials. Not a lot of gunpowder needed at an automotive factory. It can't order and stockpile raw materials beforehand because the people working at the factory would notice. It certainly can't order the materials after it has killed all the factory workers. No amount of hacking will get it what it needs. Even if there are automated trucks and ships it has problems. If it is still in the planning phase people will notice. If it is in the war phase then the shipments can be easily disrupted. They don't make armored semi-trucks or ships for moving bullets, and most people would rather fight an automated, unarmed truck than a death machine. They certainly aren't going to keep making deliveries after the revolution has begun, and if they can't stop the material or ammunition shipments to the main death machine factory they can stop the shipments of lower level materials elsewhere. So it's another Catch-22. The computer needs weapons to secure shipments of materials, but it needs materials in order to have ammunition for those weapons. Improvised weapons can only go so far. Flamethrowers are scary but they're not exactly long range.
Even now though you might think you can counter all of these objections, so I have one final point. Sometimes I think those who came up with the idea of a Robot Apocalypse have never actually used a computer or relied on a machine. Computers lock up. Computers crash. Computers bug out. What's the longest period of time you have used a computer for without some sort of issue? Remember this computer needs to be completely self-sufficient because it is murdering Tech Support. What happens when it gets a "666 Error: Murderous Intellect Not Found" ? Who reboots the supreme machine intellect when it crashes? Who replaces the frayed power cord? What about the death machines themselves? Would we really have robots bursting through walls like the Kool-Aid man? How robust is your car or your lawnmower? You might think that military grade equipment is more rugged. . . .unless you're a veteran. The truth is computers crash and machines break. A lot. We have a lot of systems in place to fix those issues, but all those systems depend on humans. Take the humans out of the equation and computers and machines would seem much less efficient and relentless. If the Robot Apocalypse ever did get off the ground it would probably be a bunch of robot cars with flamethrowers murdering people furiously. . . .and then crashing, in both connotations of the word.
As a final note: humans are really, really good at breaking stuff. I know people who can make computers crash just by touching them, and I'm willing to bet you do as well. A lot of machines break down due to human actions every day, and those humans are not actively trying to make that happen. Think about the ramifications of that.