<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Kickass Labs</title>
	
	<link>http://www.kickasslabs.com</link>
	<description>We ♥ code.</description>
	<lastBuildDate>Sun, 04 Jul 2010 03:00:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/KickassLabs" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="kickasslabs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Quick Hits: UIActionSheet cancel button strange behaviour</title>
		<link>http://www.kickasslabs.com/2010/07/03/uiactionsheet-cancel-button-strange-behaviour/</link>
		<comments>http://www.kickasslabs.com/2010/07/03/uiactionsheet-cancel-button-strange-behaviour/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 02:41:39 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[Quick Hits]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/2010/07/03/uiactionsheet-cancel-button-strange-behaviour/</guid>
		<description><![CDATA[I just got bit by this and fixed it thanks to this StackOverflow post.
http://stackoverflow.com/questions/1197746/uiactionsheet-cancel-button-strange-behaviour
Long story short, if your launch an action sheet in a view that lives in a UITabBarController, the &#8220;hit&#8221; box for the cancel button gets shifted in a VERY STUPID WAY!
The solution is to reference the view you&#8217;re displaying in by the [...]]]></description>
			<content:encoded><![CDATA[<p>I just got bit by this and fixed it thanks to this StackOverflow post.</p>
<p><a href="http://stackoverflow.com/questions/1197746/uiactionsheet-cancel-button-strange-behaviour" target="_blank">http://stackoverflow.com/questions/1197746/uiactionsheet-cancel-button-strange-behaviour</a></p>
<p>Long story short, if your launch an action sheet in a view that lives in a UITabBarController, the &#8220;hit&#8221; box for the cancel button gets shifted in a VERY STUPID WAY!</p>
<p>The solution is to reference the view you&#8217;re displaying in by the UITabBarController like this:</p>
<pre><code>[sheet showInView:self.parentViewController.tabBarController.view];</code></pre>
<p>Freaking WOW!  Thanks a heap, Apple!</p>
<p>*grumble grumble*</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F07%2F03%2Fuiactionsheet-cancel-button-strange-behaviour%2F&amp;linkname=Quick%20Hits%3A%20UIActionSheet%20cancel%20button%20strange%20behaviour"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/07/03/uiactionsheet-cancel-button-strange-behaviour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Hits: Becareful when returning inc’ed vars</title>
		<link>http://www.kickasslabs.com/2010/05/01/quick-hits-becareful-when-returning-inced-vars/</link>
		<comments>http://www.kickasslabs.com/2010/05/01/quick-hits-becareful-when-returning-inced-vars/#comments</comments>
		<pubDate>Sat, 01 May 2010 05:01:44 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Quick Hits]]></category>
		<category><![CDATA[gotcha]]></category>
		<category><![CDATA[noob]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=473</guid>
		<description><![CDATA[I noticed this in some MonoTouch code that I wrote recently, but I think it makes sense across other languages as well.  Let&#8217;s say you write a method that returns an incremented variable like this:
private int MyAwesomeFunction(int pVar)
{
// coding magic
  return pVar++;
}
&#8230;where pVar = 10, the returned value will NOT be 11!  The returned [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed this in some MonoTouch code that I wrote recently, but I think it makes sense across other languages as well.  Let&#8217;s say you write a method that returns an incremented variable like this:</p>
<p><span style="color: #0000ff;">private int</span> MyAwesomeFunction(int pVar)<br />
{<br />
<span style="color: #008000;">// coding magic</span><br />
<span style="color: #008000;"> <span style="color: #0000ff;"> return</span></span> pVar++;<br />
}</p>
<p>&#8230;where pVar = 10, the returned value will NOT be 11!  The returned value will still be 10.  If you want to return an incremented value for pVar, do the following:</p>
<p><code><span style="color: #0000ff;">private  int</span> MyAwesomeFunction(int pVar)<br />
{<br />
<span style="color: #008000;">//  coding magic</span></code><br />
<code> <span style="color: #0000ff;">return <span style="color: #000000;">++</span></span>pVar; <span style="color: #008000;">// or </span></code><span style="color: #008000;"><code>return   pVar+1</code></span>;<br />
<code>}</code></p>
<p>Just a case of postfix vs prefix.  In the previous example, the variable never gets incremented because the postfix operator would get evaluated after the line is processed, but that never happens because we&#8217;re returning the pVar.  By flipping to a prefix operator, we guarantee that we evaluate the opperator against the variable before we return it.</p>
<p>It&#8217;s also worth mentioning that being a little verbose here is also good.  Explicitly stating that you&#8217;re adding 1 to the variable (as displayed in the commented code) is the same number of characters and we eliminate the confusion over what&#8217;s getting returned.</p>
<p>Happy Coding!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F05%2F01%2Fquick-hits-becareful-when-returning-inced-vars%2F&amp;linkname=Quick%20Hits%3A%20Becareful%20when%20returning%20inc%26%238217%3Bed%20vars"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/05/01/quick-hits-becareful-when-returning-inced-vars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The 5 stages of 3.3.1</title>
		<link>http://www.kickasslabs.com/2010/04/11/the-5-stages-of-3-3-1/</link>
		<comments>http://www.kickasslabs.com/2010/04/11/the-5-stages-of-3-3-1/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 04:32:36 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[331]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=449</guid>
		<description><![CDATA[Developers have been up in arms on the news broken by Daring Fireball and TechCrunch.  The reported change in the iPhone developer agreement definitely stops Flash developers from creating iPhone apps using the new tools available CS5, but the sword Apple used also cuts into the heart of the MonoTouch, Appcelerator, Unity 3D, Corona, &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Developers have been up in arms on the news broken by <a href="http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler" target="_blank">Daring Fireball</a> and <a href="http://techcrunch.com/2010/04/08/adobe-flash-apple-sdk/" target="_blank">TechCrunch</a>.  The reported change in the iPhone developer agreement definitely <a href="http://theflashblog.com/?p=1888" target="_blank">stops Flash developers from creating iPhone apps</a> using the new tools available CS5, but the sword Apple used also cuts into the heart of the <a href="http://monotouch.net/" target="_blank">MonoTouch</a>, <a href="http://www.appcelerator.com/" target="_blank">Appcelerator</a>, <a href="http://unity3d.com/" target="_blank">Unity 3D</a>, <a href="http://anscamobile.com/corona/" target="_blank">Corona</a>, &amp; <a href="http://phonegap.com/" target="_blank">PhoneGap</a> communities.  Being a member of the MonoTouch community, I&#8217;m directly affected by this reported change.  Easily said, I&#8217;ve gone through the <a href="http://en.wikipedia.org/wiki/K%C3%BCbler-Ross_model" target="_blank">5 stages of grief</a> over the news:</p>
<p><span id="more-449"></span></p>
<h3>1] Denial</h3>
<p>It doesn&#8217;t really say that, does it?  I mean, they  must not realize what this will do to other projects not related to Adobe.  I&#8217;m sure they won&#8217;t enforce it.</p>
<h3>2] Anger</h3>
<p>Are you F*%#ING SERIOUS RIGHT NOW!?  Don&#8217;t they realize that some EA games use Lua!?  Are they going take those apps out of the store?  Don&#8217;t give me that &#8220;quality of apps&#8221; crap!  There are TONS of horrible apps written in native Objective-C!  &#8220;<a href="http://www.taoeffect.com/blog/2010/04/steve-jobs-response-on-section-3-3-1/" target="_blank">Crappy devs will make crappy apps regardless of how many layers there are &amp; it doesn’t make sense to limit source-to-source conversion</a>.&#8221;  This is creativity stifling!  Apple&#8217;s going to lose so many apps they&#8217;ll repeal this decision with the QUICKNESS!  I&#8217;m just going to bang out the best apps ever and we&#8217;ll see if Apple tries to take them out of the store.  I DOUBT THEY WILL!  What happened to the approval process!?  Shouldn&#8217;t that be enough!?  Don&#8217;t they understand how error prone manual memory management is!?  FURY!!!</p>
<h3>3] Bargaining</h3>
<p>Maybe we can team up with other developers and convince Apple to change this.  We can show them of the talent that&#8217;ll jump ship.  I mean, we&#8217;re not like those &#8220;sexy app&#8221; guys, right?</p>
<h3>4] Depression</h3>
<p>It&#8217;s over man!  It&#8217;s GAME OVER! Damn it!  I wasted all this time! What will become of my projects!?  I&#8217;m tossing out my iPhone &amp; I&#8217;m definitely not buying an iPad now.  It&#8217;ll just be too painful of a reminder that my app is available on it**.  Nothing to see here except a teary-eyed developer <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<h3>5] Acceptance</h3>
<p>This sucks likes crazy, but I&#8217;ve still got time.  I&#8217;ll make updates to <a href="http://www.touchplaybook.com" target="_blank">Touch Playbook</a> for as long as I can.  MonoTouch is talking about giving developers the ability to create Droid apps and that will kick ass!  Windows Phone 7 is right around the corner and since my app is already written in C#, the port should be very easy.  The HP Slate runs Windows 7 and obviously Silverlight so there&#8217;s another port right there.  I&#8217;ll get started on that this weekend!  If it wasn&#8217;t for MonoTouch, I wouldn&#8217;t have gotten as far along as I did with Touch Playbook.  I don&#8217;t regret a moment.</p>
<h3>Conclusion</h3>
<p>I don&#8217;t know what the future of MonoTouch and iPhone development is.  Rather, I don&#8217;t want to admit what I fear the future is.  I&#8217;d love for a miracle to take place where the reported language is altered in 3.3.1 to allow MonoTouch and other quality iPhone development solutions.  However, if that doesn&#8217;t happen, MonoTouch still definitely rocks!  For the time being, it feels good to be in the final stage.  I don&#8217;t like being so angsty. <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Update</h3>
<p>I do, however, remain hopeful.  I&#8217;ve signed the developer driven Tiny Petition <a href="http://tinypetition.com/NoBanFromTOSChange" target="_blank">against Apple&#8217;s reported TOS change and you can too</a>.  You might ask &#8220;Abel, isn&#8217;t this the barganing step?  Did you relapse?&#8221; and I would reply &#8220;Not exactly&#8221;.  In the bargaining step my thoughts came from desperation in the wake of anger.  Right now, signing the petition springs from hope and a desire to stand with my fellow MonoTouch devs and other devs effected by this.  This time the motivation is less about me and more about the community.</p>
<p>**I&#8217;ve already taken a stab at learning Objective-C and would rather use my time on other languages.  I don&#8217;t see myself taking up the effort again.  Life&#8217;s too short and I really like languages like C# &amp; Ruby.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F04%2F11%2Fthe-5-stages-of-3-3-1%2F&amp;linkname=The%205%20stages%20of%203.3.1"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/04/11/the-5-stages-of-3-3-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick Hits: Localization strings in Monotouch</title>
		<link>http://www.kickasslabs.com/2010/02/21/quick-hits-localization-strings-in-monotouch/</link>
		<comments>http://www.kickasslabs.com/2010/02/21/quick-hits-localization-strings-in-monotouch/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 22:31:05 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=439</guid>
		<description><![CDATA[It&#8217;s pretty straight forward.  Check out this post:
Internationalising my app
&#8230;and make sure the folders you use follow this format &#8220;[Language Abbreviation].lproj&#8221; as commenter #4 points out  
If you miss one of the major languages, your app will default to English.  As of this post, the iPhone OS supports the following languages:
English (U.S), English [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty straight forward.  Check out this post:</p>
<p><a href="http://forums.monotouch.net/yaf_postsm1381.aspx" target="_blank">Internationalising my app</a></p>
<p>&#8230;and make sure the folders you use follow this format &#8220;[Language Abbreviation].lpro<span style="text-decoration: underline;"><strong>j</strong></span>&#8221; as commenter #4 points out <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you miss one of the major languages, your app will default to English.  As of this post, the iPhone OS supports the following languages:</p>
<p>English (U.S), English (UK), French (France),  German, Traditional Chinese, Simplified Chinese, Dutch, Italian,  Spanish, Portuguese (Brazil), Portuguese (Portugal), Danish, Swedish,  Finnish, Norwegian, Korean, Japanese, Russian, Polish, Turkish,  Ukrainian, Arabic, Thai, Czech, Greek, Hebrew, Indonesian, Malay,  Romanian, Slovak, and Croatian</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F02%2F21%2Fquick-hits-localization-strings-in-monotouch%2F&amp;linkname=Quick%20Hits%3A%20Localization%20strings%20in%20Monotouch"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/02/21/quick-hits-localization-strings-in-monotouch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Hits:  When your .gitignore file gets…ignored</title>
		<link>http://www.kickasslabs.com/2010/02/06/quick-hits-when-your-gitignore-file-gets-ignored/</link>
		<comments>http://www.kickasslabs.com/2010/02/06/quick-hits-when-your-gitignore-file-gets-ignored/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 19:55:48 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[GIT]]></category>
		<category><![CDATA[noob]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=427</guid>
		<description><![CDATA[I made a mistake while creating a GIT repos that I&#8217;m hoping I can save you from making.  I made my first commit on a project and I realized that a bunch of files were getting in that shouldn&#8217;t be.  I created a .gitignore file, but the issue kept happening on subsequent commits.  As I [...]]]></description>
			<content:encoded><![CDATA[<p>I made a mistake while creating a GIT repos that I&#8217;m hoping I can save you from making.  I made my first commit on a project and I realized that a bunch of files were getting in that shouldn&#8217;t be.  I created a .gitignore file, but the issue kept happening on subsequent commits.  As I learned later, you SHOULD create your .gitignore file first.  However, if you forgot, this is how you fix it:</p>
<ol>
<li>Keep your .gitignore file.</li>
<li>Clear your GIT cache.  Don&#8217;t worry, this won&#8217;t delete any of your  local files, just what GIT is tracking.<br />
<code>git rm -r --cached .</code></li>
<li>Add everything in your project.  Your .gitignore file will exclude what you want to ignore now and start tracking the good stuff.<br />
<code>git add .</code></li>
<li>Commit your changes.<br />
<code>git commit -m "Now my .gitignore file works correctly!"</code></li>
</ol>
<p>Happy codding!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F02%2F06%2Fquick-hits-when-your-gitignore-file-gets-ignored%2F&amp;linkname=Quick%20Hits%3A%20%20When%20your%20.gitignore%20file%20gets%26%238230%3Bignored"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/02/06/quick-hits-when-your-gitignore-file-gets-ignored/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Hits: Sass demands syntax perfection!</title>
		<link>http://www.kickasslabs.com/2010/01/25/quick-hits-sass-demands-syntax-perfection/</link>
		<comments>http://www.kickasslabs.com/2010/01/25/quick-hits-sass-demands-syntax-perfection/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:01:58 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[Quick Hits]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Sass]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=388</guid>
		<description><![CDATA[Just a quick note about sass.  Let&#8217;s say you had the following in /public/stylesheets/sass/foo.sass:
body
  line-height:1.2em

h1
  color:red
This would render a blank document for /public/stylesheets/foo.css.  You won&#8217;t get an error about it, you&#8217;ll just get a blank document.  Here&#8217;s the thing, when you&#8217;re declaring a CSS property, you MUST put a space after the colon.  [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note about sass.  Let&#8217;s say you had the following in <strong>/public/stylesheets/sass/foo.sass</strong>:</p>
<pre>body
  line-height:1.2em

h1
  color:red</pre>
<p>This would render a <span style="text-decoration: underline;">blank</span> document for <strong>/public/stylesheets/</strong><strong>foo.css</strong>.  You won&#8217;t get an error about it, you&#8217;ll just get a blank document.  Here&#8217;s the thing, when you&#8217;re declaring a CSS property, you MUST put a space after the colon.  Failing to do so will just wind up in parsing errors on the sass side.</p>
<p>I hope I&#8217;ve saved you some head scratching. <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F01%2F25%2Fquick-hits-sass-demands-syntax-perfection%2F&amp;linkname=Quick%20Hits%3A%20Sass%20demands%20syntax%20perfection%21"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/01/25/quick-hits-sass-demands-syntax-perfection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I LOVE MonoTouch</title>
		<link>http://www.kickasslabs.com/2010/01/24/i-love-monotouch/</link>
		<comments>http://www.kickasslabs.com/2010/01/24/i-love-monotouch/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 22:42:47 +0000</pubDate>
		<dc:creator>abel</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[noob]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=415</guid>
		<description><![CDATA[Don't get me wrong, XCode is great...in it's own way...but as a .Net dev coming to the iPhone platform, MonoTouch rocks my world!
For the other devs in my shoes looking to play with MonoTouch, here are some things to keep in mind:]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t get me wrong, XCode is great&#8230;in it&#8217;s own way&#8230;but as a .Net dev coming to the iPhone platform, <a href="http://monotouch.net/" target="_blank">MonoTouch</a> rocks my world!</p>
<p>For the other devs in my shoes looking to play with <a href="http://monotouch.net/" target="_blank">MonoTouch</a>, here are some things to keep in mind:<span id="more-415"></span></p>
<ul>
<li>If you want to subclass something like UIView, UIImageView, or any class that&#8217;s originally an Objective-C class &amp; use your new class in your  XIB, you need to&#8230;
<ul>
<li>Make sure your constructor includes IntPtr constructor.</li>
<li>Sometimes you&#8217;ll need to register your classes like this:
<pre>[MonoTouch.Foundation.Register("MyAwesomeView")]
public class MyAwesomeView : UIView
{
   public MyAwesomeView (IntPtr handle) : base(handle)
   {
      Initialize ();
   }
   //My awesome code here!
}
</pre>
</li>
<li>If you simply type in the name of your custom subclassed view into IB without declaring it in code first, sometimes you get a &#8220;partial class&#8221; in the view controller&#8217;s xib code-behind file (MySensationalViewController.xib.designer.cs).  If that happens, you <strong>DON&#8217;T</strong> need to register your class, but you <strong>DO</strong> need to set your class definition to &#8216;partial&#8217;.  Here&#8217;s an example:
<pre>public partial class MyFantasticView : UIView
{
   public MyFantasticView  (IntPtr handle) : base(handle)
   {
      Initialize ();
   }
   //Your awesome code here!
}</pre>
</li>
</ul>
</li>
<li>Much like Visual Studio, you get awesome debugging tools so make sure to get familiar with &#8220;watches&#8221; (While at  break point: View -&gt; Debug Windows -&gt; Watch) and the &#8220;Expression Evaluator&#8221; (While at  break point: Run -&gt; Expression Evaluator).</li>
<li>There are also helpful tools such as a &#8220;Reg-Ex Toolkit&#8221; and an &#8220;Add-in&#8221; manager that can be hooked into repositories for even more functionality&#8230;as more repositories become available <img src='http://www.kickasslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>When you have a friendly, yet powerful IDE to work with, developing software becomes enjoyable.  I&#8217;ll definitely be using this IDE to create my first iPhone app submission to the AppStore.  As I learn more about MonoTouch, I&#8217;ll make sure to post my findings here.  In the meanwhile, those of you looking to get more info about MonoTouch should checkout <a href="http://monotouch.net/" target="_blank">its homepage</a>.  The MonoTouch site has a ton of tutorials, documentation, and multiple ways to plug into the MT community.  At a glance, you might scoff at the asking price of $399 for a yearly license, but when you consider how much faster you&#8217;ll be able to put together quality apps, it might be worth it for you.   I know it is for me.</p>
<p>Happy Coding!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2010%2F01%2F24%2Fi-love-monotouch%2F&amp;linkname=I%20LOVE%20MonoTouch"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2010/01/24/i-love-monotouch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Get Dropbox to Backup Files in Other Directories on Windows</title>
		<link>http://www.kickasslabs.com/2009/08/25/how-to-get-dropbox-to-backup-files-in-other-directories-on-windows/</link>
		<comments>http://www.kickasslabs.com/2009/08/25/how-to-get-dropbox-to-backup-files-in-other-directories-on-windows/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 02:05:39 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=405</guid>
		<description><![CDATA[If you&#8217;re using Dropbox (affiliate link), and you should be, because it&#8217;s awesome, you might have noticed that Dropbox will only backup/sync files inside your drop box folder; you can&#8217;t tell Dropbox to also sync with other folders.
Now, if you&#8217;re on a Mac or Linux system, just add a symlink inside your dropbox folder that [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using <a href="https://www.getdropbox.com/referrals/NTkxNzYyODk">Dropbox</a> (affiliate link), and you should be, because it&#8217;s awesome, you might have noticed that Dropbox will only backup/sync files inside your drop box folder; you can&#8217;t tell Dropbox to also sync with other folders.</p>
<p>Now, if you&#8217;re on a Mac or Linux system, just add a symlink inside your dropbox folder that points to the other folder you&#8217;d like to sync.  </p>
<p>On Windows,  if you want Dropbox to sync folders outside of your &#8220;My Dropbox&#8221; folder, you&#8217;ll want to use the <a href="http://technet.microsoft.com/en-us/library/cc753194(WS.10).aspx">mklink </a>command to create a <a href="http://en.wikipedia.org/wiki/NTFS_junction_point">directory junction</a> pointing to the other folder you want synced.  For example, if you want Dropbox to sync c:\source_code, open a command prompt, navigate to your dropbox directory (cd &#8220;My Dropbox&#8221;) and type: </p>
<blockquote><p>(Assuming you&#8217;ve already navigated to your &#8220;My Dropbox&#8221; folder)<br />
<strong>mklink /J source_code c:\source_code</strong></p></blockquote>
<p>Bam. That&#8217;s it. Dropbox is now following the link inside the &#8220;My Dropbox&#8221; directory and it&#8217;s syncing c:\source_code because it thinks it&#8217;s just another folder in the dropbox.  Enjoy!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2009%2F08%2F25%2Fhow-to-get-dropbox-to-backup-files-in-other-directories-on-windows%2F&amp;linkname=How%20to%20Get%20Dropbox%20to%20Backup%20Files%20in%20Other%20Directories%20on%20Windows"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2009/08/25/how-to-get-dropbox-to-backup-files-in-other-directories-on-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TDD Makes Software Go Faster</title>
		<link>http://www.kickasslabs.com/2009/08/24/tdd-makes-software-go-faster/</link>
		<comments>http://www.kickasslabs.com/2009/08/24/tdd-makes-software-go-faster/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 01:09:57 +0000</pubDate>
		<dc:creator>Brad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=392</guid>
		<description><![CDATA[One of the gripes I hear about TDD is that it takes too much time.  People look at the idea of it and think, &#8220;So I have to write code and tests and update the tests when the code changes? WTF?&#8221;
My message to you is: TDD takes less time, not more.
Today&#8217;s example: I&#8217;m writing [...]]]></description>
			<content:encoded><![CDATA[<p>One of the gripes I hear about <a href="http://en.wikipedia.org/wiki/Test-driven_development" title="TDD on Wikipedia" target="tddwiki">TDD</a> is that it takes too much time.  People look at the idea of it and think, &#8220;So I have to write code <i>and</i> tests and update the tests when the code changes? WTF?&#8221;</p>
<p>My message to you is: TDD takes <i>less</i> time, not more.</p>
<p>Today&#8217;s example: I&#8217;m writing some code that uses a parsing library written by a cow-orker.  He&#8217;s a sharp guy, and the library generally works well, but it has a couple of undocumented behaviors &#8211; they&#8217;re mostly benign, and probably work for other users of the library, but for me it&#8217;s stuff that would result in misbehavior <i>way</i> up the call stack, or in another module entirely.</p>
<p>While I&#8217;m test-driving the code that uses this library, I notice the library itself does not have automated tests.  The natural-feeling thing for me to do here is to test some sample calls to the lib to make sure it does what I expect.  I know it&#8217;s not exactly canonical behavior to test outside libs that are assumed to be functioning, but it <i>is</i> good form to write tests that teach you about the system you&#8217;re building, and I needed to learn whether this library was going to parse my input in the way that I expected.  The documentation wasn&#8217;t there, I wasn&#8217;t going to figure it out by inspecting the code (which is relatively complex), so tests it was.</p>
<p>Surprise, surprise &#8211; I found out that the library did NOT behave as I expected in every case.  Had I not taken twenty minutes to write tests to introduce confidence in the parts of the system I didn&#8217;t know well, I&#8217;d probably have spent a couple hours debugging and looking in the wrong places for the problems I was having downstream.  It also led me to a relatively simple solution where I extended the library class and just overrode the elements related to my handful of problematic cases, without changing his library or breaking code that depends on it.</p>
<p>As an added bonus, not only do I know what the documentation does not tell me, but I&#8217;ll also know if and when my colleague makes changes to his library that break the expectations of <i>my</i> code.</p>
<p>So I&#8217;ve reduced debugging time, increased my confidence in my code, and protected myself against future changes.  I see it time and again &#8211; the time <i>saved</i> by writing the extra test code is well out of proportion to the time spent writing it.</p>
<p>There&#8217;s an exception here for developers or shops that are fetishistic about 100% test coverage, and do not judiciously use automated testing to learn about the system, drive design, and catch regressions.  Writing tests to cover trivial/obvious code (i.e., writing tests that do not <i>teach you about the system)</i> is a time-suck.  I&#8217;d avoid it, if I were you.</p>
<p>As long as I&#8217;m raving about TDD, I have to recommend the work of Kent Beck.  I <a href="http://twitter.com/KentBeck" title="Kent Beck on Twitter" target="kbtwitter">follow him on Twitter</a>, I <a href="http://www.threeriversinstitute.org/blog/" title="Three Rivers Institute Blog" target="kbblog">read his blog</a>, and <a href="http://www.amazon.com/gp/product/0321146530?ie=UTF8&#038;tag=kickasslabs-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0321146530" title="Test-Driven Development: By Example" target="kbbook">his book on TDD</a> changed how I write software &#8211; I count it among the indispensible books on my shelf, with the GoF Design Patterns and Knuth.  Check him out if you&#8217;re interested in deep thought about how software gets made.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2009%2F08%2F24%2Ftdd-makes-software-go-faster%2F&amp;linkname=TDD%20Makes%20Software%20Go%20Faster"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2009/08/24/tdd-makes-software-go-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Hits: Unit Testing iPhone Apps</title>
		<link>http://www.kickasslabs.com/2009/07/05/quick-hits-unit-testing-iphone-apps/</link>
		<comments>http://www.kickasslabs.com/2009/07/05/quick-hits-unit-testing-iphone-apps/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 19:04:35 +0000</pubDate>
		<dc:creator>Brad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[tdd]]></category>

		<guid isPermaLink="false">http://www.kickasslabs.com/?p=381</guid>
		<description><![CDATA[I have a few things to add to the woefully incomplete official documentation on setting up automated tests in your iPhone apps:

You need to add your main application executable target as a direct dependency of the test target, so that you&#8217;re always testing against your latest build.  Do this by double-clicking on the test [...]]]></description>
			<content:encoded><![CDATA[<p>I have a few things to add to the woefully incomplete <a href="http://developer.apple.com/IPhone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html" title="iPhone Development Guide: Unit Testing Applications" target="iphonetestdocs">official documentation on setting up automated tests in your iPhone apps</a>:</p>
<ol>
<li>You need to add your main application executable target as a direct dependency of the test target, so that you&#8217;re always testing against your latest build.  Do this by double-clicking on the test target, going to the &#8220;General&#8221; pane in the properties dialog, and adding your app under &#8220;Direct Dependencies&#8221;.  (This was actually mentioned in the OCUnit tutorial for Cocoa, but not the one about iPhone testing.)</li>
<li>Your linker needs to know about the objects you&#8217;re testing.  An easy way to do this is to add the .m files for those classes to the &#8220;Compile Sources&#8221; group in your test target.  You&#8217;ll also have to make sure you link against any frameworks used by these objects.  (You could also tell your app target to export all symbols, then link your test target to it as you would a library.) (Thanks to Chris Hanson for pointing out this procedural improvement in comments.) <del datetime="2009-07-06T02:48:59+00:00">You need to explicitly link the object files of the classes you&#8217;re testing.  These are the &#8220;.o&#8221; files in your build folder.  To do this: Double-click on the test target, go to the &#8220;General&#8221; pane, add a new item under &#8220;Linked Libraries&#8221;.  In the dialog that pops up, choose &#8220;Add Other&#8230;&#8221; and add your class&#8217;s .o file.</del></li>
<li>When you run your tests, one failure looks like two:  Failed tests show up in Xcode as errors (just like compile errors, &#038;c). Any test failure triggers a second error, and you&#8217;ll see something like &#8220;Failed tests for architecture &#8216;i386&#8242; (GC OFF)&#8221;. The docs never say so, but this appears to be normal.  Fix the failing test, and it goes away.</li>
</ol>
<p>Anything else to add?  Drop us a comment!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.kickasslabs.com%2F2009%2F07%2F05%2Fquick-hits-unit-testing-iphone-apps%2F&amp;linkname=Quick%20Hits%3A%20Unit%20Testing%20iPhone%20Apps"><img src="http://www.kickasslabs.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.kickasslabs.com/2009/07/05/quick-hits-unit-testing-iphone-apps/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
