<?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>devinsblog &#187; coding</title>
	<atom:link href="http://devinsblog.com/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://devinsblog.com</link>
	<description>a tech journal</description>
	<lastBuildDate>Mon, 13 Jun 2011 16:36:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Mac memory management tips for the rest of us.</title>
		<link>http://devinsblog.com/2011/03/15/mac-memory-management-tips-for-the-rest-of-us/</link>
		<comments>http://devinsblog.com/2011/03/15/mac-memory-management-tips-for-the-rest-of-us/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 07:35:33 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[quickie]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[obj-c]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=1907</guid>
		<description><![CDATA[http://inessential.com/2010/06/28/how_i_manage_memory]]></description>
			<content:encoded><![CDATA[<p>&#8220;Following these rules, writing Cocoa code is damn close to scripting.&#8221;</p>
<p>Agreed.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2011/03/15/mac-memory-management-tips-for-the-rest-of-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The absolute best way to improve your coding skills!</title>
		<link>http://devinsblog.com/2010/02/25/the-absolute-best-way-to-improve-your-coding-skills/</link>
		<comments>http://devinsblog.com/2010/02/25/the-absolute-best-way-to-improve-your-coding-skills/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 05:08:41 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[Advanced MVVM]]></category>
		<category><![CDATA[best]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[improve]]></category>
		<category><![CDATA[Josh Smith]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[skills]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=1827</guid>
		<description><![CDATA[The absolute best way to improve your coding skills is to read the absolute best advanced MVVM book EVAR! If you&#8217;re programming WPF or Silverlight, don&#8217;t pass up the opportunity to give Advanced MVVM a read. Written by one of the best WPF developers in the known universe, it&#8217;s sure to be useful and worth [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://joshsmithonwpf.wordpress.com/advanced-mvvm/"><img class="alignnone size-full wp-image-1828" title="advancedmvvmcover" src="http://devinsblog.com/wp-content/uploads/2010/02/advancedmvvmcover.jpg" alt="" width="246" height="320" /></a></p>
<p>The absolute best way to improve your coding skills is to read the absolute best advanced MVVM book EVAR!</p>
<p>If you&#8217;re programming WPF or Silverlight, don&#8217;t pass up the opportunity to give <a href="http://joshsmithonwpf.wordpress.com/advanced-mvvm/">Advanced MVVM</a> a read.  Written by one of the best WPF developers in the known universe, it&#8217;s sure to be useful and worth the mere pennies that he&#8217;s charging for this gem.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2010/02/25/the-absolute-best-way-to-improve-your-coding-skills/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone SDK tutorial: disconnecting your application from Interface Builder</title>
		<link>http://devinsblog.com/2009/05/25/iphone-sdk-tutorial-disconnecting-your-application-from-interface-builder/</link>
		<comments>http://devinsblog.com/2009/05/25/iphone-sdk-tutorial-disconnecting-your-application-from-interface-builder/#comments</comments>
		<pubDate>Tue, 26 May 2009 04:28:43 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[devinsblog]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[removal]]></category>
		<category><![CDATA[removing]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=1165</guid>
		<description><![CDATA[This is a quick tutorial on disconnecting your iPhone project from Interface Builder using Xcode. When you initially start a new iPhone project in Xcode, you get a project that loads from a NIB file.  This NIB file describes a template for how visual elements are layed out on the screen. As a newbie to [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick tutorial on disconnecting your iPhone project from Interface Builder using Xcode.</p>
<p>When you initially start a new iPhone project in Xcode, you get a project that loads from a NIB file.  This NIB file describes a template for how visual elements are layed out on the screen.</p>
<p>As a newbie to iPhone development I want to watch my project get created 100% through the code &#8211; I don&#8217;t want there to be any magic going on behind the scenes.  I&#8217;ll introduce the magic pieces one at a time, but for now: no Interface Builder.  (There are a whole bunch of other things about Interface Builder that I actually don&#8217;t like, but that&#8217;s a different blog post)</p>
<p>To remove your dependence on Interface Builder from the application you need only to do these three things:</p>
<ol>
<li>In your Resources folder in Xcode, delete your .xib file named &#8220;MainWindow.xib&#8221;</li>
<li>In your Resources folder in Xcode, open up the .plist file and remove the line that says &#8220;Main nib file base name&#8221; by selecting and clicking delete.</li>
<li>In your main.m file you need to manually let the application know where to start your app and send important application events.  Change this line:</li>
</ol>
<p> <code>int retVal = UIApplicationMain(argc, argv, nil, nil);</code> <strong>TO</strong> <code> int retVal = UIApplicationMain(argc, argv, nil, @"[<em>yourAppName</em>]AppDelegate")</code><br />
And presto &#8211; no dependency on InterfaceBuilder.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/05/25/iphone-sdk-tutorial-disconnecting-your-application-from-interface-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teaching Microsoft on a Mac</title>
		<link>http://devinsblog.com/2009/04/14/teaching-microsoft-on-a-mac/</link>
		<comments>http://devinsblog.com/2009/04/14/teaching-microsoft-on-a-mac/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 04:15:37 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[notebooks]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Macbook]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[teaching]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=1095</guid>
		<description><![CDATA[I was watching a session from MIX09 this morning titled &#8220;Deep Dive into Microsoft Silverlight Graphics.&#8221; The session was hosted by Seema Ramchandani and surprisingly (though, not too surprisingly) she was conducting the session from her 17&#8243; MacBook Pro. She&#8217;s teaching the intricacies of a Microsoft product from the comfort of Mac. Wonderfully ironic! The [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-1097" href="http://devinsblog.com/2009/04/14/teaching-microsoft-on-a-mac/msft-sl-on-mac/"><img class="alignnone size-large wp-image-1097" title="msft-sl-on-mac" src="http://devinsblog.com/wp-content/uploads/2009/04/msft-sl-on-mac-530x336.png" alt="msft-sl-on-mac" width="530" height="336" /></a></p>
<p>I was watching a <a href="http://videos.visitmix.com/MIX09/T17F" target="_blank">session from MIX09</a> this morning titled &#8220;Deep Dive into Microsoft Silverlight Graphics.&#8221;  The session was hosted by Seema Ramchandani and surprisingly (though, not too surprisingly) she was conducting the session from her 17&#8243; MacBook Pro.  She&#8217;s teaching the intricacies of a Microsoft product from the comfort of Mac. Wonderfully ironic!</p>
<p>The only reason I bring this up is that I constantly get comments from people about my MacBook while traveling through meetings and offices at Microsoft&#8217;s Redmond campus and recently at a Silverlight Training that I was conducting.  I&#8217;m sure she got lots of comments as well.   A few things are commonly agreed upon:</p>
<ol>
<li> having a MacBook in a Microsoft office is just wrong &#8211; it involves too much cross-pollination of kool-aid,</li>
<li>MacBooks are definitely sexy,</li>
<li><em>and Everybody wants one.</em></li>
</ol>
<p>Everybody wants one and they want to know how it runs Windows.  &#8220;How&#8217;s the performance?&#8221;  &#8220;How&#8217;s the driver situation?&#8221; Of course, they also want to know what I like about it compared to other notebooks.  The typical &#8220;why buy a Mac?&#8221; question.</p>
<p>The answer really isn&#8217;t that complicated.</p>
<p>One of the immediate reasons that tops the list among the nerdier crowd is that as a developer I feel that I need a machine that can code for the Mac OS and for Windows.  Developers are just more <a href="http://en.wikipedia.org/wiki/Leet" target="_blank">1337</a> that way (and coding for Mac is more important nowadays too).</p>
<p>I think this was a cop out for the real reason that I bought a MacBook, however.</p>
<p>The real reason is that I just feel a little spoiled with my MacBook.  It&#8217;s like buying an expensive car.  I bought it because I appreciate the craftsmanship, the attention paid to the details.  I don&#8217;t just &#8220;go fast&#8221; &#8211; I enjoy the ride.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/04/14/teaching-microsoft-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What I&#8217;ve been up to</title>
		<link>http://devinsblog.com/2009/02/08/what-ive-been-up-to/</link>
		<comments>http://devinsblog.com/2009/02/08/what-ive-been-up-to/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 16:58:28 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[twittersort.com]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=993</guid>
		<description><![CDATA[I apologize for the lack of posts over the past few days.  Things have been crazy with work.  I&#8217;ve been pulling those 12 hour days. Unfortunately when the weekend came I didn&#8217;t find much comfort in relaxation.  Instead I spent money on buying Twittersort.com.  I&#8217;ve proceeded to spend almost my entire weekend coding the website [...]]]></description>
			<content:encoded><![CDATA[<p>I apologize for the lack of posts over the past few days.  Things have been crazy with work.  I&#8217;ve been pulling those 12 hour days.</p>
<p>Unfortunately when the weekend came I didn&#8217;t find much comfort in relaxation.  Instead I spent money on buying Twittersort.com.  I&#8217;ve proceeded to spend almost my entire weekend coding the website &#8211; we&#8217;ll see if I can get it up and running tonight.</p>
<p>It&#8217;s been a lot of work, but I&#8217;ve got all the major hurdles jumped over already.  Twitter API &#8211; check.  Website database communication &#8211; check.  Proxies for Twitter API and Website database communication &#8211; check.  Silverlight front end &#8211; piece of cake.</p>
<p>I&#8217;m not going to spoil what the idea is, but I&#8217;ll be sure to post all about it once I go live, so come back soon so you can check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/02/08/what-ive-been-up-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPF and SL developers using Twitter</title>
		<link>http://devinsblog.com/2009/01/28/wpf-and-sl-developers-using-twitter/</link>
		<comments>http://devinsblog.com/2009/01/28/wpf-and-sl-developers-using-twitter/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 00:17:02 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[IM]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=908</guid>
		<description><![CDATA[Yesterday I found the list of iPhone developers that are on Twitter.  Today I decided to start a google spreadsheet Twitter list that has all the WPF and Silverlight developers on it.  If you want your name on the list just go to this form. You&#8217;ll also be able to follow all of these users [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I found the <a href="http://devinsblog.com/2009/01/28/looking-for-all-the-iphone-developers-using-twitter/" target="_blank">list of iPhone developers that are on Twitter</a>.  Today I decided to start a google spreadsheet Twitter list that has all the WPF and Silverlight developers on it.  If you want your name on <a href="http://is.gd/hBft" target="_blank">the list</a> just go to <a href="http://is.gd/hB5f" target="_blank">this form</a>.</p>
<p>You&#8217;ll also be able to follow all of these users at once by downloading <a href="http://devinsblog.com/wp-content/uploads/2009/01/follow_wpf_sl_devs.rb">this ruby script</a> (originally provided for the iPhone developer Twitter list by <a href="http://shortpath.blogspot.com/2009/01/follow-over-100-iphone-developers-on.html" target="_blank">David Clement</a> &#8211; thanks David!) and running it using the following instructions (feel free to skip steps 2 through 5 if you know you already have the updated Ruby version, twitter gem, and google spreadsheet gem):</p>
<ol>
<li>Open Terminal</li>
<li>Update Ruby by typing: <code>gem update --system</code></li>
<li>Install the Twitter gem: <code>sudo gem install Twitter</code></li>
<li>Add the google spreadsheet gem source location: <code>gem sources -a http://gems.github.com</code></li>
<li>Install the google spreadsheet gem: <code>sudo gem install gimite-google-spreadsheet-ruby</code></li>
<li>Open up the .rb file you downloaded from <a href="http://devinsblog.com/wp-content/uploads/2009/01/follow_wpf_sl_devs.rb">here</a> in TextEdit</li>
<li>Enter your google and twitter usernames and passwords (it’s safe, look at the code!)</li>
<li>Save the file!</li>
<li>In Terminal, navigate to the .rb file you downloaded from <a href="http://devinsblog.com/wp-content/uploads/2009/01/follow_wpf_sl_devs.rb">here</a> and type: <code>ruby follow_wpf_sl_devs.rb</code></li>
</ol>
<p>Let me know if you have any questions. Happy tweeting!  Special thanks to the <a href="http://is.gd/hlhv">original iPhone developer twitter list</a> and David Clement for the ruby script.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/01/28/wpf-and-sl-developers-using-twitter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Looking for all the iPhone developers using Twitter?</title>
		<link>http://devinsblog.com/2009/01/28/looking-for-all-the-iphone-developers-using-twitter/</link>
		<comments>http://devinsblog.com/2009/01/28/looking-for-all-the-iphone-developers-using-twitter/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 07:48:35 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[coders]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=904</guid>
		<description><![CDATA[I was reading Jeff LaMarche&#8217;s iPhone Development blog and saw that Tim Haines (developer of the BurnBall iPhone game) has put up a google spreadsheet document that all the iPhone developers can put their twitter accounts on.  There&#8217;s even a ruby script that somebody made so that you can add them all at once!  Pretty [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading <a href="http://iphonedevelopment.blogspot.com/2009/01/twittering-iphone-developer-list.html">Jeff LaMarche&#8217;s iPhone Development blog</a> and saw that Tim Haines (developer of the <a href="http://ims.co.nz/BurnBall/">BurnBall</a> iPhone game) has put up a <a href="http://spreadsheets.google.com/ccc?key=p3LA_Q08eM-VAAyq03ZSjYQ">google spreadsheet document</a> that all the iPhone developers can put their twitter accounts on.  There&#8217;s even a ruby script that somebody made so that you can add them all at once!  Pretty sweet.</p>
<p>You can get the ruby script by downloading it from github: <a href="http://is.gd/hmiK">http://is.gd/hmiK</a>.  This script was created by David Clements (thanks!).  He also posted it on <a href="http://shortpath.blogspot.com/2009/01/follow-over-100-iphone-developers-on.html">his blog</a>.  To run the ruby script you need to make sure you have the google spreadsheet gem and the twitter gem installed.  You&#8217;ll also want to make sure your ruby installation is up to date.  If you have a mac you can follow my simple instructions:</p>
<ol>
<li>Open Terminal</li>
<li>Update Ruby by typing: <code>gem update --system</code></li>
<li>Install the Twitter gem: <code>sudo gem install Twitter</code></li>
<li>Add the google spreadsheet gem source location: <code>gem sources -a http://gems.github.com</code></li>
<li>Install the google spreadsheet gem: <code>sudo gem install gimite-google-spreadsheet-ruby</code></li>
<li>Open up the .rb file you downloaded from <a href="http://is.gd/hmiK">http://is.gd/hmiK</a> in TextEdit</li>
<li>Enter your google and twitter usernames and passwords (it&#8217;s safe, look at the code!)</li>
<li>Save the file!</li>
<li>In Terminal, navigate to the .rb file you downloaded from github and type: <code>ruby follow_iphone_devs.rb</code></li>
</ol>
<p>In the terminal window you should see all of the users getting added.  The follow_iphone_devs.rb file has comments at the top that you should change the code from 1..1000 to be something like 1..10 and do a few every minutes (1..10, 11..20,21..30).  That way Twitter won&#8217;t get mad.  I did 50 at a time and it seemed to be just fine.  (Also note that due to the comments at the top of the spreadsheet, the actual results don&#8217;t start until line 6, not 1).</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/01/28/looking-for-all-the-iphone-developers-using-twitter/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Check out these Mix10K applications</title>
		<link>http://devinsblog.com/2009/01/27/check-out-these-mix10k-applications/</link>
		<comments>http://devinsblog.com/2009/01/27/check-out-these-mix10k-applications/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 20:46:37 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[Mix 10k]]></category>
		<category><![CDATA[MIX09]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=884</guid>
		<description><![CDATA[There&#8217;s a 10K coding challenge being presented for MIX09.  From their site: &#8220;The grand prize winner will live large at MIX09 &#8211; they&#8217;ll receive a pass to the MIX09 event, 3 nights at The Venetian Hotel and a $1500 Visa gift card. The community choice winner will receive a $1500 visa gift card. And, three [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a <a href="http://devinsblog.com/2009/01/18/mix-10k-smart-coding-challenge/">10K coding challenge</a> being presented for MIX09.  From <a href="http://2009.visitmix.com/MIXtify/TenKGallery.aspx">their site</a>:</p>
<blockquote><p>&#8220;The <strong>grand prize winner</strong> will live large at MIX09 &#8211; they&#8217;ll receive a pass         to the MIX09 event, 3 nights at The Venetian Hotel and a $1500 Visa gift card. The         <strong>community choice winner</strong> will receive a $1500 visa gift card. And, <strong>three runners-up </strong>will each receive a $500 Visa gift card. Winners will be notified after the         close of community rating on February 13, 2009.&#8221;</p></blockquote>
<p><a href="http://2009.visitmix.com/MIXtify/TenKGallery.aspx">Check out the entries</a> and vote for your favorites!  Here are a couple of my favorite Mix 10K contest entries (though I&#8217;ve hardly looked at many of them):</p>
<p><strong>Title:</strong> <a href="http://2009.visitmix.com/MIXtify/TenKDisplay.aspx?SubmissionID=0106">Verdant [click to visit entry]</a><br />
<strong>Creator:</strong> Karim Hernandez<br />
<strong> Type:</strong> Game<strong><br />
Technology:</strong> Silverlight<br />
<strong> Description:</strong> Growth bends toward the sun. Rain water sustains growth. Collect as much as you can. Too much growth slows you down. Succeed and you may multiply.<br />
<strong>Rules:</strong> From the creator: &#8220;The more cells that are visible, the slower the rate of growth.  At the beginning, you have a grace period of 50 rain drops before your ratio of lost over captured drops kicks in. Maintain less than 25% lost droplets or you&#8217;ll lose : ) Hope you enjoy the game.&#8221;<br />
<strong> My take:</strong> Sweet little &#8220;going green&#8221; application.  If only the real life &#8220;going green&#8221; issues were this easy.  Save the earth? Unlimited retries &#8211; FTW!  High score gets elected president.  Ready?  Go.</p>
<p><a href="http://2009.visitmix.com/MIXtify/TenKDisplay.aspx?SubmissionID=0106"><img class="alignnone size-large wp-image-897" title="verdant" src="http://devinsblog.com/wp-content/uploads/2009/01/verdant-530x269.png" alt="verdant" width="530" height="269" /></a></p>
<p><strong>Title:</strong> <a href="http://2009.visitmix.com/MIXtify/TenKDisplay.aspx?SubmissionID=0096">SilverRubix [Click to visit entry]</a><br />
<strong>Creator:</strong> Timmy Kokke<br />
<strong> Type:</strong> Game<strong><br />
Technology:</strong> Silverlight<br />
<strong> Description:</strong> SilverRubix is a 3D Rubik&#8217;s Cube in Silverlight. Drag your mouse next to the cube to rotate it. Click the cube to turn it&#8217;s faces. When you&#8217;re done, post your time and number of moves below. Good Luck!<br />
<strong>My Take:</strong> Sweet application, BUT: it was a little difficult to navigate the cube once you rotated it 180 degrees.  Left becomes right and right becomes left, etc&#8230;  It actually made it so difficult that I only finished two of the three layers.  Still, this is a great example of work done in under 10K.  I still enjoyed it and played it more than once!</p>
<p><a href="http://2009.visitmix.com/MIXtify/TenKDisplay.aspx?SubmissionID=0096"><img class="alignnone size-large wp-image-887" title="rubix" src="http://devinsblog.com/wp-content/uploads/2009/01/rubix-530x295.png" alt="rubix" width="530" height="295" /></a></p>
<p>Dont forget to <a href="http://2009.visitmix.com/MIXtify/TenKGallery.aspx">check out all the other submissions</a>.  Vote for your favorites and feel free to leave comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/01/27/check-out-these-mix10k-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode error 0xE8000001, can&#8217;t install iPhone applications</title>
		<link>http://devinsblog.com/2009/01/24/xcode-error-0xe8000001-cant-install-iphone-applications/</link>
		<comments>http://devinsblog.com/2009/01/24/xcode-error-0xe8000001-cant-install-iphone-applications/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 20:59:10 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[0xE8000001]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=860</guid>
		<description><![CDATA[I was having a wild time on Friday night &#8211; I was drinking [smoothie] and making some sweet advances on the hot [uni] body [MacBook] that was resting next to me.  Yes &#8211; I was making small breakthroughs in iPhone coding.  Okay, so maybe it wasn&#8217;t THAT wild on Friday night, but I have a [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a wild time on Friday night &#8211; I was drinking [smoothie] and making some sweet advances on the hot [uni] body [MacBook] that was resting next to me.  Yes &#8211; I was making small breakthroughs in iPhone coding.  Okay, so maybe it wasn&#8217;t THAT wild on Friday night, but I have a pulled hamstring as an excuse.  Less excuses, more explanations!  I get it.</p>
<p>In order to successfully deploy your application on to your iPhone for debugging you have to set up a provisioning profile at the iPhone Dev Center in your Program Portal.  Deploying the provisioning profile into Xcode is where things start to get tricky.  I saw lots of people in the forums having <a href="http://discussions.apple.com/thread.jspa?messageID=7898793">trouble matching up their Bundle IDs with their Provisioning profile</a>.  This wasn&#8217;t my issue though &#8211; I could deploy my Application once, but then the second time it never worked.</p>
<p>I noticed that in the Xcode Organizer under my phone&#8217;s console that the error was the following:</p>
<pre><code>Fri Jan 23 22:50:12 unknown afcd[217] : user mobile has uid 501
Fri Jan 23 22:50:12 unknown afcd[217] : mode is 0x41e8</code></pre>
<p>So I Googled this hoping to find an answer.</p>
<p>Finally I found what I was looking for: <a href="http://nullreference.wordpress.com/2008/12/19/your-mobile-device-has-encountered-an-unexpected-error-0xe8000001/#comment-11">this post</a>.  This was just what I needed.  THANK YOU!</p>
<p>Apparently, the iPhone has a public staging folder that has trouble getting cleared: /private/var/mobile/Media/PublicStaging.  After uninstalling my application in the Xcode Organizer (scroll through the applications, select your application and press the minus button) and clearing the application out of the PublicStaging folder on the iPhone I was able to successfully build and debug my application on my iPhone.  I realize that this may present a problem to some people &#8211; you can only access this folder on your phone if you have a jailbroken iPhone.  Well, now is as good a time as any to jailbreak it!  You&#8217;ll need to install SSH or netatalk on your phone after you jailbreak it to communicate with your Mac and delete the files.</p>
<p>What&#8217;s weird is that sometimes the PublicStaging folder on the iPhone works just fine and clears properly, but other times it leaves a copy of the application there and I have to manually delete it.  I actually had a lot of applications in this folder.  Deleting all of them seemed to fix my problems&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/01/24/xcode-error-0xe8000001-cant-install-iphone-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone coding tutorial: Hello world!</title>
		<link>http://devinsblog.com/2009/01/23/iphone-coding-tutorial-hello-world/</link>
		<comments>http://devinsblog.com/2009/01/23/iphone-coding-tutorial-hello-world/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 20:07:09 +0000</pubDate>
		<dc:creator>devin</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://devinsblog.com/?p=812</guid>
		<description><![CDATA[In this tutorial I will walk you through the creation of a Hello World application.  I know that Apple already has a Hello World! sample that you can look at, but if you&#8217;re just getting started that&#8217;s not enough of a walk through to show you what&#8217;s going on. This will be more than just [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I will walk you through the creation of a Hello World application.  I know that Apple already has a Hello World! sample that you can look at, but if you&#8217;re just getting started that&#8217;s not enough of a walk through to show you what&#8217;s going on.  This will be more than just a step by step guide and will include simple explanations of the reasons WHY we&#8217;re doing what we&#8217;re doing.</p>
<p>To start, launch Xcode and create a new project by going to File &gt; New Project.  Under the iPhone OS section of the New Project window select View-Based Application.</p>
<p>You should be presented with the following window:</p>
<p><a href="http://devinsblog.com/wp-content/uploads/2009/01/picture-1.png"><img class="alignnone size-medium wp-image-819" title="picture-1" src="http://devinsblog.com/wp-content/uploads/2009/01/picture-1-300x220.png" alt="picture-1" width="300" height="220" /></a></p>
<p><strong>Creating the UI<br />
</strong>We&#8217;re going to start with creating the UI.  iPhone applications use files called xib or nib files to help separate the coding from the design.  To open the default xib file select the Resources folder on the left menu, and open HelloWorldViewController.xib.  This should open Interface Builder.</p>
<p>What we want to do is create the interface for our HelloWorld! application.  To start go to Tools &gt; Library, which should open up the Library of all the different UI elements you can use.</p>
<p><a href="http://devinsblog.com/wp-content/uploads/2009/01/ib_library.png"><img class="size-medium wp-image-820" title="ib_library" src="http://devinsblog.com/wp-content/uploads/2009/01/ib_library-135x300.png" alt="ib_library" width="135" height="300" /></a> <a href="http://devinsblog.com/wp-content/uploads/2009/01/ib_main.png"><img class="size-medium wp-image-838" title="ib_main" src="http://devinsblog.com/wp-content/uploads/2009/01/ib_main-207x300.png" alt="HelloWorldViewController.xib window" width="207" height="300" /></a></p>
<p>In your HelloWorldViewController.xib window double click the View object to open up the view.  This is what your application will look like when you load it.  What we want to do here is add a UILabel so that we can see the text we entered, a UITextField so that we can enter text, and a UIButton so that we can reset the text.  You can find these UIElements in the Library window under Library/Cocoa Touch Plugin/Inputs &amp; Values.  Once you drag these elements into the view you can click on the elements and go to Tools &gt; Attribute Inspector and see the attributes for each element.  For example, I clicked on the UITextField and filled in the placeholder attribute with &#8220;Type Something!&#8221; Here&#8217;s what mine looks like:</p>
<p><a href="http://devinsblog.com/wp-content/uploads/2009/01/ib_myview.png"></a><a href="http://devinsblog.com/wp-content/uploads/2009/01/ib_view2.png"><img class="alignnone size-medium wp-image-840" title="ib_view2" src="http://devinsblog.com/wp-content/uploads/2009/01/ib_view2-192x300.png" alt="ib_view2" width="192" height="300" /></a></p>
<p>If you save this by pressing Command+S and then go back to your Xcode window and press Command+Enter you can run the application in the iPhone simulator.  This application shows up, but nothing actually happens.  Clicking on the UITextField will open the keyboard, but nothing happens when you press return.  Now lets get back to coding!</p>
<p>In order to hook these UI elements up to the code we need to have a representation of these items in the code.  This representation has to be created manually, and Interface Builder helps you out just a little bit in creating these connections.  To do this click on the File&#8217;s Owner object in the HelloWorldViewController.xib window.  Notice that this object is of type HelloWorldViewController.  This is the main class of your application.  In Xcode you can see this class file in the Classes folder, and this will be where we write all of our code.</p>
<p>With the File&#8217;s Owner object selected, go to Tools &gt; Identity Inspector.  In the Identity Inspector you&#8217;ll see that the object class is HelloWorldViewController, and you&#8217;ll see two more sections indicating Actions and Outlets.  Actions are required in order to hook up events, such as a button&#8217;s click event which we&#8217;ll cover in just a minute.  Outlets are the connections used to hook up the UI elements to the code.  So we&#8217;re going to need one Action for the button click, and then three Outlets, one for each UI element.</p>
<p>In the Action section simply click the plus sign and enter a new Action name &#8211; lets call it &#8220;TextReset&#8221;.  In the Outlets section you&#8217;re going to add three outlets &#8211; let&#8217;s call them MyLabel, MyTextField and MyButton.  When you&#8217;ve finished with that we need to write these new outlets and actions into the code file.  To do this we need to go to File &gt; Write Class Files&#8230; then click Save.  Click Merge.  Now a file merging utility, appropriately named &#8220;FileMerge&#8221; will pop up.  The file you seen on the left is the new file that you&#8217;ve created with Interface Builder, and the file you currently have in Xcode is on the right.  Each arrow seen in the center corresponds to a conflict between the two files.  You&#8217;re going to want to make the arrows point to the file on the left.  Do this by clicking the left arrow on the keyboard.  Navigate through the merges by using the up and down arrows on the keyboard.  When you&#8217;ve made both arrows point to the left press Command+W to close the window.  Click Save when it prompts you. Repeat this for the second file.</p>
<p><a href="http://devinsblog.com/wp-content/uploads/2009/01/filemerge.png"><img class="alignnone size-large wp-image-839" title="filemerge" src="http://devinsblog.com/wp-content/uploads/2009/01/filemerge-530x480.png" alt="filemerge" width="530" height="480" /></a></p>
<p><strong>Taking a look at the code</strong></p>
<p>Now that we&#8217;ve modified the code file from Interface Builder, lets go back into Xcode and see what we&#8217;ve done.  Go in to Xcode and click on the HelloWorldViewController.h in the Classes folder.  You should see the following:</p>
<pre><code>@interface HelloWorldViewController : UIViewController {
IBOutlet id MyButton;
IBOutlet id MyLabel;
IBOutlet id MyTextField;
}
- (IBAction)TextReset;
@end</code></pre>
<p>The .h file is the header file, and the @interface tells us that this is just the blueprint of the implementation.  This basically shows any outside classes what the HelloWorldViewController contains.  You&#8217;ll notice that none of the variables that were created through Interface Builder have types assigned to them &#8211; they only have the generic type &#8216;id&#8217; assigned to them.  You&#8217;ll also notice that all of the variables start with IBOutlet.  This is usually not necessary for creating a variable, but in order for Interface Builder to notice the variables we have to tag them as such by playing this IBOutlet text before the variables.  Anyway, we&#8217;re going to want to change the variables to have a non-generic type, so lets start fixing things up.   Change it to look like this:</p>
<pre><code>@interface HelloWorldViewController : UIViewController {
IBOutlet UIButton *MyButton;
IBOutlet UILabel *MyLabel;
IBOutlet UITextField *MyTextField;
}

- (IBAction)TextReset;
@end</code></pre>
<p>We&#8217;re also going to need to use these variables as properties with a get and set method, so we need to declare theme as properties and not just empty variables.  To do this we add the following lines of code above the IBAction line and after the close bracket:</p>
<pre><code>@property (nonatomic, retain) UIButton *MyButton;
@property (nonatomic, retain) UILabel *MyLabel;
@property (nonatomic, retain) UITextField *MyTextField;</code></pre>
<p>Now we have successfully declared our handles for the UI elements that we created in Interface Builder.  In our actual code file, the HelloWorldViewController.m file, we have the actual code that will make the application run.  You might see a lot of green commented out functions here.  These are standard methods that are often used and are only there to make it easier for you to get started.  We&#8217;re not going to need to touch them so pay them no mind.</p>
<p>We&#8217;re only going to have to worry about two functions.  One of them is already here for us &#8211; it&#8217;s the TextReset function that we declared in Interface Builder.  Here we have to set MyLabel.text and MyTextField.text, but before we do this we have to declare the properties &#8211; we&#8217;ve already declared them in the header file, but now we have to add the get and set functions for each property.  The shortcut we&#8217;re going to use is called @synthesize and it basically looks at the header file and determines how to write the get and set functions based on the values we placed inside the parenthesis when we declared the properties (nonatomic and retain).  We don&#8217;t have to worry about any of this though for now, just add the following three lines to your HelloWorldViewController.m file, after the @implementation line:</p>
<pre><code>@synthesize MyLabel;
@synthesize MyTextField;
@synthesize MyButton;</code></pre>
<p>Press Command+B to build the application and make sure there are no errors.  Good, now we can start referencing these variables in code.  In the TextReset function we want to set the text in MyLabel and MyTextField to nothing:</p>
<pre><code>- (IBAction)TextReset {
MyLabel.text = @"";
MyTextField.text = @"";
}</code></pre>
<p>Good.  There&#8217;s one more function we need to write in this file, but for now lets go back to Interface Builder and hook up the UI elements to the code.</p>
<p><strong>Back in Interface Builder</strong><br />
Back in interface builder we want to connect everything to the code.  To do this we need to click on the File&#8217;s Owner object and go to Tools &gt; Connections Inspector.  In the Connections Inspector you should see MyLabel, MyTextField, and MyButton in the Outlets section.  Click on the circle on the right side of the title of each of these items in the Connections Inspector and drag the mouse over to the item that you want to connect this outlet to.  In the Connections Inspector you&#8217;ll also see an Actions section with an item in it called &#8220;TextReset.&#8221;  Drag from the circle of this item to the UIButton and a dialog will appear &#8211; this dialog shows you all the different events on the button that this Action can be tied to.  We want to select the Touch Up Inside event.</p>
<div id="attachment_835" class="wp-caption alignnone" style="width: 540px"><a href="http://devinsblog.com/wp-content/uploads/2009/01/connections.png"><img class="size-large wp-image-835" title="connections" src="http://devinsblog.com/wp-content/uploads/2009/01/connections-530x331.png" alt="Dragging from Connections Inspector to View" width="530" height="331" /></a><p class="wp-caption-text">Dragging from Connections Inspector to View</p></div>
<p><strong>Connecting the Keyboard<br />
</strong>Lets run the application real quick.  Save your changes in Interface Builder by clicking Command+S.  Go to Xcode and press Command+Enter.  Once the application loads up in the iPhone Simulator, select the TextField.  A Keyboard pops up!  Try typing something in and pressing return.  Nothing happens.  This is because we haven&#8217;t told it what to do yet.  In order to communicate with the keyboard we need to mark our HelloWorldViewController as the delegate that the Keyboard will talk to.  This delegate must follow and implement the UITextFieldDelegate, which we&#8217;ll add now.</p>
<p>Open the HelloWorldViewController header file and add &lt;UITextFieldDelegate&gt; after the declaration of the HelloWorldViewController:</p>
<pre><code>@interface HelloWorldViewController : UIViewController &lt;UITextFieldDelegate&gt; {</code></pre>
<p>Now, if you hold the option button down and double click on the text &#8220;UITextFieldDelegate&#8221; in Xcode it will take you to the documentation for that class.  Looking through it we could find out that we want to implement the &#8220;textFieldShouldReturn:&#8221; method.  So lets go ahead and do that.</p>
<p>In HelloWorldViewController.m we need to add the following code somewhere inside the @implementation and @end tags:</p>
<pre><code>- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == MyTextField)
{
[MyTextField resignFirstResponder];
}
MyLabel.text = MyTextField.text;
return YES;
}</code></pre>
<p>Here we first check to see if the input parameter &#8220;theTextField&#8221; that the keyboard is attached to is in fact the same text field as MyTextField (this would be important if there were more than one text field in the View).  If it is the same text field then we tell our text field to resign its first responder.  This means that it&#8217;s going to resign its status as the focused element, resulting in the keyboard going away.  We also want to make sure we update the text &#8211; that&#8217;s the point of the app!  Returning YES means that we want to implement the default text field behavior for pressing return on the keyboard.</p>
<p>One last thing before we&#8217;re done &#8211; in order for the keyboard to know that HelloWorldViewController is implementing the UITextFieldDelegate we need to tell it such.  We do this by going into Interface Builder and selecting the UITextField.  In the Connections Inspector you&#8217;ll see that the UITextField has an Outlet titled &#8220;delegate&#8221; &#8211; drag this to the File&#8217;s Owner object in the HelloWoldViewController.xib window.</p>
<p>Save.</p>
<p>Go back to Xcode and press Command+Enter.</p>
<p>If you have any build errors make sure your HelloWorlViewController.h code looks like this:</p>
<pre><code>@interface HelloWorldViewController : UIViewController &lt;UITextFieldDelegate&gt; {
IBOutlet UIButton *MyButton;
IBOutlet UILabel *MyLabel;
IBOutlet UITextField *MyTextField;
}

@property (nonatomic, retain) UIButton *MyButton;
@property (nonatomic, retain) UILabel *MyLabel;
@property (nonatomic, retain) UITextField *MyTextField;

- (IBAction)TextReset;
@end</code></pre>
<p>and that your HelloWorldViewController.m looks like this:</p>
<pre><code>@implementation HelloWorldViewController

@synthesize MyLabel;
@synthesize MyTextField;
@synthesize MyButton;

- (IBAction)TextReset {
MyLabel.text = @"";
MyTextField.text = @"";
}

- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == MyTextField)
{
[MyTextField resignFirstResponder];
}
MyLabel.text = MyTextField.text;
return YES;
}
@end</code></pre>
<p>Tada!  you&#8217;re finished.  Be sure to let me know if you find a mistake or have any questions or comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://devinsblog.com/2009/01/23/iphone-coding-tutorial-hello-world/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

