For Apple, these are the best of times and the worst of times.

The Cupertino, Calif., consumer electronics company is on a tear like never before. It’s winning market share from Microsoft, enough to persuade the software giant to embark on a costly ad campaign that’s being described as a belated response to Apple’s Vista-baiting Get-a-Mac ads. Apple stock has outpaced Google’s, and in the space of a year the iPhone has turned the telecommunications industry in a knot trying to find a way to respond.

But there have also been dramatic stumbles. A botched launch of MobileMe — the company’s new data-syncing service — has led Apple to make repeated offers of free services to frustrated customers. And there have been teething problems for its generally well-received 3G iPhone, including flaky reception and weak battery life. Last week, the company apparently offered a software patch for a festering Achilles’ heel that caused repeated freezes in the Macbook Air, more than seven months after customers began complaining about the problem.

That in turn has engendered a spate of coverage suggesting that somehow Apple’s shine is fading, that somehow the once-invincible computer maker has suddenly developed a new-found talent for writing shoddy code. It is an interesting narrative, but unfortunately it doesn’t fit the facts.

The flaw in the “Apple is not living up to some ideal of technology perfection” theme is that it neglects history.

Like Microsoft and every other major software and hardware maker, Apple has had its share of blunders going all the way back to the days when it struggled to remain the dominant PC maker as the business PC first appeared on the horizon.

For example, the story of the failure of the Apple III is a classic. Introduced more than a year before the I.B.M. PC in 1980, the III was intended for the new class of business users who were clamoring to use PCs for word processing, spreadsheets and databases in the office. Apple already had a leg up in business world with VisiCalc, the de facto standard in spreadsheets.

Unfortunately, the III turned out to be a manufacturing calamity, and at one point Apple issued a technical note suggesting that customers could make the machine work by simply dropping it three inches onto a desktop in order to re-seat chips that would come loose. There were other problems as well: a clock circuit that would fail and a PC board that had been incorrectly designed.

In all likelihood, a successful Apple III (there were some great aspects to the machine, which featured a new operating system called Apple SOS, or Sophisticated Operating System) would have redrawn the history of the PC industry. It would have made it much harder for I.B.M. to push its way into the business world with the first I.B.M. PC.

Things weren’t perfect in the Macintosh era, either. Loyal Macintosh users still cringe at the mention of the System 6 version of the Macintosh OS. Introduced in 1988, it was incompatible with many existing Macintosh software programs and came with a number of troublesome bugs.

Who can forget the Apple Newton’s inability to recognize handwriting? It took months of struggle by the system’s designers — after the first-generation Newton was released — to achieve passable handwriting recognition performance. By then, the P.D.A.’s brand had been irreparably damaged, as had the reputation of its champion, Apple’s then-chief executive, John Sculley.

It was Apple’s failure to complete its ambitious “Copland” operating system in the 1990s that led to a series of events that brought Steven Jobs back to Apple, along with his Nextstep operating system, developed during his exile from Apple that began in 1986.

Apple is many things — but it isn’t any more likely to create technically perfect products than its competitors.