The feeling among the naval staff at the time was that the simulation had failed to capture the reality of the situation. In actuality it was spot-on. During the real Battle of Midway, American aircraft carriers were able to launch a surprise attack from the north-east thanks to a partial decryption of Japanese naval codebooks. Three Japanese carriers were knocked out of action in rapid succession from initial airstrikes with the fourth and final fleet carrier falling victim to the same fate due to a follow-up dive bomber attack soon after.
Now, I should stress that my knowledge of computer programming is pretty limited. I've only ever coded in Basic, Fortran, and a bit of Turbo Pascal. Having confessed my relative ignorance though I'm going out on a flimsy limb to say a lot of people who claim to know how to code really don't. A few months ago, while watching a twitch stream of Kerbal Space Program, one viewer asked about the ETA for the next update. The streamer's response was to say the bug fixing process would take a long time because (according to him) correcting one issue in programming creates many more. My response is simply this, only if you are doing it wrong. Even though I'm a total armature I know enough to understand the importance of structured programming. It can be tedious and at times and feel like a creativity restraint, but when the time comes to squash bugs the entire process is much quicker and easier. More than once, I've seen KSP development blogs that go on about some nasty bug that was difficult to track down and isolate. The layman's term for the cause of these kinds of problems is Spaghetti Code. I'm pretty confident in saying that KSP has a bad case of it. A lot of different programmers have worked on this game at different times, some of which were more skilled than others, and while steps have been taken to clean up "legacy code" (basically an eloquent way of saying "poorly planned mess"), I think the best course of action would be to simply start over from scratch.