<?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>catapult-creative.com</title>
	<atom:link href="http://www.catapult-creative.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.catapult-creative.com</link>
	<description>worldwide (web) whatnot</description>
	<lastBuildDate>Wed, 18 Aug 2010 13:33:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating an admin area in Rails</title>
		<link>http://www.catapult-creative.com/2010/08/18/creating-an-admin-area-in-rails/</link>
		<comments>http://www.catapult-creative.com/2010/08/18/creating-an-admin-area-in-rails/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:24:33 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/08/18/creating-an-admin-area-in-rails/</guid>
		<description><![CDATA[This is an answer I posted to a question on Stack Overflow.  The title of that question is a little off from what the writer actually wanted to know, so I decided to to re-post the answer here.  It&#8217;s a bit of an easy/basic topic, but it comes up a lot, so I [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is <a href="http://stackoverflow.com/questions/3502436/understanding-mvc-architecture-as-non-mvc-developer/">an answer I posted to a question on Stack Overflow</a>.  The title of that question is a little off from what the writer actually wanted to know, so I decided to to re-post the answer here.  It&#8217;s a bit of an easy/basic topic, but it comes up a lot, so I thought other people out there might find it useful.</em></p>

<p>The two things to keep in mind when making an admin area are </p>


<ol>
<li>you can create namespaces for routes to get the /admin <span class="caps">URL</span>s you&#8217;re looking for and </li>
<li>you can have controllers inherit from other descendants of ActionController</li>
</ol>



<p>So to make an admin area, you&#8217;d want to have <span class="caps">REST</span>ful resources declared in a namespace (assumes Rails 3 routes):</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co1"># routes.rb</span><br />
resources <span class="re3">:users</span><br />
resources <span class="re3">:posts</span><br />
resources <span class="re3">:pages</span><br />
<br />
namespace <span class="re3">:admin</span> <span class="kw1">do</span> <span class="sy0">|</span>admin<span class="sy0">|</span><br />
&nbsp; match <span class="st0">'/'</span> <span class="sy0">=&gt;</span> <span class="st0">'dashboard#index'</span><br />
&nbsp; resources <span class="re3">:users</span><br />
&nbsp; resources <span class="re3">:posts</span><br />
&nbsp; resources <span class="re3">:pages</span><br />
<span class="kw1">end</span></div></td></tr></tbody></table></div>

<p>The top set is the public ones and the bottom set gives you the admin routes like /admin/users/new and /admin/posts/1, etc.  I&#8217;m also assuming you might want a &#8220;dashboard&#8221; so I&#8217;m setting up a route to the index method of an Admin::DashboardController</p>

<p>Then you create an admin base controller that descends from ApplicationController.  Use it to hold your admin area layout and your authentication filters:</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">class</span> <span class="re2">Admin::BaseController</span> <span class="sy0">&lt;</span> ApplicationController<br />
&nbsp; before_filter <span class="re3">:require_user</span><br />
&nbsp; layout <span class="st0">'admin'</span><br />
<span class="kw1">end</span></div></td></tr></tbody></table></div>

<p>Now make a directory in app/controllers called &#8220;admin&#8221;. Make controllers in there as normal, but have them inherit from your base controller:</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co1"># pages_controller.rb</span><br />
<span class="kw1">class</span> <span class="re2">Admin::PagesController</span> <span class="sy0">&lt;</span> <span class="re2">Admin::BaseController</span><br />
&nbsp; <span class="co1"># Controller code in here</span><br />
<span class="kw1">end</span></div></td></tr></tbody></table></div>

<p>Make a corresponding directory in app/views for &#8220;admin&#8221; and you&#8217;re good to go &#8212; everything is namespaced out and views/controllers would behave like you think.</p>

<p>You can always run &#8220;rake routes&#8221; to see all the admin routes.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/08/18/creating-an-admin-area-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bundler is totally worth the hype</title>
		<link>http://www.catapult-creative.com/2010/07/29/bundler-is-totally-worth-the-hype/</link>
		<comments>http://www.catapult-creative.com/2010/07/29/bundler-is-totally-worth-the-hype/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 03:36:03 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/07/29/bundler-is-totally-worth-the-hype/</guid>
		<description><![CDATA[Let us all now sing a hymn of praise to Bundler.  You know, like even more than we already were.  Not that it needs too much more light shining on it, what with being a dependency to Rails and all, but I&#8217;ve had cause in the past few days to throw up my [...]]]></description>
			<content:encoded><![CDATA[<p>Let us all now sing a hymn of praise to <a href="http://gembundler.com/">Bundler</a>.  You know, like even more than we already were.  Not that it needs too much more light shining on it, what with being a dependency to Rails and all, but I&#8217;ve had cause in the past few days to throw up my hands and make a joyful noise.</p>

<p>Now is a piece of software designed to do something as prosaic as dependency management going to get you hot and bothered all by itself?  Probably not.  It&#8217;s not going to be like when you discovered the beauty of <a href="http://ruby-doc.org/docs/ProgrammingRuby/html/tut_containers.html">Ruby&#8217;s iterators</a>, or how to get the QBasic interpreter to give you the <a href="http://videosift.com/video/Qbasic-Gorillas-video-game">exploding banana game</a> in <span class="caps">MSDOS</span> 5.x+.  </p>

<p>But along those same lines, Bundler will help you reserve more of your mental compute cycles for things that matter and fill you with wonder, secure in the knowledge that you&#8217;ve chopped off a few big boulders from the pile of computational entropy constantly threatening to avalanche everyone in our industry into oblivion.</p>

<p>Examples:</p>

<h3>Kids should come with &#8220;bundle install&#8221;.</h3>

<p>Apps are complicated because you need all sorts of specific stuff to deal with them.  That&#8217;s why Bundler was originally invented, obviously.  But real-world scenarios are always valuable, and today I had to get a development version of the app I&#8217;m building for my main client running on the designer&#8217;s machine, and do it as fast as possible.  While the designer is good w/ <span class="caps">HTML</span>/CSS, she doesn&#8217;t know thing one about Rails, rubygems, or the <span class="caps">RVM</span>-based sequestering of different Ruby versions, etc (another hymn another time for <span class="caps">RVM</span>).  I got all that going for her, and then, with a mere two commands (one of which checked out the source code from the repo and therefore didn&#8217;t really even count), I bootstrapped the entire app at once, while surfing the web.  &#8220;bundle install&#8221; for the win.  That same process would&#8217;ve taken me (just for the app&#8217;s dependencies) about 45 minutes or so in previous incarnations of Rails.  This way, it took less than three.  And almost all of that was completely automated.</p>

<h3>Specifying refs is a thing of beauty</h3>

<p>Rails 3 rc1 came out a couple days ago.  Like every other RoR cultist, I upgraded as soon as I heard.  A bunch of crap promptly broke.  Those wacky core team members!  They love to make a boatload of commits on something and then call it a release candidate, just to keep us all sharp.</p>

<p>One of the things that broke was <a href="http://github.com/pluginaweek/state_machine">state_machine</a>, which I rely on extensively in this the aforementioned app.  So one upgrade from Rails 3b4 to Rails 3rc1 and I&#8217;m sitting there in a puddle of my own tears, with all my specs broken and no ability to run my seeds.rb file.</p>

<p>Thankfully, the gem maintainer rapidly came up with a patch.  But he didn&#8217;t have a release ready yet.  So what did I do?  In the old days, I&#8217;d have to download his code at that Git reference and then put together a new gem on my own, keeping a vendored version that was seperate from the other versions of the gem I might&#8217;ve been using, etc etc.  I&#8217;m sure there&#8217;s probably a better way to do it even under the old regime, but with Bundler, you simply pass in a reference to the commit where it&#8217;s been fixed!</p>

<p>So this</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace">gem <span class="st0">'state_machine'</span>, <span class="re3">:git</span> <span class="sy0">=&gt;</span> <span class="st0">&quot;git://github.com/pluginaweek/state_machine.git&quot;</span></div></td></tr></tbody></table></div>

<p>Becomes this:</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace">gem <span class="st0">'state_machine'</span>, <span class="re3">:git</span> <span class="sy0">=&gt;</span> <span class="st0">&quot;git://github.com/pluginaweek/state_machine.git&quot;</span>, <span class="re3">:ref</span> <span class="sy0">=&gt;</span> <span class="st0">&quot;1e5e04bb67be0b504a5fe9ca10a490286825d452&quot;</span></div></td></tr></tbody></table></div>

<p>That blew my mind even more than the dead-simple bootstrapping of my colleague&#8217;s development system.  For working with libraries that are still in frequent development, and for fixing things like the myriad breakages that can occur when one version jumps up to be something else, this is a godsend.</p>

<p>So don&#8217;t bitch about Bundler, even if you&#8217;re tempted to in the beginning.  Like everything else surrounding Ruby/Rails, it&#8217;s new and it takes some getting used to.  But in the end, you&#8217;re likely to love it, and to wonder how you ever got along without it.  Plus, this gives us yet another reason to laugh at Pythonistas, who still lack even a Rubygems equivalent.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/07/29/bundler-is-totally-worth-the-hype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For sale for realz</title>
		<link>http://www.catapult-creative.com/2010/06/07/for-sale-for-realz/</link>
		<comments>http://www.catapult-creative.com/2010/06/07/for-sale-for-realz/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 02:46:55 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/06/07/for-sale-for-sheezee/</guid>
		<description><![CDATA[You know what you should do?  You should go download Fart Battles.  It&#8217;s in the store and it&#8217;s funny as hell.  It&#8217;s crude but it&#8217;s also clever.  You can use it to battle people or to play pranks on your friends or to create gross sounds to offend your co-workers during [...]]]></description>
			<content:encoded><![CDATA[<p>You know what you should do?  You should go download <a href="http://http://itunes.com/apps/FartBattles/">Fart Battles</a>.  It&#8217;s in the store and it&#8217;s funny as hell.  It&#8217;s crude but it&#8217;s also clever.  You can use it to battle people or to play pranks on your friends or to create gross sounds to offend your co-workers during meetings.  It&#8217;s got a couple of bugs left, but we&#8217;re working hard to get those squashed, and unlike many iPhone apps, the chances are high that you&#8217;ll never see them.</p>

<p>I wish I had more to say than this right now, but <a href="http://www.railsconf.com">RailsConf</a> is going on right now, so I&#8217;m tired and need to go get ready for day 2.</p>

<p>Fart Battles.  It&#8217;s out there.  It&#8217;s crude.  It&#8217;s gaining on you.  Don&#8217;t be left behind.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/06/07/for-sale-for-realz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitting here in limbo</title>
		<link>http://www.catapult-creative.com/2010/05/29/sitting-here-in-limbo/</link>
		<comments>http://www.catapult-creative.com/2010/05/29/sitting-here-in-limbo/#comments</comments>
		<pubDate>Sat, 29 May 2010 05:07:20 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/05/29/sitting-here-in-limbo/</guid>
		<description><![CDATA[Well it&#8217;s happened &#8212; we&#8217;ve shipped version 1.0 of Fart Battles, sending it to the iTunes Store yesterday.  Now we wait to find out when our app goes live (really whether it goes live).  It supposedly takes just two or three days to happen now (down from an earlier wait time of more [...]]]></description>
			<content:encoded><![CDATA[<p>Well it&#8217;s happened &#8212; we&#8217;ve shipped version 1.0 of <a href="http://fartbattles.com/">Fart Battles</a>, sending it to the iTunes Store yesterday.  Now we wait to find out when our app goes live (really <em>whether</em> it goes live).  It supposedly takes just two or three days to happen now (down from an earlier wait time of more than a week a few months back), but the fact that it could be at any moment has had the whole team on edge.  Now that it&#8217;s in the process, we need to be ready on the server side and on the marketing/publicity side for a release at basically any moment in the next few days.</p>

<p>And that&#8217;s a daunting idea, because much is riding on it.  Getting attention in the iPhone space isn&#8217;t easy or cheap.  Fart Battles is a fun app that straddles the line between game and entertainment novelty.  There are tons of these kinds of things in the store, and we believe that we&#8217;ve made one of the better ones, but getting it in front of people means getting their attention, famously difficult to do.  On June 5th, we&#8217;re scheduled to be on <a href="http://freeappaday.com">freeappaday.com</a>.  We&#8217;re racing to finish the last bits of stuff on our promo video for the website and we&#8217;re working on stuff for our <a href="http://facebook.com/fartbattles">Facebook fan page</a> and our <a href="http://twitter.com/fartbattles">Twitter stream</a> and our <a href="http://youtube.com/fartbattles">YouTube channel</a>.  All of this takes time and coordination, but without it, we can&#8217;t see how we&#8217;d be able to get any sales for this thing that we&#8217;ve worked on for six months.  It seems trying to gain even a small chance of rising above the considerable level of noise surrounding the app store is expensive, and knowing how to time those efforts with the rhythms of the submit/approval process is a big part of any given iPhone developer&#8217;s chance for success.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/05/29/sitting-here-in-limbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blackboard theme for XCode</title>
		<link>http://www.catapult-creative.com/2010/04/13/blackboard-theme-for-xcode/</link>
		<comments>http://www.catapult-creative.com/2010/04/13/blackboard-theme-for-xcode/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 01:55:41 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/04/13/blackboard-theme-for-xcode/</guid>
		<description><![CDATA[I love the Blackboard theme that comes with TextMate, so when I started writing Cocoa code, it wasn&#8217;t long until I decided I had to have it for XCode.  And so I present &#8220;Blackboard-ish&#8221; &#8212; the pretty-much Blackboard theme for Apple&#8217;s ginormous IDE.  Having it around staves off eye strain and reduces (ever-so-slightly) [...]]]></description>
			<content:encoded><![CDATA[<p>I love the Blackboard theme that comes with TextMate, so when I started writing Cocoa code, it wasn&#8217;t long until I decided I had to have it for XCode.  And so I present &#8220;Blackboard-ish&#8221; &#8212; the pretty-much Blackboard theme for Apple&#8217;s ginormous <span class="caps">IDE. </span> Having it around staves off eye strain and reduces (ever-so-slightly) the existential misery I feel daily from having to write so much code in such a dumbass editor.</p>

<p>I&#8217;ve put it on GitHub as a Gist &#8212; you can <a href="http://gist.github.com/365358/">get it here</a>.  Download the file and then put it in ~/Library/Application Support/XCode/Color Themes.  Activate it in your preferences and then feel your cool factor morph to &#8220;red-hot-insane&#8221;.</p>

<p>If you&#8217;re wondering what Blackboard looks like, it&#8217;s like this (except the method names are supposed to be orange, dagnabit):</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">class</span> Caveman <span class="sy0">&lt;</span> Human<br />
&nbsp; attr_accessor <span class="re3">:stoned_status</span>, <span class="re3">:good_times</span><br />
&nbsp; <br />
&nbsp; <span class="kw1">def</span> init<br />
&nbsp; &nbsp; <span class="re1">@stoned_status</span> = <span class="nu0">0</span><br />
&nbsp; <span class="kw1">end</span><br />
&nbsp; <br />
&nbsp; <span class="kw1">def</span> smoke_weed<br />
&nbsp; &nbsp; <span class="re1">@stoned_status</span> <span class="sy0">+</span>= <span class="nu0">1</span><br />
&nbsp; <span class="kw1">end</span><br />
&nbsp; <br />
&nbsp; <span class="kw1">def</span> make_it_happen<br />
&nbsp; &nbsp; <span class="re1">@good_times</span> = <span class="st0">&quot;this is so pseudo&quot;</span><br />
&nbsp; <span class="kw1">end</span><br />
<span class="kw1">end</span></div></td></tr></tbody></table></div>

<p>Anyway, now the color theme is out there, downloadable from the Gist, for all who want to use it in XCode.  Viva Blackboard!</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/04/13/blackboard-theme-for-xcode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Open Source and Amazon: concrete examples of empowerment for iPhone apps</title>
		<link>http://www.catapult-creative.com/2010/03/25/open-source-and-amazon-concrete-examples-of-empowerment-for-iphone-apps/</link>
		<comments>http://www.catapult-creative.com/2010/03/25/open-source-and-amazon-concrete-examples-of-empowerment-for-iphone-apps/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 14:34:14 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/03/25/httpriot-iphone-with-rails/</guid>
		<description><![CDATA[I&#8217;ve posted exactly zero times in the last two months because I&#8217;m head-down like a mad man, working with my team to get our very first iPhone app ready for shipping.  Fingers are crossed that this will happen in about a month or so, and I have to say that so far 2010 has [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted exactly zero times in the last two months because I&#8217;m head-down like a mad man, working with my team to get our very first iPhone app ready for shipping.  Fingers are crossed that this will happen in about a month or so, and I have to say that so far 2010 has been a whirlwind education in the creation of iPhone software and the server backends who love it.  That means that so far I&#8217;ve had no time to learn about the wonders of <a href="http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release/">Rails 3</a>, or to pontificate at length on <a href="http://www.huffingtonpost.com/2010/03/21/health-care-bill-passes-l_n_507714.html">the healthcare bill</a>, or to beat <a href="http://masseffect.bioware.com/">Mass Effect 2</a>.</p>

<p>But I have had time to be impressed, once again, at the awesome power of open source and the game-changing nature of <a href="http://aws.amazon.com/">Amazon Web Services</a>.</p>

<h3>Open Source &#8212; <span class="caps">HTTP</span>riot and delayed_job</h3>

<p>Without going into too much detail, the iPhone app I&#8217;m working on (codenamed &#8220;Pedro&#8221;) records audio files and uploads them to a server.  Naturally I&#8217;m using Rails for the backend, so I needed something to help me communicate easily with the server.  After trying both an <a href="http://allseeing-i.com/ASIHTTPRequest/"><span class="caps">ASIHTTP</span>request</a>  with <a href="http://www.grinninglizard.com/tinyxml/">TinyXML</a> solution and <a href="http://iphoneonrails.com/">Objective Resource</a>, I eventually settled on <a href="http://alternateidea.com/blog/articles/2009/7/11/introducing-httpriot-easily-consume-rest-resources-on-the-iphone-and-os-x"><span class="caps">HTTP</span>riot</a>.  <span class="caps">HTTP</span>riot is a Goldilocks solution.  <span class="caps">ASI</span>/Tiny are just too cumbersome since you end up having to write parsing methods yourself (and really, who the hell wants to do that when the entire point of structured serialization formats is that something should be able to turn them into native data structures (hashes/dictionaries) for you?), and ObjectiveResource seemed to do just a little too much and to rely on <a href="http://macdevelopertips.com/objective-c/objective-c-categories.html">Objective-C categories</a> a bit much for my comfort.</p>

<p><span class="caps">HTTP</span>riot sits right between these solutions and is <em>just right</em> (had to complete the Goldilocks thought) for talking to <span class="caps">REST </span>services <span class="caps">IMO. </span> You serialize something out as an <span class="caps">NSD</span>ictionary and <span class="caps">POST </span>or <span class="caps">PUT </span>it to the server, and you get back a response you can treat as a dictionary.  <span class="caps">GET </span>requests are a one-liner (though to do it right you need a few methods so you can have a ViewController delegate handle the eventual response).  The only drawback I&#8217;ve found so far to <span class="caps">HTTP</span>riot is that it requires you to cram all your processing logic for any given resource into a single method, as one and only one delegate method handles a successful server response.  But that&#8217;s a small gripe.  Using this excellent library, I was able to re-write the entire <span class="caps">ASI</span>/Tiny solution in a few hours.  That&#8217;s versus a few days getting it set up in the first place.  If you need to talk to a <span class="caps">REST </span>service with an iPhone, I highly recommend <span class="caps">HTTP</span>riot.  As a bonus, the inimitable Geoffrey Grossenbach (@topfunky) uses it in <a href="https://peepcode.com/products/iphone-view-controllers-part-i">one of Peepcode&#8217;s iPhone screencasts</a>, enabling you to get both a step-by-step tutorial on creating a non-trivial working application with <span class="caps">HTTP</span>riot, and a good bit of explanation on how the library ought to be used.</p>

<p>When <span class="caps">HTTP</span>riot is done pushing an audio file to my app server, a <a href="http://github.com/collectiveidea/delayed_job">Ruby library called delayed_job</a> does the background processing required to send it to <a href="http://aws.amazon.com/s3/">Amazon S3</a>, where it will live and respond to <span class="caps">GET </span>requests via <a href="http://aws.amazon.com/cloudfront/">Amazon Cloudfront</a>.  delayed_job was created by the redoubtable Rubyists behind <a href="http://www.shopify.com/">Shopify</a>, the coolest turnkey e-commerce solution I&#8217;ve found so far.  I&#8217;ve made a site or two for clients using Shopify, so I was excited to discover that they&#8217;d opened up the library they wrote to do background processing.  delayed_job is a database-backed persistent job queue that runs in its own process and makes backgrounding a task dead simple.  You can do all sorts of fancy things with prioritization and whatnot, but the thing that made me fall in love (even though my use cases eventually got a bit too complex to use it very much) is the fact that you can run any method with <strong>send_later</strong> &#8212; as in:</p>

<div class="codecolorer-container ruby blackboard" style="overflow:auto;white-space:nowrap;width:620px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace">foo_object.<span class="me1">send_later</span><span class="br0">&#40;</span><span class="re3">:process_that_takes_awhile</span>, <span class="re1">@argument</span><span class="br0">&#41;</span></div></td></tr></tbody></table></div>

<p>That one-liner will bop it into the queue, and delayed_job will handle it as it can.  It&#8217;s really that easy.  I&#8217;m using dj for sending emails and pushing binary files to Amazon, but I might start using it for other things as well.  <a href="http://www.engineyard.com/">EngineYard</a> (where we&#8217;re hosting this opus) supports it for production, and for development, you get a nice Rake task to help you manage it and keep an eye on the tasks as they happen.</p>

<p>The point of all this exposition is to say that I feel fortunate to have come up as a code dunce during a time in which open source software is mature enough to be able to provide even a relative n00b like me with documented, real-world-tested, helpful stuff that does exactly what I need it to &#8212; whether on the server side or on the client side.  It&#8217;s worth mentioning as well that both of these things are arguably direct offshoots of the Rails community (delayed_job is in Ruby and was built to serve a Rails app, and <span class="caps">HTTP</span>riot was built with <span class="caps">REST </span>interactions in mind, which Rails has done a lot to help popularize), which continues to astound me in its breadth, creativity, and helpfulness.</p>

<h3><span class="caps">AWS </span>&#8211; cheaper than dirt, more valuable than gold</h3>

<p>Have you ever seen anything as <strong>cheap</strong> as the stuff offered by Amazon Web Services?  I don&#8217;t think I have.  Or to put it more directly, <span class="caps">AWS </span>are the cheapest things I&#8217;ve ever seen someone try to put a price tag on:</p>

<p>- <a href="http://aws.amazon.com/s3/"><strong>S3</strong></a>, Amazon&#8217;s storage service, charges $.015 per GB for the first 10 TB of transfer bandwidth you use in a month.  And the prices go down from there.  Get out your calculator and do the math to see how much data you have to be moving around before this starts to cost you more than you have in your change jar, and you&#8217;ll likely spend 20 minutes or so cackling to yourself about just how inexpensive mind-blowing web power is these days.</p>

<p>- <a href="http://aws.amazon.com/cloudfront/"><strong>Cloudfront</strong></a>, Amazon&#8217;s <span class="caps">CDN </span>charges $.01 for every 10,000 <span class="caps">GET </span>requests.  Do the calculator thing on that one (realizing that it&#8217;s basically an add-on to the above), and you&#8217;ll be laughing even longer.</p>

<p>- We buy <a href="http://aws.amazon.com/ec2/"><strong><span class="caps">EC2</span></strong></a>, Amazon&#8217;s scalable-on-demand computing service, through a reseller (EngineYard) who really doesn&#8217;t add all that much to the $0.085/hour cost that Amazon themselves charge.  EngineYard is able to offer hosting solutions optimized for Rails based on <span class="caps">EC2, </span>along with monitoring and Rails-oriented deployment and management tools, for so little extra on top of what Amazon themselves charge that for the first few weeks you&#8217;ll feel like you&#8217;re getting away with a crime.</p>

<p>Without the open source libraries I mentioned above, Pedro would take much, much longer to build and would be necessarily a bit less stable, simply because my team and I would be building everything from scratch.  But without Amazon Web Services, there&#8217;s no way we could even entertain the notion of making this app.  Pedro is a game: a funny, 99-cent App Store novelty that we hope will go viral and make us some cash.  Apple gives us a great way to distribute the app, but without Amazon, we&#8217;d have show-stopping cost barriers to actually building a backend capable of meeting rapid, viral demand.  A few years ago, just standing up unused production infrastructure to handle these use cases would&#8217;ve cost us thousands of dollars a month in rents, to say nothing of what it would cost in time and/or people-hours to have a qualified sysadmin lurking on our payroll.  Now because of Amazon, those barriers are gone &#8212; replaced by a giggle-inducing cost structure for computing resources that back one of the most powerful retailer/supply chains on Earth.</p>

<p>With the preponderance of open source libraries and the rise of commoditized enterprise-scale computing, the utopia really <em>is</em> now &#8212; the only things holding anyone back are time, creativity, and will.</p>

<p>Speaking of which, I need to dive back down my code hole.  See you in a month or so.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/03/25/open-source-and-amazon-concrete-examples-of-empowerment-for-iphone-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad &#8212; I&#8217;m glad I&#8217;m not really a pundit</title>
		<link>http://www.catapult-creative.com/2010/01/28/ipad-im-glad-im-not-really-a-pundit/</link>
		<comments>http://www.catapult-creative.com/2010/01/28/ipad-im-glad-im-not-really-a-pundit/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:56:20 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/01/28/ipad-im-glad-im-not-really-a-pundit/</guid>
		<description><![CDATA[OK so I&#8217;m really glad that I&#8217;m not a professional technology pundit, since all the predictions from my last post turned out to be wrong.  Even the name!  What the hell?  I&#8217;m pretty sure that I&#8217;m going to be there in line for the thing on the first day, but &#8220;iPad&#8221;?  [...]]]></description>
			<content:encoded><![CDATA[<p>OK so I&#8217;m really glad that I&#8217;m not a professional technology pundit, since all the predictions from my last post turned out to be wrong.  Even the name!  What the hell?  I&#8217;m pretty sure that I&#8217;m going to be there in line for the thing on the first day, but &#8220;iPad&#8221;?  It sounds like something that the menstrual product industry would market for &#8220;young lady&#8217;s first period.&#8221;  &#8220;iSlate&#8221; was so much better.</p>

<p>I&#8217;d still love to see the iPad enable some cool peripheral needs.  I understand why they didn&#8217;t showcase that as a major use of this thing, but I&#8217;m hoping that the <span class="caps">SDK </span>will let programmers create apps that enable the iPad to be used as an input device &#8212; the 1000-sensor multitouch screen would make it pretty compelling for that.  I mean if you watch the <a href="http://brushesapp.com/">Brushes app</a> demo, you&#8217;ll get an idea of what you could do with this in something like Photoshop or Illustrator.</p>

<p><a href="http://daringfireball.net/2010/01/ipad_big_picture">John Gruber got to play with one</a> a bunch and said that the main thing that he (and it seemed everyone else there) noticed about the experience is how fast it is.  And it&#8217;s Apple&#8217;s own chip in this beast &#8212; a 1 Ghz Apple A4 chip.  This is going to drive Apple&#8217;s bid toward dominance as the &#8220;largest mobile device maker in the world&#8221;</p>

<blockquote>
  <p>Apple now owns and controls their own mobile <span class="caps">CPU</span>s. There aren&#8217;t many companies in the world that can say that. And from what I saw today, Apple doesn&#8217;t just own and control a mobile <span class="caps">CPU, </span>they own and control the hands-down best mobile <span class="caps">CPU </span>in the world. Software aside (which is a huge thing to put aside), it may well be that no other company could make a device today matching the price, size, and performance of the iPad. They&#8217;re not getting into the <span class="caps">CPU </span>business for kicks, they&#8217;re getting into it to kick ass.</p>
</blockquote>

<p>It seems inevitable that they&#8217;ll try to put one of these babies into a new version of the iPhone, and then, well holy crap. They&#8217;ll need to call it the 3GS^2</p>

<h3>Peripheral</h3>

<p>I wish I&#8217;d been right about the magnetic induction stand, because I think that would&#8217;ve been a lot cooler than the flip-around carrying case thing that they&#8217;re going to ship this with, but it makes sense that they&#8217;re going to have the same 30-pin power/data connection that the iPhone/iPod have.  Apple has a history (that they seem to have abandoned) of just drastically changing what&#8217;s available in the way of interfaces or peripherals on new devices.  Remember how aghast people were that the iMac had no 3.5&#8243; floppy drive?  Earlier than that, I think there was a big stink when they did <span class="caps">SCSI </span>instead of parallel ports on their boxes.  Given this history, it made sense to me that they might want to make the sync interactions of the device entirely wireless.  But given the existing commitment to 30-pin connectors, it feels a little more &#8220;new Apple&#8221; that they kept this tech in the device.</p>

<p>I&#8217;ll leave the public predictions to people who know a lot more about the history and industry on these things, but it was fun to speculate.  I can&#8217;t wait to download the <span class="caps">SDK </span>for iPad &#8212; I should have it later today &#8212; and I&#8217;m of course hyper-excited to get one in 60 days.  Still trying to decide though whether I care about the 3G access.  At this point, hearing that <span class="caps">AT&amp;T </span>is willing to sell me an unlimited 3G data plan for $29.95 is sort of like hearing that shit sandwiches are 75% off.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/01/28/ipad-im-glad-im-not-really-a-pundit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reckless predictions about the Apple Tablet</title>
		<link>http://www.catapult-creative.com/2010/01/04/reckless-predictions-about-the-apple-tablet/</link>
		<comments>http://www.catapult-creative.com/2010/01/04/reckless-predictions-about-the-apple-tablet/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:47:14 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2010/01/04/reckless-predictions-about-the-apple-tablet/</guid>
		<description><![CDATA[With no pundit reputation to screw up, I stand here unashamed and ready to be proven wrong.  Here are my predictions for what the mythical Apple tablet computer will be all about.

It will be called the &#8216;iSlate&#8217;

Cool name.  NYTimes editor Bill Keller called it a version of that name (&#8221;the new Apple slate&#8221;) [...]]]></description>
			<content:encoded><![CDATA[<p>With no pundit reputation to screw up, I stand here unashamed and ready to be proven wrong.  Here are my predictions for what the mythical Apple tablet computer will be all about.</p>

<h3>It will be called the &#8216;iSlate&#8217;</h3>

<p>Cool name.  <span class="caps">NYT</span>imes editor Bill Keller called it a version of that name (&#8221;the new Apple slate&#8221;) at one point awhile back, and it just fits nicely.  Also Apple owns islate.com.</p>

<h3>There will be an awesome accessory</h3>

<p>The iPhone comes with an accessory that manages to actually <em>up</em> the cool factor &#8212; its headphones.  The iSlate will have one if its own: a sleek cradle that will fulfill the functionalities of a stand (allowing the iSlate to sit upright for easy seated viewing), and a charging station, using magnetic induction as its power delivery mechanism, and enabling Apple&#8217;s designers to avoid placing a power port on the device itself.  I&#8217;m also predicting as part of this that it will support over-the-air sync <em>only</em>.</p>


<h3>Part of the pitch will be for use as an accessory</h3>

<p>Not a big part, mind you, but I think there will be significant emphasis on using this as a secondary input device for an existing computer &#8212; as a drawing tablet or a multi-function &#8220;hotkeys&#8221; device or something.  This could just be <a href="http://www.catapult-creative.com/2009/09/09/apple-my-fingers-ache/">wishful thinking</a> on my part, but I just can&#8217;t get past the idea that Apple wants people to view this as a computing device whose primary attraction is that it lends itself to a paradigm-shifting <em>generality</em> of use.  That means fulfilling the roles of computer, television, magazine, and yeah, <a href="http://www.wacom.com/">Wacom tablet</a>.</p>

<p>More importantly will be the idea that the iSlate fits into your life in a certain way &#8212; as your &#8220;on-the-go&#8221; device; even more so than the iPhone, this is the thing you take to meetings, take on short trips, etc.  Auto-syncing important documents and whatnot over the air will be a big deal.</p>

<h3>It will run something beefier than iPhone OS</h3>

<p>Maybe not full-on OS X, but I agree with <a href="http://daringfireball.net/2009/12/the_tablet">John Gruber</a> that they&#8217;re not going to just spooge the iPhone OS onto the device:</p>

<blockquote>
   <p>in the same way that it made no sense for Apple to design the iPhone OS to run Mac software, it makes little sense for a device with a 7-inch (let alone larger) display to run software designed for a 3.5-inch display.</p>
</blockquote>

<p>I also don&#8217;t think that the file system will be <em>completely</em> hidden away a la the iPhone and that the only way you&#8217;ll be able to interact with the device is through apps.  If this is to try and be a general-purpose computing device, there has to be some kind of file system access, even if it&#8217;s severely limited.  Another piece of evidence for it being something somewhere between iPhone OS and full-on OS X is the <a href="http://www.appleinsider.com/articles/09/05/07/snow_leopard_to_support_native_3g_wireless_wan_hardware.html"><span class="caps">WWAN </span>(as in 3G) network information reporting in Snow Leopard</a>.</p>

<p>OK &#8212; that seems like prognostication enough for now.  Can&#8217;t wait for January 26th/27th.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2010/01/04/reckless-predictions-about-the-apple-tablet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take no one&#8217;s word on The Tablet</title>
		<link>http://www.catapult-creative.com/2009/12/20/take-no-ones-word-on-the-tablet/</link>
		<comments>http://www.catapult-creative.com/2009/12/20/take-no-ones-word-on-the-tablet/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 04:54:11 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2009/12/20/take-no-ones-word-on-the-tablet/</guid>
		<description><![CDATA[I like this Macalope column from Macworld, reminding us all how wrong all the pundits were in advance of the iPhone (and quite a bit of the dumb stuff that&#8217;s been said lately about the rumored Apple tablet).  The best part though is his insight that the reason Apple has succeeded with the iPod [...]]]></description>
			<content:encoded><![CDATA[<p>I like <a href="http://www.macworld.com/article/145141/2009/12/tablet_macalope.html">this Macalope column</a> from Macworld, reminding us all how wrong all the pundits were in advance of the iPhone (and quite a bit of the dumb stuff that&#8217;s been said lately about the rumored Apple tablet).  The best part though is his insight that the reason Apple has succeeded with the iPod and iPhone is because those two technologies each had a killer differentiating feature that made them able to disrupt an existing market.</p>

<blockquote>
   <p>if and when it appears, will have some differentiator that makes it a compelling purchase. The iPod replaced your CD collection, the Apple TV would like to replace your <span class="caps">DVD </span>collection (but you won&rsquo;t buy one), and the iPhone, obviously, replaced your cell phone. The tablet (insert caveat about its existential dilemma) will turn another industry on its head. The problem with the JooJoo is that it has no hook, no ecosystem. It doesn&rsquo;t act as a compelling replacement for anything you have.</p>
</blockquote>

<p>One thing that I&#8217;m hoping for (but that I think there&#8217;s very little possibility of due to the likelihood that they&#8217;re going to base it on iPhone OS) is some kind of personal diagramming application.  I&#8217;d love to be able to add some programmatic heft behind the diagrams I draw of data models, applications, etc.  I&#8217;d love to be able to put data behind some stuff, or draw things that can go right into a program like <a href="http://www.omnigroup.com/applications/OmniGraffle/">OmniGraffle</a></p>

<p>If my own little personal BS grammar of pseudo <a href="http://en.wikipedia.org/wiki/Unified_Modeling_Language"><span class="caps">UML</span></a> could get programmed out pop-n-fresh automatically into some <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">ActiveRecord models</a> right after I drew it freehand, I&#8217;d be one step closer to some right-brain techie Nirvana.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2009/12/20/take-no-ones-word-on-the-tablet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One new thing that blows my mind a bit</title>
		<link>http://www.catapult-creative.com/2009/11/13/one-new-thing-that-blows-my-mind-a-bit/</link>
		<comments>http://www.catapult-creative.com/2009/11/13/one-new-thing-that-blows-my-mind-a-bit/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 14:56:11 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catapult-creative.com/2009/11/13/one-new-thing-that-blows-my-mind-a-bit/</guid>
		<description><![CDATA[There are more black people than white people on Twitter, and this is only recently becoming obvious to people because of new Twitter stuff like Trending Topics:

But seriously&#8212;talk about being in a bubble!&#8212;demographically, there is a greater proportion of black people than white people among the Internet-using population on Twitter: according to Pew, 26% of [...]]]></description>
			<content:encoded><![CDATA[<p>There are <a href="http://www.theawl.com/2009/11/what-were-black-people-talking-about-on-twitter-last-night" title="What Were Black People Talking About on Twitter Last Night? | The Awl">more black people than white people on Twitter</a>, and this is only recently becoming obvious to people because of new Twitter stuff like <a href="http://twitter.com/trendingtopics">Trending Topics</a>:</p>

<blockquote><p>But seriously&mdash;talk about being in a bubble!&mdash;demographically, there is a greater proportion of black people than white people among the Internet-using population on Twitter: according to Pew, 26% of African-Americans online use Twitter; only 19% of white Internet people use Twitter. So really the question is: why does Twitter get so white and boring during the day? Don&#8217;t white people do anything at work?</p></blockquote>


<p>So many data at play in this that I don&#8217;t want to say anything, but this is really interesting for what it says about Twitter&#8217;s power as a general communication medium with high availability outside the socioeconoomic ranks of affluent suburban office workers.</p>]]></content:encoded>
			<wfw:commentRss>http://www.catapult-creative.com/2009/11/13/one-new-thing-that-blows-my-mind-a-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
