Canadian Mac Forums at ehMac banner
1 - 20 of 25 Posts

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #1 ·
Does anyone here use CodeWarrior for Mac OS X? I'm curious as to whether it offers any advantages over the Apple Developer Tools (ProjectBuilder especially).
 

·
Registered
Joined
·
237 Posts
I like Codewarrior. I've been using it for a very, very long time so maybe it's familiarity.

I like the preprocess function that allows you to see what'll be sent to the compiler. Really helps when the code you've inherited is liberally littered with #ifdefs.

I like the disassemble function. Caught a couple of nasty bugs and did some optimizations of time critical code because I could see what the compiler was generating.

I like the fact that it generates CFM applications, so I can carbonize my code and get an application that runs on 9 and X. Project Builder will only generate Mach-O applications, which means OS X only.

I like Powerplant. It's got its strengths and weaknesses, but if you know what they are, you can get some really nice OS 9/OS X applications where you only have to worry about what your application does.

Project Builder (and tools) have improved. At the last WWDC, the various managers were waxing poetic about the improvements that were in part responsible for the speed increases in OS X.2.

But... What I don't like - because I'm not used to them - are the make files flying by in an edit window. Has a strange taste to it - Like Visual Studio. Build options dialog are just command line parameters. Setting optimization levels shouldn't be (in my opinion) opt=4, let me pick that from a menu, or a checkbox in a dialog. It's a Mac applications for crying out loud!

The final item is cost. ProjectBuilder and friends come with every copy of X. Updates and newer versions available at Apple's site. Codewarrior is not. (Can't find Visa bill with last purchase on it).

But if you're new to programming and want to get your feet wet, ProjectBuilder is a fine way to go as long as you know that the resulting executable is OS X only.

I hope I've given you an idea why I like Codewarrior. If you have more specific questions, just email me.

John
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #3 ·
JohnnyG4 wrote:
I like Codewarrior. I've been using it for a very, very long time so maybe it's familiarity.

I'm the same way with Visual Studio; I've been using it for so long I can't tell if it's good or if I'm just used to all of its quarks.

The final item is cost. ProjectBuilder and friends come with every copy of X. Updates and newer versions available at Apple's site. Codewarrior is not. (Can't find Visa bill with last purchase on it).

Right now MetroWerks is selling CodeWarrior for Mac OS X for 100USD (instead of the usual 400USD).
 

·
Registered
Joined
·
237 Posts
Yeah...

As for Visual Studio, it's got more than it's share of quirks. I spent what seemed like forever tracking down a problem where the linker stripped out my catch block code. The other winner bug was when there was this thing called the Microsoft Cross Compiler. We wrote version numbers into our files and every once and a while the version number was wrong, which meant we thought the file was corrupted. Seems that the compiler ran out of registers and was reusing a register before I was done with the version number. Sheeh was that a tough one to track down.

But I believe that the $100 vesion of Codewarrior is a version that only has the Mach-O compiler. There was a discussion about what was and wasn't included in the package on the carbon developers list. The thread is something like: "CodeWarrior 8 for 100 bucks".

John
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #5 ·
JohnnyG4 wrote:
As for Visual Studio, it's got more than it's share of quirks.

Indeed. Still, I haven't had to track down a code-generation bug in Visual Studio for a while, so I'm happy about that.

But I believe that the $100 vesion of Codewarrior is a version that only has the Mach-O compiler.

What other compilers would there be for Mac OS X?
 

·
Premium Member
Joined
·
7,069 Posts
Theres the regular gcc compiler that comes with the UNIX build... but I don't know if Project Builder uses that or not...

Anyway, what would you suggest for someone whos going to start learning how to program actual programs (Visual Basic programs are not programs...)
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #7 ·
JohnnyG4 wrote:
Java... I did a GUI for a internal Nortel project and it ran on NT and Solaris (plus I was doing development at home on my Mac). Guess how many times I had to tweek things for each supported (and unsupported) platform.

Write once, debug everywhere!

Any guesses?

I'm not the language lawyer I used to be, but that looks like a memory leak to me :D
 

·
Registered
Joined
·
237 Posts
I goofed (didn't tell you that the y was going to be deleted elsewere, but...)

It's

throw (Exception y);

the compiler inserts lots (and I do mean lots) of code to make sure that only a exception of type y is thrown.

To make matters worse, if one of the functions fails and gets into the catch block, we're throwing a pointer to a y exception that'll cause the program to exit because what we' re throwing doesn't match up with what we say we're going to throw.

(If the formatting stayed...) The code looks good, but when it comes right down to it, is really bad because of the the above reasons.

Oh well, enough of C++ 101.

John
 

·
Registered
Joined
·
1,060 Posts
Ummm... yeah, what he said!



Seriously, though. JohnnyG4 would definitely be one to talk to about CodeWarrior stuff.

Say, JG4? You ever get around to puttering on that 'side project' you showed me back... gosh, it was before NorTel imploded, so it's been almost 2 years ago... ?

:cool:
 

·
Registered
Joined
·
237 Posts
Strongblade:

Well, it's been OpenGL-ized, and carbonized so I get some really good framerates on OS X.2 but I have some rectangle problems (basically they aren't) and z problems (things are showing thru that shouldn't be).

Now that I've got some time on my hands, I think I might actually see if I can fix some of the bugs.

John
 

·
Premium Member
Joined
·
2,263 Posts
Visual basic is closer to a script than a program because it can run without the need for compiling
I found Java programs easier for my simple brain than C++, but C++ is still the best general purpose and most highly used code for most commercial apps
I find Java is fun and C++ is no fun though
Maybe I just havent worked on a good project. Java works so wel on OSX, and most everywhere else and has lots of goodies built in that you dont have to build from scratch.
All my C programs have been pretty basic and I dont have much experience with a graphic API like codewarrior, I ve just done it in a text editor, one day I will have to get back to c and get with the game a little better.
I had some enjoyable time creating some interesting things with Visual basic, but have no more intention of using it again though, those kind of apps can be made with web based scripts or java, both of which are cross platform and VB is not..
mark
 

·
Registered
Joined
·
237 Posts
Project Builder uses gcc. You can see the file and options being pumped to the compiler when you do a build.

Java... I did a GUI for a internal Nortel project and it ran on NT and Solaris (plus I was doing development at home on my Mac). Guess how many times I had to tweek things for each supported (and unsupported) platform. Sun was in the transition from AWT to Swing, so that may have added to the complications.

I've seen some really neat looking C++ code that is horrible on memory, performance, etc. You have to understand what the language offers you, what it does for you (and does for you behind your back), and what the trade offs are when you use features. The hardest thing I had to drive into a co-developer's head was not to do this.

void x::func() throw (Exception y);

void x::func() throw (Exception y)
{
try
{
func1();
func2();
}
catch (...)
{
printf("Opps.\n");
throw new y(1);
}
}

Any guesses? (Sorry about the formatting, my leading white space got stripped).

John
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #13 ·
JohnnyG4 wrote:
the compiler inserts lots (and I do mean lots) of code to make sure that only a exception of type y is thrown.

Ah, I didn't realize that. Most of the compilers I use either don't support exception specifications at all or will parse them but ignore them. Plus, the code I write for cash has to work on compilers like gcc 2.7.2, so needless to say I don't get to use all of the neat C++ features anymore.

*sigh*

(If the formatting stayed...) The code looks good, but when it comes right down to it, is really bad because of the the above reasons.

<code> (or is it <pre>?) preserves plain-text formatting in HTML.
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #14 ·
Chealion wrote:
Anyway, what would you suggest for someone whos going to start learning how to program actual programs (Visual Basic programs are not programs...)

This might sound weird, but I'd recommend learning C, even if you haven't touched another programming language before. Why C? C is a low-level programming language. Most other languages abstract away how various bits of the computer work, and so you don't get a good idea of how things are working behind the scenes (and hence whether or not they're slow). With C, the number of abstractions you have to deal with are minimal, so you get a good feeling as to what's going on behind the scenes (since you're practically there anyway).

Plus you'll find out whether or not you can use pointers, which can be, um, interesting :D

If you're looking for a book, I'd recommend The C Programming Language, Second Edition, by Kernighan and Ritchie.
 

·
Registered
Joined
·
1,060 Posts
<BLOCKQUOTE>quote:</font><HR>Originally posted by JohnnyG4:
Strongblade:

Well, it's been OpenGL-ized, and carbonized so I get some really good framerates on OS X.2 but I have some rectangle problems (basically they aren't) and z problems (things are showing thru that shouldn't be).

Now that I've got some time on my hands, I think I might actually see if I can fix some of the bugs.

John
<HR></BLOCKQUOTE>

Well, I could still do some graphic work and I'm betting you could find some beta tetsers if you *really* look hard...


:cool:
 

·
Premium Member
Joined
·
7,115 Posts
<BLOCKQUOTE>quote:</font><HR>Originally posted by JohnnyG4:
Strongblade:

Well, it's been OpenGL-ized, and carbonized so I get some really good framerates on OS X.2 but I have some rectangle problems (basically they aren't) and z problems (things are showing thru that shouldn't be).

Now that I've got some time on my hands, I think I might actually see if I can fix some of the bugs.

John
<HR></BLOCKQUOTE>

Pray tell,
It sounds like something fun! :D

On a somewhat related note, I've been looking for someone with a little programming savvy to help bring a 3d game idea that I've been contemplating for the last couple of years. Unfortunately my area of expertise is in the graphics realm (3d modeling, animation, design, illustration, motion graphics, video editing, etc.) which limits the interactivity. :( :D

So far the people I've come across tend to talk, but never follow up.

Anyway, I think it has potential... just need a partner to help bring it to fruition. Easier said than done. :eek:
 

·
Registered
Joined
·
237 Posts
The readers' digest version is that it's after WW III and you drive around in a tank and blow things up. There's a first person view, a third person view a strategy view and an editor.

(Ever notice how the editors for some games never get ported? I wanted to fix that... Once the z problem is fixed, there's a built in editor)

You also have some resources you can use like other sorts of tanks, electric cars (really neat), jets and helicopters that you send on missions. Rumour also has it that 4 players can play across the net, but the code is MacTCP based. Maybe I should upgrade to at least OpenTransport?

Anywho, I'll see what I can do to get a couple of glaring bugs out or if your in Ottawa and want to take a sneak peek (with the bugs in), just pick a downtown coffee shop (Starbucks/Second Cup on Bank and Slater work just fine) and email me when you want to to tag up.

John
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #18 ·
One more question about CodeWarrior for Mac OS X -- do you know if it comes with command-line tools (specifically, can I compile and link from the command line)?
 

·
Registered
Joined
·
237 Posts
Yes it has Command line tools (but I haven't used them). There's mwld, mwpefld, mwpefcc, mwdis, mwccppc, mwldppc, mwcc.

(English translations c compilers, linkers, disassember...)

John
 

·
Registered
Joined
·
2,198 Posts
Discussion Starter · #20 ·
My copy of CodeWarrior arrived today, and my initial impression is that it was worth 100USD (although the editor doesn't support different indent widths and tab depths; grrr). For example, the interface feels better than the ProjectBuilder interface, if for no other reason than it uses a lot less screen real estate. I've no idea (yet) how the compilers compare, but I'm sure I'll have an opporitunity to test both in the future.
 
1 - 20 of 25 Posts
Top