Article RSS Feed en-us 40 The main blog feed for my Web site. Tracking the ISS <p style="float:right"><a href="/iss"><img src="" alt="" /></a></p> <p>Back when I <a href="">wrote about creating iPhone bookmarklets that automagically grab <span class="caps">GPS</span> location</a>, I lamented that you&#8217;re unable to easily bookmark them within an iOS device or save them as web apps. A few friends were pestering me about the using the <span class="caps">GPS</span>-enabled <a href="">Heavens Above</a> link to track the <span class="caps">ISS</span>, so I quickly threw together something here on my website. The webpage <a href=""></a> will simply request your location and forward you on to Heavens Above&#8217;s <span class="caps">ISS</span> tracking page.</p> <p>The page itself is extraordinary simple. It uses entirely client-side processing; no data is logged. I only use your location to point to the correct <span class="caps">URL</span> to Heavens Above. The only little bit of fanciness involved is that it detects if you&#8217;re on an iPhone or iPod and then displays instructions on how to add to your homescreen. There&#8217;s a nice homescreen icon to go along with it. That said, it also works quite nicely with relatively advanced desktop browsers.</p> Sat, 02 Jul 2011 17:41:32 GMT Finer zoom increments in WebKit <p style="float:right"><a href=""><img src="" alt="" /></a></p> <p>I&#8217;ve always been annoyed at how large the jumps are between zoom increments in every single web browser. One click of &#8220;Zoom In&#8221; and suddenly the text is <span class="caps">HUGE</span>. I have found it so unhelpful in the past that I had completely forgotten about the feature. But then two things changed:</p> <ol> <li>I purchased a high resolution laptop. I really like the display, but it can make text on some websites too small to read comfortably.</li> <li>Apple made <em>zoom in</em> a built-in gesture on their trackpads. In almost all applications, the &#8220;pinch&#8221; and &#8220;stretch&#8221; gestures gradually zooms the content in and out. In Safari, however, the jump between zoom levels is so large that the zoomed page feels jarringly disjointed from the original.</li> </ol> <p>Fortunately, WebKit is open source and anyone can <a href="">download and modify the source code</a>. And it&#8217;s an extremely simple change (as it should be). In file <code>WebKit/mac/WebView/</code>, change</p> <p><code>#define ZoomMultiplierRatio 1.2f</code></p> <p>to:</p> <p><code>#define ZoomMultiplierRatio 1.06265857f</code></p> <p>To be more precise, you may use <a href="">this diff file</a> as a patch. Why <code>1.06265857f</code>? It&#8217;s the cube root of 1.2. Since the current zoom level is computed by multiplying by this ratio, using the cube root effectively makes the zoom increment a third of what is previously was.</p> <p>To compile your very own modified WebKit, go to <code>WebKit/ Tools/Scripts</code> and run <code>./build-webkit --release</code> (it takes a while &#8211; about 40 minutes for me). To use it, open and compile <code>WebKit/Tools/WebKitLauncher/WebKitLauncher.xcodeproj</code> in Xcode. This creates the that is found in the nightly builds. But you&#8217;re not done yet. You need to add your custom-built webkit into this app. Navigate into the build directory and right-click on to Show Package Contents. You need to create the directory <code>Contents/Frameworks/10.6</code> (or <code>10.5</code> if you&#8217;re still on Leopard). Finally, copy all the items from <code>WebKit/WebKitBuild/Release</code> into that new folder, and you&#8217;re done!</p> <p>Now if only I could hack Safari to not require such a large gesture to zoom in&#8230; but alas that code resides in Apple&#8217;s closed source.</p> Fri, 07 Jan 2011 21:47:00 GMT iPhone Geolocation Bookmarklets <p style="float:left"><a href=""><img src="" alt="" /></a></p> <p>Very few websites have implemented the new javascript <span class="caps">GPS</span> geolocation features that were intruduced with <span class="caps">HTML 5</span>. However, there are a few sites that use latitude and longitude directly in their URLs.</p> <p>I first wanted a quick way to get my current latitude and longitude while looking at <a href="">Heavens Above</a>. It&#8217;s a great site that allows you to find visible satellites based upon your current location. Here&#8217;s <a href="javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;z=c.altitude;z=z?z:0;d=new%20Date(2009,0,1,0,0,0,0).toLocaleString().substr(-3,3);window.location=''+c.latitude+'&#38;lng='+c.longitude+'&#38;alt='+z+'&#38;loc=iPhone&#38;tz='+d;},function(){alert('Permission%20denied.')});">the bookmarklet</a> that I created:</p> <div> <code style="word-wrap:break-word">javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;z=c.altitude;z=z?z:0;d=new Date(2009,0,1,0,0,0,0).toLocaleString().substr(-3,3);window.location=""+c.latitude+"&#38;lng="+c.longitude+"&#38;alt="+z+"&#38;loc=iPhone&#38;tz="+d;},function(){alert("Permission denied.")});</code> </div> <p>Copy <a href="javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;z=c.altitude;z=z?z:0;d=new%20Date(2009,0,1,0,0,0,0).toLocaleString().substr(-3,3);window.location=''+c.latitude+'&#38;lng='+c.longitude+'&#38;alt='+z+'&#38;loc=iPhone&#38;tz='+d;},function(){alert('Permission%20denied.')});">this link to your bookmarks</a> and when accessed on an iPhone or location-aware web browser, it will directly load the site with your current location entered!</p> <p>I had to jump through several hoops here. When the altitude is not available (when only using cell-tower triangulation), the javascript code returns <code>null</code>. The website only supports numeric values, so <code>z=z?z:0</code> replaces the <code>null</code> with a <code>0</code>. Secondly, the website needs the local timezone, but unfortunately it only accepts a small subset of the three letter codes (and not the numeric offset from <span class="caps">UTC</span>). Even worse, the daylight savings version of the code (EDT/CDT/MDT/PDT) are unsupported &#8211; the site just assumes that you follow the trend (sorry Arizona). So I grab the code from January 1, 2009 (when daylight savings is not in effect), and parse the three letter code from that string.</p> <p>For most sites, you&#8217;d only need something of the form (<a href="javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;window.location=''+c.latitude+'&#38;lon='+c.longitude;},function(){alert('Permission%20denied.')});">The <span class="caps">NOAA</span>&#8217;s weather forecast</a> , for example):</p> <div> <code style="word-wrap:break-word">javascript:navigator.geolocation.getCurrentPosition(function(g){c=g.coords;window.location=""+c.latitude+"&#38;lon="+c.longitude;},function(){alert("Permission denied.")});</code> </div> <p>Now if only I could find a way to save the javascript bookmark to the Home Screen, I&#8217;d be set!</p> Thu, 06 Aug 2009 01:33:15 GMT Minor Truetype Font Editing on a Mac <p style="float:left"><img src="" alt="" /></p> <p><em>Update December 5, 2011: Changed download link to the most recent version of Apple Font Tool suite, which is now x86 compatible.</em></p> <p>With the release of Windows Vista, Microsoft included six new fonts that they commissioned for the occasion. They are the new defaults for Vista and Office. They&#8217;ve also made them available for Mac through Office as well as a handful of free (as in beer) utilities. I got them by following <a href="">these instructions</a>.</p> <p>These new modern fonts are explicitly designed for display on computer screens with ClearType. Although Apple has a <a href="">different philosophy on font rendering</a>, the same basic premise is used in <span class="caps">OS X</span>. Besides all that (or, rather, because of it) these fonts are very pretty.</p> <p>But there&#8217;s a problem, and you can see it in the image above. When packaging these fonts up for the Mac, Microsoft goofed on the baseline for Consolas. The icon previews below show it much more obviously.</p> <p style="float:center"><img src="" alt="" /></p> <p>In short: it&#8217;s annoying. And wrong. And the fix is after the break.</p> Sun, 15 Mar 2009 21:36:03 GMT …Worth a million campaign promises <p>Every once and a while, someone figures out a creative and astute way to represent the data behind some of those <em>talking points</em>. Here are a few I&#8217;ve run across over the past few months:</p> <h3>Whose taxes?</h3> <p><a href=""><img src="" width="440" alt="Source: Originally a Washington Post graphic; re-proportioned by chartjunk:" title="Source: Originally a Washington Post graphic; re-proportioned by chartjunk:" /></a></p> <h3>Drill, Baby, Drill.</h3> <p><img src="" title="Source:" alt="Source:" /></p> <h3>All those overpriced &ldquo;overhead&rdquo; projectors</h3> <p><img src="" title="Source:" alt="Source:" /></p> Mon, 20 Oct 2008 21:54:14 GMT The Blues <p style="float:left"><a href=""><img src="" title="The Chicago Skyline, with the BCBS building lit up for the occasion. Now if only they'd play nice with my dental bills..." alt="The Chicago Skyline, with the BCBS building lit up for the occasion. Now if only they'd play nice with my dental bills..." /></a></p> <p>Dad and Ben came down to Chicago for the Blues Festival. It was quite a blast, and dad put up some of the pictures on <a href="">his website</a>. Boy, did they wear me out! I tell ya&#8217;&nbsp;—&nbsp;it&#8217;s a lot of work bouncing around the city every day! <br /><br /></p> Sun, 10 Jun 2007 00:30:11 GMT On the LSD <p style="float:left"><a href=""><img src="" title="On my bike again. Click for bigger." alt="On my bike again. Click for bigger." /></a></p> <p>Well, not quite. This picture is on my way home from biking the Lake Shore Drive. It was wet and rainy until they kicked us off the road, at which point the sun immediately emerged and the clouds completely cleared from the sky. I got two flats, as well. (The first was from a shard of glass, which I fixed with the spare I brought along. I went to the bike-fixing-station to get it pumped up, and the guy there promptly broke the valve.) Even so, it was great to get back on the bike and just cruise without interruption.</p> <p>And yes, I am missing a tooth.</p> Tue, 29 May 2007 00:33:27 GMT Adding an OptiBay to my MacBook Pro <p>Well, I finally decided to risk voiding my warranty for the luxury of double the disk space. I have a 160GB hard drive installed in my MacBook, but I&#8217;m constantly squeezed for space. I never use my internal CD drive (the last time was over two months ago&#8230; and it was actually my house-mate that needed it), so the thought of occasionally using an external CD drive is much more pleasant than lugging an external HD around all the time.</p> <p><a href=""><span class="caps">MCE</span> Technologies</a> sells a decent-looking package called <a href="">OptiBay</a> for a little too much money that takes the internal optical drive and replaces it with a Hard Drive. You can do it on most any Mac laptop. I searched around online quite a bit for reviews and experiences, but it seems as though nobody has done a formal review. So, I figured I&#8217;d photograph and document my experience as I went.</p> Sat, 26 May 2007 21:14:43 GMT Lies, Lies! <p style="float:left"><a href=""><img src="" title="The Chicago Theatre Marquee: Arcade Fire" alt="The Chicago Theatre Marquee: Arcade Fire" /></a></p> <p>What a blast. A few months ago, Jesse and I managed to grab some of the last tickets for the <a href="">Arcade Fire</a> shows in Chicago. Not kidding&nbsp;—&nbsp;I searched for singles immediately after we got our pair (others were interested in going, too), but none were to be had. The concert was last night, and what a show it was. I am continually impressed by their musicianship; I can&#8217;t count the number of instruments they bounced between. Even a <em>Bass</em> Saxophone made an appearance.</p> <p>It&#8217;s always refreshing to get out and be reminded how live music is <em>supposed</em> to sound. And the Chicago Theatre is gorgeous (we even had fancy box seats).</p> Mon, 21 May 2007 02:04:01 GMT The Temporary Crowns <p>Here&#8217;s the after photo. The dentist on Thursday fitted me with temporary crowns, so I really haven&#8217;t been walking around with a big hole in my mouth. For a temporary quick fix, I&#8217;m pretty impressed. They don&#8217;t quite match, and boy do they feel weird. My nerves from the old teeth were removed, so they really don&#8217;t hurt at all.</p> <p>That said, I certainly am not going to be eating any caramel apples anytime soon. Or anything that I have to bite off with my front teeth, for that matter.</p> <p><img src="" /></p> <p>Yesterday at work someone mentioned that I should just screw the replacement implants and just go for a grill. I think it&#8217;s a <a href="">marvelous idea</a> (thanks for lending them to me, Nelly). Insurance will cover that, right?</p> Sat, 19 May 2007 12:41:26 GMT