<?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>12 Spokes</title>
	<atom:link href="http://blog.12spokes.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.12spokes.com</link>
	<description>Make the web go 'round</description>
	<pubDate>Mon, 27 Apr 2009 22:06:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Launch: New Depot Site—Keep Rockin&#8217;</title>
		<link>http://blog.12spokes.com/?p=15</link>
		<comments>http://blog.12spokes.com/?p=15#comments</comments>
		<pubDate>Mon, 27 Apr 2009 22:06:19 +0000</pubDate>
		<dc:creator>Trey Bean</dc:creator>
		
		<category><![CDATA[Web Design & Development]]></category>

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

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

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

		<category><![CDATA[web design]]></category>

		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=15</guid>
		<description><![CDATA[Last week, we deployed a complete redesign of The Depot&#8217;s website.  The Depot is one of the premier concert venues in Salt Lake City.  They&#8217;ve been one of our clients since the early days of 12 Spokes, coming to us (back when we were InfoSauce) to build their original site when they first opened in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.depotslc.com"><img class="alignright size-full wp-image-16" style="margin-left: 10px; margin-right: 10px;" title="The Depot" src="http://blog.12spokes.com/wp-content/uploads/2009/04/picture-11.png" alt="The Depot" width="300" height="236" /></a>Last week, we deployed a complete redesign of The Depot&#8217;s website.  <a href="http://www.depotslc.com/">The Depot</a> is one of the premier concert venues in Salt Lake City.  They&#8217;ve been one of our clients since the early days of 12 Spokes, coming to us (back when we were InfoSauce) to build their original site when they first opened in late 2005.  We like good music, they like good web design.</p>
<p>Since they originally opened, they&#8217;ve faced the difficult dilemma of balancing being a kick-ass concert venue and, being located in the historic Union Pacific building, an excellent location to hold private events.  The first site we built focused almost exclusively on the hip music scene.  Viewing the site was like looking at a concert poster glued to the alley wall, waiting for the doors to open for that show you&#8217;ve been waiting all month for.</p>
<p>This worked well for the early days, but as more and more interest rose for renting out the space for corporate parties and weddings, well, the site didn&#8217;t quite scream nuptials and black-tie galas.  The next iteration of the site, designed by <a href="http://www.raremethod.com/">Rare Method</a>, then, tried to incorporate more of the historicity of the building.  Unfortunately, it went too far and the music side ended up taking a back seat.</p>
<p>This version, therefore, is an attempt to find that sweet balance between the two moods of the two primary businesses The Depot provides.  Both the beautiful building and the concert are presented equally on the home page.  The overall look, while still leaning on the grungy music scene, is much tidier and professional.</p>
<p>While were at it, we did a bit or restructuring the information on the site to ensure the most important information is easily accessible.</p>
<p>It was a challenge, but I think the result is spot on and is receiving rave review from everyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/?feed=rss2&amp;p=15</wfw:commentRss>
		</item>
		<item>
		<title>Objective-C: Releasing an object that spawns a thread</title>
		<link>http://blog.12spokes.com/?p=13</link>
		<comments>http://blog.12spokes.com/?p=13#comments</comments>
		<pubDate>Wed, 15 Apr 2009 20:30:12 +0000</pubDate>
		<dc:creator>Trey Bean</dc:creator>
		
		<category><![CDATA[I ♥ Concerts]]></category>

		<category><![CDATA[iPhone Development]]></category>

		<category><![CDATA[objective-c]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=13</guid>
		<description><![CDATA[While I was working on the first version of I ♥ Concerts, I ran into an interesting problem trying to release an object that spawns a thread.  I have a ConcertUpdater object that handles querying our server for upcoming concerts in your area.  This object is initialized in our AppDelegate.  Because finding the user&#8217;s location and [...]]]></description>
			<content:encoded><![CDATA[<p>While I was working on the first version of <a href="http://www.iheartconcerts.com">I ♥ Concerts</a>, I ran into an interesting problem trying to release an object that spawns a thread.  I have a ConcertUpdater object that handles querying our server for upcoming concerts in your area.  This object is initialized in our AppDelegate.  Because finding the user&#8217;s location and downloading the concert data can take a bit of time, though, the object kicks off new threads for the expensive operations, so the UI remains responsive.</p>
<p>I used an NSOperationQueue to handle the threads like so:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>isUpdatingConcerts<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
  isUpdatingConcerts <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #a61390;">YES</span>;
  <span style="color: #400080;">NSInvocationOperation</span> <span style="color: #002200;">*</span>theOp <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSInvocationOperation</span> alloc<span style="color: #002200;">&#93;</span> initWithTarget<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>getConcerts<span style="color: #002200;">&#41;</span> object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span>appDelegate.concertoQueue addOperation<span style="color: #002200;">:</span>theOp<span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span>theOp release<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>This threaded approach, however, leads to not knowing exactly when we can release the ConcertUpdater object from memory.</p>
<p>I tried a few different things: simply not releasing it (used version 1.0) and autorelease.  Autorelease wouldn&#8217;t work, because it would get released before it found a location and downloaded the data.  Simply not releasing it works, but is kind of irritating to me—always having to ignore that error in <a href="http://clang.llvm.org/">Clang</a>.  I also realize this is one of my first projects programming threads, so there might simply be a better way to architect this in general—maybe start the ConcertUpdater&#8217;s getConcerts method in a thread.</p>
<p>Anyway, I finally did come up with a way to release the ConcertUpdater.  On the last line of it&#8217;s updateConcerts method (or at least the last line of that process), I tell the AppDelegate to release the object.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> delegate<span style="color: #002200;">&#93;</span> performSelectorOnMainThread<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>releaseConcertUpdater<span style="color: #002200;">&#41;</span> withObject<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> waitUntilDone<span style="color: #002200;">:</span><span style="color: #a61390;">NO</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>Now, if that method simply released the object—which is what I tried first— I would get a EXC_BAD_ACCESS exception, especially when running it on the device.  I&#8217;m pretty sure, but not positive, that this was happening because the NSOperationQueue wasn&#8217;t quite finshed, at least with it&#8217;s garbage collection and it would then try to release or access something in the ConcertUpdater object.</p>
<p>The solution was to pause the main thread at that point for a few seconds until the NSOperationQueue had finished all of its tasks.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>releaseConcertUpdater<span style="color: #002200;">&#123;</span>
  <span style="color: #002200;">&#91;</span>concertoQueue waitUntilAllOperationsAreFinished<span style="color: #002200;">&#93;</span>;
  <span style="color: #002200;">&#91;</span>concertUpdater release<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>That little waitUntilAllOperationsAreFinished method was a lifesaver.  Now I can free that memory up for other cool operations. <img src='http://blog.12spokes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/?feed=rss2&amp;p=13</wfw:commentRss>
		</item>
		<item>
		<title>I Heart Concerts is Live!</title>
		<link>http://blog.12spokes.com/?p=9</link>
		<comments>http://blog.12spokes.com/?p=9#comments</comments>
		<pubDate>Sat, 11 Apr 2009 01:36:41 +0000</pubDate>
		<dc:creator>Trey Bean</dc:creator>
		
		<category><![CDATA[I ♥ Concerts]]></category>

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

		<category><![CDATA[iPhone Development]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=9</guid>
		<description><![CDATA[I got the email this evening that I Heart Concerts was &#8216;Ready for Sale&#8217;.  It turns out that status was a little premature, since it took a few more hours for it to actually appear in the app store.  It&#8217;s there now, though, just in time for all those great concerts you were about to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=311067492&amp;mt=8"><img class="alignright size-full wp-image-11" title="I Heart Concerts in the app store" src="http://blog.12spokes.com/wp-content/uploads/2009/04/picture-1.png" alt="I Heart Concerts in the app store" width="346" height="156" /></a>I got the email this evening that I Heart Concerts was &#8216;Ready for Sale&#8217;.  It turns out that status was a little premature, since it took a few more hours for it to actually <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=311067492&amp;mt=8">appear in the app store</a>.  It&#8217;s there now, though, just in time for all those great concerts you were about to miss out on this weekend.</p>
<p>We&#8217;re hard at work on version 1.1, which is already shaping up to be so much better than 1.0.  We&#8217;ve made great improvements on speeding things up along with integrating with Last.fm&#8217;s iPhone application.  We should have this update ready for you in the next week or two.  Until then, let us know what else you&#8217;d like to see at <a href="http://iheartconcerts.uservoice.com">http://iheartconcerts.uservoice.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/?feed=rss2&amp;p=9</wfw:commentRss>
		</item>
		<item>
		<title>iheartconcerts.com Updated (w/screenshots)</title>
		<link>http://blog.12spokes.com/?p=5</link>
		<comments>http://blog.12spokes.com/?p=5#comments</comments>
		<pubDate>Tue, 07 Apr 2009 17:28:04 +0000</pubDate>
		<dc:creator>Trey Bean</dc:creator>
		
		<category><![CDATA[I ♥ Concerts]]></category>

		<category><![CDATA[iPhone Development]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=5</guid>
		<description><![CDATA[We updated iheartconcerts.com this weekend with a better description of what this iPhone app does.  We also included three screenshots.
We&#8217;re still waiting to hear from apple about when it will be released in the app store—hopefully it will be this week, so you can find out what concerts are happening in your area this weekend.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-6" style="margin-left: 10px; margin-right: 10px; border: 5px solid #484a50; border-bottom:1px;" title="I Heart Concerts - Concert Details Page" src="http://blog.12spokes.com/wp-content/uploads/2009/04/concert_detailsjpg.jpeg" alt="I Heart Concerts - Concert Details Page" width="87" height="183" />We updated <a href="http://www.iheartconcerts.com">iheartconcerts.com</a> this weekend with a better description of what this iPhone app does.  We also included three screenshots.</p>
<p>We&#8217;re still waiting to hear from apple about when it will be released in the app store—hopefully it will be this week, so you can find out what concerts are happening in your area this weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/?feed=rss2&amp;p=5</wfw:commentRss>
		</item>
		<item>
		<title>Release Release—I ♥ Concerts Submitted to the App Store</title>
		<link>http://blog.12spokes.com/?p=3</link>
		<comments>http://blog.12spokes.com/?p=3#comments</comments>
		<pubDate>Fri, 03 Apr 2009 21:10:18 +0000</pubDate>
		<dc:creator>Trey Bean</dc:creator>
		
		<category><![CDATA[I ♥ Concerts]]></category>

		<category><![CDATA[iPhone Development]]></category>

		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=3</guid>
		<description><![CDATA[I&#8217;ve often complained that web development rarely gives you the joy and elation after turning in a big project—there&#8217;s always something else to do.  And with the web, it&#8217;s always at your fingertips to do—no waiting until you get back called back to the job site.
Well, last night, we submitted our first iPhone app to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve often complained that web development rarely gives you the joy and elation after turning in a big project—there&#8217;s always something else to do.  And with the web, it&#8217;s always at your fingertips to do—no waiting until you get back called back to the job site.</p>
<p>Well, last night, we submitted our first iPhone app to the app store.  Oh what a great feeling.  I spent most of the week scouring the code for potential bugs and memory leaks.  In the software world, it&#8217;s not as easy to make sure everyone gets the latest update like it is in the web development world, so you better make sure all the major bugs are squashed.</p>
<p>All of that pressure, though, ends up giving you a huge release once it&#8217;s all done.  When I finally hit the &#8217;submit application&#8217; button, I felt great.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/?feed=rss2&amp;p=3</wfw:commentRss>
		</item>
	</channel>
</rss>
