Domain: metrowerks.com
Stories and comments across the archive that link to metrowerks.com.
Comments · 110
-
Re:maccvs works?I do commercial Mac software development, and we use MacCVS Pro to great effect. I recommend it highly. It doesn't hurt that it's GPL and has been stable for over a year.
It is interesting to note that the new version of CodeWarrior for MacOS, version 8, comes with a CVS plugin (not mentioned on that page). I haven't had a chance to try it yet, though.
One thing that does bother me about the various incarnations of CVS on the Mac is how poorly they work together. Partly this is because of the different ways in which they work around CVS' inability to deal with MacOS' multi-forked files. For cocoa apps [like iJournal and Fire] this is not much of a problem, because the old NeXT-style Cocoa development environment sticks strictly to simple data files with no resource forks, which works perfectly with all varieties of CVS.
The upshot is that if you are working with files with resource forks using CVS, you'd better make sure everyone agrees which CVS client you are going to use.
-
OT: Game Cube?
I've Googled and Googled, but have yet to find any resources covering homebrew on the Game Cube. It uses a modded IBM G3 and some interesting SRAM-ish memory. I'd be nice if a resource like Marcus Comstedt's existed. So far the closest I can find are photos of the guts, and some marketing from Metrowerks.
-
Re:C++ too slow, really!
If you don't mind buying an IDE have thought about using CodeWarrior under linux. I have not tried under linux, but it is very good on Mac OS. Give it a shot.
-
My thoughts on a few:
If I were doing much heavy programming in Java, I'd be using Netbeans . It's high-power and open-source. I'm not doing much heavy programming in Java though.
At the university I use Metrowerk's Codewarrior . It's very good, although both features and speed seem sub-par compared to Netbeans. It's closed-source, coincidently.
My personal favorite, though, is Arachnophilia . I don't need an IDE with gobs of features for the light programming I do; Arachnophilia is a multifaceted IDE that does Java, HTML, C++ and a few other common languages (albeit in small portions). It's fast enough for my work, too. -
Re:CodeWarrior
I second (or third?) the recommendation for CodeWarrior from Metrowerks, now a Motorola company.
At my previous job, we did cross-platform development in Java on Macs using CodeWarrior, and we programmed circles around the guys using JBuilder, Vis Cafe, and VisJ on Windows. Part of that was Windows
:-), but the rest was that CodeWarrior just works.The Windows guys kept thrashing around with different tools for a couple of months before they ended up with VisJ. I suspect it was because it only sucked as bad as the other tools, and it's MS. Sigh.
-
Try out Metrowerks
Although I haven't used it recently, I used to regularly own and love the Metrowerks IDE, called Codewarrior. It is a very nice IDE that support Jave, C, and C++. The debugger is quite good. I used it on the Mac for C and C++, and I haven't used it in two major revisions. So possibly my experiences won't reflect yours. But I do think it's worth checking out. Codewarrior runs on a bunch of platforms, including Mac, Windows, Solaris, and Linux. I only have experience with the Mac and Windows version, personally.
-
CodeWarrior
What about CodeWarrior by Metrowerks? I use it for C++ codeing and I think that it's great. It's got stanex highlighting, a debugger, etc. It can also do C and Java, so maybe that would be right up your alley.
-
lots out thereWell, most shops I've seen use Jbuilder. It's fast, it's very good and at least version 4 was free. It's the top dog for a reason. Unfortunately, they've switched to an absurdly expensive model for their upper tiers of commercial products.
I've also used Codewarrior for Java, and have been pleasantly surprised. It's a top-notch environment. Metrowerks has done some fine work.
Forte/NetBeans has a way to go. What a pig. 3.0 has some nice speed and stability increases...
If you don't need a really fancy setup, try jEdit. It's an open source text editor with syntax coloring(60 file types!), and the plug-ins avaliable give you plenty of project management features.
And a dark horse: IntelliJ. I really like it. Lots of "enterprise" features bundled in a relatively cheap package.
-
Re:Link to the compilerFrom the free trial page:
:(
(You must be a licensed Sony PlayStation 2 developer to receive this product.)
If you are not a licensed PlayStation 2 developer but are interested in signing up,
please email: The_Future@playstation.sony.com or call 650-655-6040
for more information on how you can become a licensed developer.
So the question is, will becoming a licensed PS2 developer cost more than the compiler? -
Compiler for Playstation2
Metrowerks has a compiler suite. Check out this site for info on all their game console suites. Don't know the price, but they do have a 30 day eval.
-
Link to the compilerThe only compiler I know of for the Playstation 2 (and many game platforms) is Metrowerks CodeWarrior for PlayStation 2.
It is very expensive, but it is nice to use a compiler that works the same for multiple platforms such as Linux, Windows or the Palm OS. As for cost, you need to contact games@metrowerks.com for a pricing/packaging matrix.
-
Metrowerks has a PS2 compiler
Here is a link to Metrowerks CodeWarrior for Playstation 2. I'm not sure about the pricing, but there is a pricing link there where you can send a request for pricing on it. There is also a datasheet, FAQ, etc.. there. Definitely a place to start.
bbh -
Metrowerks CodeWarrior
Although I've never used their products for anything but Mac and Palm development, I've had lots of success with Metrowerks Codewarrior. They have Win32, Mac, Solaris and Linux versions available (...and versions for the PS2, Nintendo 64, etc).
-
Apple Developer Tools freely availableThe official developer tools (including both gcc-type systems as well as Apple's own Carbon and Cocoa tools) always have been available to registered Apple developers and were included in the two-CD commercial distribution of OS X released in March.
There are several tiers of the Apple Developer Program, including a free "online" membership that provides direct download access to the latest tools from Apple. For more information, visit the official developer site; to register for access, go here.
There are obviously a number of ways in which Apple could have made the process simpler, but the bottom line is that its OS X dev tools are available to the public.
The Darwin dev tools mentioned in the article certainly enable BSD-style development. Apple's full tool set, on the other hand, provides the BSD dev tools as well as APIs, tools, and documentation for the all of OS X. The Darwin tools will be sufficient to port BSD apps (though these days most developers are also adding tools like fink for apt-get like packaging), but to access the full potential of the OS (including the Quartz imaging layer, QuickTime playback, and the Aqua GUI) requires use of Apple's APIs.
One can also use a variety of 3rd-party tools such as the commercial Metrowerks package, but for a BSD developer, the Apple kit is probably the best.
-
Running Linux, or developing on Linux for a handhe
Its not Linux based OS, but if you want to develop applications for your handheld on a Linux desktop you have options.
For Java, take a look at IBM's Visual Age Micro Edition. It's a fair Java IDE for the J2ME stuff. Free if you don't need the collaboration tools offered in the $99 pro setup. Runtime... well that will cost you if you want to sell the apps to others, but that is another issue. They have a JVM (called J9) that supports Palm, WinCE, and a few other platforms (actually, they support ARM, x86, MIPS, etc., but you know what I mean). You pick your GUI setup based on the platform.
I know there are tons of other options out there for Palm OS application development using Linux as well. I started coding palmtop apps in C/C++ - there are Linux based commercial IDE's that you can get as a student.
Don't forget about vi/emacs/nedit/any other IDE either...there are some fantastic libraries out there if you want to go the GCC route.
-
Re:Unfortunately, shareware is very important to m
There are several development environments for the Mac... either free, or low-cost:
- MPW (Macintosh Programmer's Workshop) has been available from Apple for years, and is a (free for the download) full and complete C and C++ development environment.
- RealBasic is fairly cheap ($149 for standard edition, without Windows support), and is pretty well regarded, especially for hobbyist developers.
- CodeWarrior is very well regarded, supports cross-platform development (i.e., compile Windows programs from the Macintosh IDE)... it's a little more expensive ($300-$400), but I think many of the shareware developers find that the productivity increase (not only from from the IDE, but also from Metrowerk's Application framework, PowerPlant) is worth it.
- And, last but not least, every retail copy of Mac OS X comes with ProjectBuilder, the Mac OS X version of the very well regarded Next development tools. Including make, ar, gcc, and all of those command line tools Unix developers love.
In fact, I think the inclusion of ProjectBuilder with Mac OS X has enabled a lot of hobbyist/shareware developers (not to mention Next oldtimers) to get a head start at developing software for the OS. Just look at VersionTracker's Mac OS X pages for evidence.
-
Re:It's dead, Jim
Try codewarrior from metrowerks which is good for Mac OS 9. But Mac OS X actually comes with a CD of Development tools.
-
Re:It's dead, Jim
Try codewarrior from metrowerks which is good for Mac OS 9. But Mac OS X actually comes with a CD of Development tools.
-
Framework for BeOS, Linux, Mac OS and WindowsDo you have a BeOS product that you still want to support while giving yourself a migration path to other platforms? Do you have a Linux application but want to contribute to the survival of the BeOS - or bring it to Mac OS or Windows?
The ZooLib cross-platform application framework allows you to create multithreaded C++ applications with (or without) GUI, networking, and a single-file database format from a single sourcebase and deliver native executables for BeOS, Mac OS, Windows, and Linux.
It is open source under the MIT License.
ZooLib still needs some work before it reaches the 1.0 release but it has been in use in some commercial products for Mac OS and Windows for years.
You can download the source, the demo application source (which you will need to build the main source), and binaries of the sample applications built for BeOS, Mac OS, Windows and Linux from:
It presently does not build on:- Visual C++ for Windows
- BeOS PowerPC
- BSD
- Other POSIX variants are unknown
If you don't want to wait to write a Windows application, you can use Metrowerks CodeWarrior Pro for Windows or the Windows cross-compiler in CodeWarrior Pro for Mac OS - CodeWarrior has much better compliance to the C++ ISO standard than Visual C++ anyway so you really should be using it if you want to write portable code.
-
Framework for BeOS, Linux, Mac OS and WindowsDo you have a BeOS product that you still want to support while giving yourself a migration path to other platforms? Do you have a Linux application but want to contribute to the survival of the BeOS - or bring it to Mac OS or Windows?
The ZooLib cross-platform application framework allows you to create multithreaded C++ applications with (or without) GUI, networking, and a single-file database format from a single sourcebase and deliver native executables for BeOS, Mac OS, Windows, and Linux.
It is open source under the MIT License.
ZooLib still needs some work before it reaches the 1.0 release but it has been in use in some commercial products for Mac OS and Windows for years.
You can download the source, the demo application source (which you will need to build the main source), and binaries of the sample applications built for BeOS, Mac OS, Windows and Linux from:
It presently does not build on:- Visual C++ for Windows
- BeOS PowerPC
- BSD
- Other POSIX variants are unknown
If you don't want to wait to write a Windows application, you can use Metrowerks CodeWarrior Pro for Windows or the Windows cross-compiler in CodeWarrior Pro for Mac OS - CodeWarrior has much better compliance to the C++ ISO standard than Visual C++ anyway so you really should be using it if you want to write portable code.
-
Framework for BeOS, Linux, Mac OS and WindowsDo you have a BeOS product that you still want to support while giving yourself a migration path to other platforms? Do you have a Linux application but want to contribute to the survival of the BeOS - or bring it to Mac OS or Windows?
The ZooLib cross-platform application framework allows you to create multithreaded C++ applications with (or without) GUI, networking, and a single-file database format from a single sourcebase and deliver native executables for BeOS, Mac OS, Windows, and Linux.
It is open source under the MIT License.
ZooLib still needs some work before it reaches the 1.0 release but it has been in use in some commercial products for Mac OS and Windows for years.
You can download the source, the demo application source (which you will need to build the main source), and binaries of the sample applications built for BeOS, Mac OS, Windows and Linux from:
It presently does not build on:- Visual C++ for Windows
- BeOS PowerPC
- BSD
- Other POSIX variants are unknown
If you don't want to wait to write a Windows application, you can use Metrowerks CodeWarrior Pro for Windows or the Windows cross-compiler in CodeWarrior Pro for Mac OS - CodeWarrior has much better compliance to the C++ ISO standard than Visual C++ anyway so you really should be using it if you want to write portable code.
-
Re:I don't want to be a wet blanket, but...
Is programming for Windows actually coding in C++?
Funny you should bring it up, I remember when VisualC came out for Mac System 7.5. There was no advantage to it, since any of the "visual" features (form builder, class wizard) etc. required you use Microsoft's libraries (so Universal Interfaces was out of the picture). I think Visual BASIC was ported as well with the same result. Needless to say, the Mac development market is still held by Codewarrior and Apple'sMPW.
-
Use a cross-platform framework to write this
It has to work on Windows...
Do yourself a favor and get the efficiency of native machine code without the headache of making your users get a Java virtual machine - or caring what version of the JVM is available for a given platform.Apple has announced it has no plans to support a JVM later than 1.1.8 on the classic Mac OS so you can't use all those great collection classes in Java 1.2 and be cross platform! (See Apple's Java Developer page and scroll down to where it says "Mac OS Classic Java".)
Use a cross-platform application framework. That way you can program on Linux, Mac, BeOS, Windows or maybe even QNX and deliver for all those schoolkids running Windows ME on their parents' PC.
One such framework, for C++, is ZooLib. There are many others, as you can see from The GUI Toolkit, Framework Page.
Read about why it's important to write cross-platform code.
I'm most familiar with ZooLib, because I've been working with it on the products I write for my clients, and I helped ZooLib author Andy Green prepare it for open source release late last year under the MIT License.
ZooLib offers all of the following implemented as C++ classes:
- Multithreading, with cross-platform C++ thread classes and various kinds of locks (simple mutexes, reader/writer locks) - multithreading is important for something like a servent. For systems like the Mac OS that don't have preemptive threads it has a handrolled thread scheduler.
- GUI, with a uniquely flexible layout method. The widgets are rendered by platform appropriate renderers, and you can make custom widgets. There's a renderer that will call through to the Appearance Manager on the Mac OS, if it's running.
- platform-independent TCP networking, it's implemented in terms of sockets on Linux, WinSock on Windows, sockets on BeOS and MacTCP on Mac OS. I think Open Transport may be working too on the Mac, I'm not sure - but on all platforms you use the same C++ classes for your networking with no platform-specific client code needed.
- Thread-safe reference counted smart pointers, for quick, efficient memory management that's free of leaks.
- Extensive debugging support - assertions in core components and a debugging memory manager, handy macros for assertions and the like
- Single-file database format with C++ interface. Create ZDatabase objects with ZTables in them. Much zippier than SQL and more pleasing to the object-oriented soul.
- File objects - you instantiate a ZFile object from a ZFileRef object, then use its Open, Close, Read and Write methods
- Platform-specific file open and save dialogs with an API that's consistent with the rest of ZooLib. Filter by filetype on the Mac or filename three letter extension on windows. While ZooLib is cross-platform, it breaks out into platform specific code in cases like this where it's appropriate, in a way that's considered entirely sacreligious by the Java community.
- Streams that can be chained to provide filtering, somewhat like the iostreams classes in the C++ standard library but more appropriate for use with binary data. This is how you typically read or write to a file or network connection.
- Handy preprocessor macros to deal with platform specific code or selecting options like debug builds.
- Offscreen graphics buffers that may be manipulated directly via pointers or accessed in a manner that is transparent to the bit depth via GetPixel and SetPixel calls. All platforms have the same API that provide a wrapper around platform bitmap buffers. I believe there's a purely homegrown in-memory implementation, plus platform implementations bounds to the native GUI layer like GWorlds on the Mac OS.
ZooLib 0.81 is known to build with MetroWerks CodeWarrior on Windows and Mac OS, gcc on Linux, and gcc on BeOS for Pentium.
If you use CodeWarrior you can cross-compile and cross-debug; check out Thursby Software for some filesharing solutions that work well for this. (Tip - on Windows, select the "MacBinarize" post-linker in the target linker prefs when building a Mac target - you also need to derez all your resource files and include them as Rez text source).
While it should ultimately work, there are known build problems with BSD, CodeWarrior for BeOS PowerPC and Visual C++ on Windows. These are all being worked on and full support for all these platforms is expected before long.
Other cross-platform frameworks I'd like to note are:
- The Adaptive Communications Environment for cross-platform networking
- GTK - yes, that's right, GTK! but you must forgo using XLib calls and POSIX calls that are not in the ANSI C Standard Library
- The Netscape Portable Runtime for the non-GUI aspects of cross-platform development
- The Mozilla XPToolkit for cross-platform GUI
- Mozilla Netlib for network and file stream access
- Mozilla XPInstall for cross-platform installation, packaging and updating.
- Also check out AbiWord, a great cross-platform WYSIWYG word processor that's open source, with an open file format. As far as I know the only product coded in AbiWord's XP framework is AbiWord itself, but it's worth looking into for another look at how people architect these things.
People often mistake these problems for valid arguments that one should not do cross-platform development, or perhaps not render your own widgets when doing so but depend on platform specific ones (like AWT vs. Swing), but I think the lightweight, well architected, efficient and easy to use ZooLib answers those arguments very eloquently.
Help me teach the Free Software community to write quality code.
-
CodeWarriorWhen writing threaded code the developers must take the responsibility for understanding the threading issues and creating thread-safe code. But the right tools can help you get there more quickly and sanely.
We've used Metrowerks CodeWarrior to develop and debug very heavily multithreaded applications on MacOS, NT, Solaris, and Linux for about five years now; the CodeWarrior tools seem very much 'up to the job' and thread-aware. As a nice plus, CodeWarrior runs on multiple platforms (including Mac OS X now), which is a nice plus for our development, which is all multiplatform.
We now use a diversity of compilers/IDEs/debuggers, but CodeWarrior is still a favorite, even if it's just because of the "Blood, Sweat, and Code" T-shirts.
-
Won't build with MS Visual C++ YetI should point out before you get to into it that it won't build out of the box with Microsoft Visual C++.
This is a known issue with some of the headers and templates and is expected to be fixed in the near future.
The reason this wasn't considered a priority in the past was that everyone was happy using Metrowerks Codewarrior on windows, in part because it has better ISO standard compliance and in part because you can share IDE project files between the Mac and Windows.
I was even cross-compiling in both directions at points, and when I got a new PC that was much faster than my old Mac, I did all my Mac builds under windows.
It will build with gcc (although there are parts of the API that aren't implemented under Linux yet), so it's not hardwired to a particular compiler.
If you have the cash, I encourage you to try out codewarrior, if you don't, work with the mailing list and we'll get you a visual C++ compatible version soon.
Also note that I accidentally wrote some code that compiled fine under windows but not mac on codewarrior:
class Foo{
public:
void Foo::MyMethod( int AnArg );
}
This is obviously illegal - under codewarrior for Mac, it complained that there was an illegal using qualifier or something like that.
When I brought this up with Metrowerks support, they said they had a "#pragma cpp_extensions on" on by default under the Windows compiler because otherwise a lot of Windows apps wouldn't compile.
And in fact when I tried to ensure the correctness of my own code by setting "#pragma cpp_extensions off" in my zconfig.h file it broke the compile in the Microsoft headers where they were included by ZooLib's windows platform implementation >:-/
Michael D. Crawford
GoingWare Inc -
Rearranging Compiled Code for OptimizationI read an IBM paper when I was an OS engineer at A Big Fruit Company which discussed the use of instruction-pointer sampling profilers to optimize compiled PowerPC code (I think maybe actually POWER code, similar but not the same) by rearranging blocks of the machine code in the executable file.
This was in either late '95 or early '96 - but the IBM work on this had been around for a while by the time I read the paper.
This technology is widely available now - read all the way to the end to see how you can try it out.
If you have a jump to a certain offset in a routine, you can move the code where you jump to elsewhere in the file and change the offset you give in the jump. Complicated, because you need to parse RISC machine code, but doable.
It's made a little easier by PowerPC instructions always being fixed at 32 bits with no extension words (a side effect of that is that there's no way to load a 32-bit constant into a register with a single instruction, which makes it hard to scan machine code by eye for constants in an assembly debugger.)
This has the effect of speeding up the overall program execution because you group frequently used code blocks together in the executable file, and also in memory once it's loaded. You may find less-commonly used branches of an if-statement put miles away at the end of the file, so that you jump a long ways away and then back in sometimes, but this isn't a big deal because all the frequent cases flow straight along.
The reason this is a big win is twofold. First, you reduce virtual memory paging and the code resident in physical memory because less commonly used code is all grouped together and just sits idly paged out on disk; that which is taking up valuable physical RAM is of a minimum size and being used actively.
Also (and more importantly in small programs, and in CPU-bound cases), you make more effective use of your processor's code cache.
This is because jumping over an uncommonly used branch may load a few unused instructions into the cache at the beginning and end of the branch that's not taken - cache lines (blocks) are of a fixed size and are always aligned by the cache block size, so if you have 32 byte cache lines then the start of any cached code falls at a physical address that is divisible by 32.
If you run even one instruction into the address rangle, you load 32 whole bytes of code into the cache, deleting 32 bytes of code that might be useful later, then if your code is not optimized this way you'll just end up jumping over most of it.
Many people who are trying to make their programs run faster would benefit from knowing more about how the cache works. Gary Kacmarcik's Optimizing PowerPC Code has a good discussion of this that will benefit anyone who programs on modern microprocessors - not just PowerPCs. And while Kacmarcik emphasizes PowerPC assembly, most of the benefit of improving cache use you can do from C, C++ or another higher level language.
The way the profiler works is that an interrupt-driven task is used to check the instruction counter at frequent but random intervals. The samples are saved to a file for later analysis, then a postprocessor makes a histogram which gives the number of samples per basic block of instructions.
(A basic block, essentially, is any code that falls between a pair of curly braces if it came from original C source code. It's more complicated than that in practice but basically it's a chunk of machine code that has one entry point and one exit. It's possible to analyize machine code with a program and divvy it up into basic blocks.)
Then basically what you do is sort the machine code, with the most frequently used basic blocks coming earlier in the file.
Note that the profiling process depends necessarily on the use to which the program is put during the sampling. For best results, you might actually want to prepare several seperate binaries of the same program, each optimized for a different purpose. Or you might want to construct test data or a test script that gives you a good overall average performance.
Now, how do you get this tool? It's more than just theory. It's available for IBM RS-6000's, although I don't remember what they call it.
But if you can spare the cash for an iMac you can get it included with the Macintosh Programmer's Workshop - MPW. The particular tool that's used for this is called MrPlus, which is discussed in Apple's Technote 1174 and Technote 1066
I believe a variant of this is available in the Metrowerks Codewarrior development environment for PowerPC (CodeWarrior also supports Windows, Linux via GCC and lots of embedded systems but I believe the code reordering is only available for PowerPC).
CodeWarrior provides both an IDE (on Windows there's a choice of MDI user interface or Mac style with a global menu bar and free windows, which makes me much happier when I program on Windows) and it also provides command line tools, including the entirety of MPW with mwcc preinstalled so you can do "make" style builds on the MacOS (but with a weird makefile syntax). I don't seem to find any mention of this on Metrowerks' website. I'll ask their friendly support guy if I'm correct about this.
Perhaps you're lusting over using this for Linux. It would certainly be interesting to try using this on the kernel - build the kernel, boot the machine off it, run it for a while under a normal load while you run the instruction pointer sampler, then reorder the instructions in the kernel and boot off the new kernel and you run faster!
This would probably be easiest to do on PowerPC Linux given the availability of published information from IBM and Apple about it, but I don't see why you couldn't do it for any instruction set. Some would just be harder to parse or rearrange correctly than others.
Stop drooling and start studying.
Michael D. Crawford
GoingWare Inc -
Re:"Education friendly"?
You can buy a commercial IDE cheap and get the same funcitonallity on Linux. I found a copy of Metrowerks CodeWarrior for linux in my university book store for $50. I suppose there is a volume discount for school systems too. This was reviewed on
/. previously. So no, you don't have to type gcc $whatever every time. -
Freeing the Developer from OS Vendor ShacklesOperating systems vendors invest a great deal of energy in getting applications developers to code products to the native API of the OS.
The result is that it is very difficult for the developer to bring the product out on a competing platform, and it discourages users from moving to a different OS when they feel the vendor isn't serving their needs (because they can't get the solutions to their problems).
If the developer doesn't want to deal with the OS vendor anymore, he's really got a problem - either suffer under the vendor's thumb, or make a great deal of personal sacrifice to move to a different operating system.
I was sick of Apple so I wrote I'm worried about my future. That's why I'm a Be developer.
And in fact I shipped (and still do support) on of the first commercial applications for the BeOS, Spellswell from Working Software.
Nothing Be ever did made any sense, and while there are individuals at the company that I regard highly, on the whole I felt the company to be uniquely unresponsive and incompetent.
And just when they were showing some promise of shipping enough BeOS installations that I had some hope of making more than the measly couple hundred bucks I'd earned in royalties in the three years I'd been working on Spellswell, they announced a "change in focus" and said they weren't going to support the desktop anymore, except for the extent necessary to use it as a development platform for their new Strategy Du Jour, Internet Appliances.
After I posted on BeDevTalk that Some of Us Work for a Living, the moderator told me he was fed up with a developer who was trying to discuss business issues of concern to Be's third-party developers on Be's third-party developer mailing list. That was my last message to bedevtalk - he unsubscribed me.
I've been working on a really challenging C++ application for a few months, and after reading C++ Answers with Bjarne Stoustrup I got excited about really digging into the basics of programming - but from the perspective of a developer with 13 years of work experience and a lot of shipping products.
I bought a few books, mostly on C++ and also hit some websites and newsgroups, and I became a much better programmer as a result. And I really felt that I did better to spend my time on core architectural and language issues rather than dealing with OS-specific nits or tool issues. And so I wrote Study Fundamentals, Not APIs, Tools or OSes.
So this brings me back to being used by operating systems vendors to serve their material needs at my expense and the cost of much personal pain. If you become a better programmer by learning the basics better, to can fluidly go from OS to OS without much of a learning curve.
But there's the problem that you have to use some API to code your application to, and while Java claims to be "platform-independent" it is really a proprietary platform in itself - just try making use of platform-specific code in a Java application, yes you can do it with the Java Native Interface but it is difficult and an assault on the Java developer's senses to write a dll in C or C++ to load into the runtime.
So what you really need is a cross-platform application framework that you can write in with a language such as C++, that comes preconfigured with easy-to-use preprocessor symbols so you can drop into OS-specific code at your whim, and will compile from a single sourcebase to native machine code for multiple operating systems.
Funny that, since December '99 I've been writing a multithreaded special-purpose graphics editor that is also an HTTP client with just such a cross-platform application framework. I can develop on Mac or Windows as the need suits me and switch back and forth at a moments notice (especially now that I've got filesharing between my machines). My client only asked for Mac and Windows versions but I could port to BeOS or Linux in a few days. The framework is called ZooLib.
It was written by my friend Andrew Green of The Electric Magic Company, originally to insulate himself from Apple's API nonsense. (Do you remember when all progress on developer tools at Apple and Symantec stopped while they went off into the sunset to develop Bedrock, itself a cross-platform application framework and an immense investment of time and money - and then abandoned it? If it hadn't been for then-tiny Metrowerks Apple would have gone out of business after shipping the first PowerPC Macs, because there would have been no native PPC compilers.)
He felt that if he could code to his own layer and Apple changed their API, he'd just have to reimplement the OS-specific layer and he'd be working again. But then a little more work and he'd be cross-platform...
If you click that link today you'll just get a placeholder page. But just wait a few days...
(For practical reasons the source itself, mailing lists and so on will be provided at http://zoolib.sourceforge.net/ once it's released.)
While ZooLib is to be newly released to the public it is not new code. It has been in use in commercial products for about five years - and in development in my own since last December. Part of why Andy gave me the code and I've been working with it is to give him meaningful architectural feedback and detailed bug reports so he can prepare it for public release.
I've been urging Andy to release the source as-is for a couple of years but his standards are incredibly high for a programmer. Andy's code doesn't just work, it is correct.
Andy spares no effort or time to fix the smallest problems (this is especially important in multithreaded code - think about reference counted smart pointers that are operated on by different threads, as you can do with Zoolib), and part of why he's been delaying the release is to improve the overall architecture.
For more details, including relevant quotes from Judge Thomas Penfield Jackson's Findings of Fact and Final Judgement discussing why Microsoft felt it was more important than anything to suppress cross-platform API's, such as Netscape plug-ins, Java, Intel Native Signal Processing, Lotus Notes, Apple Quicktime (runs on Windows too!) and RealNetworks' multimedia technology, please read my early draft of:
Thank you for your attention.
Regards,
-
Re:More pointsAs for burning the app into the ROM, that isn't feasible becasue the way our program works is that all updates are place on the server and when a client connects, it passes new information upstream, and recieves new updates downstream.
We-ell, I fail to see how this would stop you from placing the application (binary) in ROM... You aren't going to modify your code on the fly, are you? The data, which you obviously need read-write access to, would still reside in RAM.
PalmOS also uses C to program it, if I am not mistaken (and I might be) So the turn around time for this would be huge.
C and C++ are the two big languages, and there's a choice of two compilers: Metrowerks CodeWarrior and GCC. If you just must use BASIC (*shudder*), there are several variants available. Browse the Development category on www.palmgear.com or see Wademan's slightly outdated Palm Programming FAQ.
--Bud
-
Some Helpful SuggestionsI think the principles stated in The Cluetrain Manifesto will help here - they've already started to, because the ZDnet article is instantly available worldwide and is already provoking discussions at such places such as here at Slashdot.
First I'd like to suggest that some big motorola customers get together and visit an attorney and have them write up a contract. This contract will state that, in return for purchasing products from a Motorola dealer, the dealer agrees to hold the customer's demographic information confidential, and forbid it to be shared with any third party - specifically name Motorola, but also say any third party.
If the dealer won't sign, ask them if they carry any of Motorola's competitors' products, and buy those instead. Alternatively, shop around for Motorola dealers willing to sign.
Rememeber, your information is your information, and while there may be no law to protect you, if the dealer signs such a contract, then you have civil law to protect you.
When such a contract has been drafted, put it on a web page and distribute the URL widely so that all Motorola customers may benefit.
Secondly, keep in mind that Motorola is a huge company. They have interests around the globe. Interested in buying a Mac? Print out the ZDNet article and bring it with you to the Apple dealer. Tell them you want to look inside the case of the Mac you're considering purchasing. Tell them you'd be happy to make the purchase if the PowerPC chip was manufactured by IBM, but you won't consider purchasing a Mac containing a Motorola brand PowerPC - the chip was jointly designed by Apple, IBM and Motorola and is actually manufactured by IBM and Motorola (multiply sourced). Second sourcing means you as a consumer have a choice.
Also look around you and think about what products you use that are made by Motorola. Do you do MacOS, BeOS, or QNX development? How about embedded or game consoles? Perhaps then you use Metrowerks Codewarrior for your development system (compiles for Windows too - I vastly prefer it to Visual C++ or Borland). Metrowerks is now a Motorola subsidiary. If so, drop a line to any contacts you may have at Metrowerks, give the URL to the ZDNet article, and ask them to let the folks they know at Motorola that this practice is unacceptible.
Do you actually design embedded hardware? Consider alternatives to Motorola products - again, IBM has some altnernatives - and let your rep at Motorola know that you're not going to be needing his services anymore - and tell him why.
Some links for you:
Tilting at Windmills for a Better Tomorrow. -
Leverage Frameworks - Post Only Subversive PartsI suggest that you minimize the amount of explicitly subversive code (and also your development workload) by making use of readily available frameworks.
It's preferable if these are open source, but they don't have to be to suit your purpose; for example Metrowerks PowerPlant is the most popular application framework for the MacOS, and although it is a commercial product it is inexpensively available and when you do buy the Codewarrior development system you get the PowerPlant source code on the installation disk.
You can even develop an open source framework yourself and publish it openly, and invite in contributors publicly, and distribute non-subversive demo and test programs. Alternatively, you can add functionality to frameworks that almost suit the purpose and submit your patches back to the original maintainers.
This will save you work, although you may have to write "adapters" to be able to use someone else's library for your own purposes, it will increase reliability of your product, because the framework will have already been debugged by someone else and also tested under a wider variety of circumstances than it will encounter in your code, and you can concentrate your work on the particularly subversive parts.
Then you post only the "interesting" parts of your source code, and provide hyperlinks to the needed application frameworks in your build instructions. Be sure to include the version numbers needed for this build of your program, and if the sources to any of the frameworks are signed with a public key, include the key which those sources were signed with when you got them. That way you can be sure future programmers can rebuild the same program as you did.
It may well be that you have a large application but only a few source files and some build instructions to upload, which could be done off a floppy disk at a public access terminal. If you upload these to a few free webhosting service pages, then email the URL to a bunch of warez site maintainers, your code will be looked after.
Note: to find lots of warez sites (and even more serialz sites) go to Altavista, click on "Advanced Search" and enter:
download and warez and photoshop and illustrator and crack
Probably only 10% of the sites you find will actually have live warez (they get taken down quickly) but some patient hunting will find you any software title you want - but of course your objective here is to contact the warez site maintainers so they can introduce your program into their archive system.Note that if you want to build a Windows application you can build it with Cygwin (a GNU shell environment for Windows including gcc) so you can be sure Microsoft doesn't embed Globally Unique Identifiers in your code. I'd also suggest that when you make a windows build, you buy a brand-new copy of windows 98 (pay cash), install it on a freshy formatted hard drive, build your binary, upload it, low-level format the hard disk you built it on and throw away the Windows 98 installation disk and all the materials that came with it. It's probably hard to get away with installing a development system on a public access terminal.
If you don't want to use a public access terminal (after all, you might be recorded on a surveillance camera, or the coffee shop waiters might remember you skulking around), then use Zero Knowledge Systems' Freedom to anonymize your web access.
Note that the way Freedom works is your HTTP packets are multiply encrypted with the public keys of the Freedom Network's servers, then "unwrapped" one by one as they pass through up to three servers until they are passed unencrypted to the public net at a faraway place.
Freedom provides both anonymous web browsing and anonymous email send and receive.
Some sources for open source libraries:
- Available C++ Libraries FAQ
- The Apache XML Project
- The Free Software Foundation software page
- Walnut Creek CDROM Free Software Archive
- SourceForge
- Freshmeat
- Gnome
On the other hand, when you write new code, it is definitely worth while to snip out little bits and make sure that they will compile and run on their own, or depend only on other readily available libraries. That way you can create a library yourself.
The book More C++ Gems has some articles on Large-Scale Software Architecture that discusses reducing cyclic dependencies in software projects, in part so that the projects can be rebuilt faster but also so that they can be unit tested in smaller parts and the parts can be extracted out and reused in other programs - although the claim is often made that object-oriented software is more reusable, this claim is baseless unless good engineering practices are observed.
-
Re:Some reasons Apple won't release an Intel versiThe Star Trek project mentioned in the article is source-compatible, not binary-compatible, so every software manufacturer would have to recompile all of their code for the x86, and some would have problems, and many just wouldn't bother.
The thing is, there is already an x86 compiler on the MacOS that creates more efficient x86 code than most x86 native compilers. Furthermore, this compiler is already owned by nearly everyone who develops for the Mac, because it is included in CodeWarrior, the MacOS's leading development package. Given their history, Metrowerks (the makers of CodeWarrior) would likely make it very easy to recompile for MacOS on x86. The biggest stumbling block in doing this right now is that the Mac Toolbox is not availble on x86. Naturally, this problem would go away if MacOS was available on x86.
-
Re:similar experienceOh, and I've never used it since! It doesn't understand Perl too well
;)CodeWarrior 5 has Perl scripting support on Windows and Mac (dunno about Solaris/Linux).
(Yes, I know this isn't what you were asking about.
:-) For most of my projects, it's been the reverse - I've done them in CodeWarrior on a Mac rather than the university's official [pick command-line tool] on Solaris. The number of people who sit and wait for javac to run on an Ultra1 amazes me (jikes, anyone?)... not to mention those who don't use makefiles and other convenience methods, but retype the same commands OVER and OVER again. For me, I hate messing with them, so I just use an IDE for most tasks and plug scripting in when I need it (Perl, AppleScript, etc.)
-- -
Re:similar experienceOh, and I've never used it since! It doesn't understand Perl too well
;)CodeWarrior 5 has Perl scripting support on Windows and Mac (dunno about Solaris/Linux).
(Yes, I know this isn't what you were asking about.
:-) For most of my projects, it's been the reverse - I've done them in CodeWarrior on a Mac rather than the university's official [pick command-line tool] on Solaris. The number of people who sit and wait for javac to run on an Ultra1 amazes me (jikes, anyone?)... not to mention those who don't use makefiles and other convenience methods, but retype the same commands OVER and OVER again. For me, I hate messing with them, so I just use an IDE for most tasks and plug scripting in when I need it (Perl, AppleScript, etc.)
-- -
School Should Require Code to Work AnywhereThe school should not only allow you to use a different environment - it should require it.
They should offer a choice of several development environments (on a Pentium box, you could use Codewarrior, Microsoft Visual C++, Borland, gcc under Windows with Cygwin or under Linux or BSD, or Solaris with the Sun C++ compiler).
The best thing would be to have machines that have multiple operating systems installed mounting your home directory off a server so you can reboot and try a different compiler.
Not only is it educational to compile under different environments, it helps to keep you from using compiler-specific features that lock your code into a specific platform (you use the pedantic option on gcc and don't use the gcc extensions, do you), but also building your code under multiple compilers will find bugs in syntactically incorrect code that won't compile in one compiler but will compile and run and do who-knows-what under another.
(This is one of the reasons Be, Inc. still supports the BeOS under PowerPC even though Pentium has an overwhelmingly larger customer base - it helps them to validate their code and keeps their code portable. They found lots of bugs when they moved from Codewarrior to gcc on their Pentium version, and so did I in my BeOS products.)
For example, I recently found that using auto_ptr< char > on a character array seems to work just fine under Codewarrior for Windows.
(I use it because I like the IDE's UI and it's great for cross-platform development - it also works with any text file format (MacOS CR, Unix LF, or or DOS CRLF) so you can easily share source files between any kind of machine, unlike gcc which only accepts Unix newlines).
It is not correct to use auto_ptr on an array because it deletes the pointer it holds with delete, rather than delete [] which is the required operator to delete arrays (this is needed so you can call the destructor separately on each element of the array; it doesn't hurt to fail to call char's destructor because it doesn't have one, but the memory allocation format for an array in C++ is different than in C because the number of elements has to be stored somewhere).
It is no real fault of Codewarrior that it works but I wouldn't expect my code to work if I moved it to a different platform - or worse, got into the habit of managing array pointers this way and maybe wrote a big library full of auto_ptr's of arrays. It would be perfectly within reason for a different development environment to cause my code to crash if I did this.
Take my word for it, I am a professional cross-platform developer with with extensive experience shipping on a variety of platforms including my current project which builds from the same C++ source base for MacOS and Windows.
(My friend Andy Green wrote the cross-platform application framework I'm using, which will be released under the BSD license soon. It also works under BeOS and XWindows/Posix, including Linux).
If you or your TA's wish to discuss this directly with me feel free to email me at crawford@goingware.com
-
Any relation to MacOS tabbed widgets?As I recall, the ability to produce such tabbed widgets in a floating window and form them into their own windows(like Adobe does) was easily available to all developers in Mac OS 8. Adobe also didn't use this technique until about the time that Mac OS 8 came out.
I think it is foolish of Adobe to pursue two operating system features being combined together as a patent. Anybody with Codewarrior or RealBasic on a Mac can make the exact same thing in under a minute.
I think its sad when large software companies fight over software techniques that are neither unique or difficult to create. I think it lowers the quality of all other software that would take advantage of those features.
-
Re:Development Costs?
Are there any free development environments for MacOS?
Apple's MPW (Macintosh Programmers Workshop) is a command-line based development environment that can be downloaded for free from Apple here. MPW is a very UNIX-like environment and includes C and C++ compilers, as well as linkers, assemblers and editors etc.
If someone is going to develop a program to give away, I can see why they wouldn't want to shell out $500 for VC++ or CodeWarrior.
VC++ no longer supports Macintosh development, I believe, so its not a viable option anyway. There is a low-cost version of CodeWarrior available, which can be used for non-commercial (i.e. Open Source freeware) development. Check out the Metrowerks site for details (its currently down, though).
If there was a port of gcc to MacOS (there may be, I'm not sure),
Mac OS X comes with a complete gcc-based development environment, but you currently need to have a (paid) membership in the Apple Developer Program to get it. However, a public beta is due later this summer, and it should be very cheap or free to get the OS with development tools then.
there still would be the lack of a good IDE to develop with. A project like Kdevelop for macintosh would provide the ease of use and incentives that the Mac programmer would need to start writing open source.
Defintely check out MPW, particularly if you are coming from a UNIX background.
-
I always recommend Java to beginnersI always recommend Java to beginners, as a first language.
Note that I generally prefer programming in C++ for my own applications for various reasons (I like manual memory allocation and pointers, and tweaking code, and stuffing bits and stuff) but that's not what a beginner needs to know about, they need to get stuff running quickly and easy without ever having to reboot their machine because of a pointer bug.
I'm not sure what are the right books for a kid, maybe "learn Java in 21 days".
One nice part is that once you teach them how to write an Applet they can show off to their friends on their web pages.
For an IDE, I suggest MetroWerks CodeWarrior for Java. Get CodeWarrior Pro if you want to do C++ too. CodeWarrior supports a variety of processors and OSes. When they move over to Linux (and they will move over to Linux after your gentle urging), they can use the CodeWarrior IDE on Linux for a familiar UI and won't have to write makefiles.
That's the other thing - first way to scare off a beginner is to require him to write a makefile to compile a project.
Mike
-
I always recommend Java to beginnersI always recommend Java to beginners, as a first language.
Note that I generally prefer programming in C++ for my own applications for various reasons (I like manual memory allocation and pointers, and tweaking code, and stuffing bits and stuff) but that's not what a beginner needs to know about, they need to get stuff running quickly and easy without ever having to reboot their machine because of a pointer bug.
I'm not sure what are the right books for a kid, maybe "learn Java in 21 days".
One nice part is that once you teach them how to write an Applet they can show off to their friends on their web pages.
For an IDE, I suggest MetroWerks CodeWarrior for Java. Get CodeWarrior Pro if you want to do C++ too. CodeWarrior supports a variety of processors and OSes. When they move over to Linux (and they will move over to Linux after your gentle urging), they can use the CodeWarrior IDE on Linux for a familiar UI and won't have to write makefiles.
That's the other thing - first way to scare off a beginner is to require him to write a makefile to compile a project.
Mike
-
I always recommend Java to beginnersI always recommend Java to beginners, as a first language.
Note that I generally prefer programming in C++ for my own applications for various reasons (I like manual memory allocation and pointers, and tweaking code, and stuffing bits and stuff) but that's not what a beginner needs to know about, they need to get stuff running quickly and easy without ever having to reboot their machine because of a pointer bug.
I'm not sure what are the right books for a kid, maybe "learn Java in 21 days".
One nice part is that once you teach them how to write an Applet they can show off to their friends on their web pages.
For an IDE, I suggest MetroWerks CodeWarrior for Java. Get CodeWarrior Pro if you want to do C++ too. CodeWarrior supports a variety of processors and OSes. When they move over to Linux (and they will move over to Linux after your gentle urging), they can use the CodeWarrior IDE on Linux for a familiar UI and won't have to write makefiles.
That's the other thing - first way to scare off a beginner is to require him to write a makefile to compile a project.
Mike
-
Graphics
I think what kept me going when I started learning Pascal when I was in the 3rd grade was getting visual feedback from my programs. My dad showed my the function call to fill a rectangle on the screen and so I wrote bigs lists of that. Then I learned some flow control and smeared rectangles all over the screen into lines and other shapes.
So, I got a lot out of Lightspeed Pascal on that old MacPlus. I think the best environment to do the same now might be Java, with java.awt.Graphics for the drawing calls. Set the kid up with a tiny program shell that brings up the window and draws one thing. Then let them edit and learn.
Evironment? Can't go wrong with Metrowerks. And I think they have deals for Java-only tools. -
Re:iMovie punches? Not quite***WARNING*** INCREDIBLY OFF-TOPIC POST ***WARNING***
A program should never be an exact copy of its version on another platform. Different platforms have different design ideas and different standards. I've seen a few apps (namely CodeWarrior (especially the Palm version, but also the Java version), QuickTime) that are awesome on the Mac get ported to Windows and become horrible. Why? The developers tried to make the program be the same exact way in Windows as it is on the Mac.
That just isn't right. MacOS and Windows have different widgets. MacOS has one static menu bar - Windows has a menu bar for each window. MacOS uses the many different windows approach, Windows uses the one window approach. (MDI is an excellent idea, by the way. I love Opera.) And so on.
Now that I've begun... does anyone feel this way about Mozilla? It follows the Web standards beautifully, but I feel that the idea of using their own widgets isn't the best solution... Under MacOS, the window has its own menu bar, breaking the whole concept of the MacOS interface. Under Windows, the widgets don't respond well to common input, constantly lose focus, etc. I haven't tested it under Linux yet, since I don't use it a lot. I'll test it under MacOS X soon. I realize that the software isn't exactly in the final stages yet, but I loathe the thought that this maybe how it will stay.
--
-
An example
> but how can you only support one distro?
See here for an example. This is Metrowerks' CodeWarrior for Red Hat Linux. You may care to note the system requirements.
Now granted, they do also have a SuSE version, but still. The program is only available for those two distros. The mentality comes from the same place.
The problem in this case (I believe) is that they are distributing neither as source nor as RPM/Apt/Deb/pkg/etc. Rather, they are distributing just as binary and with their own installer, or whatever. And I believe (again, I don't know, because I don't actually use the program; I just know about it) that it looks for certain libs in certain places, and so on, making it difficult to "simulate" a Red Hat/SuSE environment.
It definitely is possible, as this example shows.
--
It's a fine line between trolling and karma-whoring... and I think I just crossed it.
- Sean -
An example
> but how can you only support one distro?
See here for an example. This is Metrowerks' CodeWarrior for Red Hat Linux. You may care to note the system requirements.
Now granted, they do also have a SuSE version, but still. The program is only available for those two distros. The mentality comes from the same place.
The problem in this case (I believe) is that they are distributing neither as source nor as RPM/Apt/Deb/pkg/etc. Rather, they are distributing just as binary and with their own installer, or whatever. And I believe (again, I don't know, because I don't actually use the program; I just know about it) that it looks for certain libs in certain places, and so on, making it difficult to "simulate" a Red Hat/SuSE environment.
It definitely is possible, as this example shows.
--
It's a fine line between trolling and karma-whoring... and I think I just crossed it.
- Sean -
An example
> but how can you only support one distro?
See here for an example. This is Metrowerks' CodeWarrior for Red Hat Linux. You may care to note the system requirements.
Now granted, they do also have a SuSE version, but still. The program is only available for those two distros. The mentality comes from the same place.
The problem in this case (I believe) is that they are distributing neither as source nor as RPM/Apt/Deb/pkg/etc. Rather, they are distributing just as binary and with their own installer, or whatever. And I believe (again, I don't know, because I don't actually use the program; I just know about it) that it looks for certain libs in certain places, and so on, making it difficult to "simulate" a Red Hat/SuSE environment.
It definitely is possible, as this example shows.
--
It's a fine line between trolling and karma-whoring... and I think I just crossed it.
- Sean -
All the options suckOf course, all the alternatives suck, which is why you asked the question in the first place.
Metrowerks is the vendor most serious about cross-platform development. Their IDE is mature, and quite nice, although the Java layout editor needs work.
The usual Java problems continue. Java 2 is an improvement, but deployment has been slow. Some areas are still in flux (audio, in particular) with different versions of the API. Unless you ship a JVM, a JIT compiler, and Swing with the application, along with an installer that gets it all right without messing up existing Java installations, there will be problems.
I haven't looked at the portable C++ GUI libraries in years, so I can't comment on that one. (Anybody remember Bedrock?)
-
Re:If Motorola really wants to support Linux...
Cnet's News.com reported August 19 of last year: Motorola buys Metrowerks for $95 million. The Metrowerks homepage says:
CodeWarrior
Metrowerks
A Motorola Company -
This is changeable
Managers understand complaints - intelligent and polite complaints. So if you care about Codewarrior, then do call them and write polite letters. If you're depending on their product like one writer already told, then go and set up a meeting with one of their top managers.
They are writing on their home page:
If you still have questions, feel free to ask. You can email us at info@metrowerks.com or give us a call at 1-512-873-4700
Why don't you just do it and keep on doing it. Signing some driver petitions doesn't help but it sure is better than flaming.
-
Re:Why not just add a front-end for CVS?
The version control system theoretically can tie into CVS. The necessary software is not yet written, but the necessary APIs are published on their web site at www.metrowerks.com/desktop/versi on_control/.
Apparently at one point in time, Metrwerks was working on such support, but the project went nowhere. The rep that I asked played the "Blame it on the intern" card.
:) -
PowerPlantAlthough it is a commercial product, and it is single platform, PowerPlant by Metrowerks is a relatively good application framework.
Following with true OOP, all of the core functionalities are mix in. If you want drag and drop in a window class, your window class simply inherits from LWindow and LDragAndDrop... Messaging is well defined, and window creation is extremly simple. (Made simpler because of resources on a macintosh)
Moreover, all of the framework code is very easy to see and fairly well organized. I would love to see a framework such as this attached on top of a good multiplatform underpinnning. While GTK and QT go a long way to improve straightup X11 programming, there is still a great deal of room for a really well written application framework.