PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

IPAQ H1915 (FA101A) - worth buying for dev?

MirekCz forgot his pass.. · 29 Aug 2003, 07:21 UTC
hey folks,
I have noticed today that there's a cheap IPAQ to buy (look at subject for details). I'm asking myself if it's worth the cash?
It goes for something like 250$ down here.. and the only drawback I can see is the slow 200mhz cpu (it's not the 206 strongarm).
All the other machines with 400mhz cpus cost about double the amount... so where's the catch?!?
Would it be a good dev. machine?
Thanks for your comments.
One benefit of developing with a slightly slower test system is that you can be pretty well assured that the faster devices will run your software without problems.

I use an Axim 300MHz PXA250, and I haven't heard of any performance problems with any of the three apps I've released.

You might also want to check out the Toshiba e350, which goes for about $200, has a 300MHz PXA255 and WM2003.

-John
The main problem with the 1915 is the lack of any reasonable communications for debugging. USB just isn't good enough.

I have a 1915 and I really like it but I find it pretty useless for development.

Although theoretically it could be possible to get some kind of SDIO WiFi solution going on it this seems very far away and I don't think it will ever happen for the 1915. If I'm wrong about this I would love to be corrected.
Orpe wrote:
The main problem with the 1915 is the lack of any reasonable communications for debugging. USB just isn't good enough.


mmm... you mean that usb for that device is not good enough or that usb (general for all devices) is not good enough?

If the last answer is the "correct", what do you guys use to debug your apps, or which is your favourite pocket pc to debug?
I use the Socket 10/100 CF Ethernet to debug (over LAN).

Favorite device? The iPAQ 2215. It's a 2003 device, meaning I use EVC 4.0 with it. My experience with EVC 3.0 is that it hangs the device / desktop all the time when I try to trace into functions. With EVC 4.0, no problem at all.
Kak":2q49nece]


USB in general is not good enough.

In fact I have looked into why this is the case and I would blame the way WCE uses the USB hardware rather than the hardware itself. The hardware should be able to theoretically reach a throughput of 1500000 bytes per second. I have never gotten more than a few percent (as in 3-5%) of that when copying files etc over USB. When something is that far from the theoretical limit there is reason to suspect that something about the implementation/hardware sucks.

The main factors that make performance so bad are from what it seems.

1) The fact that the USB is used as a virtual serial port which then has a PPP link over it. This causes quite a bit of latency which is the main problem for debugging purposes.

2) The fact that the USB driver does all of its processing in user space. The problem with this is mainly that the USB causes a lot of interrupts due to small buffer sizes (20 bytes if I remember correctly) and this doesnt work well when each interrupt requires a switch to a user space thread which unblocks from an event etc.

3) The USB driver ISR thread runs at the lowest possible priority. Probably to prevent the device from becoming unresponsive during file transfers etc over USB.

All of those three points work together to ensure that you get terrible latency and thus low bandwidth. At least this is my fairly well based theory.

Sadly, all of those things could easily have been overcome if whoever did them just cared enough about it.
I am currently developing using GapiDraw, which lets me build both a PC version and a PocketPC version.

I would recommend that you avoid the debugging trap. I've been developing professionally for years and when I am working with code I've written from scratch, I tend to spend as little time in the debugger as I possibly can.

The first thing I do is write test code. Yes, test code. It runs at program startup, and tests all the "interesting" modules of my app quite thoroughly. It runs on both PC and PocketPC. I'll know if something major goes wrong.

Another thing thing I do is generate log files. Even my PocketPC app has a log file. Anything interesting goes into the log file. If I am working on a problem that only exhibits on the PocketPC, I put a bit more relevant info in the log file and run it on the device. If this doesn't give me enough info to know what the problem is, I either do it again or conclude that I have no idea.

I don't like the approach of wading into the debugger to try to find out what is wrong. Debugging should be done in your head, I think. You should deduce what the problem is from what you know. Then, the debugger is merely another tool to acquire information about the problem.

Put another way, if you are firing up the debugger without a specific hypothesis you are trying to disprove, or without a specific question you are trying to answer, or without a specific fact you are trying to acquire, what are you doing? You're pretty much groping in the dark.

Kernighan and Plauger also caution against this debugging mentality in their excellent book The Practice of Programming. There's a lot you can do before you need to go into the debugger. That said, the debugger can be a powerful tool if properly used. I just find it to often be improperly used by fledgling programmers.

So I guess I'd just suggest that you question why you need to debug so much, and organize your coding habits to reduce the amount of debugging that needs to be done. It can be done, don't let people tell you I am just blowing smoke. (And Kernighan and Plauger too.)
I've never used a debugger, so I tend to approve :)
Let me go on about test code while I'm here and waiting for dinner.

The first complaint I usually hear about test code is that it tells you when something goes wrong, but not what is going wrong or exactly where it is going wrong. The mistaken belief is that you need to use the debugger to discover all of that.

These mistaken beliefs are rooted in misuse of test code as well as misuse of the debugger.

Proper test code is written to test each level of the hierarchical structure of your program. So when it fails, you know where the failure is. Sure, if a high level component fails, the failure might be there or in a lower level component. But if you are also testing the lower level components individually, you'll have already answered that question.

Proper test code is written *while* you write your actual code, or even *before* you write your actual code. A lot of people understand that having test code is handy to test the *implementation* of your code for correctness as you write it. But even more important is having test code to test the *interface* of your code before you write it. In that respect, think of test code as something that happens almost in the design stage of development, as well as the implementation stage.

If you've managed to get to the debugging stage without writing test code, of course diving into the debugger seems a better option. But that's only because you've skipped the whole step of writing your test code, which should have happened before. If you'd written your test code diligently, you wouldn't be in this quandry of being forced to use the debugger even when it isn't necessarily the most efficient way to debug your problems.

Now, let me caveat all I've just said. Firstly, I find there tends to be a bit of a cost/benefit judgement to whether I write test code for a module, and how much I test code I do write. If it's an important module, or it is complicated, or I've never done that type of code before, or I intend to refactor it, then I will lean towards more test code with deeper and broader coverage. On the other hand, some modules I write have little or no test code.

Like so many decisions in software development, it's a judgement call, but I consider it to be the mark of an inexperienced or amateur developer to be so inclined as to have little or no test code at all.

Secondly, there are cases where it makes sense to approach a problem using the debugger as your primary debugging tool. It's just that this isn't always the case. And it's a good practice, once you've discovered the problem, to write test code to ensure it doesn't happen again, or that similar problems (perhaps even in similar modules) are flushed out.

Consider it. You've just went into the debugger to look at a module. You don't really know what the problem is, but you have a hunch it's there. What does that say about your development practices? Why didn't your test code for that module reveal the problem? (Fix the test code.) Don't you have test code for that module? (Write the test code!)

I'm only coming down hard on the debugger here because I see it misused often in development shops. Don't get into the habit.

Anyways, Kernighan and Plauger have a whole chapter on debugging in the book I mentioned, and the debugger is only one aspect of debugging. It needn't dominate your development practices. There is also a chapter on testing. I reviewed the book here: http://slashdot.org/article.pl?sid=99/04/08/1512209
MirekCz forgot his pass.. · 29 Aug 2003, 23:31 UTC
ok, I'm used to not use debbuger, I'm working with Symbian devices right now and they suck bigtimes... it's not possible to debug your code.
So my question is really if it's a good device (ie everything works fine, no problems with keys/screen/image quality/whatever)
I want to start dev. on PPC, possibly write some software as multiport between Symbian and PPC.

PS.does PPC userbase still grow? I have heard some rumors that PPC devices are becoming much less popular?
MirekCz forgot his pass.. wrote:
ok, I'm used to not use debbuger, I'm working with Symbian devices right now and they suck bigtimes... it's not possible to debug your code.
So my question is really if it's a good device (ie everything works fine, no problems with keys/screen/image quality/whatever)
I want to start dev. on PPC, possibly write some software as multiport between Symbian and PPC.


I also worked with Symbian devices and I must say that I feel a lot more comfortable with Pocket PC than Symbian. Symbian is just too hard, every step you make you find the OS in the middle trying to make your work harder. It's only an opinion, but symbian devices are the worst devices I've worked with (and I've worked from spectrums to PS2, with LOTS of devices in the middle...)


about the debugging battle seems to be here, I won't talk about it as I've always considered programming is an art, not a science, and everything you can say about programming is just an opinion ;)
everything you can say about programming is just an opinion


The difference is, anything you say about programming is your opinion, and anything Kernighan says about programming is Kernighan's opinion.

Kernighan knows a lot more about programming than anyone here. We should value his opinion. And he conveniently provides a lot of his opinion in his book The Practice of Programming.
mlepage wrote:
Kernighan knows a lot more about programming than anyone here. We should value his opinion. And he conveniently provides a lot of his opinion in his book The Practice of Programming.


Are you getting a percentage of the sales or something?

Yes, Kernighan knows a lot about programming and his opinion should be valued.

But, he doesn't typically program things that are event driven and/or have graphical user interfaces. He also typically works on UNIX systems. At least, this is what I know of his work.

While many things apply generally to all forms of programming there are some things that are a bit different when you do for example Pocket PC/Windows development.

Actually, I think it is quite common for PPC developers to run things under the debugger for a number of reasons.

Here are my favorite things about running code in the debugger.

* I usually log things both to a file and to the debugger. This enables me to see the log messages as they happen, very useful in some cases. While it would be possible to write a tool for this it is already conveniently available in the debugger.

* If you format log messages correctly you can have the development environment jump to the correct piece of code when you double click on it. This saves a lot of time when you want to look at the code where a certain message came from.

* When a severe error is logged you can have the debugger automatically break where it occured.

* It's a convenient way of getting a quick understanding of someone elses code. Just set a breakpoint somewhere interesting and when execution stops follow it for a bit or watch the stack trace to see where it came from.

So, for the above reasons I run my code in the debugger for the most part. But that doesn't really say much about my development practises, whether I have test code or not (which I do) etc.

To conclude and stay on topic, the above reasons are what made me say that a device that only has USB is not good for development IMHO, since those things work much more poorly over USB.
Nope, no percentage of sales, I just like the book. I've read a lot of books on software development and that is a good one. (It's funny though, apparently my favourable review on Slashdot caused a jump in its sales at Amazon, which Kernighan noticed.)

Orpe, it sounds like you have the best of both worlds: logging and a debugger. And if there's a problem in the log, you jump into the debugger. That's great: you're jumping in to where you know the problem might be, not blindly.

I just see too many people writing screens and screens of code, then running it and finding problems, then spending hours in the debugger sorting out all the problems. Instead, they could have written a bit of code, then some test code for it, then immediately discovered it was broken and fixed it right away while it was fresh in their mind and obvious where the problem is. Then, they move on to a bit more code. It's more efficient, and when they're done, they have test code.

As I said earlier, I find myself not using the debugger too much when I've written my own code, since I try to stop problems before the debugging stage. But when I work on other people's code, for example the few years I spent porting code from Windows to Unix, I found the debugger to be an invaluable tool. Some of that code was a mess, and you had to go into the debugger to see exactly what was happening.

But I think here, most people are working on their own code, sometimes even from scratch. That's why I encourage people not to rely on the debugger so much, but to try to structure their development processes to catch problems earlier and more efficiently.
mlepage wrote:
The difference is, anything you say about programming is your opinion, and anything Kernighan says about programming is Kernighan's opinion.


of course, but it's still an opinion ;)


Kak (sorry, I don't have my login here...)