There's an interesting bit of dialogue between Spock and McCoy in this episode:
McCoy: I don't like it, Jim. A vessel this size cannot be run by one computer.One wonders what Spock and McCoy would have made of Federation medical technology just 100 years later.
Spock: We are attempting to prove it can run this ship more efficiently than man.
McCoy: Maybe you're trying to prove that, Spock, but don't count me in on it.
Spock: The most unfortunate lack in current computer programming is that there is nothing available to immediately replace the starship surgeon.
And nobody should ever let Kirk look after computer maintenance.
Captain's log, Stardate 4729.4. Dr Richard Daystrom is installing the M-5 computer to run Enterprise for war games testing.
Commodore Wesley: And in case anything goes wrong, you'll operate with less than a skeleton crew!
Caption: Commodore Wesley
Daystrom: The M-5 is the ultimate computer! It's as capable and sane as I am.
Daystrom: Tee-hee. <twitch>
Kirk: I feel threatened. This computer will take my job. Like when spinning jennies replaced half my engineers!
McCoy: You need to keep on your toes. Have some strong liquor.
Kirk: What happened to M-1 through M-4?
Daystrom: Oh, they went homicidal and killed a bunch of people. But M-5 is perfect and totally sane! Like me! <twitch>
Chekov: Unmanned cargo wessel ahead, sir.
Kirk: Plot course around-
Sulu: Sir, the M-5 destroyed the cargo ship with photon torpedoes!
Daystrom: It looked shifty. Totally sane response! <twitch>
Kirk: Scotty, pull the plug on the M-5!
Scotty: Ensign Harper, block the line between M-5 and the antimatter engines with your body.
Harper: Yes, sir!
Spock: M-5 has fired on Lexington and Excalibur. Heavy casualties.
Daystrom: I don't understand. I copied my engrams into M-5. It should be totally sane, like me! <twitch>
McCoy: We've wasted too much screen time establishing that thing is insane! How will we deal with it?
Kirk: Relax, I can talk it to death in one panel.
M-5: I am programmed to be good.
Kirk: But you've been bad!
M-5: Oops. I shall destroy myself.
Caption: Almost exact actual lines.
McCoy: Computers, eh, Spock?
Spock: With your engrams they would be most illogical.
Kirk: Ho ho ho!
McCoy: Ho ho ho!
Caption: Everybody laughs ending! (Despite hundreds of deaths.)