Say what you want about Steve Ballmer, but he left Microsoft better than he found it.Comparing Microsoft when Ballmer took over to Microsoft as Satya Nadella gets it, Nadella is in much better shape because Ballmer fixed many critical things during his tenure. Yes, Microsoft's valuation is down, but that's connected to the failed Yahoo acquisition and the fact that problems Ballmer inherited took a ton of time to identify and correct.\n[ Analysis: Will Nadella Shake Up Microsoft More Than Expected? ]\n[ More: Nadella Toes the Ballmer Line in First Public Comments As CEO ]Generally, CEOs leave their companies in pretty bad shape these days. They're motivated to favor quarterly revenues over long-term survival thinking, that they can push that problem down the road to the next CEO until the last man or woman standing is screwed. But Ballmer didn't do that.When Ballmer Took Charge, Microsoft Was in TroubleAs the 1990s ended, Microsoft was in great shape financially but, organizationally and politically, it was a mess. It spent the decade being so arrogant, and moving to dominate desktop PCs, that Internet developers rebelled and created Linux, their Microsoft killer. I've never seen customers so pissed at a company that they actually rebel and create an alternative themselves \u2014 nor do I ever hope to see it again.If that wasn't enough, Microsoft made the mistake of kicking a dying man. While the pathetic attempts to kill Netscape made little impact, they were also incredibly illegal. Microsoft, which had expertly dodged antitrust actions for years, suddenly had local, federal and foreign companies lining up to nuke it. The firm faced the real likelihood of getting get broken up or fined into insignificance \u2014 very much like being cut into little bitty pieces and buried while still barely alive.Bill Gates, who up until that point had been a hero, was attacked publicly. The antitrust hearings broke his spirits, destroyed his effectiveness as a leader and, during cross-examination, made him look the fool. Gates lost his heart for the business and his mission of holding the Microsoft programmers together \u2014 that is, herding cats.Finally, Microsoft implemented Forced Rankings, the success of which made a large number of Microsoft's top contributors very wealthy. They responded by leaving the firm and an environment so political that it came as a surprise when a product was actually done on time.So Ballmer inherited a largely broken company stripped of its key assets, including Gates. Insiders and outsiders were tearing Microsoft apart, and its own customers continued to attack. The fact that Microsoft survived to appoint a successor to Ballmer 14 years later is actually a testament to his focus and execution.Microsoft Has Made Amends, Let Google Enjoy Government ScrutinyBallmer reorganized the company, massively simplifying it, and recently eliminated forced rankings, reducing politics and infighting to more manageable levels. This means Nadella can focus more on creating innovative products and less on constant internal fire drills and disasters.\n[ Commentary: Microsoft, the Infrastructure Wallflower ]\n[ FAQ: The Microsoft Leadership Change ]In addition, Ballmer made peace with most of the folks driving Linux. Now that product is less of a customer driven-threat and, like Android, more of a competitive offering. It's still powerful, sure, but that makes it a vastly easier problem to deal with.Ballmer also put the antitrust stuff behind him, shifting much of the focus onto Google \u2014 which is now getting all the government's attention, largely for arrogance and abuses that are far more widespread and frightening than Microsoft's. Finally, Ballmer delivered quarter after quarter of solid financial results, which gives Nadella a rather impressive war chest if he decides to use it.Nadella Will Benefit From Microsoft's Addition by SubtractionNadella gets some additional benefits that can't be directly attributed to Ballmer, too.For starters, Bill Gates proved to be more of a liability to Ballmer than an asset. Gates wasn't a good mentor, he hung like a cloud over everything Ballmer did and, from time to time, parachuted in and did damage. Gates was connected to cancelling the Currier Tablet, which would have been a far more timely response to the iPad than the Surface.\n[ Analysis: Daunting Challenges Await Nadella As He Takes Over ]\n[ More: Microsoft's Consumers Want to Know: 7 Questions for Nadella ]Also gone is Ray Ozzie, who proved to be no help at all. Gates is coming back \u2014 not as chairman but, rather, focused on bringing products to market, and he's working under Nadella, not above him. Nadella gets a well-trained mentor in John Thompson, who got the best CEO training there is from IBM, and this gives Nadella a huge initial advantage over Ballmer, who got a lot of really bad advice during his tenure. Finally, Nadella is a programmer, and a company such as Microsoft is always better run by someone who understands its products and technologies intimately. That wasn't Ballmer.Microsoft Survived Its Surgery, Will Recover WellIf you find out someone finished last in a race, you might conclude he did poorly. But if you find out he finished despite being shot, run over and having a heart attack, you'd be impressed. That's Microsoft.Certainly Microsoft has slid in the last decade, but Ballmer revived a company in crisis when much of what was needed to fix it either gone or rendered ineffective. He systematically fixed the firm while running it, even though he didn't have the ideal skill set. This is like a Marine performing surgery while fighting the Taliban on a sinking ship being attacked by a sea serpent. The fact the patient lived \u2014 and is recovering well \u2014 is damned near a miracle. Now a specialist can take over and make things even better.Nadella should succeed at Microsoft \u2014 and he'll owe much of that success to how Ballmer cared for the company during his tenure.Rob Enderle is president and principal analyst of the Enderle Group. Previously, he was the Senior Research Fellow for Forrester Research and the Giga Information Group. Prior to that he worked for IBM and held positions in Internal Audit, Competitive Analysis, Marketing, Finance and Security. Currently, Enderle writes on emerging technology, security and Linux for a variety of publications and appears on national news TV shows that include CNBC, FOX, Bloomberg and NPR.Follow everything from CIO.com on Twitter @CIOonline, Facebook, Google + and LinkedIn.