Sign in to follow this  
  • entries
    51
  • comments
    129
  • views
    82384

The Warrior cometh...

Sign in to follow this  
Muhammad Haggag

304 views

Intro
Ah, life's been going kinda tough recently. Been busy most of the time. I really wonder how people find the time and brains to update their journals...

News
I've been working on 2 projects lately, both of which are under NDA. So I can't say anything about them. However, suffice it to say that one's developed using wxWidgets for Win32 mainly, and hopefully linux some time in the future. The other's developed for the Palm OS.

On widgets...
For the wxWidgets one, I'm using VC++ (gasp) 6. Yup. Later versions are too expensive for this kind of project. Also, the express beta wouldn't work. Why? There's some wxWidgets hack for File I/O, where they define the values of some file-security/open-mode constants to the values that VC++ 6 defines them to be. Problem is, VC++ Express comes with different values for those constants, so it blows up on file I/O. Of course, I could've fixed this (given that I've taken the time to trace it). However, I thought this wouldn't be the only bug/incompatability, so I just opted to stay safe - I'm already, as always, behind schedule.

(I'll be talking about wxWidgets later, god-willing)

The Warrior...
For the Palm one, we're using mixed C and C++ (can't provide details though [grin]). We're using (Oh my god! The horror! The horror!) CodeWarrior 9.3 for the Palm. And I kid you not, it's a spectacular piece of software. It's amazing how crippled it is , IMHO, compared to Visual C++ 6 (The ~8 years old suite).

Stability is non-existent. For example:
- I have this breakpoint in my code. I run the simulator (I don't work on the real device most of the time), and run the app to the point I reach the breakpoint. What happens?
CW "breaks" immediately...and disappears. Typical move. Happens at *least* twice or three times a day
I sigh, launch it from the start menu, and redo the scenario.

- I create a new source file, select the project path manually (no, it
doesn't come up by default - it opens the CW installation path by default), and save it. Next, I add it to the project (No, it doesn't add it by default). I write some code. I place a breakpoint - It doesn't get placed. I keep jumping on F9 like a chimp (to place a breakpoint), I try it through the debug menu...to no avail. Turns out to be another typical move.
Solution:
Close the file. Re-open it. Place the breakpoint.

- There's this system function called DbgMessage(). It's *supposed* to output a debug string, you see. It's old, and is said to be vulnerable for message loss and corruption when called too often. Fair deal. Simple and not very robust, but I didn't need anything complicated. So I used it at a couple of places (in the memory manager), and life goes on...

Until I place a call to it somewhere in my main form, and now whenever this point is executed, I get an "Unknown instruction executed".
I yelled at it. It didn't work.
I kinda kept moving the call here and there trying to find out why it won't work. It still didn't work. I gave up.

And the documentation is especially spectacular. Undocumented functions, methods and types are not that unusual. And talk about empty pages. And don't forget doxygen generated documentation - gotta love it.
Here's a little story:
- I wanted to load the shared cryptography library (it's not loaded by default in the OS), and to do that, I need to know its name (kinda like its identifier to the OS). All the functions start with CPMLib. So I thought, is it CPM, CPMLib, cpm, or what?

I searched the documentation. It said nothing. I googled. Nothing. I looked
at the palm forums at palmsource
After searching for CPM, I find some code in a thread called
"CPMLibGenerateKeyError" that says the name is "CPMLib". Cool. But not just
that, it also says there's a function called CPMLibOpen that should be
called to initialize the library...WHAT THE???!!!!
There's no documentation on that function. It's only mentioned in the "CPM Error Codes" section:
"cpmErrNotOpen All CPM functions (except CPMLibOpen()) expect the CPM
library to be open. This code is returned if the library isn't open.
To open the library, call CPMLibOpen()."

Ok, thanks...
By the way, I ended up using a small, simple encryption system: TEA (There's sample code there - albeit a bit ugly)

I have so many stories to share here, some good and some bad, but seems like I'm out of time now.

PS: This post would seem to indicate CW is a piece of garbage given all the negative comments. Well, things are not that simple of course. It's got its ups and downs. I've not mentioned the ups here, and definitely not all the downs, but let's keep that for a later time.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now