<?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/"
	>

<channel>
	<title>Sean Cook</title>
	<atom:link href="http://www.seancook.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seancook.com</link>
	<description>ramblings on mobile software, devices, and life</description>
	<pubDate>Fri, 26 Dec 2008 14:58:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Testing mobile web pages in Firefox</title>
		<link>http://www.seancook.com/2008/09/24/testing-mobile-web-pages-in-firefox/</link>
		<comments>http://www.seancook.com/2008/09/24/testing-mobile-web-pages-in-firefox/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 17:19:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Handsets]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[wap]]></category>

		<category><![CDATA[xhtml-mp]]></category>

		<guid isPermaLink="false">http://www.seancook.com/?p=45</guid>
		<description><![CDATA[The worst part of developing for the mobile web is ensuring that you&#8217;re accounting for the quirks of each of your target devices&#8217; browsers.  I often compare this to developing for the fixed web circa 1998&#8211;  no matter how great your site looked in one browser, you still had to hack it to pieces to [...]]]></description>
			<content:encoded><![CDATA[<p>The worst part of developing for the mobile web is ensuring that you&#8217;re accounting for the quirks of each of your target devices&#8217; browsers.  I often compare this to developing for the fixed web circa 1998&#8211;  no matter how great your site looked in one browser, you still had to hack it to pieces to make it render correctly in another browser (*cough* IE *cough*).  To accomodate these nuances, you typically have to implement per-device views that can make projects exponentially harder to test, and really take the fun out of mobile development.</p>
<p>Fortunately, I spend a lot of time writing both the client side of my mobile web apps, as well as the server side components  that power them.  The easiest way I&#8217;ve found to quickly test the rendering of my output per device User-Agent is to install the <a title="User Agent Switcher" href="https://addons.mozilla.org/en-US/firefox/addon/59">User Agent Switcher component for Firefox</a>.  This component allows you to quickly and easily  change the User-Agent header that your browser uses to identify itself to web servers.  With just a few clicks I can quickly run down a list of 10 devices and verify that device-specific logic is firing properly on the backend.  Additionally, I&#8217;ll often resize my Firefox window to the target device&#8217;s screen dimensions (e.g. 240&#215;320) to get a rough approximation of the overall look and feel of the page.</p>
<p>While there is no real substitute for testing on real devices, this technique has proven useful to me and hopefully someone else will also find it useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/09/24/testing-mobile-web-pages-in-firefox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iPhone screenshots are easy</title>
		<link>http://www.seancook.com/2008/09/22/iphone-screenshots-are-easy/</link>
		<comments>http://www.seancook.com/2008/09/22/iphone-screenshots-are-easy/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 21:38:07 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Handsets]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=43</guid>
		<description><![CDATA[If you have firmware version 2.0+ on your iPhone, you can quickly take a screenshot on the device by navigating to the screen you want to grab, holding down the home button, then pressing and releasing the sleep/awake button on the top of the phone.  Your screen will &#8220;flash&#8221; to indicate that the picture [...]]]></description>
			<content:encoded><![CDATA[<p>If you have firmware version 2.0+ on your iPhone, you can quickly take a screenshot on the device by navigating to the screen you want to grab, holding down the home button, then pressing and releasing the sleep/awake button on the top of the phone.  Your screen will &#8220;flash&#8221; to indicate that the picture has been taken and you can find the picture in your camera roll library on the device.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/09/22/iphone-screenshots-are-easy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Double Brace Initialization in Java</title>
		<link>http://www.seancook.com/2008/07/18/double-brace-initialization-in-java/</link>
		<comments>http://www.seancook.com/2008/07/18/double-brace-initialization-in-java/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 18:10:57 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=3</guid>
		<description><![CDATA[When I was working on my thesis for graduate school I spent months reading all that I could on optimizations that Java coders could consciously utilize while coding. While that was as exciting as it sounds*, I did manage to stumble across a few Java idioms that I’m surprised I don’t see used more often. [...]]]></description>
			<content:encoded><![CDATA[<p>When I was working on my thesis for graduate school I spent months reading all that I could on optimizations that Java coders could consciously utilize while coding. While that was as exciting as it sounds*, I did manage to stumble across a few Java idioms that I’m surprised I don’t see used more often. One of my favorite idioms that I still use from time to time is called <a href="http://c2.com/cgi/wiki?DoubleBraceInitialization">Double Brace Initialization</a>.  It’s a simple way to initialize collections, and I personally feel that it makes code more readable.</p>
<p>Instead of this:</p>
<pre name="code" class="java">
private Map<Object,Integer> map = new HashMap<Object,Integer>();
map.put(obj1, 3);
map.put(obj2, 4);
/*  yada yada yada */
</pre>
<p>You can do this:</p>
<pre name="code" class="java">
private Map<Object,Integer> map = new HashMap<Object,Integer>(){{
put(obj1, 3);
put(obj2, 4);
/* yada yada yada */
}}
</pre>
<p>The first brace creates an anonymous inner class, and the second brace creates an initializer block that is executed when the anonymous class is created.</p>
<p>__</p>
<p>*it really wasn’t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/07/18/double-brace-initialization-in-java/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programmatically obtain a phone&#8217;s ESN</title>
		<link>http://www.seancook.com/2008/07/03/programmatically-obtain-a-phones-esn/</link>
		<comments>http://www.seancook.com/2008/07/03/programmatically-obtain-a-phones-esn/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 18:28:02 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Handsets]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[CDMA]]></category>

		<category><![CDATA[ESN]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=8</guid>
		<description><![CDATA[
Bitpim is an open-source program that allows a user to manipulate data on a CDMA handset, including the phone book, wallpapers, ringtones, and in some cases, the filesystem. While poking around the application’s source, which is written in python, I found a great class that provides a quick way to access the phone’s manufacturer, ESN, [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p><a href="http://bitpim.org/">Bitpim</a> is an open-source program that allows a user to manipulate data on a CDMA handset, including the phone book, wallpapers, ringtones, and in some cases, the filesystem. While poking around the application’s source, which is written in python, I found a great class that provides a quick way to access the phone’s manufacturer, ESN, and firmware revision. Yes, this information is available through a small set of keystrokes on CDMA handsets, but I have often found cases where I would still prefer to provide an app to a user and have it do all the dirty work.</p>
<p>The class is called “phone_detect.py” and it’s located under the /src/ in the source tree. All that it really does is act as a wrapper for the AT commands that are necessary to switch the phone into the correct mode and also to ask the phone for it’s configuration info. You can get a good understanding of what it’s doing by following the calls to __get_esn(). There are plenty of references available online that show the full range of AT commands that phones respond to.</p>
<p>To play with the class, you’ll need to get an install python.  In addition to python, you will also need <a href="http://pyserial.sourceforge.net/">pySerial</a> in order to interface with your serial port. Once you have your handset connected to your computer you can call use the class directly by calling DetectPhone().detect(). There’s an example of using this call in setphone_wizard.py if you need one.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/07/03/programmatically-obtain-a-phones-esn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GZIP content for mobile devices</title>
		<link>http://www.seancook.com/2008/07/02/gzip-content-for-mobile-devices/</link>
		<comments>http://www.seancook.com/2008/07/02/gzip-content-for-mobile-devices/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 18:31:39 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Handsets]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[GZIP]]></category>

		<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=11</guid>
		<description><![CDATA[One of the easiest, most obvious ways to lower the data transfer footprint of your mobile apps is to compress data. For some reason, I still see mobile web decks that output XHTML-MP in plain text instead of very-easy-to-implement GZIP compression. I’ve implemented GZIP output on multiple J2EE projects with the help of Jayson Falkner’s [...]]]></description>
			<content:encoded><![CDATA[<p>One of the easiest, most obvious ways to lower the data transfer footprint of your mobile apps is to compress data. For some reason, I still see mobile web decks that output XHTML-MP in plain text instead of very-easy-to-implement <a href="http://en.wikipedia.org/wiki/Gzip">GZIP</a> compression. I’ve implemented GZIP output on multiple J2EE projects with the help of Jayson Falkner’s excellent GZIPFilter which is available in his article <a href="http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html">Two Servlet Filters Every Web Application Should Have</a>.</p>
<p>To implement the filter in your own projects, download the three pieces of the filter: GZIPFilter, GZIPResponseStream, GZIPResponseWrapper and save them in your project. Then, in your web.xml add the following entries:</p>
<pre name="code" class="xml">
<filter>
<filter-name>Compress</filter-name>
<filter-class>GZIPFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Compress</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
</pre>
<p>Remember to adjust the url-pattern to what’s appropriate for your webapp. I typically map my Spring MVC dispatcher servlet to *.do, but that’s just a hangover from Struts.</p>
<p>Once you’ve redeployed your webapp you should verify that output is rendering correctly in a desktop client such as Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/07/02/gzip-content-for-mobile-devices/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dave Matthews Band in Bristow, VA</title>
		<link>http://www.seancook.com/2008/06/30/dave-matthews-band-in-bristow-va/</link>
		<comments>http://www.seancook.com/2008/06/30/dave-matthews-band-in-bristow-va/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 18:41:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Concert]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=15</guid>
		<description><![CDATA[

&#8220;Eat, drink, and be merry for tomorrow we die&#8221; - Tripping Billies
I caught DMB out at the Nissan Pavilion Saturday night for my 4th concert in 4 weeks (which brings my total ticket cost of this summer to more than $500). They sounded great, and as always I found myself in awe of Carter Beauford’s [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://seancook.com/images/concerts/dmb.jpg" alt="Dave Matthews Band - Bristow VA" /></p>
<p><br clear="all" /></p>
<p><em>&#8220;Eat, drink, and be merry for tomorrow we die&#8221; - Tripping Billies</em></p>
<p>I caught DMB out at the Nissan Pavilion Saturday night for my 4th concert in 4 weeks (which brings my total ticket cost of this summer to more than $500). They sounded great, and as always I found myself in awe of Carter Beauford’s mad chops.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/06/30/dave-matthews-band-in-bristow-va/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Capistrano deploy script for Dreamhost</title>
		<link>http://www.seancook.com/2008/06/18/capistrano-deploy-script-for-dreamhost/</link>
		<comments>http://www.seancook.com/2008/06/18/capistrano-deploy-script-for-dreamhost/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 18:58:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Capistrano]]></category>

		<category><![CDATA[Dreamhost]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=19</guid>
		<description><![CDATA[I use the following Capistrano script to manage deployment of my blog to Dreamhost.  It is a modified version of the deploy script provided on the Radiant CMS wiki, and it addresses two bugs involving the svn username and password.
To use it, capify your working rails directory and then replace /config/deploy.rb with the code [...]]]></description>
			<content:encoded><![CDATA[<p>I use the following Capistrano script to manage deployment of my blog to <a href="http://dreamhost.com/">Dreamhost</a>.  It is a modified version of the deploy script provided on the <a href="http://wiki.radiantcms.org/How_To_Deploy_on_Dreamhost">Radiant CMS wiki</a>, and it addresses two bugs involving the svn username and password.</p>
<p>To use it, capify your working rails directory and then replace /config/deploy.rb with the code below:</p>
<pre name="code" class="ruby">
set :user, '' #dreamhost username goes here
set :application, "" #dreamhost domain name goes here
set :repository, "" #path to your svn repo
set :scm_username, "" #svn username 

# =============================================================================
# You shouldn't have to modify the rest of these
# =============================================================================

role :web, application
role :app, application
role :db,  application, :primary => true

set :deploy_to, "/home/#{user}/#{application}"
# set :svn, "/path/to/svn"       # defaults to searching the PATH
set :use_sudo, false
# set :restart_via, :run
set(:scm_password) { Capistrano::CLI.password_prompt }

# saves space by only keeping last 3 when running cleanup
set :keep_releases, 3 

# issues svn export instead of checkout
set :checkout, "checkout" 

# keeps a local checkout of the repository on the server to get faster deployments
set :deploy_via, :remote_cache

ssh_options[:paranoid] = false

# =============================================================================
# OVERRIDE TASKS
# =============================================================================
namespace :deploy do

  desc "Restart Passenger"
  task :restart, :roles => :app do
    run "touch #{current_path}/tmp/restart.txt"
  end

  desc <<-DESC
    Deploy and run pending migrations. This will work similarly to the \
    `deploy' task, but will also run any pending migrations (via the \
    `deploy:migrate' task) prior to updating the symlink. Note that the \
    update in this case it is not atomic, and transactions are not used, \
    because migrations are not guaranteed to be reversible.
  DESC
  task :migrations do
    set :migrate_target, :latest
    update_code
    migrate
    symlink
    restart
  end

end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/06/18/capistrano-deploy-script-for-dreamhost/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Death Cab for Cutie in Columbia, MD</title>
		<link>http://www.seancook.com/2008/06/10/death-cab-for-cutie-in-columbia-md/</link>
		<comments>http://www.seancook.com/2008/06/10/death-cab-for-cutie-in-columbia-md/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 19:03:37 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Concert]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=21</guid>
		<description><![CDATA[

&#8220;How I wish you could see the potential,
the potential of you and me
It&#8217;s like a book elegantly bound,
but in a language that you can&#8217;t read just yet&#8221; 
I was fortunate enough to score tickets in the pit for yesterday’s Death Cab for Cutie show at the Meriweather Post Pavilion in Columbia, MD. The Pavilion is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://seancook.com/images/concerts/death_cab_for_cutie.jpg" alt="Death Cab for Cutie - Columbia, MD" /><br />
<br clear="all" /><br />
<em>&#8220;How I wish you could see the potential,<br />
the potential of you and me<br />
It&#8217;s like a book elegantly bound,<br />
but in a language that you can&#8217;t read just yet&#8221; </em></p>
<p>I was fortunate enough to score tickets in the pit for yesterday’s Death Cab for Cutie show at the <a title="Meriweather Post Pavilion" href="http://www.merriweathermusic.com/">Meriweather Post Pavilion</a> in Columbia, MD. The Pavilion is great– designed by Frank Gehry in 1967, it’s consistently named one of best outdoor venues in America. Death Cab played almost all of their tracks off of Narrow Stairs and also mixed in some older stuff like “Tiny Vessels” from Transatlanticism.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/06/10/death-cab-for-cutie-in-columbia-md/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ben Folds in Vienna, VA</title>
		<link>http://www.seancook.com/2008/05/29/ben-folds-in-vienna-va/</link>
		<comments>http://www.seancook.com/2008/05/29/ben-folds-in-vienna-va/#comments</comments>
		<pubDate>Thu, 29 May 2008 19:10:29 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Concert]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=27</guid>
		<description><![CDATA[
Fred sits alone at his desk in the dark
There&#8217;s an awkward young shadow that waits in the hall
He&#8217;s cleared all his things and he&#8217;s put them in boxes
Things that remind him: &#8216;Life has been good&#8217;
Last night I caught Ben Folds performing at Wolf Trap, which is called “America’s National Park for the Perfoming Arts”. Wolf [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://seancook.com/images/concerts/ben_folds.jpg" alt="Ben Folds  - Vienna, VA" /></p>
<p><em>Fred sits alone at his desk in the dark<br />
There&#8217;s an awkward young shadow that waits in the hall<br />
He&#8217;s cleared all his things and he&#8217;s put them in boxes<br />
Things that remind him: &#8216;Life has been good&#8217;</em></p>
<p>Last night I caught Ben Folds performing at <a href="http://www.wolftrap.org/">Wolf Trap</a>, which is called “America’s National Park for the Perfoming Arts”. Wolf Trap is a beautiful venue that sits just minutes down the road from DC– it’s easy to get to, has ample parking, and allows you to bring in your own alcohol and food.</p>
<p>I’ve seen him a few times before in Atlanta at the Roxy and the Tabernacle, but this was definitely the most personable and energetic performance that I’ve seen from him. As always, I still kick myself for not going to see Ben Folds Five when they were together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/05/29/ben-folds-in-vienna-va/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Radiohead in Bristow, VA</title>
		<link>http://www.seancook.com/2008/05/12/radiohead-in-bristow-va/</link>
		<comments>http://www.seancook.com/2008/05/12/radiohead-in-bristow-va/#comments</comments>
		<pubDate>Mon, 12 May 2008 19:13:05 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Concert]]></category>

		<guid isPermaLink="false">http://www.seancook.local/?p=29</guid>
		<description><![CDATA[

I don’t wanna be your friend
I just wanna be your lover
No matter how it ends
No matter how it starts
Forget about your house of cards
And I’ll do mine
Forget about your house of cards
And I’ll do mine
It was cold and there was a torrential rain storm, but it was well worth it. Hearing Thom Yorke sing “Fake [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Radiohead - Bristow, VA" src="http://seancook.com/images/concerts/radiohead_bristow.jpg" alt="" width="500" height="348" /></p>
<p><br clear="all" /></p>
<p><em>I don’t wanna be your friend<br />
I just wanna be your lover<br />
No matter how it ends<br />
No matter how it starts</em></p>
<p><em>Forget about your house of cards<br />
And I’ll do mine<br />
Forget about your house of cards<br />
And I’ll do mine</em></p>
<p>It was cold and there was a torrential rain storm, but it was well worth it. Hearing Thom Yorke sing “Fake Plastic Trees” live is something that every music lover has to do at least once.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seancook.com/2008/05/12/radiohead-in-bristow-va/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
