Impromptu Rides

feb 28, 2012 in Technology

wpid-impromptu-2012-02-28-10-13.pngYesterday Cindy and I pushed out the new version of the Day Rides Center web site, now renamed to Impromptu Rides.

This site supports our cycling club’s program for scheduling ad-hoc bike rides. While the club (Rochester Bicycling Club) has a yearly formal schedule of rides, that schedule is put together with a workweek in mind: mostly rides in the weekend and the evening weekday hours once daylight savings starts. But many club members and other local cyclists have time during the week during the day. And so an initiative came about to help coordinate interested riders to suggest, find and join in on rides outside the regular schedule. At first this was an email send-around effort. Then last winter Cindy asked if I could help make a web site to make this easier. My answer: “Sure!”

It was a great excuse to tinker with a few technologies I have wanted to play with and learn but didn’t have a “real world”-enough project to try them out on. These were GWT (Google Web Toolkit) and GAE (Google App Engine). GWT allows one to write the browser portion in Java. GWT compiles the Java source code to Javascript and takes care of the differences between the various browsers. GAE is Google’s cloud computing platform and so that is hosting the backend of the site. GAE is what GWT is to Javascript: I can just write Java without having to worry much, or know much, about server-side computing and Java EE at all.

We launched the first version last March and then during the year added some features, fixed bugs and so on. We used this winter – not many people riding bikes – to redesign the layout, add a bunch new features and I took the opportunity to re-implement a good portion. The latter is the usual software engineering happenstance: I learned a lot about the two technologies during the year and so found better ways to do certain things, the bolting on of new features made some parts a little bloated, and to make doing some of the new things easier it required some rewriting as well.

The backend also gained a new front end client this winter: the Club Rides iOS app now plugs in too to show both the regular ride schedule and the impromptu rides. The ease of doing this shows a benefit of both App Engine and GWT: it’s all just a REST API and so the front end and the back end are nicely decoupled.

This winter I focused on getting feature parity between Impromptu Rides and the Club Rides app. The Club Rides app grabs the RSS feed from the RBC web site to display recent club news. The new version also uses a Google service to grab the weather forecast. This content is also returned as XML. Working with XML, and in general any content over an http connection, is really easy to do in Objective-C. It has always amazed me how hard, comparatively, this is in Java. The built-in parsers are memory hungry and it takes a lot of code to get the content from the http connection and then parse it. For Objective-C there’s a really nice, fast, small open source library to parse XML: TBXML. Delighted I was to discover that Julien Foltz ported it to Java!

Now, all that is needed to ingest the RSS feed is:

                try {
URL url = new URL(http://rbcbike.wordpress.com/feed/);
TBXML doc = new TBXML(url);
if (doc != null) {
TBXMLElement root = doc.rootXMLElement();
TBXMLElement channel = doc.childElement(“channel”, root);
TBXMLElement element = doc.childElement(“item”, channel);
ArrayList> result = new ArrayList>();
while (element != null) {
TBXMLElement temp = doc.childElement(“title”, element);
[…snip…]
result.add(entry);
element = doc.nextSibling(“item”, element);
}
return result;
}
} catch (Exception e) {
this.sendEmailReport(“AdminServiceImpl:getClubNews”, e.toString());
}

The browser’s security framework does not allow the opening of URL connections – GWT doesn’t therefore implement java.net.URL – so the above code runs on the server. The client makes a Java RPC call to the server requesting the feed, the server grabs it, parses it and passes it back as a hashmap array to the browser.

Impromptu Rides tries to determine whether it’s being viewed on a computer, a tablet or a phone. In case of the latter it displays a simpler version of the app: just the Find Rides portion. This involves interpreting the user.agent values that the browser reports. Messy stuff. The Android devices, or rather their manufacturers, could be a little nicer and more forthcoming about what category of device they are. In the end I chose to distinguish between “Safari” and “Mobile Safari” which seems to work to draw the line between computers and tablets on one side and phones (and iPods) on the other. At least for iOS and Android devices. I don’t know how Blackberry or other non-Android devices present themselves. The Impromptu Rides site also knows about the regular RBC schedule and so together with the mobile device support this saves me needing to do an Android version of the Club Rides app.

As you can see from the code snippet the server-side code sends me an email when something is amiss. I quite like that. I can leave the application running by itself without needing to keep an eye. When something unexpected happens it sends me a little email.

When I started playing with GWT last year, I had to smile. When Google first released GWT I was working at Sun. We, JavaSoft, were not amused. This was not Java. What Google did was Wrong and Bad, how dare they! Now, as a software developer I find GWT great. Google directly addressed a developer need and a niche in the available tools at that time: writing in a well-known high-level language, no need to learn Javascript, shielded from (most) browser-specific stuff, zero administration and no plug-ins required.

A quick summary of the new features:

–        Elevation profiles for most, known, routes

–        Weather forecast for the starting location

–        Recent club news

–        When scheduling a ride, include a link to MapMyRide, BikeToaster, etc for Garmin Edge bike computers

–        “Remember me” for ride leaders and admin

–        Adjusted layout for iPhones and Android phones

–        and an About page which explains what Impromptu Rides are actually about!

So, have a play with it and join us on some of our rides!

Rond de Public Market

feb 26, 2012 in Photography

wpid-Tracks2-2012-02-26-11-02.jpgIn de acht jaar dat ik hier woon ben ik nog niet naar de Public Market geweest. De fototrip van gister telt niet. Ik was daar rond het midden van de middag wat was te laat was voor de markt hoewel een paar stalletjes nog open waren.In plaats daarvan was de focus van de trip de gebouwen en de treinrails in die omgeving. Samen met de harde wind, de dwarrelende sneeuw hoopte ik enige foto’s met karakter te kunnen nemen. Of ik daar in slaagde kan je zelf zien in de galerie.

Deze foto’s zijn met Snapseed op m’n iPad ge-edit. Ik begin verliefd te raken op die applicatie! Nik Software heeft nu ook een Mac OS versie uitgebracht.

Om de discussie van de vorige post op te pakken, ik heb een nieuw thuis gevonden om de foto’s tentoon te stellen. Zoals ik toen schreef gaat Apple de MobileME Gallery beëindigen en dus was ik naar een nieuwe plek op zoek. Ik plaats foto’s ook op Flickr hetgeen leuk is voor commentaar enzo maar ik vind de presentatie opties niet mooi en die web pagina’s zijn erg druk. Na enig zoeken kwam ik bij smugmug.com. Dat heeft het zulke presentatie mogelijkheden als MobileME, het integreert met Aperture, het ziet er ook mooi uit op een iPad. En dus is onno.smugmug.com het nieuwe fotografische thuis. Laat me weten wat je er van vindt!

Gisterochtend en vrijdagavond waren ook productief voor een andere hobby: de website voor Day Rides, nu hernoemd als Impromptu Rides: impromptu.onno.com. In twee of drie dagen gaan we live met de nieuwe versie waar ik de laatste paar weken mee bezig ben geweest. En ik heb ook goede progressie gemaakt met de Club Rides app voor het ’12 fietsseizoen. Als alles goed gaat wordt die nog vandaag of anders morgen naar Apple gestuurd.

Club Rides 2011

mrt 08, 2011 in Cycling, Technology

wpid-clubrides-iPad1-2011-03-8-10-18.pngThe new version of my bike ride scheduling iPhone app, Club Rides, is up in the iTunes App Store.

It has native support for both iPhone and iPad. In addition to the new schedule for 2011 there are several other enhancements:
– Faster launch time
– Displays the club’s RSS feed for club news
– Share your favorite rides via email (facebook and twitter to come in an update)
– Send the rides you plan to do directly to your calendar
– Tap the ride leader’s phone number to call

To enable posting your rides to the calendar on your device, tap the Settings icon in the top right corner of the screen and select which calendar you want to use.

On iPhone to show a map with the starting location of the ride, tap the starting location in the ride view.

Club Rides comes preloaded with Rochester Bicycling Club’s schedule. It supports other clubs, like Northern California’s Western Wheelers, as well. And it can support your club by using the customization guide. If you like to make Club Rides applicable to your cycling or hiking club then I would be happy to assist you.

(this post is a little late – couldn’t log in for days – called in my host’s customer support and lunarpages came through with flying colors – thanks guys!)

stretch mark removal products
Спорт-как способ похудеть ссылка сайт кремлёвской диеты женские сайты диеты как быстро похудеть и накочать мускулы как можно быстро похудеть без проблем рисовая диета для похудения как быстро похудеть, рецепты похудения как похудеть быстро без дееты за 14 дней срочно похудеть с помошью салона красоты в казани как быстро похудеть народные рецепты как похудеть быстро и не мучить себя голодом диеты для снижения веса сайт девчат быстро похудеть на 30 килограмм срочно похудеть на 5 кг. за 10 дней алан кар легкий способ похудеть скачать бесплатно как быстро и безвредно похудеть? как похудеть быстро за месяц 10кг спомощю воды диетхудеем быстро без с упражнениями отзывы средства для похудения хочу быстро легко похудеть быстрый способ похудеть aллен кaрр срочно похудеть за три дня три колограмма быстро похудеть без лекарств худеем быстро после родов ка быстро похудеть делая клизмы сайт диета доктора аткинса легкий способ похудеть от алена карра диета для похудения из куриного мяса танец живота как способ похудеть индивидуальная диета тест худоба ру легкий способ похудеть