<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>klauskomenda.com</title>
	<atom:link href="http://www.klauskomenda.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klauskomenda.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 14 Dec 2011 23:58:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Boost the performance of your mobile web app using YUI Compressor</title>
		<link>http://www.klauskomenda.com/archives/2011/12/14/boost-the-performance-of-your-mobile-web-app-using-yui-compressor/</link>
		<comments>http://www.klauskomenda.com/archives/2011/12/14/boost-the-performance-of-your-mobile-web-app-using-yui-compressor/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 23:58:03 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1069</guid>
		<description><![CDATA[This article describes how to reduce HTTP requests by integrating YUI Compressor into Xcode build settings.]]></description>
			<content:encoded><![CDATA[<p>From well established <a href="http://developer.yahoo.com/performance/rules.html">web performance guidelines</a>, we learned a few years ago that it has certain enhancing effects to the performance of a website if the number of <a href="http://en.wikipedia.org/wiki/Http"><abbr title="Hypertext Transfer Protocol">HTTP</abbr></a> requests made to external assets is reduced and their content is stripped of any unnecessary characters or content. This is commonly referred to as concatenation and minification of, in our case, JavaScript and CSS files. Knowing that byte size and HTTP requests matter even more on mobile devices, the following article attempts to explain how to achieve such performance boost using <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a> in an Xcode project. </p>
<p>While working on version 2 of <a href="/apps/bikenav/">BikeNav</a>, I attempted to make some improvements not only to the app itself, but also to my development and build environment. Streamlining the process of minification was one of the goals I had in mind. The following step-by-step guide illustrates how I integrated YUI Compressor into the BikeNav Xcode project, which in itself is a <a href="http://phonegap.com/">PhoneGap</a> project. Nevertheless, this can be applied to any mobile web application that stores assets (HTML, CSS and JavaScript) on the device itself.</p>
<h2>Step 1: Download YUI Compressor</h2>
<p>Obviously we need to <a href="http://yuilibrary.com/download/yuicompressor/">download</a> YUI Compressor first. After downloading and extracting the ZIP file, we end up with a folder <span class="code">yuicompressor-[version-number]</span>. I decided to copy that folder into my iOS project folder into a directory <span class="code">tools</span>, that I had created earlier. The final path to the YUI Compressor folder would be:</p>
<pre><code>/Users/komenda/Documents/PhoneGapApps/BikeNav2/tools/yuicompressor-2.4.2</code></pre>
<h2>Step 2: Create a Shell Script File</h2>
<p>Since YUI Compressor only handles minification for us, we need to make sure that our JavaScript and CSS files are concatenated into one file each before fed to the Compressor. Also, in order to include this step into the iOS build process, we need to point the build settings to some file it can execute. I decided to create another folder in my iOS project directory called <span class="code">scripts</span> in which I created a shell script called <span class="code">bikenav_build.sh</span> which will hold the shell commands to concat the files first and then call YUI Compressor to minify them.</p>
<pre><code>$ pwd
/Users/komenda/Documents/PhoneGapApps/BikeNav2/scripts
$ ls -l
total 8
-rwxrwxrwx@ 1 komenda  _lpoperator  1098 Nov  8 15:51 bikenav_build.sh</code></pre>
<h2>Step 3: The Build Script</h2>
<h3>rsync</h3>
<p>In order to be able to do development in the browser before pushing anything on to the iOS Simulator or the device, I had set up my dev environment in such a way that I am serving all the BikeNav code from within my local Apache DocumentRoot (since there is no server-side processing involved, Apache is not even necessary, but because I store all my other projects in there as well, it keeps things nice and tidy). The path and folder structure looks like this:</p>
<pre><code>$ pwd
/Users/komenda/Webroot/BikeNav
$ ls -l
total 264
drwxr-xr-x  18 komenda  _lpoperator     612 Nov  8 16:35 audio
drwxr-xr-x   5 komenda  _lpoperator     170 Oct 24 17:11 css
drwxr-xr-x  27 komenda  _lpoperator     918 Oct 29 16:46 img
-rw-r--r--   1 komenda  _lpoperator   12497 Nov  8 17:48 index.html
drwxr-xr-x  13 komenda  _lpoperator     442 Nov  8 15:49 js
-rw-r--r--   1 komenda  _lpoperator  116575 Aug 17 17:33 phonegap-1.0.0.js</code></pre>
<p>Once I reach a certain point during development where I feel it is time to try things out on simulator or device, I sync this directory with the <span class="code">www</span> directory inside the iOS/PhoneGap project. A great tool to do this is rsync, which already comes with Mac OSX. The following command is how I run rsync when working on BikeNav (from inside the <span class="code">scripts</span> directory in the iOS project). For details on rsync command line options please refer to the <a href="http://www.samba.org/ftp/rsync/rsync.html">documentation</a>.</p>
<pre><code>rsync -avz --exclude 'index.html' --delete ~/Webroot/BikeNav/ ../www/</code></pre>
<p>This is also the first thing I put into the <span class="code">bikenav_build.sh</span> script:</p>
<pre><code>#!/bin/bash

echo "Custom BikeNav build script"
echo "==========================="

echo "Step 1: rsync files from web directory"

rsync -avz --exclude 'index.html' --delete ~/Webroot/BikeNav/ ../www/</code></pre>
<h3>Concatenation</h3>
<p>As mentioned above, we need to concatenate our JavaScript and CSS files into one single file each before passing it on to the YUI Compressor for minification. For this, we simply use the Unix <span class="code">cat</span> command like so:</p>
<pre><code>cat ../www/js/one.js ../www/js/two.js ../www/js/three.js &gt; ../www/js/combined.js
cat ../www/css/one.css ../www/css/two.css &gt; ../www/css/combined.css</code></pre>
<p>These two commands create two new files, <span class="code">combined.js</span> and <span class="code">combined.css</span>, each holding the contents of the JavaScript and CSS files, respectively. With that, we are now ready to give the YUI Compressor something to&#8230;well&#8230;compress.</p>
<h3>Minification</h3>
<p>Now we can send YUI Compressor to work to give us a nicely minified JavaScript and CSS files:</p>
<pre><code>java -jar ../tools/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar -o ../www/js/bikenav.min.js ../www/js/combined.js
java -jar ../tools/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar -o ../www/css/bikenav.min.css ../www/css/combined.css</code></pre>
<p>This will create <span class="code">bikenav.min.js</span> and <span class="code">bikenav.min.css</span> in their respective directories, based on the concatenated files created in the previous step. With some additional output and commenting as well as deleting the concatenated files after minification (since we don&#8217;t need them any more after that) the final <span class="code">bikenav_build.sh</span> script looks like this:</p>
<pre><code>#!/bin/bash

echo "Custom BikeNav build script"
echo "==========================="

echo "Step 1: rsync files from web directory"

rsync -avz --exclude 'index.html' --delete ~/Webroot/BikeNav/ ../www/

echo "Step 2: minify JavaScript and CSS files"

echo "=== JavaScript ==="
echo "concatinating files"

cat ../www/js/one.js ../www/js/two.js ../www/js/three.js &gt; ../www/js/combined.js

echo "minifying files"

java -jar ../tools/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar -o ../www/js/bikenav.min.js ../www/js/combined.js

echo "removing combined.js"

rm ../www/js/combined.js

echo "=== CSS ==="
echo "concatinating files"
cat ../www/css/one.css ../www/css/two.css &gt; ../www/css/combined.css

echo "minifying files"

java -jar ../tools/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar -o ../www/css/bikenav.min.css ../www/css/combined.css

echo "removing combined.css"

rm ../www/css/combined.css</code></pre>
<h2>Step 4: Integration into iOS Build Settings</h2>
<p>Now that we got our build script ready, we need to integrate it into the build process of our project in Xcode. The following instructions are based on the Xcode 4 user interface. </p>
<ol>
<li>After opening the project, make sure that the &#8220;Project Navigator&#8221; view is selected</li>
<li>Select the top level project, in my case it would be BikeNav</li>
<li>In the project editor window, select the target, BikeNav in my case</li>
<li>Select &#8220;Build Phases&#8221;</li>
<li>In the lower right corner, select the + sign labeled &#8220;Add Build Phase&#8221; and select &#8220;Add Run Script&#8221;</li>
</ol>
<p>After going through these steps, a new bar in the sequence of Build Phases will show up labeled &#8220;Run Script&#8221;. Because we want to run our build script before any data is copied onto the simulator or device, we need to move it up in the sequence (I put it right after &#8220;Target Dependencies&#8221;). Now we only need to specify the path to the build script and how to run it. Therefor, in the text area inside that &#8220;Run Script&#8221; phase, I put the following:</p>
<pre><code>cd /Users/komenda/Documents/PhoneGapApps/BikeNav2/scripts
./bikenav_build.sh</code></pre>
<p>For better illustration, have a look at this <a class="lightbox" title="Custom Build Script integration" href="http://www.klauskomenda.com/wp-content/uploads/2011/12/xcode_800.png">screenshot</a>, showing how that &#8220;Build Phase&#8221; section should look like after you added our build script.</p>
<h2>Step 5: Testing</h2>
<p>To test whether everything works correctly, build and run your project either on the iOS Simulator or an actual device. To verify that the script is being run, select the &#8220;Log Navigator&#8221; in the Xcode UI and then &#8220;Build [Projectname]&#8221; in the left sidebar. In the &#8220;Build target [projectname]&#8221; section in the log output you should see an entry &#8220;Run custom shell script &#8216;Run Script&#8217;&#8221;, which should show the familiar commenting messages we put in the shell script.</p>
<p>As a sidenote, of course in order to use the minified files, these need to be properly referenced in the <span class="code">index.html</span> of your project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/12/14/boost-the-performance-of-your-mobile-web-app-using-yui-compressor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cycling through Death Valley, powered by REI</title>
		<link>http://www.klauskomenda.com/archives/2011/12/06/cycling-through-death-valley-powered-by-rei/</link>
		<comments>http://www.klauskomenda.com/archives/2011/12/06/cycling-through-death-valley-powered-by-rei/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 01:45:54 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1143</guid>
		<description><![CDATA[Experiencing Death Valley with a group of 11 other fellow cyclists and supported by REI.]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Death_valley">Death Valley</a> has intrigued me ever since I got to California and has since been on my list of places to visit. I even went as far as buying <a href="http://www.amazon.com/Hiking-Death-Valley-Natural-Wonders/dp/0965917800/ref=sr_1_1?ie=UTF8&#038;qid=1323216069&#038;sr=8-1">a book on hiking Death Valley</a>. <a href="http://rei.com">REI</a>, however, came up with the perfect solution for me: a <a href="http://www.rei.com/adventures/trips/weekend/dvc.html">3 day cycling adventure</a> and a chance to visit the driest and lowest locations in North America. Sounded like fun.</p>
<p>The adventure began with an orientation meeting of the participants with our two guides, Maryanne and Nick, at the <a href="http://maps.google.com/maps/place?cid=240902820017301271&#038;q=REI,+Henderson,+NV&#038;hl=en&#038;ie=UTF8&#038;ll=36.034143,-115.119767&#038;spn=0.000035,0.000043&#038;t=m&#038;z=15&#038;vpsrc=0">REI store in Henderson, NV</a>, about 15 minutes away from the Las Vegas strip by car. While we got to know each other, the guides gave us a run-down of the next 3 days, what to expect and go over the logistics.</p>
<p>One word about the weather: Death Valley is usually associated with sauna-like temperatures and one would not necessarily think that booking a cycling trip to go there is necessarily a pleasant way to spend your free time. While this might be true of the summer months, winter usually presents itself with more moderate temperatures with highs in the mid 70s and lows around freezing at night. This time, it turned out to be a little cooler and a little windier than usual, which luckily in the end did not turn out to be much of a problem. A much colder front had already passed through the area a day before we headed out to start our adventure Friday morning.</p>
<h2>Day 1: Drive to Scotty&#8217;s Castle, ride to Stovepipe Wells</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6469032957/in/photostream/"><img src="http://farm8.staticflickr.com/7034/6469032957_be1b8b769b.jpg" style="width:293px" class="img-left"></a>The whole group (11 participants, 2 guides) met in Henderson at 7am on Friday and we hit the road in the REI van, with our bikes on top (I opted for renting a <a href="http://www.giant-bicycles.com/en-us/bikes/model/defy.2/7307/44048/">Giant Defy 2</a> from REI for $150 for the trip) and our luggage in the trailer in the back. We headed Northwest, past Vegas and <a href="http://en.wikipedia.org/wiki/Mount_Charleston,_Nevada">Mt Charleston</a> towards the Northeast entrance of Death Valley, with stops in <a href="http://en.wikipedia.org/wiki/Indian_Springs,_Nevada">Indian Springs</a> and <a href="http://en.wikipedia.org/wiki/Beatty,_Nevada">Beatty</a>. After about 3 hours, we made it to, <a href="http://en.wikipedia.org/wiki/Scotty%27s_Castle">Scotty&#8217;s Castle</a>, our (driving) destination for the day. While Maryanne and Nick prepared our bikes and lunch, we took a tour of the castle. It was ok, although I felt that most people were anxious to finally get on their bikes and ride. </p>
<p>Lunch was quick and once everyone got changed into their bike gear and transformed into &#8220;Weekend-Lance-Armstrong-Wannabies&#8221;, we were ready to go. <a href="http://connect.garmin.com/activity/132942632">This first ride</a> took us over 44 miles of Death Valley vastness and coming here for the first time, it certainly was a great opportunity to take in the scenery with the valley spreading out to the left and right of the road until the plain makes way to the mountain ranges. The ride was mainly downhill with an elevation loss of close to 3,500 feet, with just a few minor uphills in between. With the wind also working in our favor, the ride turned out to be a nice cruise to <a href="http://en.wikipedia.org/wiki/Stovepipe_Wells,_California">Stovepipe Wells</a>, where we checked into <a href="http://www.escapetodeathvalley.com/hotel">Stovepipe Wells Village Hotel</a>, our quarters for the next 2 nights. After dinner at the local <a href="http://www.escapetodeathvalley.com/restaurant">Toll Road Restaurant</a>, everyone was pretty much ready to hit the pillow and get a good night sleep before day 2 of our adventure.</p>
<h2>Day 2: Furnace Creek to Badwater Basin</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6469056197/in/set-72157628312729535"><img src="http://farm8.staticflickr.com/7156/6469056197_5d6c20506b.jpg" style="width:293px" class="img-right"></a>We started the day by meeting over breakfast at 7am and then driving to <a href="http://en.wikipedia.org/wiki/Furnace_Creek,_California">Furnace Creek</a> about 30 minutes away, which was our starting point for ride #2. Even though it was less mileage than ride #1, it turned out to be a little bit harder, due to doing a loop through <a href="http://en.wikipedia.org/wiki/Places_of_interest_in_the_Death_Valley_area#Artist.27s_Drive_and_Palette">Artist&#8217;s drive</a> and up to the viewpoint at Artist&#8217;s palette. The rest of the way to <a href="http://en.wikipedia.org/wiki/Badwater_Basin">Badwater Basin</a>, however, was a blast and supported by tailwind, I reached a max speed of 40 mph on one of the straight downhill sections. Arriving at Badwater was beautiful, with clear skies and the massive salt flat spread out in front with the mountain range holding Dante&#8217;s View (which we were supposed to go up the following day) in our backs. As soon as everyone had made it to the Basin, we ventured out into the salt flat, took pictures and relaxed from the 30 mile ride, followed by lunch overlooking the Basin. </p>
<p>Using our trusty support van, we then made our way back to Stovepipe Wells, however stopping at the <a href="http://en.wikipedia.org/wiki/Places_of_interest_in_the_Death_Valley_area#Mesquite_Flat_Sand_Dunes">Mesquite Flat Sand Dunes</a> to play in the sand and have some fun. The wind picked up a bit, so it was not as pleasant as we initially hoped so we could maybe stay until dusk, but we still managed to get a few runs in with the sandboards our guides had brought with them. </p>
<p>Back at the hotel a much needed shower back at our hotel followed by dinner and a drink at the <a href="http://www.escapetodeathvalley.com/badwater-saloon">Badwater Saloon</a> concluded day 2 of the trip. Everyone seemed to be a bit sore after 2 days of cycling, however Maryanne and Nick saved the biggest challenge for the last day.</p>
<h2>Day 3: Dante&#8217;s View</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6469061277/in/set-72157628312729535"><img src="http://farm8.staticflickr.com/7155/6469061277_7c8199f7b0.jpg" style="width:293px" class="img-left"></a>Sunday morning, we got up to an early start, checked out and said goodbye to the Stovepipe Wells Village Hotel and headed back to Furnace Creek for breakfast. The weather forecast wasn&#8217;t lying when it had predicted chilling temperatures in the 40s in the morning, however the skies were clear and the sun shining brightly. Not many reasons to complain. We then drove to the junction of Hwy 190 and Furnace Creek Wash Rd, via <a href="http://en.wikipedia.org/wiki/Zabriskie_Point">Zabriskie Point</a>, where Maryanne dropped me and Stefan, a fellow rider, off so we could conquer <a href="http://en.wikipedia.org/wiki/Dante%27s_View">Dante&#8217;s View</a>, a 13 mile stretch with an elevation gain of 3,400 feet. The rest of the group got dropped off at mile 7, so they did not have to do the full length of the way up. Up to their drop off point, the ride was actually pretty mellow with a steady grade of around 4%. After that, however, the incline increased up until mile 12 and for the last 0.7 miles (switchbacks) went up to an intimidating 23%. With a lot of cursing and sweating, I finally reached Dante&#8217;s View at 5,475 feet and was greeted with incredible views of Death Valley, Badwater Basin below, snow-covered mountaintops in the East and even <a href="http://en.wikipedia.org/wiki/Mount_Whitney">Mt Whitney</a> in the distance. Absolutely gorgeous. Certainly the highlight for me on this trip. A speedy descent down the mountain brought us back to where we started and at a close by rest stop area we had lunch before we made our way back to Henderson via <a href="http://en.wikipedia.org/wiki/Pahrump,_Nevada">Pahrump</a>.</p>
<h2>Thoughts on the Trip</h2>
<p>When I had initially booked the trip, I was not really sure what to expect apart from the info that one can get from the REI website about the itinerary and the daily mileage. And, of course, the fact that you are going to Death Valley. My experience with REI had always been great each time I walked into one of their stores and the fact that the trip was not exactly cheap, I figured REI will live up to its reputation and deliver. And they did. Very much so. </p>
<p>Maryanne and Nick were fun, energetic, organized, supportive and just great to be around and hang out with. It certainly showed their experience of having done 30+ trips that year alone. The average age of the participants was way above mine, but we all got along pretty well and had fun together while sharing this experience. The rides felt more catered towards leisurely riders as well, however, as one of my fellow participants pointed out, &#8220;You can make any ride hard. Just pedal faster.&#8221; So from my perspective all 3 rides provided the opportunity for decent workouts, certainly the last one up Dante&#8217;s View, and since everyone was allowed to go at their own pace, everyone was able to get out of it whatever he or she wanted to. </p>
<p>To conclude, this trip met and in parts exceeded my expectations, I had a lot of fun and would certainly recommend this trip to others who would like to experience Death Valley not from an air conditioned car but from their bike saddle.</p>
<h2>Resources</h2>
<ul>
<li><a href="http://connect.garmin.com/activity/132942632">Ride 1: Scotty&#8217;s Castle to Stovepipe Wells</a></li>
<li><a href="http://connect.garmin.com/activity/132942623">Ride 2: Furnace Creek to Badwater Basin</a></li>
<li><a href="http://connect.garmin.com/activity/132942621">Ride 3: Dante&#8217;s View</a></li>
<li><a href="http://www.rei.com/adventures/trips/weekend/dvc.html">Death Valley Cycling (trip details on REI website)</a></li>
<li><a href="http://www.flickr.com/photos/commander_klaus/tags/reideathvalleycyclingdec11/">Trip photos on Flickr</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/12/06/cycling-through-death-valley-powered-by-rei/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bike ride up (and down) a volcano</title>
		<link>http://www.klauskomenda.com/archives/2011/12/06/bike-ride-up-and-down-a-volcano/</link>
		<comments>http://www.klauskomenda.com/archives/2011/12/06/bike-ride-up-and-down-a-volcano/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 21:08:19 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1121</guid>
		<description><![CDATA[Ever thought about riding up a volcano on your bicycle?]]></description>
			<content:encoded><![CDATA[<p>A bicycle. One of the most beautiful spots on earth. 35 miles. 10,000 feet of climbing. Feelings of pain and exhaustion waiting to happen. If this is your idea of a great vacation then keep on reading.</p>
<p>Ever since picking up road biking a few months ago, I fantasized about doing a multi-day bike tour in the not so distant future. <a href="http://www.adventurecycling.org/">Adventure Cycling</a> and <a href="http://www.rei.com/adventures/activity/cycle.html">REI</a> (among others) offer a variety of tours with different difficulty levels, lengths and, of course, locations. In order to get in the mood (and training state) for such a trip, I felt it would be good to get a few longer and intense rides under my belt. The combination of great air fares and the fact that I found out that one can actually ride up <a href="http://en.wikipedia.org/wiki/Haleakal%C4%81">Haleakalā</a> on <a href="http://en.wikipedia.org/wiki/Maui">Maui</a>, led me into booking a trip to the second-largest of the <a href="http://en.wikipedia.org/wiki/Hawaiian_Islands">Hawaiian Islands</a> for mid November. And so I found myself on a beach in <a href="http://en.wikipedia.org/wiki/Paia,_Hawaii">Pāʻia</a> in the early morning hours of November 15, in full cycling gear and my <a href="http://www.specialized.com/">Specialized</a> rental bike leaned against a tree nearby&mdash;it was time to rock n&#8217; roll.</p>
<p>The following is a description of my own experiences while riding up the volcano, however if you are looking for an even more detailed trip report, I encourage you to visit <a href="http://www.chainreaction.com/haleakala.htm">Mike Jacoubowsky&#8217;s definitive guide for riding up Haleakalā</a>.</p>
<h2>Starting Out</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6467663695/in/set-72157628309477997"><img src="http://farm8.staticflickr.com/7025/6467663695_1639b412de.jpg" style="width:293px" class="img-left"></a>The adventure started with tipping my toe into the water of the Pacific Ocean, a nice symbolic ritual and it underlines that this ride starts at 0 elevation. After a few pedal strokes, I left the small town of Pāʻia, the official start of the ride. For quite a while, the sides of the road are lined by farmland on one side and little housing and small businesses on the other. But with every minute, the area gets less and less populated. Due to the amount of rainfall this part of the island gets, there is green all around. </p>
<p>After riding for about 6.5 miles and climbing roughly 1,500 feet, I reached the town of <a href="http://en.wikipedia.org/wiki/Makawao">Makawao</a>, more than double the size of Pāʻia, with quite some shops and lunch places along Baldwin Ave. After the intersection with Makawao Road, Baldwin Avenue becomes Olinda Road which greeted me right away with a steep 13% climb of around 300 feet in length (which is probably the steepest section of the whole climb, so be relieved to get that out of the way at the beginning). </p>
<p>At the 8 mile marker, I made a right turn onto Hanamu Road, avoiding to continue riding on I-390 and eventually reaching a dead end. So not missing that turn is quite imperative. From Hanamu Road I connected to I-377 (or Haleakala Hwy) via the short Kealaloa Ave. For the next 4 miles, I admired the lush of green to both sides of the road and great views of West Maui, while I was climbing and climbing and climbing&hellip;. Conquering that stretch, the area showed signs of civilization again when I reached settlements that are part of the <a href="http://en.wikipedia.org/wiki/Kula,_Hawaii">Kula</a> region. The sign for <a href="http://www.nps.gov/hale/index.htm">Haleakala National Park</a>, which I have been waiting for finally manifested at mile marker 14 and about 3,400 feet of elevation, directing me onto Crater Road and further up the mountain.</p>
<h2>Crater Road</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6467664399/in/set-72157628309477997/"><img src="http://farm8.staticflickr.com/7150/6467664399_5645170d7f.jpg" style="width:293px" class="img-right"></a>The next 7 miles were what seemed like a never-ending string of switchbacks, first meandering around nice residential areas but only after 2 miles presented me with wide open space. During that 7 mile section, you are climbing up about 2,300 feet and reaching 5,700 feet after a total of around 21 miles. I reached that point after roughly 3 hours (to put that in perspective, the <a href="http://www.cycletothesun.com/index.php?page=results2011">fastest rider</a> in the 2011 <a href="http://cycletothesun.net/">Cycle to the Sun bike race</a> was already enjoying the views from up top for 11 minutes at that time). </p>
<p>A pretty much straight climb to 6,500 feet over about 3.3 miles brought me to a right bend with lots of forest and vegetation before reaching another milestone: The Haleakala National Park entrance (where I paid my $5 entrance fee) at 6,700 feet and a total of just over 24 miles. 11 miles and 3,300 feet of climbing to go. You have either the option to fill up your water bottles at the entrance (water hose at the back of the building) or at the Haleakala National Park Headquarters Visitor Center (restrooms with water fountains on the left side of the building), which is about 1 mile up the road from the park entrance.</p>
<h2>Above the Clouds</h2>
<p>From here on out, there were 8 more turns (stretched switchbacks) between me and the final stretch to the top. The vegetation grew more and more sparse with every feet of elevation and the views more and more gorgeous (above the line of clouds at this point) as I climbed further towards the summit. 7.7 miles of gruel climbing up to 9,200 feet, with rest stops about every 500 feet finally brought me to that last stretch where you feel real close to the top (the operative word is &#8220;feel&#8221;). </p>
<p><a href="http://www.flickr.com/photos/commander_klaus/6467668233/in/set-72157628309477997/"><img src="http://farm8.staticflickr.com/7025/6467668233_69d8abf6d8.jpg" style="width:293px" class="img-left"></a>At 9,800 feet your mind might trick you into thinking you are already there (with the parking lot of the Haleakala National Park Visitor Center to the left), but no, there is still a significant stretch to go. Actually it is only about 0.7 miles and a bit over 200 feet of climbing, but having been on the bike for 6 hours and 15 minutes, this felt like a real real hard challenge. Eventually, after a total of 6 hours and 24 minutes, I reached the summit at 10,023 feet, 35 miles away from the beach in Pāʻia where I had started this epic ride.</p>
<p>For about an hour I took in the scenery and surfed the waves of emotions of my accomplishment, it was then time for the equally thrilling downhill ride (for which the regular tourist type <a href="http://www.bikemaui.com/">has to pay for</a>). Luckily it was not terribly cold at the summit (mid 60s), but nevertheless I put on my <a href="http://www.pearlizumi.com/publish/content/pi_2010/us/en/index/products/men/ride/accessories/5.-productCode-9331.html">arm</a> and <a href="http://www.pearlizumi.com/publish/content/pi_2010/us/en/index/products/men/ride/accessories/5.-productCode-14371006.html">leg warmers</a> as well as my <a href="http://www.pearlizumi.com/publish/content/pi_2010/us/en/index/products/men/ride/apparel/6.-productCode-11131102.html#428">wind breaker</a> and long finger gloves and cruised down. The downhill took me about 90 minutes.</p>
<h2>Thoughts on the ride</h2>
<p>The ride was one of the most strenuous things I have ever attempted and is pretty comparable to <a href="http://www.flickr.com/photos/commander_klaus/sets/72157624837823470/">hiking up Mount Whitney</a>. Especially after 6,000 feet, the elevation starts to get to you and combined with the fact that you started out from 0 and had covered 20 miles of constant climbing already really affects your performance. At the beginning I had teamed up with another fellow rider, John from Vancouver, B.C., whom I had met in the <a href="http://maps.google.com/?ll=20.91501,-156.382584&#038;spn=0.002007,0.004128&#038;t=h&#038;z=19&#038;vpsrc=6">public parking lot in Pāʻia</a>. Having done a couple of triathlons and Ironmans, I was not really a match for his speed, so we split up after about 1 hour of riding to keep going at my own pace, which was definitely important.</p>
<p>The traffic was surprisingly heavy at the beginning of the ride in the Pāʻia and Makawao area, died down a bit and picked up again fueled by tourists driving up the volcano. In general I found it to be fine, unfortunately with the occasional driver coming a little too close, but luckily it worked out without incident. </p>
<p>As Mike points out in his guide, it is pretty important to pick a nice day for the ride. I had kept a close eye on the forecast when heading to Maui and the day right after I got there turned out to be the best one with sunshine and clear skies pretty much all the way. You certainly want to try to avoid a day with rain or fog. </p>
<p>In terms of food and drinks, I brought multiple energy bars and gels with me, as well as <a href="http://www.gatorade.com/default.aspx#product?s=g2-powder">Gatorade powder sticks</a>, which make it real easy to turn regular water into an electrolyte-rich sports drink. There are certainly ways to stock up on food along the way (in Pāʻia or Makawao, as well as the <a href="http://www.yelp.com/biz/sunrise-country-market-and-protea-farm-kula">Sunrise Country Market</a> on Crater Rd), but the only time I filled up my 2 25oz <a href="http://www.camelbak.com/Sports-Recreation/Bottles/Podium-Big-Chill-25oz.aspx">Camelbak Podium Big Chill bottles</a> was at the Park Headquarters Visitor Center. </p>
<h2>Bike Rental</h2>
<p>Instead of bringing my own bike, I ended up renting a Specialized Secteur Comp from <a href="http://www.islandbikermaui.com/rentals.asp">Island Biker Maui</a>, which came to a total of $200 for the whole week (which would have included a bike rack, that I did not end up needing since <a href="http://alamo.com/">Alamo</a> upgraded me to a minivan). It included a pump, a island biker maui branded water bottle, 2 bottle cages, flat repair tools, a spare tube and a Specialized helmet.</p>
<p>I ended up going with them since I ride a Specialized at home and they turned out to be the cheapest option for a weekly rental. When I did my research, I also found these other options which may or may not suit you better (prices are per December 2011):</p>
<ul>
<li><a href="http://www.gocyclingmaui.com/road-rentals.html">Maui Cyclery</a> (99 Hana Hwy, Paia, HI 96779): Scott Speedster S20 ($45/day, $220/week)</li>
<li><a href="http://www.westmauicycles.com/Maui-bicycle-rental-shop/">West Maui Cycles</a> (1087 Limahana Pl, #6, Lahaina, HI 96761): Specialized Performance Road Bike (1 day: $60, 3-6 days: $50/day, $220/week), Auto Bicycle Carrier (1 day: $5, 3-6 days: $3/Day, $15/week)</li>
<li><a href="http://www.mauiroadbikerentals.com/index.php/mauibiking/road-bikes.html">Maui Road Bike Rentals by Boss Frog&#8217;s</a> (locations in Kihei and Lahaina): Fuji Aero 3.0 SST ($50/day, $200/week), bike rack ($15/week)</li>
</ul>
<h2>Resources</h2>
<ul>
<li><a href="http://connect.garmin.com/activity/129194733">Ride data on Garmin Connect</a></li>
<li><a href="http://www.flickr.com/photos/commander_klaus/tags/haleakalabikeride/">Ride photos on Flickr</a></li>
<li><a href="http://www.chainreaction.com/haleakala.htm">Mike Jacoubowsky&#8217;s definitive guide for riding up Haleakalā</a></li>
<li><a href="http://velohacker.com/cycling-notes/jeremy-vs-the-volcano-haleakala/">Jeremy vs the Volcano</a></li>
<li>Another great ride while on Maui: <a href="http://connect.garmin.com/activity/129500470">West Maui Loop</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/12/06/bike-ride-up-and-down-a-volcano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text to speech functionality in web applications using the iSpeech API</title>
		<link>http://www.klauskomenda.com/archives/2011/11/11/text-to-speech-functionality-in-web-applications-using-the-ispeech-api/</link>
		<comments>http://www.klauskomenda.com/archives/2011/11/11/text-to-speech-functionality-in-web-applications-using-the-ispeech-api/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 23:02:40 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[ispeech]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[text-to-speech]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1067</guid>
		<description><![CDATA[Speech-enable your web applications using the iSpeech REST API. ]]></description>
			<content:encoded><![CDATA[<p>&#8220;Turn right onto Main Street&#8221;. If you are using a car navigation system like <a href="http://www.garmin.com/us/products/ontheroad">Garmin</a> or <a href="http://www.tomtom.com/">TomTom</a>, you will be all too familiar with phrases like this, spoken to you by the device mounted to your dashboard, magically guiding you through the maze of local roads and highways to your destination. Such <a href="http://en.wikipedia.org/wiki/Text_to_speech">text-to-speech</a> capabilities are usually associated with native software implementations, not so much with web applications. With the <a href="http://www.ispeech.org/developers">iSpeech API</a>, that changes. You can now build web applications that implement text-to-speech functionality with the power of JavaScript and HTML5.</p>
<p>The <a href="http://www.ispeech.org/text.to.speech.demo.php">iSpeech demo page</a> gives you an idea of the power of the API by providing a regular text input and being able to turn any text into spoken words. Let&#8217;s have a closer look now as to what is required to make this work in a web application.</p>
<h2>Step 1: Sign up for a Developer Account and set up an API key</h2>
<p><a href="http://www.ispeech.org/developer/signup/stage1">Signing up for a developer account</a> is a requirement in order to use the API. After creating your account and logging in, you can <a href="http://www.ispeech.org/developer/createkey">create a new API key</a>. Fill in the form and select &#8220;Desktop, Web, Other&#8221; as the application type in order to be able to use iSpeech&#8217;s REST API.</p>
<h2>Step 2: Trying out the API</h2>
<p>After creating an API key, you should find it in <a href="http://www.ispeech.org/developer/readallkeys">your list of available API keys</a>. Clicking on &#8220;Settings&#8221; leads you to a form where you can set certain parameters for the text-to-speech functionality, like file formats, bit rates and frequency as well as add some more information about the app that uses the key. For this step, we just want to try out the API and get some text converted into speech, so the first thing we need to do is familiarize ourselves with how the API request is constructed. iSpeech provides <a href="http://www.ispeech.org/api">good documentation</a> on that and gives us the general layout of the request:</p>
<pre><code>http://api.ispeech.org/api/rest?apikey=YOURAPIKEYHERE&amp;action=convert&amp;text=This+is+the+text+I+want+to+convert</code></pre>
<p>Now we only need to replace YOURAPIKEYHERE with the API key we created in Step 1 and copy that request URL to the address bar of our browser or create an <a href="http://html5doctor.com/native-audio-in-the-browser/">HTML5 audio element</a> like the one below to embed in our HTML document.</p>
<p><audio controls preload="auto" autobuffer><source src="http://api.ispeech.org/api/rest?apikey=developerdemokeydeveloperdemokey&#038;action=convert&#038;text=This+is+the+text+I+want+to+convert" /><source src="http://api.ispeech.org/api/rest?apikey=developerdemokeydeveloperdemokey&#038;action=convert&#038;text=This+is+the+text+I+want+to+convert&#038;format=ogg" /><source src="http://api.ispeech.org/api/rest?apikey=developerdemokeydeveloperdemokey&#038;action=convert&#038;text=This+is+the+text+I+want+to+convert&#038;format=wav" /></audio></p>
<h2>Step 3: Tweaking the Request Parameters</h2>
<p>The attentive reader might have noticed, from looking at the source code of the audio element in step 2, that we need to provide several fallback versions in addition to the MP3 format that the iSpeech API generates by default. This is necessary to satisfy the different codec requirements by modern browsers. To achieve this, the iSpeech API has a <span class="code">format</span> parameter, that lets us specify the format in which we would like the audio piece to be returned to us. A complete list of supported formats can be found in the <a href="http://www.ispeech.org/api">iSpeech API documentation</a>. </p>
<p>If we want to use the <a href="http://en.wikipedia.org/wiki/Ogg_vorbis">Ogg Vorbis</a> format, we can specify this like this:</p>
<pre><code>http://api.ispeech.org/api/rest?apikey=YOURAPIKEYHERE&amp;action=convert&amp;text=This+is+the+text+I+want+to+convert&amp;format=ogg</code></pre>
<p>We can also specify a different voice using the &#8220;voice&#8221; parameter:</p>
<pre><code>http://api.ispeech.org/api/rest?apikey=YOURAPIKEYHERE&amp;action=convert&amp;text=This+is+the+text+I+want+to+convert&amp;format=ogg&amp;voice=auenglishfemale</code></pre>
<p>It is also possible to slow down the voice by providing a &#8220;speed&#8221; parameter with values between -10 (very slow) and 10 (very fast). However I noticed that not all voices provided by iSpeech support this parameter.</p>
<pre><code>http://api.ispeech.org/api/rest?apikey=YOURAPIKEYHERE&amp;action=convert&amp;text=This+is+the+text+I+want+to+convert&amp;format=ogg&amp;speed=-5</code></pre>
<h2>Sounds great (literally), but&hellip;</h2>
<p>By this point it is probably obvious that being able to use this text-to-speech API from within HTML documents using regular web technologies is pretty powerful. However, there is a catch to it in the name of costs. The web API key that we created is free for the first 500 words being transformed to audio by the API (you can check your key&#8217;s total word balance on the settings page of the key). If you exceed that limit, you have to pay, $50 for 1000 word credits to be exact, which essentially means that you can only feasibly use this API in some sort of premium app setting where your revenue generated can cover for these costs. While I would love this technology to be free, I can understand that it is not, considering the amount of work that goes into developing such piece of software. </p>
<p>The upside is, however, that iSpeech in addition to the REST API also offers SDKs for pretty much all popular mobile platforms, such as the <a href="http://www.ispeech.org/developers/iphone">iPhone</a>, and API keys generated for these do not have any word quota imposed on them. Maybe another good reason to start learning Objective-C.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/11/11/text-to-speech-functionality-in-web-applications-using-the-ispeech-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search along a route with CloudMade&#8217;s Local Search API</title>
		<link>http://www.klauskomenda.com/archives/2011/11/06/search-along-a-route-with-cloudmades-local-search-api/</link>
		<comments>http://www.klauskomenda.com/archives/2011/11/06/search-along-a-route-with-cloudmades-local-search-api/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 05:09:49 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[bikenav]]></category>
		<category><![CDATA[cloudmade]]></category>
		<category><![CDATA[local search]]></category>
		<category><![CDATA[search along route]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1065</guid>
		<description><![CDATA[A tutorial demonstrating how to give users functionality that they were used to get only from their car navigation systems.]]></description>
			<content:encoded><![CDATA[<p>Suppose you go on a casual bike ride with a couple of friends. Wouldn&#8217;t it be nice to know if there are any coffee shops located along the route to refuel on caffeine and sugar? Or lets say you are doing a longer ride and would want to pick up a spare tube along the way. It would be good to know if there is any bike shop conveniently located along the route. Meet <a href="http://developers.cloudmade.com/projects/local-search/examples/searching-for-objects-along-route">CloudMade&#8217;s Local Search API</a>, which I used to power this specific feature in the most recent version of <a href="/apps/bikenav/">BikeNav</a>. This article is going to show you how you can include that in your next mobile-aware app.</p>
<h2>Step 1: Sign up for a Developer Account and get an API key</h2>
<p>CloudMade lets you <a href="http://cloudmade.com/register">sign up for a developer account</a> for free. After completing that initial step, access your account and click on the &#8220;Get API Key&#8221; button. Fill the details into the form presented to you, selecting &#8220;Web&#8221; as the platform and the &#8220;Free&#8221; pricing plan. Since we will not use any of the <a href="http://cloudmade.com/select/web">other features</a> the API provides, the free version has more than we need.</p>
<h2>Step 2: Create a token from your API key</h2>
<p>In order to be able to communicate with CloudMade&#8217;s servers, you need to create an access token from your API key. This is done by sending an HTTP POST request to a particular authentication server as noted in <a href="http://developers.cloudmade.com/projects/show/auth">their documentation</a>. If you are using PHP, the following code can help you out (using <a href="http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/">Wez Furlong&#8217;s do_post_request function</a>).</p>
<pre><code>$apiKey = 'my-api-key';
$userId = 'your-generated-user-id';

// http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/
function do_post_request($url, $data, $optional_headers = null)
{
  $params = array('http' =&gt; array(
              'method' =&gt; 'POST',
              'content' =&gt; $data
            ));
  if ($optional_headers !== null) {
    $params['http']['header'] = $optional_headers;
  }
  $ctx = stream_context_create($params);
  $fp = @fopen($url, 'rb', false, $ctx);
  if (!$fp) {
    throw new Exception("Problem with $url, $php_errormsg");
  }
  $response = @stream_get_contents($fp);
  if ($response === false) {
    throw new Exception("Problem reading data from $url, $php_errormsg");
  }
  return $response;
}
$token =  do_post_request('http://auth.cloudmade.com/token/' . $apiKey . '?userid=' . $userId, '');

echo "generated token: " . $token;</code></pre>
<h2>Step 3: Requesting POI data along a given route</h2>
<p>Equipped with the token from Step 2, we can now try to retrieve POIs along the route. The following example would do a search along the route for a maximum of 20 points of interest of type &#8220;cafe&#8221; from my place to Cupertino, within a radius of 1 kilometer and returning the data in <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a> format.</p>
<pre><code>http://geocoding.cloudmade.com/[APIKEY]/geocoding/v2/find.js?token=[TOKEN]&amp;object_type=cafe&amp;along=37.36721,-122.03533,37.36756,-122.0354,37.36752,-122.03662,37.36672,-122.03607,37.36642,-122.03648,37.36429,-122.03288,37.33911,-122.03241,37.33763,-122.03239,37.32283,-122.03241&amp;distance=1000&amp;results=20&amp;callback=mySuperCallback</code></pre>
<p>The <a href="http://developers.cloudmade.com/wiki/geocoding-http-api/Documentation">find method</a> of the Local Search API lets you pass in various parameters, which are <a href="http://developers.cloudmade.com/wiki/geocoding-http-api/Documentation#Parameters">well documented</a>. For the purpose of this article, the following are the most important ones:</p>
<ul>
<li><span class="highlight">object_type</span>: the API lets you choose from an <a href="http://developers.cloudmade.com/wiki/geocoding-http-api/Object_Types">extensive list of point-of-interest types</a>
</li>
<li><span class="highlight">along</span>: vector of the route your are traveling along, i.e. a comma separated list of lat/long pairs</li>
<li><span class="highlight">distance</span>: radius of the search are in meters</li>
<li><span class="highlight">results</span>: number of results to return</li>
<li><span class="highlight">callback</span>: signaling the server to return the response in JSONP format and specifying a publicly accessible JavaScript function to execute, passing in the response data</li>
</ul>
<p>The result from the above request will come back as JSONP and look similar to the following:</p>
<pre><code>mySuperCallback({
    "found": "3",
    "bounds": [{
        "json": ["37.33155", "-122.03642"]
    }, {
        "json": ["37.36805", "-122.03266"]
    }],
    "features": [{
        "id": "7367785",
        "centroid": {
            "type": "POINT",
            "coordinates": ["37.36768", "-122.03642"]
        },
        "bounds": [{
            "json": ["37.36768", "-122.03642"]
        }, {
            "json": ["37.36768", "-122.03642"]
        }],
        "properties": {
            "operator": "Starbucks",
            "osm_element": "node",
            "amenity": "cafe",
            "synthesized_name": "Cafe",
            "osm_id": "266625630"
        },
        "type": "Feature"
    }, {
        "id": "26073213",
        "centroid": {
            "type": "POINT",
            "coordinates": ["37.33155", "-122.03266"]
        },
        "bounds": [{
            "json": ["37.33155", "-122.03266"]
        }, {
            "json": ["37.33155", "-122.03266"]
        }],
        "properties": {
            "osm_element": "node",
            "amenity": "cafe",
            "name": "Bagel Street Cafe",
            "osm_id": "957085286"
        },
        "type": "Feature"
    }, {
        "id": "14342531",
        "centroid": {
            "type": "POINT",
            "coordinates": ["37.36805", "-122.03338"]
        },
        "bounds": [{
            "json": ["37.36805", "-122.03338"]
        }, {
            "json": ["37.36805", "-122.03338"]
        }],
        "properties": {
            "osm_element": "node",
            "amenity": "cafe",
            "name": "Peet's Coffee",
            "osm_id": "441987522"
        },
        "type": "Feature"
    }],
    "type": "FeatureCollection",
    "crs": {
        "type": "EPSG",
        "properties": {
            "code": "4326",
            "coordinate_order": ["0", "1"]
        }
    }
});</code></pre>
<p>In our <span class="code">mySuperCallback</span> function we can then use this data to e.g. plot each of the returned points of interest on a map, in addition to the given route. </p>
<h2>Be aware of long routes</h2>
<p>Attentive readers will notice that there is a slight flaw in the way the request is constructed. If you have a long route with a lot of waypoints that you are passing along in the request to the search API, at some point you will reach the limit of the maximum amount of characters you can pass along in a URL. One way to mitigate this is to drop every other entry from the array of waypoints if the number exceeds a certain limit. That way, the search will still be somewhat accurate (since you are only taking out points in between instead of cutting them off at the beginning or the end). A JavaScript example code could look like this:</p>
<pre><code>maxWaypoints = 160; // a good threshold that I noticed works well for BikeNav
waypoints = [ ... ]; // array where each entry represents a waypoint along the route
no_of_waypoints = waypoints.length;

if (no_of_waypoints &gt; maxWaypoints) {
    while (waypoints.length &gt; maxWaypoints) {
        for (var i = 0, len = waypoints.length; i &lt; len; i++) {
            waypoints.splice(i + 2, 1);
        }
    }
}</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/11/06/search-along-a-route-with-cloudmades-local-search-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BikeNav featured in Bicycling Magazine</title>
		<link>http://www.klauskomenda.com/archives/2011/11/06/bikenav-featured-in-bicycling-magazine/</link>
		<comments>http://www.klauskomenda.com/archives/2011/11/06/bikenav-featured-in-bicycling-magazine/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 03:10:13 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[bicycle]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[bikenav]]></category>
		<category><![CDATA[cycling]]></category>
		<category><![CDATA[mobile development]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1061</guid>
		<description><![CDATA[Launching an app into the App Store is great. Being featured by a magazine is even better.]]></description>
			<content:encoded><![CDATA[<p>It is always nice to see when other people like and use the software you release. I remember when I launched the first version of <a href="/apps/bikenav/">BikeNav</a> back in March of this year and saw it listed on the <a href="http://itunes.apple.com/us/app/bikenav/id428665758">App Store</a>, I certainly felt a big feeling of accomplishment. However, the joy was even bigger when I found out that a <a href="http://www.bicycling.com/">magazine publication</a> took notice.</p>
<p><a href="http://www.flickr.com/photos/commander_klaus/6321017500/in/photostream"><img class="img-left" style="width: 293px" src="http://farm7.static.flickr.com/6226/6321017500_1bf4d4d738.jpg"></a>A couple of weeks ago I got contacted by someone from Bicycling Magazine, which has been providing the bike community with bike gear and equipment reviews, training plans, maintenance how-to&#8217;s and more for 47 years, that they would like to feature my application in their December issue. This was great news and really the best thing that could have happened, considering the state the development process was in. I had hit some technical difficulties when working on an update version of the application back in May and combined with higher load at work and less free time, I had lost interest a bit in improving the application. The interest from the magazine, combined with the news that the piece will be contributed by <a href="http://www.dcrainmaker.com/">Ray Maker</a> (whose blog should be your #1 destination if you are interested in any kinds of gear reviews when it comes to outdoor and endurance sports), gave me the spark that I needed to continue working and improving the app. </p>
<p>Motivated by this attention that I had received, I spent huge chunks of my spare time since to improve the app, which led to the release of version 2 of BikeNav on pretty much the same date&mdash;incidentally&mdash;as the publish date of the <a href="http://www.flickr.com/photos/commander_klaus/6320493851/in/photostream/">December issue of Bicycling Magazine</a>. And just today I was able to pick up a copy and found, with great joy, a little paragraph about my app in the upper right hand corner on <a href="http://www.flickr.com/photos/commander_klaus/6321017796/in/photostream/">page 20</a>. Nothing big. Nothing fancy. But still something.</p>
<h2>BikeNav 2.0: The tech details</h2>
<p>What was holding me back a little bit since the release of version 1 was that I was an earlier adopter of <a href="http://jquerymobile.com/">jQuery Mobile</a>, having used their first alpha release for my initial version. The upgrade to a more stable version always seemed too painful and time consuming and so I kept adding hack after hack on top of an understandably buggy (in parts) version of the framework. In addition, I was also using a 0.9.x release of <a href="http://phonegap.com/">phoneGap</a> to power BikeNav.</p>
<p><img src="http://www.klauskomenda.com/wp-content/uploads/2011/11/logo.png" class="img-right" alt="" title="logo" width="147" height="147" class="alignnone size-full wp-image-1089" />With version 2, both of the frameworks were upgraded to their most recent version. In addition, I also gave the application a bit of a UI overhaul, abandoning the black &amp; white look from the initial version and introducing a new splash screen, updating the logo to feature a blue color tone instead of black and cleaning up the interface in general. I also introduced new features, like the ability to search for points of interests along a route using the <a href="http://developers.cloudmade.com/projects/local-search/examples/searching-for-objects-along-route">CloudMade&#8217;s Local Search API</a> and being able to add custom location pins to the map. </p>
<p>The attention that I got from the magazine and from the occasional user who emails with his feedback certainly motivates me to keep working on BikeNav. In addition to being a very useful app for bicyclists, it is also a great playground for me to see how far I can get with the hybrid mobile application approach, where the majority of the heavy lifting is done using web technologies.</p>
<p>So if you are a cyclist and haven&#8217;t checked out my app, please do so. And after you are done, feel free to <a href="/contact/">send me feedback</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/11/06/bikenav-featured-in-bicycling-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mount Diablo Road Ride</title>
		<link>http://www.klauskomenda.com/archives/2011/10/11/mount-diablo-road-ride/</link>
		<comments>http://www.klauskomenda.com/archives/2011/10/11/mount-diablo-road-ride/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 04:53:45 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Cycling]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1044</guid>
		<description><![CDATA[Another road bike ride classic in the Bay Area.]]></description>
			<content:encoded><![CDATA[<p>After going up the Devils Mountain on a mountain bike <a href="/archives/2011/09/17/riding-the-devils-mountain/">a few weeks ago</a>, it was time to try it on the road. Unfortunately I had just missed the annual <a href="http://savemountdiablo.org/activities_events_chal.html">Mount Diablo Challenge bicycle race</a>, where the fastest guy made it up to the summit in about 43 minutes, but thanks to the popularity of this ride, I never felt alone on the road up with lots of cyclists making their way to the top the same time as me. After a lot of sweat and tears, I was rewarded with magnificent views of the Bay Area, including the&mdash;already snow covered&mdash; mountain tops of the Sierra Nevada range in the east. </p>
<h2>Start early</h2>
<p>Trying to beat traffic and warm weather, I arrived at the &#8220;start&#8221; at the junction of Diablo Rd and Mt Diablo Scenic Blvd around 9am. I made my way up the mountain just after a group of 10 to 15 riders (presumably from a local bike club, judging by their matching outfits) had passed the parking area and were zooming up the road. The first mile or so leads the rider through a residential area with the road surface being unworthy of this great ride. One has to dodge manhole-sized potholes and you wonder whether you should have brought your mountain bike instead of your lightweight road machine with skinny tires. But after this weird start, the surface gets smoother and the long uphill climb begins.</p>
<p><a href="http://www.flickr.com/photos/commander_klaus/6236822936/in/photostream"><img src="http://farm7.static.flickr.com/6213/6236822936_971bdc5158.jpg" alt="" style="width: 293px" class="img-left"></a>After climbing up for about 3.6 miles and enjoying views of the East Bay on the right, you reach the South Gate Checkin Station of <a href="http://www.parks.ca.gov/?page_id=517">Mount Diablo State Park</a>, which you pass on the right and where you will also find an opportunity to fill up on water. The path flattens a bit and you continue on South Gate Road for 3.1 miles, passing the <a href="http://www.flickr.com/photos/commander_klaus/6236824674/in/photostream/">large sandstone formations of Rock City</a> along the way and the views getting more and more beautiful the higher up you go. </p>
<p>A popular resting spot to give you some time to relax your muscles and prepare you for the last stretch to the summit is Junction Ranger Station at 6.7 miles. On a nice weekend day and great conditions for riding up the mountain, this place is buzzing with people. The rangers are also trying to make an effort to make you aware of your duties as a bicyclist when going up on this multipurpose road to the summit with a display window filled with signs like: &#8220;220. The number of curves on the paved roads of Mount Diablo State Park. Don&rsquo;t pass on one of them or you may be the next accident.&#8221;.</p>
<h2>Home Stretch</h2>
<blockquote class="pullquote appear-right">
<p class="pullquote">[...] that killer section at the very end is a religious experience!</p>
<p><cite>Mike Jacoubowsky, <a href="http://www.chainreaction.com/">Chain Reaction Bicycles</a></cite></p>
</blockquote>
<p>The grade picks up a bit now on what is called Summit Road, with a few flatter passages in between while you are passing several campground parking lots as well as scenic overlooks for folks who like to conquer the mountain by car. Eventually, after being teased by views of the summit for quite some time, you will reach the last, steep stretch of road, about 700 feet long, which will shoot up your heart rate and suck the last bits of energy out of your body. Pat yourself on the back at the top if you made it up there without stopping, catch your breath and enjoy the magnificent views at the top. </p>
<p>While you are up there, lean your bike against one of the railings and check out the <a href="http://www.mdia.org/museum.htm">Summit Museum</a> to stand on the <a href="http://www.flickr.com/photos/commander_klaus/6236824150/in/set-72157627750632637">actual summit of Mount Diablo</a> and learn a bit about its history and wildlife. Should you feel inclined to financially support the park, there is also a small store inside the museum building.</p>
<h2>Logistics</h2>
<p>I parked at the <a href="http://www.athenian.org/">Athenian School</a>, which is <a href="http://maps.google.com/maps?q=athenian+school&#038;oe=utf-8&#038;client=firefox-a&#038;fb=1&#038;gl=us&#038;hq=athenian+school&#038;hnear=0x808fb645a9d05d3b:0x768dfb26dd7cc3a2,Sunnyvale,+CA&#038;cid=0,0,3879885791966863531&#038;t=m&#038;z=16&#038;vpsrc=0&#038;iwloc=A">right off of Mt Diablo Scenic Blvd</a> and has a nice big parking lot right across from the soccer field next to the entrance. It is also the location where the annual <a href="http://savemountdiablo.org/activities_events_chal.html">Mount Diablo Challenge</a> starts.</p>
<p>It is advisable to <em>not</em> do this ride in the midst of Summer, since the road is pretty much exposed to full sunlight the whole way. I started around 9.30 in the morning and while it was sunny, the temperature was in the mid 70s with a slight breeze when getting further up the mountain. I carried 2 water bottles (16 oz. and 20 oz.) and emptied both of them on my way up, however there are options to fill up on water along the way at either the South Gate Checkin Station (at 3.6 mi) or the Junction Ranger Station (at 6.7 mi). A good idea is also to bring a bottle of sunscreen, maybe a clif bar or two and a light jacket to wear on the descent.</p>
<h2>Resources</h2>
<ul>
<li><a href="http://connect.garmin.com/activity/120191416">Ride data on Garmin Connect</a></li>
<li><a href="http://www.flickr.com/photos/commander_klaus/sets/72157627750632637/">Ride pictures on Flickr</a></li>
<li><a href="http://savemountdiablo.org/activities_events_chal.html">Mount Diablo Challenge road race</a></li>
<li><a href="http://www.chainreaction.com/diablo.htm">Trip report from Mike from Chain Reaction Bicycles</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/10/11/mount-diablo-road-ride/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>History will be made. Again.</title>
		<link>http://www.klauskomenda.com/archives/2011/10/09/history-will-be-made-again/</link>
		<comments>http://www.klauskomenda.com/archives/2011/10/09/history-will-be-made-again/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 08:27:55 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Hockey]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[canucks]]></category>
		<category><![CDATA[hockey]]></category>
		<category><![CDATA[nhl]]></category>
		<category><![CDATA[stanley cup]]></category>
		<category><![CDATA[vancouver]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1029</guid>
		<description><![CDATA[Looking back at my experiences from attending an NHL Stanley Cup Final game up close.]]></description>
			<content:encoded><![CDATA[<p>Its been 120 days since the <a href="http://canucks.nhl.com/">Vancouver Canucks</a> won their last game of the 2010/2011 NHL season 1-0 in the <a href="http://en.wikipedia.org/wiki/2011_Stanley_Cup_Finals#Game_five">Stanley Cup Final game 5</a> against the <a href="http://bruins.nhl.com/index.html">Boston Bruins</a>. To the dismay of many Canucks supporters, all went downhill from this point on with Vancouver losing games 6 and 7 of the series and, consequently, the race for the cup by one game. 1. single. game. And I was there, in person, to witness that last victory and then followed the downward developments in front of the TV, culminating in the <a href="http://www.cbc.ca/news/canada/british-columbia/story/2011/06/15/bc-stanley-cup-fans-post-game-7.html">riots after the last game</a>. All of this is history now and the NHL Season 2011/2012 just starting. And <a href="http://video.canucks.nhl.com/videocenter/console?id=111644">history will be made</a>. Again. Hopefully by the Canucks. </p>
<h2>Vancouver fan</h2>
<p>I fell in love with the city of <a href="http://en.wikipedia.org/wiki/Vancouver">Vancouver</a> well before I ever set foot on Canadian soil for the first time. Being constantly mentioned as one of the cities with the highest quality of living and featured in many travel magazines, I wanted to visit this place ever since I was a teenager. The portrayal of Canada being the underdog compared to its neighbor USA and Canadians <a href="http://en.wikipedia.org/wiki/Due_South">being nice and friendly folks in the media</a> (in Austria, at least) certainly sparked some of that interest.</p>
<p><a href="http://www.klauskomenda.com/wp-content/uploads/2011/10/155_5593.jpg"><img src="http://www.klauskomenda.com/wp-content/uploads/2011/10/155_55931-300x224.jpg" alt="" title="155_5593" style="width:293px" class="img-left" /></a>In 2005, after interning in NYC for 6 months, I finally got to see Canada&#8217;s eigth-largest city. And one thing that I noticed right away was that, even though it was August and the hockey season well over, hockey was still dominating the headlines. Incidentally, I got there right at the time when then-Canucks winger <a href="http://en.wikipedia.org/wiki/Todd_Bertuzzi">Todd Bertuzzi</a> was allowed to lace up his skates again after initially being suspended indefinitely by the league for his behavior during the <a href="http://en.wikipedia.org/wiki/Todd_Bertuzzi#Steve_Moore_incident">Steve Moore incident</a>. And the fact that, in the mid of summer, hockey made front page of both <a href="http://www.theprovince.com/">The Province</a> and <a href="http://www.vancouversun.com/">Vancouver Sun</a>, was a clear indication as to how crazy this town really is about hockey. After touring GM Place (which would later be renamed to <a href="http://en.wikipedia.org/wiki/Rogers_Arena">Rogers Arena</a>), I was pretty much set that if I am going to support one NHL team, it will be the Canucks. </p>
<p>I was fortunate enough to come back to visit &#8220;Rain City&#8221; (Vancouver averages about 1200mm of rain per year) a couple of times after that and catch a few regular season games, since when would you ever get a chance to see NHL hockey up close in personal when living in Europe. When I moved to California end of 2008 however, I was able to start following the game much more closely than from overseas. I still can&#8217;t quite fathom why people would want to play hockey in places like <a href="http://sharks.nhl.com/">San Jose</a> or <a href="http://coyotes.nhl.com/index.html">Phoenix</a> (cause neither place has seen or ever will see a natural outdoor pond frozen over), but nevertheless, I still find hockey the most interesting of all major North American sports. </p>
<h2>Stanley Cup Final 2011, Game 5</h2>
<p>Fast forward to June 2011: Vancouver made its incredible run to reach the Stanley Cup Final and I had decided to visit my good friend <a href="http://www.erudianart.com/">Preet</a> to watch game 5 at one of the many public viewing areas downtown. By some luck and the help of <a href="http://craigslist.org">craigslist</a>, I was able to score an actual ticket for the final, which did cost me quite some money, but in the end I felt that the chance of going to a Stanley Cup Final game might not come around again that often. </p>
<p><a href="http://www.flickr.com/photos/commander_klaus/6225784550/in/set-72157627849155138/"><img class="img-right" style="width:293px" src="http://farm7.static.flickr.com/6105/6225784550_b16d5c1e00.jpg"></a>The atmosphere at the game was phenomenal, goose-bump-inducing in fact as you might be able to tell from the <a href="http://www.flickr.com/photos/commander_klaus/sets/72157627849155138/">photos and videos I posted on Flickr</a>. &#8220;I have been to 5 playoff home games so far, and each time the Canucks won&#8221; Michael, the guy in the seat next to me told me. Interestingly, he, a <a href="http://en.wikipedia.org/wiki/Victoria,_British_Columbia">Victoria</a> native, also got his ticket on short notice from craigslist on that very day. And Michael proved the be the lucky charm again this time with <a href="http://en.wikipedia.org/wiki/Maxim_Lapierre">Maxim Lapierre</a> scoring <a href="http://latimesblogs.latimes.com/sports_blog/2011/06/stanley-cup-finals-game-5-canucks-defeat-bruins-1-0-to-move-within-one-victory-of-title.html">the only goal in the contest</a> 4:35 into the third period. Needless to say, the city went crazy after the victory and my hands hurting the next day from high-fiving dozens of other Vancouver fans around the stadium and in downtown. </p>
<p>Despite all the optimism amongst Canucks supporters however, this turned out to be the last win for Vancouver in the final and Boston snatching the series 4-3. </p>
<h2>Looking forward</h2>
<p>All of this, nevertheless, is history now. </p>
<p>The new season has just started with Vancouver losing their first game against the Pittsburgh Penguins, <a href="http://www.nhl.com/ice/news.htm?id=594518">EA Sports&#8217; pick to hoist the cup in June 2012</a>, in a shootout. Can the Canucks do what they did last year plus one more win? From what I have read, very few experts have Vancouver on their list of favorites for winning the cup. Does that mean they can&#8217;t do it? Of course not, but it will arguably be hard to top what the team accomplished last year in the regular season with winning the Western Conference, the <a href="http://en.wikipedia.org/wiki/Presidents_Trophy">President&#8217;s Trophy</a> and <a href="http://en.wikipedia.org/wiki/Daniel_Sedin">Daniel Sedin</a> winning the <a href="http://en.wikipedia.org/wiki/Art_Ross_Trophy">Art Ross Trophy</a>. What can be learned from the past though is that the regular season means&#8230;close to nothing. So I guess we will have to wait until April 2012 when the playoffs start to see what the Canucks are capable of this time around. Assuming the Canucks will actually make the playoffs&#8230;but that is pretty much guaranteed, right? Right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/10/09/history-will-be-made-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Riding the Devil&#8217;s Mountain</title>
		<link>http://www.klauskomenda.com/archives/2011/09/17/riding-the-devils-mountain/</link>
		<comments>http://www.klauskomenda.com/archives/2011/09/17/riding-the-devils-mountain/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 00:36:24 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Cycling]]></category>
		<category><![CDATA[bay area]]></category>
		<category><![CDATA[mount diablo]]></category>
		<category><![CDATA[mountain biking]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1021</guid>
		<description><![CDATA[Finally, I got to get mano-a-mano with the mountain with the satanistic name.]]></description>
			<content:encoded><![CDATA[<blockquote class="pullquote appear-right">
<p class="pullquote">If the climbs featured in the rest of the East Bay rides just haven&#8217;t been steep enough or long enough for you, then you should really consider a trip to good old Mount Diablo, the tallest park in this region known for its leg-crushingly steep climbs.</p>
<p><cite>Skye Kraft in <a href="http://www.amazon.com/Mountain-Bike-San-Francisco-Area/dp/0897326598">his book on mountainbiking in the San Francisco Bay Area</a></cite></p>
</blockquote>
<p>I had neglected my mountain bike for the past couple of months ever since I got bitten by the road riding bug that has led me to do some <a href="/archives/2011/09/05/how-i-learned-to-love-the-tailwind/">memorable</a> <a href="/archives/2011/09/13/encircling-big-blue/">rides</a>. This weekend, however, I decided it was time to give the heavy guy a spin. The challenge: <a href="http://en.wikipedia.org/wiki/Mount_Diablo">Mount Diablo</a>, the <a href="http://www.summitpost.org/eagle-peak-mt-diablo-state-park/603827">Eagle Peak</a> Loop to be precise, a ride which I had picked from Skye Krafts exceptional mountain bike guide book. </p>
<p>The drive in the morning from the South Bay to the Mitchell Canyon entrance of <a href="http://www.parks.ca.gov/?page_id=517">Mount Diablo State Park</a> took me about 1.5 hours. Considering that the guide book says that weekend trail traffic can be quite high and the fact that the weather forecast predicted high 80s temperatures in the afternoon, I decided to go early and got there around 9:45am. Usage fees had apparently doubled to $6 per car since Skye last visited the park, but I find it still incredibly cheap considering the size of it. </p>
<h2>Easy Start</h2>
<p>Before heading up the mountain, I noticed some event noise from the main parking area (I had parked in the equestrian lot apparently) and found out that there was a <a href="http://www.coastaltrailruns.com/d_diablo.html">trail run event</a> going on. On my way up Mitchell Canyon Fire Road, I encountered several runners coming down the mountain, some of which I tried to encourage by noting &#8220;Almost there! Only about a mile left!&#8221;. </p>
<p>The first part of the ride was pretty relaxed with only a few very moderate climbs, but after about 3 miles I got to the steeper sections, most of them, luckily and thanks to the still rather early hour, were shaded and not as hot as they probably would have been in the afternoon sun. I have to admit that I stopped a couple of times, primarily because I was out of breath and second to snap a few pictures of the great scenery. A humorous park ranger, who passed me in his off-road vehicle, remarked that, like salmon, I was heading the wrong way (compared to the runners who were heading down the mountain). You gotta love your park officials.</p>
<p>After about an hour of riding, I reached Deer Flat, a small plateau at 2120 feet. &#8220;The worst must be over&#8221;, or so I thought. Boy, was I wrong. The steepest parts of the ride were yet to come. After conquering the first one, I simply ran out of traction on my rear wheel on the dirt road terrain and a grade of about 12%. It took me a couple of tries to get going again without having to put me feet down immediately. Eventually I made it and stopped, abandoned my bike for a few minutes and hiked to the top of a little sister peak of Eagle Peak. Great views and astonishingly great visibility. </p>
<h2>Downhill Thrill</h2>
<p>&#8220;Coming down [the trail] must be fun!&#8221; one of the runners had said to me on my way up. Since I was pretty much at the highest point of the ride, that very downhill came up next. Something I always look forward to (duh, who doesn&#8217;t). The way down was actually pretty challenging and 2 hikers even warned me (in a way) of some steeper sections coming up ahead by saying &#8220;Good luck down there!&#8221;. </p>
<p>Finally, I managed to come all the way down, with lots of rear wheel skidding, but no falling down. Needless to say I got so excited by the downhill, that I went too far on Donner Creek Road, that I &#8220;missed&#8221; my exit, so to speak (the poor signage in that part of the park added to my confusion). Ultimately, I found my way back to the parking lot only to find a piece of paper pinned underneath my windshield wipers. Not a ticket, but a flyer advertising upcoming <a href="http://getlostxx.com/Street_Scramble">Street Scramble</a> events. Maybe I should try that next time&#8230;</p>
<h2>Resources</h2>
<ul>
<li><a href="http://connect.garmin.com/activity/115100188">Ride data on Garmin Connect</a></li>
<li><a href="http://www.flickr.com/photos/commander_klaus/sets/72157627568950809/">Ride photos on Flickr</a></li>
<li><a href="http://www.amazon.com/Mountain-Bike-San-Francisco-Area/dp/0897326598">Mountain Bike! San Francisco and the Bay Area</a> by Skye Kraft</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/09/17/riding-the-devils-mountain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encircling Big Blue</title>
		<link>http://www.klauskomenda.com/archives/2011/09/13/encircling-big-blue/</link>
		<comments>http://www.klauskomenda.com/archives/2011/09/13/encircling-big-blue/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 07:21:40 +0000</pubDate>
		<dc:creator>Klaus</dc:creator>
				<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.klauskomenda.com/?p=1007</guid>
		<description><![CDATA[Riding 72 miles around Lake Tahoe by bike. ]]></description>
			<content:encoded><![CDATA[<p>&#8220;Dude, the water looks so clear, its like we are in the Caribbean!&#8221;. Only one of the many moments of observation of natural beauty when going around the <a href="http://en.wikipedia.org/wiki/Lake_Tahoe">largest alpine lake in North America</a>.</p>
<p>We had set the alarm clocks for 6:30am, with the intention to be the first ones at the complimentary breakfast and then embarking on our adventure. Considering we stayed at a <a href="http://www.besttahoe.com/">rather cheap motel</a> close to the California/Nevada state line, I was not expecting much, but a (styrofoam) bowl of cereal, a cup of orange juice and a banana would have had to suffice. And so, at 7:37am, we started into the fresh morning air and with the circumvention of Big Blue.</p>
<h2>Tires roll</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6142667813/in/set-72157627659432626"><img class="img-right" style="width: 293px" src="http://farm7.static.flickr.com/6169/6142667813_b66f1ea5b2.jpg"></a>&#8220;Definitely cold!&#8221;, my friend Ethan noted and yes, compared to the night before, when we had arrived at Lake Tahoe, temperatures had dropped significantly and showed about 45 Fahrenheit by 7am. But preparation is everything, and prepared we were with windbreakers and mittens. The forecast for Saturday had not looked that promising initially, but we started with partly cloudy skies literally no wind. The 20% chance of precipitation were just too low to take serious, we decided. </p>
<p>About 20 minutes into the ride, we took a right turn, leaving Hwy 50 behind us and making our way towards <a href="http://en.wikipedia.org/wiki/Emerald_Bay_State_Park">Emerald Bay</a>, the first of two significant climbs along the route, as I had meticulously noted on <a href="http://www.flickr.com/photos/commander_klaus/6142667729/in/set-72157627659432626">my to-scale map/sketch of the route</a>. Halfway between the turning point and Emerald Bay, we got overtaken by a fellow cyclists, who greeted us with a brisk but collegial &#8220;Morning!&#8221; between bikers. All dressed in <a href="http://en.wikipedia.org/wiki/Lance_Armstrong">Lance Armstrongs</a> <a href="http://livestrong.org/">LIVESTRONG</a> gear from head to toe and quadriceps the size probably comparable to Lance&#8217;s, he passed us with seemingly no effort. However, he turned around and went back the other way shortly after and so we were on our own heading up and then down to Emerald Bay, only to have to climb back up again for the descent towards <a href="http://en.wikipedia.org/wiki/Meeks_Bay,_California">Meeks Bay</a>. By that time, we had already gotten rid of all the other layers that we had put on and were just riding in shorts and short-sleeved jerseys. </p>
<h2>Cruising along</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6143221296/in/set-72157627659432626"><img src="http://farm7.static.flickr.com/6069/6143221296_8807acdafc.jpg" class="img-left" style="width: 293px"></a>Apart from a little climb at the Rubicon Park Estates, the road was now relatively flat and we were cruising along Hwy 89. Then the first beach view at Chambers Landing, <a href="http://www.flickr.com/photos/commander_klaus/6143221296/in/set-72157627659432626">an invitation we decided to postpone until after the ride</a> and time for a little break. 2 hours and 20 minutes and 52 km (32 miles) into the ride, we arrived at the junction of Hwy 89 and 28, where we watched <a href="http://www.flickr.com/photos/commander_klaus/6142668831/in/set-72157627659432626/">water flowing out of the lake</a> at its only outlet at the Lake Tahoe Dam. Being on the road for 2 hours and 45 minutes and pretty much halfway around the lake, we took a well-deserved lunch break on a pebble beach at <a href="http://en.wikipedia.org/wiki/Carnelian_Bay">Carnelian Bay</a>. While we indulged ourselves on Clif Bars, Gatorade and GU Energy Gels, <a href="http://www.flickr.com/photos/commander_klaus/6142669107/in/set-72157627659432626/">we enjoyed beautiful vistas of the lake</a>, in almost spotless sunny skies, while people were out paddle boarding or playing with their dogs on the beach. &#8220;Holy cow, we are lucky with the weather so far&#8221;, I commented on our pretty fortunate situation at this moment. </p>
<p>Relaxing felt good, but after resting out muscles for about an hour, we continued our journey, passing through Tahoe Vista and Kings Beach and reached the California/Nevada border on a climb at Crystal Bay. We were welcomed not only by great views of the bay itself, but by casino establishments right, left and center. Reaching the other side of the bay, we noticed really for the first time the cleanliness of the water in the lake, luring us into jumping in. But no no, we had something to finish first. </p>
<h2>Hurtin&#8217; in Nevada</h2>
<p><a href="http://www.flickr.com/photos/commander_klaus/6142670131/in/set-72157627659432626"><img class="img-right" style="width:293px" src="http://farm7.static.flickr.com/6198/6142670131_a1b41f22e9.jpg"></a><a href="http://en.wikipedia.org/wiki/Lake_Tahoe_Nevada_State_Park">Lake Tahoe Nevada State Park</a>, which we passed through shortly after while still on Hwy 28, presented us with lake views of unbelievable beauty, hidden, tucked away beaches with <a href="http://www.flickr.com/photos/commander_klaus/6142669865/in/set-72157627659432626/">water so clear</a> that you would think you are on some island in the Caribbean. Stopped briefly at an overlook with restrooms and a chance to fill up on water, we mentally prepared ourselves for the second big climb yet to come, up towards the junction with Hwy 50. Not really knowing what to expect, the climb proved to be steady and not too steep, but stretched over 8 km (5 miles), an elevation gain of roughly 200 meters (656 feet), with a dip in between. After 87 km (54 miles) on the bike, ascending that much in the mid-day sun, totally exposed turned out to be more difficult than I had anticipated. My body, starting from my lower back downwards, was hurting and my hamstrings were cursing at me for not having warmed them up properly in the cool morning. </p>
<p>Just about halfway up the climb I got sunscreen in my left eye, which was burning like hell, so I stopped and got passed by Ethan with a &#8220;See ya at the top!&#8221;. After some stretching, water and some energy drink, I was back on the bike and soon caught up with Ethan again to head up to <a href="http://en.wikipedia.org/wiki/Lake_Tahoe_%E2%80%93_Nevada_State_Park#Spooner_Lake">Spooner Lake/Summit</a>, where the climb finally ended. Thank god.</p>
<p>We didn&#8217;t know it then, but the best part was yet to come. Reaching the highest point of our tour at 2153 meters (7063 feet) meant there was nowhere to go but down. And down we went. And epic descent down Hwy 50, reaching top speeds of about 55 km/h (40 mph), even blasting through the short <a href="http://en.wikipedia.org/wiki/Cave_Rock_Tunnel">Cave Rock Tunnel</a>, we were on the final stretches of our ride. However, some rolling hills were still in the way between us and the finish line, and every climb at this point was like poison for our legs. But we had to keep going, no matter what. </p>
<p>Climbing up one of the last ascents at Zephyr Cove meant literally turning around the corner for the home stretch towards the state border and the checkered flag. Once I saw the casinos, which I remembered from when we started, I knew that we were only minutes away. And there it was, the state line, and soon thereafter, after being out there for 6 hours and 22 minutes, we pulled in the driveway of our motel. <a href="http://www.flickr.com/photos/commander_klaus/6143223090/in/set-72157627659432626/">Tired, exhausted, but happy</a>. If only our motel room hadn&#8217;t been on the third floor with no elevator&#8230;</p>
<h2>Trip planning</h2>
<p>Just a few organizational aspects that are worth sharing for folks who want to do this great ride as well.</p>
<h3>Ride logistics</h3>
<p>We both carried two 20 oz. bike bottles with us, I had, in addition to that, my 80 oz. camelbak with me, almost filled to the top. If you are just concerned about staying hydrated, than bringing the camelbak is not really necessary, because there are plenty of options to refill the bottles along the way. I mainly wanted the some convenient way to carry clothing layers, as well as Clif bars, snacks and bike repair/maintenance stuff with me. </p>
<p>As can be easily figured out from the report, we did the loop clockwise, mainly because I figured that being on the side closer to the lake would account for better views and thus being able to easily stop and take pictures.</p>
<p>Because we had anticipated chilling temperatures in the morning, we both started out with wearing a wind breaker bike jacked, with a short sleeved jersey underneath, bike mittens and bike shorts. In addition, I was wearing a short sleeved base layer underneath. It certainly helped at the beginning, but as mentioned above, with the first climb, sun coming out and temperatures rising, we continued in shorts and jersey.</p>
<h3>Accommodation</h3>
<p>Coming from the San Francisco Bay Area, it was simply most convenient, i.e. closer, to stay at the southern tip of the lake, meaning in South Lake Tahoe. I picked a motel with a low price (it came out to $80 per night) and with <a href="http://www.tripadvisor.com/Hotel_Review-g1798615-d226528-Reviews-Best_Tahoe_West_Inn-South_Lake_Tahoe_Lake_Tahoe_California_California.html">decent reviews on TripAdvisor</a>. Any motel will do, really.</p>
<h3>Weather etc.</h3>
<p>Since July and August are <a href="http://www.weather.com/weather/wxclimatology/monthly/graph/USCA0584">historically the hottest in the Tahoe Area</a>, June or September are good alternatives with more welcoming temperatures if you are exercising outside for multiple hours. For this specific trip, which we did beginning of September, the weather turned out to be nearly perfect, with colder temperatures in the morning (44 Fahrenheit), warming up to around 72 Fahrenheit during the day and pretty much sunny up until the last hour of the ride. In the afternoon as well as the next day, thunderstorm clouds rolled in, which brought showers and cooler temperatures. So even though the temperatures get more accommodating, the weather can, unfortunately, also be a little bit more unpredictable. Before you head out to Tahoe, check the <a href="http://www.wunderground.com/US/CA/South_Lake_Tahoe.html">weather forecast</a>. If you consider to take the ride as more of a stroll along the lake, with not paying attention to time too much, be sure to check <a href="http://www.calendar-updates.com/sun.asp?PostalCode=96150&#038;Submit=Get+Sunrise+%2F+Sunset+Times&#038;sunrise=6%3A24AM&#038;sunset=7%3A38PM&#038;mos=August&#038;day=27&#038;year=2011&#038;ZIPDST=Y&#038;City=Stateline&#038;Province=Nevada&#038;latDeg=38&#038;latMin=57&#038;latSec=45&#038;lonDeg=119&#038;lonMin=56&#038;lonSec=20&#038;hrsToGMT=8&#038;cities=&#038;dayAns=">how much daylight you have available</a> and plan accordingly.</p>
<h3>Things to do after the ride</h3>
<p>Since we did the loop on a Saturday and were planning on heading back to the Bay Area on Sunday, there was still some time left to explore other things in the South Lake Tahoe area. If you are up for another physically demanding challenge, you can hike up <a href="http://www.summitpost.org/mount-tallac/150430">Mount Tallac</a> (from South Lake Tahoe, north on Hwy 89 three miles, left onto Fallen Leaf Lake Road. Turn right at &#8220;T&#8221; and continue to the Glen Alpine Trailhead sign and turn left). If you want to take it a little easier (like we did), you can take a ride with the <a href="http://www.skiheavenly.com/activitiesdetail/Heav+-+Heavenly+Scenic+Gondola+Rides.axd#fragment-2#Top?cmpid=PPC116081824">Heavenly Gondola</a> up to the top of the resort, where you can enjoy great views of the lake and the surrounding mountains. Although with prices starting at $32 for the return trip, the gondola ride might seem equally steep.</p>
<h2>Resources</h2>
<ul>
<li><a href="http://connect.garmin.com/activity/113741456">Ride data on Garmin Connect</a></li>
<li><a href="http://www.flickr.com/photos/commander_klaus/sets/72157627659432626/">Photo set on Flickr</a></li>
<li><a href="http://www.roadbikerides.com/ride/view/ride_around_lake_tahoe/906">Another ride description on roadbikerides.com</a></li>
<li><a href="http://www.bikethewest.com/tourdetahoe.html">Tour de Tahoe: Annual organized bike ride</a></li>
<li><a href="http://www.tahoesouth.com/Page/candw">South Lake Tahoe: current conditions with average temperatures per month</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klauskomenda.com/archives/2011/09/13/encircling-big-blue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.775 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-03 20:30:35 -->

