TweetFollow Us on Twitter

Mar 97 Factory Floor

Volume Number: 13 (1997)
Issue Number: 3
Column Tag: From The Factory Floor

Jon Watte, Metrowerks BeMeister

By Dave Mark, ©1996 by Metrowerks, Inc., all rights reserved.

This month's Factory Floor interview is with Jon Watte, leader of Metrowerks BeOS tools effort. With all the interest in the BeOS brought on by prospective deals with Apple (as of this writing, not yet decided) and a bundling deal with Power Computing, I asked Jon if he wouldn't mind answering some questions about his involvement with Be.

Dave: How did you hook up with Metrowerks?

Jon: All the applications I wrote and designed at SCOOP were coded using the Think Class Library, using Think C versions 6 and 7. When the time came for Apple to roll out the PowerMacs, Symantec did not have a solution for us, so I went ahead and ported the TCL from Think C+- to "real" C++. I also wrote some utilities that would do the hard work of converting a TCL application to use this TCL version for PowerMac. I released this port publicly in several versions and, through it, got the attention of people at Metrowerks.

Meanwhile, my wife and I entered into something called the Diversity of Immigration Visa Lottery, or "green card lottery" for short, where US immigrations randomly selects among qualified applicants from nations with under-representation in US immigration statistics. Most people don't "win" this lottery, but my wife did. The only crux was that you had to secure an offer of employment from the US to be able to enter. I guess they were afraid people would move from the Swedish welfare system to live on American welfare. I e-mailed everybody I knew in the US from the ‘net and visits to trade shows, and literally thirty minutes later I had a reply from Greg Galanos, saying he had just thought about me for this secret new project they were starting... the Be port of CodeWarrior.

Dave: What were the early days in the Be universe like?

Jon: I actually had one of the first BeBoxes at home in Stockholm, a machine based on the AT&T Hobbit. The hardware wasn't very fast, but the machine was nice anyway. Once I managed to clear through the US visa process (which took much longer than I would have liked), I moved to the US at the same time as the PowerPC-based BeBox prototype appeared.

At first, the machines were very bare-bones; I had the deluxe model with a sheet metal frame (no cover) whereas people at Be usually kept their machines as circuit boards laying on their desks (they still do.) Back then, there wasn't even any debugging except for printf(). You compiled your program on a Mac using CodeWarrior, FTP'ed it to the BeBox, ran it there and watched it spit out text in a terminal window.

There was only a small circle of developers then, many of them from France where Be got much of their initial capital. There were also no mailing lists or news groups in which to discuss the system - they were keeping a very low profile in order not to hype the machine before it was ready to be shown. We all worked under NDA and had to cover the machine with blankets when relatives were visiting. Every two to three months, we would go to Be to talk about what we were doing and in which direction to move, as well as bug them until they fixed the bugs we were running into.

Dave: How did CodeWarrior for BeOS evolve?

Jon: My initial task once I moved to the US was to design and write an IDE, while the other team member (another John) ported the compiler and linker. One interesting quirk soon developed; Be was doing all the compilation under SCO unix and Linux, because those boxes could run NFS which was needed for their source-code control system. In fact, I think they still do. That meant that we had to port our compiler to run under unix on a little-endian machine, a job which later turned out to benefit us when we ported to Windows.

Anyway, while we were cross-developing from the Mac, we soon felt the need for a cross-debugger as well. The only problem was that the BeOS did not support debugging - and since it has protected memory, you can't just write breakpoints into code as you can on the Mac. I put the IDE work on the back-burner and helped Be co-design the system API for debugging, based on the requirements the Metrowerks debugger had at that time. Once that was done, I could write a debugger Nub that ran on Be and adapt the Metrowerks debugger to talk to this Nub instead of a local Mac Nub. This was still back when the machine was secret, and we wrote the debugger mostly for our own use and that of the few select developers in on the secret.

When I was almost finished with this, the other team member left Metrowerks, and I was left alone in charge of the Be team. Quickly finding another programmer to help out (Brian Stern) as well as leveraging the skills of the MPW/command-line tools guy (Mark Anderson) I put together a new Be team within Metrowerks, and showed Brian the design I had for the IDE. Mark already did MPW compilers and linkers, and quickly caught on to Be, which left me with the task of writing the "real" Be debugger.

Dave: Is that where the Be version of PowerPlant came to be?

Jon: Yes. We looked at the cross-debugger, and wondered how to move the technology over to BeOS. It turned out that the debugger source code had some ugly interrelations between UI and functionality that made perfect sense on the Mac but wouldn't work in the multi-threaded Be world. So we had the choice of developing a new debugger from scratch, or somehow porting the MacOS debugger. After some going back and forth, we settled on making the debugger believe it was running on a weird kind of Mac. Since the debugger code was non-reentrant, we had to re-implement the entire event loop layer; the current Be debugger still sits in WaitNextEvent() waiting for things to be thrown at it. Since all of the former Mac code runs in the same thread because of that, the reentrancy problems went away, at the cost of implementing about 300 toolbox calls and some PowerPlant classes.

Dave: What is the state of Be development today?

Jon: The larger companies that have lots of code vested in other OSes are being silent. I'm sure they're working with BeOS internally, but need more time to see if it'll be a viable platform. Meanwhile, smaller, nimbler developers who don't mind throwing away lots of code and starting over are waking up and smelling the coffee - a brand new frontier waiting for fortunes to be made off of it.

If you're thinking of moving a Mac program to the BeOS, you have to realize that, PowerPlant portability or not, it may be hard, or not even make sense. The BeOS is different; it has a different UI and a very multi-threaded concept. Users are quickly getting used to being able to perform all kinds of actions simultaneously, and modal dialogs are few and far between. Mostly because they're so hard to implement, I think, and I love it that way. It's easier to create a modeless dialog than a modal!

If we make the PowerPlant layer available, it'll probably be useful if you have a PowerPlant application on the Mac, but it'll also still require work in the app. It's not a miracle pill. The current version "solves" the re-entrancy problem by having all the windows and menus send messages to the one "Mac Toolbox" thread, which means that the program will never truly feel and behave like a real Be program.

The right thing to do is to re-map the interface classes you may be using currently onto Be classes, and make sure that the underlying "engine" code is thread-safe and re-entrant. Maybe you can even take advantage of some BeOS features on your code, such as easy add-ins, pre-emptive multitasking or memory mapping of data files. That will make an application sing, and is of course the direction we want to take our internal code in. Whether this will be done in the PowerPlant context, or by separating engine from UI remains to be seen.

Dave: How stable is the Be platform for development?

Jon: Well, I don't have to reboot the machine every time I crash. It's sometimes also nice to have a command-line in the system - even though I'm a die-hard CodeWarrior IDE user, I had to go to MPW now and then on the Mac. On Be, it's GNU "bash" that's the shell, and there's a gazillion little utilities already written for it that you can use.

CodeWarrior runs well under the BeOS, although we spend much time waiting for the file system. The new file system promised in DR9 looks as if it'll fix that problem. Being able to type and edit unhindered while running a compile - or two! - at the same time is something I miss everytime I go back to the Mac.

However, every four or five months, Be comes out with a new version of the OS, and lots of things changed that you have to catch up with. Old programs don't usually work on the new version of the OS, since they have the luxury of changing the APIs. That will stop once they reach larger, non-developer markets; currently release DR9 (the next after the MacTech release) is supposed to be "Compatibility Lock".

It's extra hard for us, because our tools ship with the OS and have to be developed, debugged, and tested by the time the OS ships - but Be typically fixes bugs that breaks compatibility while we do that, and once the "last bug" is fixed, they document it, test it, and ship, so we have to get in early, roll with the flow, and hope the APIs work as we think they do...

Dave: How do you feel about Be's choice of C++ as the Be API standard?

Jon: I don't mind C++. It's certainly a language with wide industry adoption and also well understood system characteristics. Many of the nicer, more dynamic languages would need special hardware (mark and type bits in memory) to run really well, which would drive prices up. Meanwhile, there's a lot of C and C++ source available for porting; most public source is C or C++, so it's an obvious language to support.

Pascal affecionados will of course be somewhat unhappy, but in the grim world of business, I think the sentiment is that they're not a big enough force to cater to initially, although I hope Pascal and other languages will arrive at some point. We've done some looking into this at Metrowerks, and there is no reason why you can't make Object Pascal code generate C++ compatible objects; it's just a SMOP. ("Small Matter Of Programming" - a term that means lots of sweaty work.)

The fragile base class problem has several different solutions, and I think it will not be a big impediment to the BeOS. We've talked to them, and they're on the ball with a solution.

Dave: Many prospective developers ask about the types of software they should develop for the BeBox. Any advice?

Jon: There are lots of things I want to see. Sticking to the "content development" niche that Be says they want to target, I could see how you could write an integrated radio station program that kept all of the play lists, spot lists, helped out with traffic planning, and generated all the reports you'd want. Storing the actual songs and "canned" shows and interviews in MPEG and playing them back in real time from disk or network would also come in handy. The BeOS is really tuned for this combination of "soft real-time" and GUI tasks. Connecting back to my previous work in publishing, given some people and some dollars, the right person could create a kick-ass integrated newspaper publishing solution; the only problem being that Quark XPress is a formidable competitor in page layout. But that is only part of the publishing chain; the BeBox has everything else it takes to implement that kind of solution already.

Dave: Can you tell me about Datatypes.lib? (a data translation library Jon wrote in his "copious" spare time and which is starting to see major adoption among Be developers.)

Jon: The cool thing about BeOS is that everything is new. The bad thing is that it's pretty sparse on the nicer amenities. However, the design of the BeOS makes it so that Be doesn't have to provide every system service an application might want to rely on.

A case in point is Datatypes.lib, a generic data translation service much like EasyOpen on the Mac, except with an API mere mortals can understand. It started as a request to Be from some old Amiga developers to adopt the Amiga "datatypes" system service, which apparently is a very basic way of identifying and loading the contents of a disk file into an application. Many people liked the idea, but thought the Amiga implementation was flawed, and a lot of discussion ensued. To cut down on the clutter and flames, I decided one weekend to take the best of the discussion and just implement it. I did, and posted the result for comments. The first round was pretty harsh (and rightly so) but version 1.1 really had everything you'd need in a basic data translation package, including identification, import, export, making it easy to write add-on translators, and abstracting translation from storage so you could use any translator going to/from any source (such as disk, memory, or a network connection). Judicious use of C++ abstract base classes made this both forward compatible and easy to implement.

The library wasn't all that hard to write, thanks to the Be kernel threading and code add-on model, and people are already both using it in applications and writing translator plug-ins for it. This means that your, say, sound editor program doesn't have to know about every imaginable sound file format, just the "standard" format and rely on Datatypes.lib to provide translation.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »

Price Scanner via MacPrices.net

Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more
Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more

Jobs Board

Operating Room Assistant - *Apple* Hill Sur...
Operating Room Assistant - Apple Hill Surgical Center - Day Location: WellSpan Health, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.