Archive

Posts Tagged ‘coding’

The good, the bad, and the blackberry developer

June 25th, 2009 1 comment

I have been doing quite a bit of development for hand-held devices lately, mostly the iPhone and Windows Mobile. I took a brief foray into Blackberry and realized that I did not have enough high-quality booze to get over the learning curve (as close as you can come to a step function and still have rounded corners) and Byzantine documentation and API choices. I felt rather guilty at not being able to master the Blackberry and will probably give it another try when I have more time and fewer deadlines.

I came across a story about a developer who decided to write an application for the Blackberry and documented some of the ups and downs of his work. The article concentrates a lot on the aspects of writing an application that come after the development is “finished” (at least released) and the difficulty in converting the application into customer dollars. That part is interesting but the part that caught my interest was the first third of the article that deals with the development process and some of the difficulties he experienced. The part where he describes choosing the development environment hit very close to home as this was early in the process for me (and him) and it left me rather disheartened early in the process.

All BlackBerry phones are java based, and there are two SDK options for developing software on them: MIDP/CLDC and BlackBerry specific APIs. … Initially I leaned towards CLDC to maintain portability, but I eventually decided I’d rather take full advantage of the platform. I could always port it later if it came to that (if there is a later).

Great, now I just needed the RIM SDK. Turns out there are about 5 different versions, and the more features you get the fewer devices you can support. RIM has been around for a long time, and unfortunately (and unlike the iPhone) not all operating system revisions are available for all devices. The basic choices when I started PodTrapper were 4.2, 4.2.1, 4.3, 4.5, and the newly released 4.7.

He also hit a snag that I experienced (and the one that eventually broke my will), connecting to the network:

There are 10 different network transports available on BlackBerry: WiFi, Direct TCP, WAP, WAP2, BES/MDS, BIS, Unite, BES Serial Bypass, USB and Bluetooth. A lot of options for getting data in and out. What would be nice is to say:

Me: Give me an HTTP connection using least-cost routing.
BB: Here you go

What you get is:

Me: I need an HTTP connection, is Wifi available?
BB: No.
Me: Is BES available?
BB: No.
Me: Is BIS available?
BB: Yes.
BB: Ooops, that file is over the size limit for BIS.
Me: Is TCP available?
BB: Yes.
BB: Ooops, TCP looks available but it was blocked by the carrier’s firewall…..

Regdarless, he persevered and ended up with a decent application. I envy his dedication and results. Mine will have to wait until next time. I know it can be done now.

Millay’s candle

June 18th, 2009 No comments

One of the great things about working hard is the feeling of accomplishment. Another is finishing and looking back at a job well done. I have been working rather diligently lately doing some coding for mobile devices (Windows Mobile of all things … how I ended up at that is a long and winding tale beyond what I feel you, the casual reader, can endure at this moment). I was also teaching a programming course for high-school students on Saturday mornings. On top of this I was enjoying helping a vision-impaired cyclist train for a 200km tour ride by being a sighted rider on a tandem with him. Actually, “rider” is not entirely accurate because there was no notion of “being along for the ride” while we were training (yes, damnit, it was training and my legs are still sore).

About ten days ago I finished the programming course. It was quite good but I am sure I could do better if there is a next time. That day (Saturday) I went out biking for the long ride that was to be the big ride before some easier rides that would lead to the tour the following Saturday. Man, what a ride. It was long and hot and … as we were going down a large hill very quickly … terrifying. The second most horrible sound a person wants to hear (and possibly the last sound one might hear) when speeding down a hill on the front of a tandem bicycle (one that tilts the scales at nearly 600lbs with both riders and gear) is the taaannng of a spoke breaking on the front wheel. The most horrifying sound is a second taaannng that follows the first before one has had a chance to decelerate any significant amount while still going down the hill at great speed and squeezing the brakes with increasing force and urgency.

It was a very long, careful, and slow ride back to town.

I also want to plug MacQueen’s bike shop in Charlottetown (particularly Danny) who shook his head and pulled a wheel off of one of his tandems and told us not to worry about it until later so we could finish our ride. I appreciate his desire and ability to keep us riding.

The upshot of all this is what my body did to me on Sunday. The biking, teaching, and working left me tired and (apparently) susceptible to the Martian Death Flu (MDF). Not to be confused with Swine Flu or West Nile Virus, or any of the horrors that will terrify us throughout the summer, the MDF knocked me out of normal life for a week. Of that week I spent 4 days in bed (it might have been 5 but it is hard to judge that last one where I was out of bed for part of it). Did I mention that I was IN BED during this time–and not just moping around the house.

The good news is that I was able to watch movies and (eventually, when my brain would allow it) read some books. I read all five of Dashiel Hammet’s novels and would seriously recommend The Maltese Falcon, The Glass Key, and The Thin Man. The first two, Red Harvest and The Dain Curse are quite intense–think Kill Bill as a novel. I have watched The Maltese Falcon a few times and it is very close to the novel. The Thin Man movie was a much looser interpretation of Dashiel’s book but attention to the characters in the movie brings out much of the charm (yikes, lots of pretence to use the word “charm” when writing about books and movies) of the novel. The characters spawned a total of six Thin Man movies. I like them all (with the last two being my least favourite but still worth watching).

So I read (I also finished my next book in the Cadfael series, Saint Peter’s Fair) and watched (all three of the original Star Wars movies with director’s commentary on–you know you are sick when you can lie through that dribble and be too apathetic to change the audio track). And I am very glad to be back on the mend. Oh, and the BBC adaptations of the Cadfael novels is quite good as well.

Life lesson: do not work so much that you get sick. Burning the candle at both ends leads to a short and soggy candle, even if it were extra bright while it burned. Let’s see if I can remember that for the next time.

Biking up that hill … with no problem

May 7th, 2009 No comments

There is nothing like having similar circumstances continually reappearing to make me believe I am either a) the poster child for déjà vu, b) living a somewhat haphazardly written version of the movie Groundhog Day, or c) in a bit of a rut.

Today’s reoccurrence came through my recent Music-Coffee-and-Code-in-a-basement life. As I am beginning a new project using Windows Mobile I chose the New Project menu item and followed the appropriate step to create a new mobile project (yeah, I know, this kind of riveting storytelling keeps me alive … I will be unboxing Happy Meals soon …). The result of these straightforward and previously effective acts was a little tiny failure message and a very disconcerting beep (not your standard disconcerting beep either; this was a new and ugly beep).

The reason for said disconcerting beep and lack of new project was a problem that occurred as a result of the security in Internet Exporer 8. I found this while drinking my iced addiction and listening to the CBC Radio 3 track of the day: “The Prisoner” by D.O.A.

There is no way that I can listen to D.O.A. without a flood of memories that bring me back to struggling up some gruesome hill (I always tried to stop and look at the lake for its beauty and not because I could scarcely draw an unlaboured breath). My suffering and panting (I am gravity enhanced and prefer the ride down to the ride up any hill) would always camouflage the stealthy cranking of those riding behind until the gutteral refrain of “my old man’s a bum … uurgh” would appear in my left ear as I would be left trying in vain to dig down to find enough energy to grab the aerodynamic advantage of the rear wheel quickly spinning ever further ahead.

I never caught the wheel and I always knew I would hear the lyric. The very occasional time I managed to summit anything greater than an on-ramp without hearing the whizzing of passing tires and D.O.A. lyrics (it was sometimes worse … Tom Jones’s “it’s not unusual to be loved by anyone” can stay in a person’s head for hours) was a victory savoured at least until the next hill. Of course, the downhills were their own reward.

In celebration of finding a way around a tedious problem I am pouring myself a little more coffee (be careful filtering that stuff … it is very easy to drop the strainer into the coffee bowl and have to do it all over again and be forced to wait for a second straining) and putting D.O.A.’s Just Play It Over and Over five songs (one with Bif Naked doing some singing as well) on high rotation. The code mines were never better.

Cold coffee thunder

April 23rd, 2009 1 comment

Time for a jittery update on things that should not be so simple and so good. Okay, maybe it is not quite as simple a pleasure to other people, but drinking iced coffee (the simplest, yummiest brewing and drinking experience yet invented–from the The Internet Food Association via Lifehacker) after just finding an amazingly difficult bug (a subtle overwriting of a function pointer in the vtable of a C++ object) while Thunderheist hones my fast-twitch muscular response is damn fine in my world.

Cold, iced coffee love   Thunderheist arranged and stuffed

You can experience this joy for yourself by making iced rocket fuel using the method above and listening to Thunderheist (CBC Radio 3 Sessions podcast). You are on your own to find C++ bugs.

Pure joy

April 13th, 2009 No comments

I read The Mythical Man Month about fifteen years ago at a time when I was trying to figure out why I got into programming and how I could be the best programmer in the world. It was one of a number of books that were considered essential reading at the time for people on my quest. As an aside, there were a surprising number of books out of Microsoft that were on that list as well–Microsoft ruled the roost back then. I like to think that I took the lessons in that book to heart, I am not sure that I actually did. I still have it at home and may give it another read this week.

I do not remember how I ended up at the site that had the following quote from The Mythical Man Month but when I read the quote it made me smile. I can remember feeling a true sense of fellowship with the author when he wrote that “[a programmer] builds his castles in the air, from air, creating by exertion of the imagination.” I still have moments when I feel that I have built something that simply did not exist before I dreamed it into being–something beautiful and poetical. There is much more in my life now than programming and I am not nearly as good as I once was but on the few times that I can look back at what I have built and I think that it is beautiful I am, just for a second, a poet.

Why is programming fun? What delights may its practioner expect as his reward?

First is the sheer joy of making things. As the child delights in his mud pie, so the adult enjoys building things, especially things of his own design. I think this delight must be an image of God’s delight in making things, a delight shown in the distinctness and newness of each leaf and each snowflake.

Second is the pleasure of making things that are useful to other people. Deep within, we want others to use our work and to find it helpful. In this respect the programming system is not essentially different from the child’s first clay pencil holder “for Daddy’s office.”

Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning. The programmed computer has all the fascination of the pinball machine or the jukebox mechanism, carried to the ultimate.

Fourth is the joy of always learning, which springs from the nonrepeating nature of the task. In one way or another the problem is ever new, and its solver learns something: sometimes practical, sometimes theoretical, and sometimes both.

Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures. (…)

Yet the program construct, unlike the poet’s words, is real in the sense that it moves and works, producing visible outputs separately from the construct itself. It prints results, draws pictures, produces sounds, moves arms. The magic of myth and legend has come true in our time. One types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be.

Programming then is fun because it gratifies creative longings built deep within us and delights sensibilities we have in common with all men.

Taken from here quoting The Mythical Man Month.

gord Tags: , ,