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

<channel>
	<title>/dev/amro</title>
	<atom:link href="http://amromousa.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amromousa.com</link>
	<description>vim /etc/amdev_rant.conf</description>
	<pubDate>Thu, 28 Aug 2008 00:55:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>NSURLConnection + timeoutConnection = Amdev Woes</title>
		<link>http://amromousa.com/2008/08/27/nsurlconnection-timeoutconnection-amdev-woes/</link>
		<comments>http://amromousa.com/2008/08/27/nsurlconnection-timeoutconnection-amdev-woes/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 00:55:04 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

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

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

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

		<guid isPermaLink="false">http://amromousa.com/?p=231</guid>
		<description><![CDATA[So for the past two days I&#8217;ve had my iPhone app crashing and vomiting &#8220;EXC_BAD_ACCESS&#8221; in the console. Generally speaking, this error means you&#8217;ve released a reference to some object you still need and some other object tried to send a message to said object afterward. It turns out that it was entirely my fault [...]]]></description>
			<content:encoded><![CDATA[<p>So for the past two days I&#8217;ve had my iPhone app crashing and vomiting &#8220;EXC_BAD_ACCESS&#8221; in the console. Generally speaking, this error means you&#8217;ve released a reference to some object you still need and some other object tried to send a message to said object afterward. It turns out that it was entirely my fault and (GASP) paying a little more attention to Apple&#8217;s reference would saved hours and hours of debugging for me.</p>
<p>NSURLConnection is actually pretty simple to use but here are some tips:</p>
<ol>
<li>Use the asynchronous mode for any reasonably large file (bigger than a few KB) as people might be on a slow Edge network connection and locking up the view is never a good thing.</li>
<li>Do <strong>not</strong> send the message &#8220;start&#8221; to your connection if you use connectionWithRequest or initWithRequest to initialize your connection as you&#8217;ll get the nasty &#8220;EXC_BAD_ACCESS&#8221; error mentioned above. The reason for this is simple:  You&#8217;ve scheduled your connection to time out in n seconds, the method that initializes the connection starts fetching data immediately. You then send the message &#8220;start,&#8221; which spins off the connection trying to fetch data again. This works fine except that the original attempt eventually times out and tries to call back, hosing everything over and crashing your application hard core. Oops. <strong>You should only send the message &#8220;start&#8221; to your connection if you initialize it with initWithRequest:delegate:startImmediately.</strong></li>
<li>When setting up NSURLRequest to pass to NSURLConnection, I highly recommend using NSMutableURLRequest so you can set the User-Agent header.  Some http servers may not return data, even for a simple GET without the User-Agent.  It&#8217;s my understanding that User-Agents are optional, but I do not know if said server behavior is nonstandard.</li>
</ol>
<blockquote>
<div>
<p><span>    </span>NSMutableURLRequest<span> *request  = <span>[</span>NSMutableURLRequest<span> </span><span>requestWithURL</span><span>:[</span>NSURL U<span>RLWithString</span><span>: @"http://myurl.com"</span><span>] cachePolicy<span>:</span>NSURLRequestUseProtocolCachePolicy<span> </span>timeoutInterval<span>:</span><span>15.0</span><span>];</span></span></span></p>
<p><span>    </span>//Borrow FF2&#8217;s User-Agent</p>
<p><span>[request </span><span>setValue</span><span>: </span>@"Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16"<span> </span><span>forHTTPHeaderField</span><span>: </span>@"User-Agent"<span>];</span></p>
</div>
</blockquote>
<p>I hope this saves someone some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/08/27/nsurlconnection-timeoutconnection-amdev-woes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>return7</title>
		<link>http://amromousa.com/2008/08/26/return7/</link>
		<comments>http://amromousa.com/2008/08/26/return7/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 04:21:19 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

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

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

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

		<guid isPermaLink="false">http://amromousa.com/?p=230</guid>
		<description><![CDATA[so drew and i founded a new startup, return7.  we&#8217;re each working on an iphone app, and we&#8217;re hoping to submit the apps to apple within the next week or two &#8212; stay tuned.
]]></description>
			<content:encoded><![CDATA[<p>so drew and i founded a new startup, return7.  we&#8217;re each working on an iphone app, and we&#8217;re hoping to submit the apps to apple within the next week or two &#8212; stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/08/26/return7/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Appcelerator Dynamic Code + IE = Be careful</title>
		<link>http://amromousa.com/2008/08/12/appcelerator-dynamic-code-ie-be-careful/</link>
		<comments>http://amromousa.com/2008/08/12/appcelerator-dynamic-code-ie-be-careful/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 18:09:58 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[appcelerator]]></category>

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

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

		<guid isPermaLink="false">http://amromousa.com/?p=229</guid>
		<description><![CDATA[So you want to insert widget code using element.innerHTML in IE? That&#8217;s fine, but wrap the string you&#8217;re innerHTMLing in a call to &#8220;Appcelerator.Compiler.addIENameSpace(string).&#8221;  Why?  When inserting XML into IE&#8217;s DOM, you need to prefix it w/ &#8220;&#60;?xml:namespace prefix = app ns = &#8220;http://www.appcelerator.org&#8221; /&#62;&#8221; so IE knows what to do.  It sort of makes [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to insert widget code using element.innerHTML in IE? That&#8217;s fine, but wrap the string you&#8217;re innerHTMLing in a call to &#8220;Appcelerator.Compiler.addIENameSpace(string).&#8221;  Why?  When inserting XML into IE&#8217;s DOM, you need to prefix it w/ &#8220;&lt;?xml:namespace prefix = app ns = &#8220;http://www.appcelerator.org&#8221; /&gt;&#8221; so IE knows what to do.  It sort of makes sense, actually, but we&#8217;re all spoiled by Firefox and the like.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/08/12/appcelerator-dynamic-code-ie-be-careful/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Can&#8217;t Select Distribution Provisioning Profile in Xcode</title>
		<link>http://amromousa.com/2008/08/11/cant-select-distribution-provisioning-profile-in-xcode/</link>
		<comments>http://amromousa.com/2008/08/11/cant-select-distribution-provisioning-profile-in-xcode/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 02:35:27 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://amromousa.com/?p=228</guid>
		<description><![CDATA[If you can&#8217;t seem to select the Distribution Provisioning Profile when you&#8217;re trying to sign your iPhone app for distribution on the AppStore, here&#8217;s a tip:  Check your Keychain Access application, under &#8220;Keys&#8221; on the left hand side to make sure you have a public and private key for the certificate you request in step [...]]]></description>
			<content:encoded><![CDATA[<p>If you can&#8217;t seem to select the Distribution Provisioning Profile when you&#8217;re trying to sign your iPhone app for distribution on the AppStore, here&#8217;s a tip:  Check your Keychain Access application, under &#8220;Keys&#8221; on the left hand side to make sure you have a public and private key for the certificate you request in step 1 of the process.</p>
<p>If you don&#8217;t have these keys, remove your certificate from Keychain and remove your provisioning file (from ~/Library/MobileDevice/Provisioning Profile). Installing the same old certificates over and over will NOT help &#8212; you have to remove them all from your system and invalidate the certificate and distribution profile on the Apple Developer Connection page, then start the process over again.  When you generate the initial request and upload the certificate request to Apple&#8217;s site, check Keychain Access for the the public/private keys &#8212; if they&#8217;re there, you&#8217;re on the right track.</p>
<p>From there, clean your build and follow the instructions on Apple&#8217;s site and you&#8217;ll be good to go.  Make sure you close xcode prior to installing the provisioning profile again (I just copied mine to the directory instead of dragging it onto xcode or itunes).</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/08/11/cant-select-distribution-provisioning-profile-in-xcode/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RadioJavan is Out!</title>
		<link>http://amromousa.com/2008/07/31/radiojavan-is-out/</link>
		<comments>http://amromousa.com/2008/07/31/radiojavan-is-out/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 20:33:40 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

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

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

		<category><![CDATA[Radio Javan]]></category>

		<guid isPermaLink="false">http://amromousa.com/?p=227</guid>
		<description><![CDATA[Radio Javan is out on the Appstore! Click here or navigate to the music category to download your free copy.
]]></description>
			<content:encoded><![CDATA[<p>Radio Javan is out on the Appstore! Click <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=286225933&#038;mt=8">here</a> or navigate to the music category to download your free copy.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/07/31/radiojavan-is-out/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Radio Javan for the iPhone!</title>
		<link>http://amromousa.com/2008/07/21/radio-javan-for-the-iphone/</link>
		<comments>http://amromousa.com/2008/07/21/radio-javan-for-the-iphone/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 05:02:41 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[Radio Javan]]></category>

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

		<guid isPermaLink="false">http://amromousa.com/?p=225</guid>
		<description><![CDATA[About a week ago, Hamed Hashemi (of RadioJavan.com, coworker at Appcelerator) asked if I wanted to help write an application to stream RJ to the iPhone.  A week (and many late nights spent learning the iPhone SDK and Objective-C) later, RadioJavan.app is alive and kicking.  Look for it on the AppStore soon.  It&#8217;ll run on [...]]]></description>
			<content:encoded><![CDATA[<p>About a week ago, <a href="http://www.coolestan.com">Hamed Hashemi</a> (of <a href="http://radiojavan.com">RadioJavan.com</a>, coworker at <a href="http://appcelerator.com">Appcelerator</a>) asked if I wanted to help write an application to stream RJ to the iPhone.  A week (and many late nights spent learning the iPhone SDK and Objective-C) later, RadioJavan.app is alive and kicking.  Look for it on the AppStore soon.  It&#8217;ll run on your iPhone (2g/3g) or iPod Touch w/ 2.0 firmware.  Thanks to Hamed for letting me help  put this together &#8212; it was a lot of fun.  Here are some screens to wet your appetite:</p>
<div style="text-align: center;padding-top:10px"><img src="http://static.zooomr.com/images/5371994_ec7c0ced71_o.png" alt="Loading Screen" width="320" height="460" /></div>
<div style="text-align: center;padding-top:10px"><img src="http://static.zooomr.com/images/5371995_69f4ef22c4_o.png" alt="Main screen" width="320" height="460" /></div>
<div style="text-align: center;padding-top:10px"><img src="http://static.zooomr.com/images/5371996_be72e185bb_o.png" alt="Icon" width="79" height="92" /></div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/07/21/radio-javan-for-the-iphone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hi, I&#8217;m Apple and I like to..</title>
		<link>http://amromousa.com/2008/06/11/hi-im-apple-i-like-to/</link>
		<comments>http://amromousa.com/2008/06/11/hi-im-apple-i-like-to/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 14:06:14 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[Apple]]></category>

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

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

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

		<guid isPermaLink="false">http://amromousa.com/?p=223</guid>
		<description><![CDATA[ban people from using my iPhone SDK to do useful things, presumably so I can do those useful things with less features and sell them for more than the 3rd party would with more features.
Edit: Oh and heaven forbid people have applications that actually run in the background.  That would be the &#8220;wrong solution&#8221; so [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gizmodo.com/5015389/iphone-sdk-agreement-prohibits-real+time-route-guidance-and-saving-lives">ban people from using my iPhone SDK to do useful things</a>, presumably so I can do those useful things with less features and sell them for more than the 3rd party would with more features.</p>
<p>Edit: Oh and heaven forbid people have applications that actually run in the background.  That would be the &#8220;wrong solution&#8221; so instead we&#8217;ll wait until september for them to give us a server to push &#8220;events&#8221; to the phones instead of letting us have the functionality immediately.  Everyone should just forget that practically every other mobile platform out there aside from the ever-crappy PalmOS allows background processes in some form or another without killing battery life.</p>
<p>Edit 2: So it looks like it was a sham (copied from the google maps terms), but the first edit still stands.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/06/11/hi-im-apple-i-like-to/feed/</wfw:commentRss>
		</item>
		<item>
		<title>When Testing Against Nightly Builds..</title>
		<link>http://amromousa.com/2008/06/06/when-testing-against-nightly-builds/</link>
		<comments>http://amromousa.com/2008/06/06/when-testing-against-nightly-builds/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 00:12:41 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[Other]]></category>

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

		<category><![CDATA[funny waste of time]]></category>

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

		<guid isPermaLink="false">http://amromousa.com/?p=222</guid>
		<description><![CDATA[..it often helps if your QA department doesn&#8217;t use a proxy server for caching older versions of files.  Food for thought.
]]></description>
			<content:encoded><![CDATA[<p>..it often helps if your QA department doesn&#8217;t use a proxy server for caching older versions of files.  Food for thought.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/06/06/when-testing-against-nightly-builds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SquirrelFish: Webkit&#8217;s new Javascript Interpreter</title>
		<link>http://amromousa.com/2008/06/05/squirrelfish-webkits-new-javascript-interpreter/</link>
		<comments>http://amromousa.com/2008/06/05/squirrelfish-webkits-new-javascript-interpreter/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 03:42:59 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[webkit]]></category>

		<category><![CDATA[byte code]]></category>

		<category><![CDATA[virtual machine]]></category>

		<guid isPermaLink="false">http://amromousa.com/?p=221</guid>
		<description><![CDATA[So Webkit&#8217;s JS interpreter has just hit the big time &#8212; it&#8217;s now a full blown vm instead of a syntax-tree-walker like the other slow-pokes.  What&#8217;s interesting is it&#8217;s roughly 1.6x faster than Safari 3.1&#8217;s js interpreter and 4.something times as fast as Safari 3.0&#8217;s so we&#8217;re talking a major improvement here.  The blog post [...]]]></description>
			<content:encoded><![CDATA[<p>So Webkit&#8217;s JS interpreter has just <a href="http://webkit.org/blog/189/announcing-squirrelfish/">hit the big time</a> &#8212; it&#8217;s now a full blown vm instead of a syntax-tree-walker like the other <a href="http://microsoft.com/ie">slow-pokes</a>.  What&#8217;s interesting is it&#8217;s roughly 1.6x faster than Safari 3.1&#8217;s js interpreter and 4.something times as fast as Safari 3.0&#8217;s so we&#8217;re talking a major improvement here.  The <a href="http://webkit.org/blog/189/announcing-squirrelfish/">blog post</a> talks about why SquirrelFish is faster and what to expect in the future (the developers state that it&#8217;s relatively unoptimized at this point.  Hopefully Microsoft moves to something along these lines for IE9 &#8212; the javascript performance of IE8 will still be mediocre relative to other modern browsers (except for its predecessors, of course).</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/06/05/squirrelfish-webkits-new-javascript-interpreter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More Shoutcast on the iPhone</title>
		<link>http://amromousa.com/2008/05/31/more-shoutcast-on-the-iphone/</link>
		<comments>http://amromousa.com/2008/05/31/more-shoutcast-on-the-iphone/#comments</comments>
		<pubDate>Sat, 31 May 2008 15:59:39 +0000</pubDate>
		<dc:creator>amro</dc:creator>
		
		<category><![CDATA[Shoutcast]]></category>

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

		<guid isPermaLink="false">http://amromousa.com/?p=218</guid>
		<description><![CDATA[So I finally fixed that odd crapping out after 30 seconds of streaming issue &#8212; I was corrupting the audio buffer in some odd circumstance.  It turns out that Shoutcast 1.9.9 beta (linux only atm) already has native iPhone/iPod touch support so my proxy guy is pretty much moot.  It was still fun to impl [...]]]></description>
			<content:encoded><![CDATA[<p>So I finally fixed that odd crapping out after 30 seconds of streaming issue &#8212; I was corrupting the audio buffer in some odd circumstance.  It turns out that <a href="http://forums.winamp.com/showthread.php?threadid=291762">Shoutcast 1.9.9 beta</a> (linux only atm) already has native iPhone/iPod touch support so my proxy guy is pretty much moot.  It was still fun to impl and if anyone&#8217;s interested in the source, I&#8217;ll put it up for download.  Just shoot an email via my contact form or leave a comment.  Unfortunately, I never did fix the client reconnect/disconnect issue.  As for <a href="http://radiojavan.com">RJ</a>, they&#8217;re going to setup an iPhone specific stream shortly using the Shoutcast stuff (much better than each user having to run some proxy software on their computers and deal w/ port forwarding, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://amromousa.com/2008/05/31/more-shoutcast-on-the-iphone/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
