PROGRAMMING PARADIGMS

Power Mac Development(s)

Michael Swaine

I attended Apple's Worldwide Developers Conference with more than my usual level of curiosity. I wondered what technologies Apple would be pushing and what new developments I'd hear about, but I was also curious to hear what spin Apple would be putting on the news and rumors of recent days.

The conference turned out to be less dramatic than past conferences. A few developers, including some conference speakers, thought that this was just a consequence of the conference being less well planned than in previous years. But some attendees, myself included, found the lower-key conference refreshing. I went with specific questions about specific technologies, and got some answers. The Newton team, an earnest bunch, had information I particularly needed.

I also saw demonstrations of hot technologies, including the next version of QuickTime and the dynamic language, Dylan. Dylan's development environment seems to answer Lee Buck's plea (see last month's column) for developer tools that treat the developer with respect.

My less-specific curiosity about future directions for Apple software and hardware was satisfied, too. The changes Apple is making in all levels of its technology are dramatic: moving from CISC to RISC; dumping NuBus for the PCI bus; retooling the toolbox; rewriting the operating system (and moving to a kernel-based operating system next year); and pushing for a fundamental change in the way applications are designed, sold, and used in the OpenDoc model of document-centered programming.

I know that none of these technological directions is unique to Apple; what I find impressive is that very little of what Apple does isn't slated for radical change in the 1994--1996 time frame. Things have to go well with each of these changes or the next change in the sequence will falter. If Apple hadn't done a good job in introducing the PowerPC-based Power Macintosh this year, next year's introduction of a kernel-based, nearly native PowerPC version of the operating system would be hurt.

Of course, we all read in the weeklies how Apple did a great job in introducing the Power Macintosh. Impressive compatibility with 68K software, surprisingly acceptable performance in emulation, and lots of native applications. Or wait, was it "hardly any native applications"? The message began to get mixed. And sales of the machines, rapid at first, dropped off within a few months, alarming Apple stockholders. What was going on?

The most obvious theory, and the one I'm buying until it's proven wrong, is that Apple has a crisis in developer support, has failed to deal with it, and is suffering as a result. There are other theories, though_.

What is Making Tom Pittman So Mad

On the last day of the conference I ran into an old friend. An old friend of this magazine, that is: Tom Pittman.

Tom will be familiar to long-time DDJ readers as the earliest implementor of Tiny Basic. In the very first issue of this magazine, the editors laid down the challenge of implementing a tiny language that could load and execute in the meager pittance of RAM available in the microcomputers of the day. Tom immediately took up the challenge.

I mention this not just out of nostalgia but because it tells you what kind of guy Tom is: He thrives on challenges. His day job has typically been doing some sort of embedded-systems development, an area in which you can be challenged by limitations of the hardware, and not just by the limitations of the hardware vendor.

In recent years, though, Tom's been writing Macintosh development tools, like CompileIt. Tom's tools turn HyperCard into a more serious development environment. They allow HyperTalk scripters to compile and optimize chunks of HyperTalk code for speed or to access system services not supplied by HyperCard. They also allow HyperCard to generate stand-alone applications. (HyperCard itself will now finally produce stand-alones, but Tom's product still does it better.)

Tom's products are good, and he has a loyal customer base. But he's in an odd niche: producing serious development tools but selling to HyperCard developers, people Apple does not consider serious developers. That niche may have turned into a crack to fall through, as our conversation will show:

DDJ: I was talking with a mutual friend, and he hinted that you were not happy with Apple. What's your concern?

TP: My concern is that as near as I can tell, either Apple is lying through their teeth when they say that they want developers to port their products to native code, or [the PowerPC team is] staffed by incredibly incompetent bozos.

DDJ: I see.

TP: In that group only. The HyperCard team has been open and helpful and supportive. The OpenDoc team has been open and helpful and supportive.

DDJ: So what happened between you and the PowerPC team?

TP: I went to them in August of last year. I said: I have thousands of customers that would like to port their applications to native mode. They're not using C, so I need some technical answers so my compiler can support them. I figured six to nine months to get my compiler to run native and produce native code. I started asking questions in August. Those guys wouldn't give me the time of day. I asked and I asked and I asked and I asked, and finally they said, "well, we don't answer technical questions to people who are not seeded."

DDJ: And you didn't have a seed unit?

TP: You read in MacWEEK how easy it is to get seed units. Right. To this day I have not got technical answers from that group.

DDJ: I can see why you're annoyed. What did you do?

TP: I bought a Power Macintosh and I am reverse engineering it. That is deplorable. That is absolutely unacceptable.

DDJ: I should think it would be unacceptable to Apple.

TP: Either they are a bunch of bozos who don't know which end is up, or Spindler has a secret plan--and I've already said this in public--a secret plan that recognizes the huge backlog inventory of 030s, a manufacturing capacity of Power Macintoshes that is not up to speed yet, and the bad PR that you would get from a demand that exceeds the supply. So while saying "convert, convert, convert," he's holding the software back. No development software.

DDJ: Well, there's MetroWerks' CodeWarrior.

TP: Okay, MetroWerks was a surprise. They weren't prepared for that. They couldn't block them. They were too visible. So they gave them support, but basically held everybody else back. And they withheld the beta units that they were promising developers. They actually promised developers beta units, and at the very last minute, somebody very high up in management diverted them. Where did they get diverted to? They got diverted to education, manufacturing, industry--people who can't produce software to run on it. We know that those guys got beta units; they got quoted in MacWEEK the first week. So the PR is all plus, plus, plus, and the actuality is all minus, minus, minus. Then the word gets out there's no apps. If you want to run PhotoShop and you need that superfast speed, buy one today. Otherwise wait.

DDJ: That's certainly the message that a lot of people got.

TP: So Apple comes out with new processors, flushing their 030 pipeline.

DDJ: Well, as you say, that's one theory regarding the lack of developer support.

TP: That's the sinister spin you could put on this thing.

DDJ: Right. So where does Tom Pittman go from here?

TP: I finally have given up. I am not going to depend on Apple for anything. CompileIt has to go native. It's no secret. Two years from now there is not going to be any market for 68K. Zero.

DDJ: And you are_?

TP: As I said, I am reverse engineering the Power Macintosh. I have PEF almost all figured out.

DDJ: Tell me about PEF.

TP: Ah, yes. PEF. Apple won't tell you about PEF. But I'm not telling you any secrets, because I have none. It is thought that PEF might involve some patent issues. This is the "preferred execution format"--that's what PEF stands for. If they really wanted people developing for the Power Macintosh, they would make the file format open and available. PEF is not available. You cannot get it from anybody. When you beat on them hard enough they say, "Talk to Apple Licensing." When you talk to Apple Licensing you find out, "Oh yes, we can license it to you for many thousands of dollars per year plus this restrictive contract that says that you're not allowed to give anything to anybody else unless they sign it also." Obviously it's a great format for fleecing the developers. And some of the developers are willing to be fleeced. I'm not one of them.

DDJ: So you're an unhappy camper.

TP: Yeah. I wrote a nasty flame to the new editor of MacTech before I knew that he was on the PowerPC team, before he took the editor job.

DDJ: Oops.

TP: I really have to stop writing letters in the heat of passion.

Why Hal Hardenbergh has Emulation Reservations

Maybe Tom should emulate Hal Hardenbergh. Hal manages to write some pretty devastating criticism while coming across as the most reasonable of men. He does this by marshaling the facts and presenting them in a manner calculated to let them speak as boldly as possible. His facts seem dramatic, while his personal style seems calm and dispassionate.

You may not be familiar with Hal's work, although he has written for this and other technical magazines, because his main channel these days is an irregularly appearing letter that he sends to a select group of people--23 of us, at last count. I don't know what criteria he applies that put me on the list, but I'm glad to be there.

Hal called recently to ask if I had seen any outrageous claims regarding Power Macintosh emulation, because he was going to, uh, discuss them in his next letter. I hadn't seen any claims that he hadn't already seen, and he had even come across one claim in a less technical publication that the current Power Macs could run Windows software in emulation at Pentium speeds! Maybe Hal will let me pass along some of those claims and his thoughts on emulation in a future column; that is, if he's not too annoyed by the lead sentence two paragraphs back.

What Jeff Duntemann is Saying about Your Face

Of course, it's not the emulation but, rather, the native applications that make the Power Macintoshes fly. And despite Apple's slowness in getting developer tools for PowerPC development into the hands of developers, there were a lot of announced native applications either at, or shortly after, the arrival of the hardware. Were these ports real?

It turns out that, while there were some genuine rewrites, many of the early native releases were Flashport jobs. Flashport is the code-translation product from Echo Logic (based on Bell Labs compiler-optimization technology) that makes it possible to move a 680x0 application to the PowerPC in a matter of weeks, or even days.

I picked up the Flashport fact in Inside the PowerPC Revolution, by Jeff Duntemann and Ron Pronk. I recommend this book highly if you are at all interested in the PowerPC. The authors attempted to do a lot in one book, and seem to have succeeded overall.

The style is generally light and conversational (the book even includes some interviews). Duntemann is one of the best explainers around, and with few lapses, this book exemplifies his passion for finding the least painful way to put across a complicated idea.

The content ranges broadly, including journalistic coverage of the newsworthy facts, analytical discussion of the significance of events, and technical exposition. One early chapter is even a breezy, readable history of personal computing, included, no doubt, to broaden the target audience for the book by bringing everyone up to date and identifying the players in the drama to come.

And a drama it is, with chapters on Apple and IBM's future PowerPC strategies and present maneuvers, a provocative analysis of Intel's shortsightedness, and some not-too-far-fetched speculations on the future.

But then there's the solid technical information, too: The authors play the RISC-versus-CISC game, but at a higher level than the weeklies, digging into just what aspects of RISC are turning out to be important.

The technical level ranges from user-level discussions, such as how it is possible that an application program could actually run faster in emulation on a Power Mac than native on the fastest 680x0 Mac, to a rather detailed discussion of cache architectures.

I like this book, and I think it's because of the breadth and quality of discussion it presents. But I have to admit that I am intrigued when the editor of a magazine for PC programmers writes a book that contains a section titled, "Intel and Microsoft Are in Your Face and in Your Way." Heresy gets me every time.

What Tom Thompson Thinks about CodeWarrior

Let me tell you about one other book, a book-and-CD package, really.

Power Macintosh Programming Starter Kit, by BYTE senior tech editor-at-large Tom Thompson, was published this year by Hayden Books, and includes a stripped-down version of the aforementioned MetroWerks CodeWarrior development system for PowerPC and 680x0 Macs.

I'm assuming there are some readers of this magazine who are not committed Mac developers, but who have 40 bucks worth of curiosity about Power Mac development. This book is for them.

As of this writing, MetroWerks' CodeWarrior is the development environment in which anybody with a choice would want to develop software for the Mac. You can work on a 680x0 Mac or on a Power Mac and can develop for 680x0 and/or Power Mac. It's a reasonably friendly environment and produces fast PowerPC code. And there's this book to help get you started.

Thompson is as narrowly focused as Duntemann and Pronk are broad. He spends about ten pages on PowerPC background; the rest of the book is dedicated to showing how to use CodeWarrior to develop software for the Power Mac.

After a brief look at the development environment, he jumps into code and moves on to some other programs that exercise the compiler and the programmer. Full source listings for the programs are in the book.

There are also chapters on debugging, the 68K and PowerPC application run-time architectures, and a brief checklist for people porting apps to PowerPC. It really is what the title says: a Power Mac programming starter kit. It's a very good one, too.

The program I found most educational, as well as most useful, was a little hack that ejects a CD-ROM from its drive. This gets around an annoyance that has bugged me for years: Under certain circumstances, circumstances that often seem to apply in my office, the Mac system software will decide that a CD-ROM is a shared volume and will refuse to eject it.

Ten years of Mac hacking has taught Tom Thompson what the most annoying problems on the Mac are. When he wrote this book, he knew that fixing at least one of those problems ought to be a high priority.


Copyright © 1994, Dr. Dobb's Journal