Teaching Software Engineering with BlackBerry

One of the best aspects of my job as computer science professor is that I keep learning new stuff. This semester, I am teaching a software engineering class. Cinequest, the organization that puts on the annual San Jose film festival, approached the CS department, asking for help with their mobile initiative. We jumped at the chance, and now my students are hard at work designing and prototyping a BlackBerry application for festival attendees.

Our job is to put the festival catalog into the palms of the moviegoers so they don't have to browse the paper version, which is not only uncool but may also be out of date. Why the BlackBerry when everyone (except for McCain's staffers) knows that the iPhone is the cool device to support? Well, the BlackBerry is an open system, and you don't have to deal with Apple which has rather rigid ideas who gets to be a developer and who gets to put apps on the device. Also, fortunately for me, the BlackBerry runs Java. I want to learn new stuff, but not that much new stuff :-)

It is the perfect project for a software engineering class. We have a real customer and a real deadline, but the scope is reasonably constrained so that is feasible. And there is great resume value for the students and PR for the university. Now what we really need is some BlackBerry donations for the students, preferably with some air time tossed in. If anyone has useful contacts, please let me know!

As it turns out, BlackBerry programming isn't quite the same as Java ME. While Java ME apps will run on a BlackBerry, they don't have the same look, so we decided to go with the BlackBerry API.

That is easier said than done. We groaned when we found out that the development tools only run on Windows. (Somewhat to my surprise and delight, half of the students prefer Linux as a development platform.) I feel transported into a different world, where archives are distributed as .EXE files and development done in a (rather poor) custom IDE rather than Ant scripts and Eclipse/NetBeans plugins.

Fortunately, there is an Ant task that works on Linux. (It is pretty sad that one needs to hack one of the tools that has hardwired backslashes, but a good lesson for my students who will hopefully never do such an embarrassing thing themselves.) The only thing that doesn't work is the simulator. Some lucky people can run it in Wine, but not me. If you are among the unlucky, here is how you can get it to run in VirtualBox.

First I didn't understand why the simulator wasn't just written in Java. But it is able to simulate Bluetooth, so it may be some amount of work to get it to work cross-platform. Looking into my crystal ball, I would think that going forward, it will be increasingly hard to ignore Linux and Mac OS X in the developer marketplace. Maybe one solution is to treat Wine as another flavor of Windows on which your software must work.

If any BlackBerry hacker reads this, I'd be grateful for a tip on how I can render the tabs on the top so that they don't get cut off. Buttons don't seem to be the right thing, but I couldn't find any tabbed pane in the API.

Finally, here is a cool article by fellow Java Champion Qusay Mahmoud, who uses BlackBerry devices in his CS1 course at the University of Guelph in Canada. (He teaches straight Java ME.)