Author Archive

Microsoft on the verge of releasing Windows Mobile version 2.0

Brad Midgley

OK… sorry about the inflammatory title, but it really does feel like MS has been coasting since it came out with its first mobile software release. I’ve used Windows Mobile on two Dell Axim revs and two cellphones. Instead of feeling like each new OS revision was an upgrade, it just felt like the same thing with a few more applications included and a few more options in settings. Before that I went through almost every model of the Apple Newton… at least with Newton, each OS update and device update felt like a significant improvement.

Windows Mobile currently has the worst browser in any shipping operating system and made development for mobile web sites or multiplatform mobile development (Rhomobile) very difficult. I’ve had countless customers tell me “no one uses” Windows Mobile so they didn’t want to target it. Lots of people use Windows Mobile every day, but the fact

Continue reading

How long will it take to understand Rails 3 in and out?

Brad Midgley

According to David Heinemeier Hansson, you will never understand it all. Case in point? David himself.

That was the gist of his answer to how a new change to the way rails 3 renders actions in the browser would be handled for older browsers.

DHH gets involved in the parts he cares about and doesn’t worry about the exact details that have been delegated to someone else. He says we should not worry about knowing the whole framework because he doesn’t either. We don’t need to live up to an impossible standard.

Continue reading

iPad influencing the tablet market

Brad Midgley

Steve-Jobs-and-iPadMy first thought on seeing this image today was “wow… Steve Jobs looks really small now behind his big iPhone”. Fortunately, this isn’t a case of Steve shrinking, it’s the mobile computer that got bigger.

I believe there is a lot of potential for the Apple tablet and I’m excited to write software for it. I was a little bit disappointed with the realization that it is also a closed device…

Continue reading

Linux kiosk

Brad Midgley

I recently did some maintenance on a linux-based kiosk project. It runs linux and has a rails application serving content. Firefox is running in a kiosk mode and there is no keyboard or mouse present.

In adding a touchscreen from a different vendor, I found some details that can help make a kiosk application more responsive to touchscreen taps.

If you use linux in a touchscreen implementation, I recommend staying away from linux drivers offered by the vendor if possible. These were very out of date and X refused to load them. Use evtouch if possible. Install the package:

apt-get install xserver-xorg-input-evtouch

Note that most of the parameters to the driver are meant to discourage it from giving us complicated mouse emulation behavior like mousovers, middle/right clicks, dragging, etc. It needs to be just the simplest it can be for kiosk operation. People will push buttons too long, unintentionally try to drag

Continue reading

Turning technologies upside down: exchanging web and embedded approaches

Brad Midgley

I’ve posted about working in Rhomobile to develop for embedded platforms. This work has been progressing and we’re seeing the platform mature as developers are pushing its limits.

This is a platform that has code snippets that look like rails. An entire page for listing several firefighter rotations for example can be as simple as:

<div>
<h1 id=”pageTitle”>Rotations</h1>
</div>

<ul id=”rotations” title=”Rotations” selected=”true”>
<a href=”/app/Rotation/new” target=”_self”>New</a>

< % @rotations.each do |rotation| %>
<li>< %= link_to rotation.name, :action => :show, :id => rotation.object %></li>
< % end %>
</ul>

Now, contrast this with working in Cappuccino, a framework that uses a javascript dialect and framework inspired by Objective C and Cocoa. This code deals with a model object:

@implementation Segment: CPObject
{
    CPString name @accessors;
    int order;
    Template template @accessors;
    CPMutableArray media;
    CPMutableArray images;
    int startTime @accessors; // relative to 0 seconds, i.e. start of 

Continue reading

Xcode won’t recognize iPhone OS 3.0.1

Brad Midgley

If you see a message like “The version of iPhone OS on (your phone’s name) does not match any of the versions of iPhone OS supported for development with this copy of Xcode” after the 3.0.1 update, the quick fix is to run in a shell:

sudo ln -sf 3.0\ \(7A341\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1

And then restart Xcode and reconnect the device. A long discussion about this at technolosophy.

Continue reading

Over-the-air calendar synchronization for iPhone

Brad Midgley

Water flowing over red rocks, (C) 2009 Marcus Derencius

I’m very impressed so far with nuevasync.com for their over-the-air calendar synchronization. They have free and pay options. You set them up as an MS Exchange server data source and your contacts and calendar are synchronized with google. I love being able to edit calendar items with a full keyboard and also keep my existing workflow for using google to manage my calendar. Then I don’t have to think about arranging to synchronize… it just happens and the data is there the next time I look.

Beware, adding an Exchange sync source will mean the iPhone loses its current contacts and calendar events. I got around this by synchronizing contacts with funambol first and then restoring after setting up nuevasync. I didn’t have enough calendar events to worry about losing those.

Incidentally, the iPhone SDK

Continue reading

Native iPhone look in rhomobile

Brad Midgley

Getting to Railsconf 2009-81

Rhomobile provides great instant gratification in building applications. See my last article for a starter.

There are some elements you’ll miss as you start to work on the iPhone target. The back button is one and the custom tab bar is another.

The main bar can currently be customized by building rhodes from source (the way I did in the previous post). Open platform/iphone/rhorunner.xcodeproj in Xcode and double-click MainWindow.xib under Resources. This will launch it in Interface Builder.

You might wonder why the bottom bar is a toolbar and not a tab bar. Native iPhone apps typically use a tab bar that switches the view above the bar. This isn’t going to work for rhodes however–we aren’t going to change to a different view. We’ll simply tell the UIWebView to go to another part of the application. Fortunately,

Continue reading

processing large xml data files

Brad Midgley

Getting to Railsconf 2009-26XML is often used to convey very large data sets. A perfect example is wikipedia’s data. The full wikipedia datasets are available in several different slices.

This dataset is about 24GB uncompressed for all articles in English. This is an excellent set to push the limits on your parser. Clearly, you can’t load a file like this into memory to process it. To handle a large file like this, you need to use sax mode. In this mode, methods in your code are called in the process of scanning through the xml document. The parser does not retain any state as it goes, so this mode scales up to whatever dataset size you need.

Nokogiri, rexml, and direct libxml interfaces in ruby all expose a sax mode for their interfaces. These differ in the way the

Continue reading

Rhomobile 1.2 for iPhone, android, blackberry, win mobile

Brad Midgley

We’ve been evaluating the Rhodes platform, aka Rhomobile, as a way to deliver multiplatform applications to our customers. Version 1.2.1 was recently released.

One thing that is clear right away is the development platform problem. Develop on OSX if you need to work on iPhone and Android ports. Use Windows if you plan to release for Android, Windows Mobile, and Blackberry. For most multiplatform deployment combinations you’ll need to switch back and forth, use windows in a vm, etc.

Back on OSX, install rhodes and create a basic application. The application will work only with local data and not synchronize it with a server copy. (You need to install the iPhone SDK and ruby/rubygems as prerequisites).

$ sudo gem install rhodes
$ rhogen app testapp
$ cd testapp
$ rhogen model location lat,lon,rating,image_path,type

To use the scaffolds for model manipulation, we’ll add the model controller to the main index:

$ cat app/index.erb


<div>
<h1 id="pageTitle">
Testapp</h1>
</div>
<ul id="home" title="Testapp">
<li><a href="Location">Locations</a></li>
</ul>

We should be

Continue reading