There's good news and bad news with this episode.
The bad news is that the plot is awfully familiar. Can there be a single person in the world who doesn't figure out in the first five minutes where this segment is going? We can trace this story back to Chaplin's MODERN TIMES and probably earlier if we include prose fiction as well. So zero points for story originality.
The good news is that Shakespearean actor William Marshall, as computer whiz Daystrom, brings some dignity to the rather wobbly proceedings and is, despite some iffy lines, a commanding presence as the disintegrating software designer.
But you have to wonder why someone like Daystrom wouldn't have undergone careful psychological screening before being (effectively) given control of a Starship. And why Commodore Wesley would immediately think his old friend Jim Kirk was a couple of sandwiches short of a picnic (bearing in mind Kirk isn't in charge of the Enterprise - M-5 is!), rather than entertaining the notion that Daystrom could be the balmy one ...
Otherwise, this is a fairly routine filler segment and well below the standard of other episodes in the second season.