<?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>Terry Blanchard</title>
	<atom:link href="http://www.terryblanchard.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.terryblanchard.com</link>
	<description>Ramblings From Inside My Head</description>
	<lastBuildDate>Wed, 17 Aug 2011 08:00:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Worst SVN Error Message Ever</title>
		<link>http://www.terryblanchard.com/2011/08/16/worst-svn-error-message/</link>
		<comments>http://www.terryblanchard.com/2011/08/16/worst-svn-error-message/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 06:52:12 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[svn+ssh]]></category>
		<category><![CDATA[Versions]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=538</guid>
		<description><![CDATA[Total props go to Ben Christensen for this little gem that had me slamming my head against the wall. If you&#8217;re trying to perform a Subversion checkout and getting some meaningless error such as: svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the &#91;tunnels&#93; section of your Subversion configuration [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />Total props go to <a title="Ben Christensen" href="http://benjchristensen.com/2010/06/01/useless-svn-error-message-network-connection-closed-unexpectedly/">Ben Christensen</a> for this little gem that had me slamming my head against the wall. If you&#8217;re trying to perform a Subversion checkout and getting some meaningless error such as:</p>
<div class="codecolorer-container bash default codecolorer-noborder" style="border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn: To better debug SSH connection problems, remove the <span style="color: #660033;">-q</span> option from <span style="color: #ff0000;">'ssh'</span> <span style="color: #000000; font-weight: bold;">in</span> the <span style="color: #7a0874; font-weight: bold;">&#91;</span>tunnels<span style="color: #7a0874; font-weight: bold;">&#93;</span> section of your Subversion configuration file.</div></div>
<p>or</p>
<div class="codecolorer-container bash default codecolorer-noborder" style="border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn: Network connection closed unexpectedly.</div></div>
<p>The simple answer is to delete your known_hosts file in your .ssh folder:</p>
<div class="codecolorer-container bash default codecolorer-noborder" style="border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">indy:~ terryblanchard$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-al</span> .ssh<br />
drwx------ &nbsp; <span style="color: #000000;">3</span> terryblanchard &nbsp;staff &nbsp;<span style="color: #000000;">102</span> Aug <span style="color: #000000;">16</span> <span style="color: #000000;">23</span>:01 .<br />
drwxr-xr-x+ <span style="color: #000000;">29</span> terryblanchard &nbsp;staff &nbsp;<span style="color: #000000;">986</span> Jul <span style="color: #000000;">15</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">59</span> ..<br />
<span style="color: #660033;">-rw-r--r--</span> &nbsp; <span style="color: #000000;">1</span> terryblanchard &nbsp;staff &nbsp;<span style="color: #000000;">474</span> Aug <span style="color: #000000;">16</span> <span style="color: #000000;">23</span>:01 known_hosts<br />
indy:~ terryblanchard$ <span style="color: #c20cb9; font-weight: bold;">rm</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>known_hosts</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2011/08/16/worst-svn-error-message/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Successful Businesses Hire the Right People and Give Them the Freedom to Make the Right Decisions</title>
		<link>http://www.terryblanchard.com/2011/02/28/giving-employees-the-freedom-to-make-the-right-decisions/</link>
		<comments>http://www.terryblanchard.com/2011/02/28/giving-employees-the-freedom-to-make-the-right-decisions/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 17:07:57 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Aviation]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Corporate Culture]]></category>
		<category><![CDATA[Southwest Airlines]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=402</guid>
		<description><![CDATA[I read a heart-warming article on Time.com about a Southwest Airlines pilot. He delayed a plane full of passengers by waiting at the gate for a late arriving passenger. Planes that depart late reflect poorly on the airline&#8217;s reputation and how customers evaluate them. There were 100+ passengers sitting in the plane and he&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://www.terryblanchard.com/wp-content/uploads/2011/02/southwest-airlines-heart-logo.jpg"><img class="size-full wp-image-431 alignright" title="southwest-airlines-heart-logo" src="http://www.terryblanchard.com/wp-content/uploads/2011/02/southwest-airlines-heart-logo.jpg" alt="" width="358" height="184" /></a>I read a heart-warming article on Time.com about a <a title="Southwest Airlines" href="http://www.southwest.com/">Southwest Airlines</a> pilot. He delayed a plane full of passengers by waiting at the gate for a late arriving passenger.</p>
<p>Planes that depart late reflect poorly on the airline&#8217;s reputation and how customers evaluate them. There were 100+ passengers sitting in the plane and he&#8217;s not in the cockpit. His flight crew, and everyone else who is dependent on him, are forced to answer a lot of tough questions from those inquiring passengers.</p>
<p>Why would he do this?</p>
<p>Why does he still have a job?</p>
<p>He&#8217;s done everything that I&#8217;m sure all of the company policies and operational manuals tell him not to do. Not only does this fine pilot have a job, his company fully stands behind him and endorses his decision.</p>
<p>The passenger he was waiting for was just a regular guy, a grandfather. He wasn&#8217;t a celebrity, personal friend of the pilot, or some high-ranking executive with Southwest Airlines. Just a guy. A man who received some of the most difficult news any person could ever have to deal with. He was flying to Denver because they were pulling his 3 year-old grandson off life support. There was nothing the doctors could do to save him from the brutal act of inhumanity committed by his daughter&#8217;s boyfriend.</p>
<p>The grandfather received the news from his wife while he was on a business trip in Los Angeles. She offered to call and make his travel arrangements for him as he was emotionally devastated. She called Southwest Airlines and the lady who helped her book the flight could do very little to hold back her tears throughout the call.</p>
<p>Arriving at the airport two hours before his flight was scheduled to depart, long security lines reduced the probability of him making his flight. No one in the security lines gave a damn while the grandfather pleaded his case about missing his flight. I have to be honest, I would have thought it was a scam and told him that I was sympathetic &#8230; but no. I&#8217;ve been scammed one to many times to &#8220;fall&#8221; for that line.</p>
<p>It&#8217;s so easy to get caught up in life and become part of the machine. No one would have faulted the pilot for doing his job by departing on time while the grandfather was stuck in the TSA lines.</p>
<p>But Southwest Airlines is a different kind of company. Those who have flown on Southwest know they are a different kind of airline. They aren&#8217;t the stuffy type of airline that we&#8217;re all accustomed to. If you haven&#8217;t seen this video, you should watch it. While this is a clearly a highlight, it&#8217;s pretty typical from Southwest and represents just how different they are from other airlines.</p>
<p><a href="http://www.terryblanchard.com/2011/02/28/giving-employees-the-freedom-to-make-the-right-decisions/"><em>Click here to view the embedded video.</em></a></p>
<p>From a corporate perspective, there&#8217;s a huge distance between the lady who took the phone call from the grandfather&#8217;s wife and the pilot who actually flies the airplane. I doubt they know each other even though they work for the same company. But this is where we start to see what kind of company Southwest really is. We get to see it&#8217;s true colors. On the <a title="Southwest website" href="http://www.southwest.com/html/why-fly-southwest/index.html">Southwest website</a> they say:</p>
<blockquote><p>Fly Southwest Airlines because you want to be treated like a person</p></blockquote>
<p>Most companies say crap like this in their mission statement or some marketing bullshit posted on their website. Nobody in their employ believes in it and they probably mock it. Very few companies actually walk-the-walk.</p>
<p>Southwest Airlines is one of those few companies that walks-the-walk.</p>
<p>After the Southwest booking agent got off the phone, she called the LA gate agent and informed her of the situation. The gate agent told the pilot. The pilot made the decision to go against everything his company pays him to do because &#8230; it was the right thing to do. He wasn&#8217;t concerned with business metrics or his upcoming employee review. He was a compassionate man with his heart on his sleeve, not a cog in the wheel of a business machine.</p>
<p>When the grandfather arrived at the gate, the pilot was waiting for him.</p>
<p>“Are you Mark? We held the plane for you and we&#8217;re so sorry about the loss of your grandson. They can&#8217;t go anywhere without me and I wasn&#8217;t going anywhere without you. Now relax. We&#8217;ll get you there. And again, I&#8217;m so sorry.”</p>
<p>This story could move a robot to tears.</p>
<p>Let&#8217;s think about the corporate culture that must exist within Southwest Airlines. They clearly hire compassionate people, but the company also gives them the freedom to make the right decisions. Even if they are against what the rules say. They trust their employees to do what their mission statement says; Fly with us because you want to be treated like a person.</p>
<p>This philosophy applies to everyone at Southwest Airlines. From the lady who booked the flight and stopped taking calls while she contacted the gate agent in LA, to the pilot who refused to board his plane while he waited for a passenger going through a tragic time in his life.</p>
<p>Read the comments on <a href="http://www.elliott.org/blog/southwest-airlines-pilot-holds-plane-for-murder-victims-family">this website</a>. Most of them say things like, &#8220;If you didn&#8217;t mention the airline, I would have totally guessed that it was Southwest.&#8221;</p>
<p>Would people say this about your company? Would you?</p>
<p>The original Time.com article can be found <a href="http://newsfeed.time.com/2011/01/13/pilot-who-cares-the-most-heartwarming-airline-story-of-2011/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2011/02/28/giving-employees-the-freedom-to-make-the-right-decisions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why Cross-Platform Products Fail</title>
		<link>http://www.terryblanchard.com/2011/01/17/why-cross-platform-products-fail/</link>
		<comments>http://www.terryblanchard.com/2011/01/17/why-cross-platform-products-fail/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 22:13:27 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Interaction Design]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Visual Design]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Cross Platform]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Native]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=399</guid>
		<description><![CDATA[Alex Payne has written a wonderful article about why cross-platform development environments ultimately fail to deliver what customers really want; a great experience. Alex says: This post is about platforms and doing the right thing by your customers. It’s about the one big thing that I think HipChat and some other great companies are doing [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://al3x.net">Alex Payne</a> has written a <a href="http://al3x.net/2011/01/15/user-hostile-platforms.html">wonderful article</a> about why cross-platform development environments ultimately fail to deliver what customers really want; a great experience. Alex says:</p>
<blockquote><p>This post is about platforms and doing the right thing by your customers. It’s about the one big thing that I think HipChat and some other great companies are doing wrong.</p></blockquote>
<p>He nails the reason that cross-platform development tools and environments like Adobe&#8217;s <a href="http://www.adobe.com/products/flash/">Flash</a> and <a href="http://www.adobe.com/products/air/">AIR</a> products are attractive from a business perspective but end up failing from the customers perspective. Ultimately, that circle of life will come back to haunt the business.</p>
<p>Many businesses are attracted to the idea of writing software once and deploying it across multiple platforms. From their perspective they have one development team, one code base, and one release cycle. What&#8217;s not to love?</p>
<p>That&#8217;s where most businesses stop their investigation. They fail to even think about <em>what their customers want</em>. They&#8217;ll quickly jump up and say, &#8220;What they want is our product on their platform. We&#8217;re giving them that!&#8221;</p>
<p>Yeah, but you&#8217;re giving them a turd and that&#8217;s insulting. I hear the next bit of verbal diarrhea spilling out of their mouth &#8230; and this part kills me.</p>
<p>&#8220;Well, at least they&#8217;ll have our product on their platform.&#8221;</p>
<p>Ouch. I think I just threw up a little while typing that.</p>
<blockquote><p>What you’re communicating with a poorly-done AIR app is that your business priorities – namely, saving time and money – are more important than what your customers want.</p></blockquote>
<p>Ironically paradoxical in nature because without customers there is no business.</p>
<p>Alex points out a few very well known products such as <a href="http://www.davidalison.com/2009/04/tweetdeck-vs-nambu-vs-tweetie.html">TweetDeck</a>, <a href="http://getsatisfaction.com/pandora/topics/plans_for_a_pandora_client#reply_3570108">Pandora</a>, and <a href="http://www.rememberthemilk.com/forums/ideas/3007/">Remember the Milk</a>, where their users are begging for a native application. Sadly, the folks screaming for a native application for Remember The Milk have been flat out ignored by that company since 2007. Actually, that&#8217;s not ignoring them. That&#8217;s giving them the finger.</p>
<blockquote><p>My team experienced a number of the usual problems one has with AIR applications: lousy performance, odd interface bugs, key combinations and UI elements that didn’t conform to our operating system. AIR apps exist in an uncanny valley between a web application and a desktop application, and the result is unsettling and annoying. Pretty soon, we were itching to go back to Campfire (via the native Mac client Propane), even though HipChat has better features and the promise of improved reliability.</p></blockquote>
<p>Why are these cross-platform products so bad? Do users even know if a product is using a cross-platform development environment? Yup, they sure do. Users, even if they&#8217;re not geeks or developers like me, can smell a cross-development turd. I love how Alex wrote this:</p>
<blockquote><p>Humans are gifted with extremely sensitive bullshit detectors. The average computer user may not internalize the difference between an AIR app and a native app, but he knows when something doesn’t feel right or work correctly. Your tech-stunted uncle may not ever request a native application with that terminology, but he’ll sure complain about his computer acting funny when he experiences the oddities of an AIR app.</p></blockquote>
<p>Just read the comments at <a href="http://amplicate.com/hate/adobe-air">this site</a> and you&#8217;ll quickly see the common threads:</p>
<ul>
<li>Slow</li>
<li>Sucks up CPU cycles better than a Dyson</li>
<li>Doesn&#8217;t conform/take advantage of native UI</li>
<li>Lack of support for native OS features. Instead, uses the least common denominator solution that works across all-platforms</li>
<li>Security issues</li>
</ul>
<p>With comments like that, do you really think &#8220;investing&#8221; in that type of development environment is going to save you money/time in the long-run? Does this seem like the path to huge business profits and long-term customer loyalty?</p>
<p>Is it more expensive to create native applications across all of the different platforms? Yes and no. Yes, because it is an investment in the development of your product. No, because unless you&#8217;ve misjudged the market, this investment will more than pay for itself.</p>
<blockquote><p>“We don’t have time” is the common excuse for delivering an AIR app instead of a good native app. Money, though, can buy someone else’s time. For a price, you can find a <a href="http://www.phase2industries.com/">great contractor</a> to build a native app for any platform under the sun. It’s an investment. Eventually, unless you’ve misjudged your market, the investment should pay off.</p></blockquote>
<p>What should a company do when they don&#8217;t have the time, resources, or expertise to deliver a native application? You start by clicking on the link above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2011/01/17/why-cross-platform-products-fail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Accessibility on iOS</title>
		<link>http://www.terryblanchard.com/2010/12/23/accessibility-on-ios/</link>
		<comments>http://www.terryblanchard.com/2010/12/23/accessibility-on-ios/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 07:14:55 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=329</guid>
		<description><![CDATA[Implementing accessibility in iOS applications. It only takes minutes to make your software usable to an audience with a few changes in Interface Builder.]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://www.terryblanchard.com/wp-content/uploads/2010/12/accessibility-zoom-20090608.jpg"><img src="http://www.terryblanchard.com/wp-content/uploads/2010/12/accessibility-zoom-20090608.jpg" alt="Accessibility Zoom" title="Accessibility Zoom" width="272" height="341" class="alignright size-full wp-image-386" /></a><br />
Accessibility is one of those areas that most software engineers and product teams seem to have little or no knowledge of. When it is brought to the attention of the decision makers, I&#8217;ve heard all too often, &#8220;We&#8217;ll do that if we have time at the end of the project&#8221; or, &#8220;What is that? Why do I care about it?&#8221; What&#8217;s worse, is that in the eyes of many companies and project leads, they can easily rationalize to themselves why accessibility shouldn&#8217;t be included in the development cycle:</p>
<p>&#8220;Why would a blind person own a touch screen device?&#8221;</p>
<p>&#8220;I think you&#8217;re solving a problem that doesn&#8217;t exist.&#8221;</p>
<p>&#8220;That&#8217;s not our target demographic.&#8221;</p>
<p>&#8220;I can&#8217;t see how this would improve our App Store ratings.&#8221;</p>
<p>&#8220;QA doesn&#8217;t know how to test it.&#8221;</p>
<p>It&#8217;s really sad. Especially when Apple has made it so incredibly simple for us to implement. They&#8217;ve done all they heavy lifting for us and simply said, &#8220;Carry the baton across the finish line. Please.&#8221; And most of us drop the baton.</p>
<p>Honestly, it takes minutes to make your application accessible to a population that all too often gets the shaft. I am a fan of Matt Gemmell. Everything from his <a href="http://twitter.com/mattgemmell">tweets</a> to his <a href="http://mattgemmell.com">blog</a>. Even if you&#8217;re not a fan, I implore you to read just one article. It&#8217;ll make you a better software engineer, and you&#8217;ll make your software usable to an audience that seems to lack a voice.</p>
<p>See Matt Legend Gemmell&#8217;s article:<br />
<a href="http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps">http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps</a></p>
<p><a href="http://daringfireball.net/colophon/">John Gruber</a> of <a href="http://daringfireball.net/">Daring Fireball</a> quoted <a href="http://daringfireball.net/linked/2010/12/21/gemmell-accessibility">this article as:</a></p>
<blockquote><p>Must-read for developers. Both a good high-level overview of what accessibility really means and who it helps, <em>and</em> a technical overview of how iOS developers can take advantage of it. iOS is simply leaps and bounds ahead of the competition in accessibility.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/12/23/accessibility-on-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa Threading</title>
		<link>http://www.terryblanchard.com/2010/12/22/cocoa-threading/</link>
		<comments>http://www.terryblanchard.com/2010/12/22/cocoa-threading/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 03:21:14 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[CocoaTouch]]></category>
		<category><![CDATA[Locking]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[NSCache]]></category>
		<category><![CDATA[NSOperation]]></category>
		<category><![CDATA[NSOperationQueue]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=302</guid>
		<description><![CDATA[My thoughts and reflections on Multi-threading in a Cocoa environment based on Brent Simmons original article.]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://www.terryblanchard.com/wp-content/uploads/2010/12/450px-Multithreaded_process.svg_.png"><img class="alignright size-medium wp-image-384" title="Multithreading" src="http://www.terryblanchard.com/wp-content/uploads/2010/12/450px-Multithreaded_process.svg_-300x283.png" alt="Multithreading" width="300" height="283" /></a><br />
Everyone has their own vision of how things should work. As you gain more experience in your craft, you become more grizzled. Well learned. After some time, you earn the privledge of passing this experinece on. Oscar Wilde said it best:</p>
<blockquote><p>Experience is simply the name we give our mistakes.</p></blockquote>
<p>Multi-threading in software engineering has been around for a long time. Many mistakes have been made, thankfully. From those mistakes, experience was born. Most of the engineering books talk about the essentials, and the dangers that must be respected and adhered to. But while they talk about the pitfalls of what could happen, none of them really give you great guidelines. I&#8217;ve been doing this a long time and I&#8217;ve worked with people who should not have made some of the mistakes I&#8217;ve witnessed.</p>
<p>Are they bad engineers?<br />
No.</p>
<p>Was there a fundamental misunderstanding about multi-threading?<br />
No.</p>
<p>But there are some fantastic guidelines that aren&#8217;t well-established. It seems like <a href="http://inessential.com/">Brent Simmons</a> and I agree on a lot of the same principles. He&#8217;s written a great <a title="Brent Simmons article on Cocoa Threading" href="http://inessential.com/2010/12/05/some_notes_on_threading">blog post about Cocoa Threading</a> that every Cocoa developer should read and understand. He refers to his post as his, &#8220;barely-organized thoughts on threading and Cocoa applications&#8221; but it covers the points in a concise manner.</p>
<h2>Thread Communication Exclusively on the Main Thread</h2>
<p>First up is his philosophy on all communication between threads taking place on the main thread. He extends this to notifications as well. I&#8217;ll add one more to that list which is KVO notifications. This is essential because UIKit and Core Data don&#8217;t like operating on secondary threads. I don&#8217;t know how many times I&#8217;ve seen</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">NSAssert<span style="color: #002200;">&#40;</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSThread</span> isMainThread<span style="color: #002200;">&#93;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;This needs to run in the main thread&quot;</span> <span style="color: #002200;">&#41;</span>;</div></div>
<p> go off because I received a notification or call from a secondary thread.</p>
<blockquote><p>Communication between systems always happens on the main thread. (A system is one or more objects that work together.) In most cases, communication between objects in the same system happens on the main thread too.</p>
<p>If an object does something in the background, that is that object’s business and nobody else’s.</p>
<p>This extends to notifications: from background threads, I always make sure notifications get posted on the main thread. This way every notification observer can always assume that it’s getting called on the main thread.</p></blockquote>
<p>Regarding KVO, Brent has this to say:</p>
<blockquote><p>KVO is a trickier thing. Here’s how I handle that: anything happening in a background thread is not observable (by convention). Whatever is going on is private. When it’s time to set public stuff, stuff that could be observed, those things are set on the main thread.</p></blockquote>
<h2>Threading Methods</h2>
<p>There&#8217;s almost as many different ways to spin off a thread as there are people in the United States. Brent and I also agree on which methods we use:</p>
<blockquote><p>I’m very deliberate about my threading. I like Grand Central Dispatch, but for my purposes NSOperationQueue works best. The formal, easily-monitored approach of NSOperationQueue works best here. I definitely recommend against anything but GCD and NSOperationQueue — anything else (NSThread’s detach method, etc.) is too random. (Yes, we used it for years, but we have better stuff now.) (In fact, I almost never even use NSInvocationOperation — I much prefer the structure and defined stop/start of NSOperation.)</p>
<p>I use an NSOperation subclass that takes a target and selector in its init method. When it’s finished, it calls the target and selector on the main thread. This way the caller only ever sees the main thread — it creates the operation on the main thread, then gets called back on the main thread. The fact that the operation happens in the background is unknown to the caller: the caller just knows that it’s async, and doesn’t know anything else.</p></blockquote>
<p>I almost exclusively use NSOperation subclasses with NSOperationQueue in my applications for the same reasons that Brent outlines. You can create multiple NSOperationQueue&#8217;s if you need different operating parameters (for example, one queue that is sequential, another queue that can operate concurrently). Making dependencies between various NSOperation&#8217;s is as simple as making an addDependency call. Plus, they can have dependencies across different NSOperationQueue&#8217;s.</p>
<h2>Locking</h2>
<p>NSCache seems to have suffered from poor marketing. It&#8217;s a little gem that very few people seem to know about. I&#8217;ll bet most of you have written your own class that performs much of the same functionality. I&#8217;ll take the very-well tested and used NSCache, which is also thread-safe, any day.</p>
<blockquote><p>Locking sucks. If you have to do it, you have to do it. It doesn’t mean you’ve failed — failure would be not-locking when you really do need a lock.</p>
<p>There are a couple other things you can do which make sense.</p>
<ol>
<li>Use performSelectorOnMainThread to set some data that would otherwise require locking. (This is not a trick to use willy-nilly, though — typically it comes at the very end of an operation, not sprinkled throughout.)</li>
<li>Use NSCache — it’s thread-safe.</li>
</ol>
</blockquote>
<p>I highly recommend you read Brent&#8217;s full article, &#8220;<a href="http://inessential.com/2010/12/05/some_notes_on_threading">Some Notes on Threading</a>&#8221; over at his site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/12/22/cocoa-threading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad for Senior Citizens</title>
		<link>http://www.terryblanchard.com/2010/12/01/ipad-for-senior-citizens/</link>
		<comments>http://www.terryblanchard.com/2010/12/01/ipad-for-senior-citizens/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 09:58:31 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Industrial Design]]></category>
		<category><![CDATA[Interaction Design]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Senior]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=284</guid>
		<description><![CDATA[I&#8217;ve been seeing a lot of iPad usage around me. I know what you&#8217;re thinking, &#8220;Duhhh, Captain Obvious! You live in Silicon Valley and this is where Apple is headquartered. Yeah, I think you might see a few.&#8221; Silicon Valley is loaded with top-tech talent. Devices and gadgets that only the top-talent stereotypes understand and [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://www.terryblanchard.com/wp-content/uploads/2010/12/iPad-iPad-3G-wifi.jpg"><img class="alignright size-medium wp-image-324" title="iPad" src="http://www.terryblanchard.com/wp-content/uploads/2010/12/iPad-iPad-3G-wifi-247x300.jpg" alt="" width="247" height="300" /></a>I&#8217;ve been seeing a lot of <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a> usage around me. I know what you&#8217;re thinking, &#8220;Duhhh, Captain Obvious! You live in Silicon Valley and this is where Apple is headquartered. Yeah, I think you might see a few.&#8221;</p>
<p>Silicon Valley is loaded with top-tech talent. Devices and gadgets that only the top-talent stereotypes understand and thrive on is abundant around me. I don&#8217;t even blink an eye when I see Segway zooming by with a laptop strapped to the handle bars, touring it&#8217;s driver around the city while their Bluetooth stereo headset is connected to their smartphone, providing the audio portion of the tour, while also feeding directions to the Segway via it&#8217;s GPS.</p>
<p>Just another day in Silicon Valley.</p>
<p>There&#8217;s something different about these <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a> sightings. One that pleasantly captivated my eye and brought a huge smile to my soul. These sightings didn&#8217;t involve your typical Silicon Valley geek. In fact, the stars of these sightings are usually the last people you would expect to see or ever associate with the word, &#8220;technology.&#8221;</p>
<p>And I love it.</p>
<p>I was having lunch with a colleague and noticed an elderly gentleman, well into his eighties, sitting at the bar with a Martini in one hand while streaming some <a href="http://itunes.apple.com/us/app/netflix/id363590051?mt=8">NetFlix</a> videos to his <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a> laying down on the bar.</p>
<p>Is streaming new?<br />
No.</p>
<p>How about the ability to watch videos on a computer, is that new?<br />
No.</p>
<p>The type of person performing this task was.</p>
<p>Apple has done something magical here with the <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a>. They bridged what many would say was an impossible chasm. All joking aside, we do everything we can to minimize the technology in the lives of the senior citizens closest to us. The <a href="http://www.terryblanchard.com/wp-content/uploads/2010/12/fixfix_2.jpeg">remote control for the television can instill the fear of God</a> into them when they&#8217;re looking for the volume or channel button amongst the 40 or 50 buttons on the remote control. DVR? Don&#8217;t waste your money, they&#8217;ll never use it because it&#8217;s a foreign and complicated mental model for them.</p>
<p>Another sighting. At my gym I saw an elderly lady on the treadmill reading a book. Not just any book. Her <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a> was sitting in front of her with the <a href="http://www.amazon.com/gp/feature.html/ref=amb_link_352814462_2?ie=UTF8&amp;docId=1000490441&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=auto-sparkle&amp;pf_rd_r=1DASZZ96CAG5TSGVM85F&amp;pf_rd_t=301&amp;pf_rd_p=1275861102&amp;pf_rd_i=kindle%20ipad%20app">Kindle application</a> running and the font size was probably set at 96 points as I read along with her from the other side of the gym.</p>
<p>Watching these people use their <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a> I didn&#8217;t see the awkwardness and hesitation you normally see from them when using a laptop or desktop computer. They were, dare I say it, &#8220;at ease&#8221; with it.</p>
<p>Why is that?</p>
<p>All of the typical items that frighten senior citizens who are new to using computers are not present with an <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a>. Let&#8217;s start with the mouse. My mother won&#8217;t even try to use a computer because of the mouse. She couldn&#8217;t comprehend or understand what to do when the mouse reached the end of the mouse pad, but her cursor was only halfway across the screen to her destination. She didn&#8217;t make that mental connection between what was happening onscreen versus what the device she was directly manipulating had on one another. When I told her to pickup the mouse and move it back to the other side of the mousepad, she just stared at me blankly.</p>
<p>&#8220;Well, if I move the mouse it will move the doo-hickey thing on the television screen and I&#8217;ll be back in the same position.&#8221;</p>
<p>&#8220;No, Mom. That will only happen if the mouse is touching the mouse pad. You can pickup the mouse and if it&#8217;s not touching the mouse pad, the sensor on the bottom of the mouse won&#8217;t detect the movement and therefore won&#8217;t move the mouse on the screen so you can move the mouse without moving the cursor &#8230; never mind, just trust me.&#8221;</p>
<p>What we take for granted is pure magic to them. It&#8217;s a mouse for us, but it&#8217;s a 747 flight deck to them.</p>
<p>Removing that middle-man translation and adopting the touch screen is much easier for them to understand. Want to launch email, just tap on it with your finger. Done. They get that. That makes complete sense to them.</p>
<p>Another reason is software installation. The App Store on an <a href="http://www.amazon.com/gp/product/B002C7481G?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B002C7481G">iPad</a> compared to shopping and installing software for a typical computer is night and day. Easy access to the App Store, seamless purchasing and installation without introducing more confusing questions and concepts such as, &#8220;Where on your hard drive do you want to install this new fancy software?&#8221; or &#8220;Make sure you have enough hard drive space on the destination drive before proceeding?&#8221; mean nothing to them.</p>
<p>App Store, tap to buy, screen automatically moves to the new application icon that is installing. Tap to open. They can do that. They get that. That makes sense to them.</p>
<p>And to get them started, you should pick up a copy of <a href="http://www.amazon.com/gp/product/0470883170?ie=UTF8&amp;tag=chateaublanch-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0470883170">iPad For Seniors For Dummies</a> for them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/12/01/ipad-for-senior-citizens/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why is My Apple Wi-Fi Network So Damn Slow?</title>
		<link>http://www.terryblanchard.com/2010/11/09/why-is-my-wifi-so-damn-slow/</link>
		<comments>http://www.terryblanchard.com/2010/11/09/why-is-my-wifi-so-damn-slow/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 07:37:48 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[802.11]]></category>
		<category><![CDATA[AirPort Express]]></category>
		<category><![CDATA[AirPort Extreme]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Ping]]></category>
		<category><![CDATA[Time Capsule]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=275</guid>
		<description><![CDATA[About a year ago, I switched my broadband provider over to AT&#38;T U-verse and have been relatively happy with it. One of my to-do items that was constantly de-prioritized was: Turn off U-verse broadband router wireless (802.11b/g) and re-enable Apple AirPort Extreme wireless (802.11n) A year later, I finally got around to it. However, all [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />About a year ago, I switched my broadband provider over to <a href="http://www.att.com/u-verse/">AT&amp;T U-verse</a> and have been relatively happy with it. One of my to-do items that was constantly de-prioritized was:</p>
<ul>
<li>Turn off U-verse broadband router wireless (802.11b/g) and re-enable Apple AirPort Extreme wireless (802.11n)</li>
</ul>
<p>A year later, I finally got around to it.</p>
<p>However, all was not rainbows and unicorns. What? How could my 802.11n wireless network be slower than the 802.11b/g network? This made no sense. And it wasn&#8217;t just a little bit slower. Oh, no. It was noticeably slower, almost by a factor of 3.</p>
<p>I tried changing the wireless channel and physically moved the unit assuming there was some kind of interference, but neither resolved the problem. My ping times to the AirPort Extreme were wacky. I was getting huge deltas ranging from 1 ms through 900 ms. They should have all been around the 1-5 ms range.</p>
<p>I browsed all of the AirPort Extreme&#8217;s settings using Apple&#8217;s AirPort Utility program and that&#8217;s where I noticed the problem. It&#8217;s a sneaky little bugger and one that I&#8217;ll have to admit, I didn&#8217;t really understand at first. Shhhh, don&#8217;t tell anyone.</p>
<p>There&#8217;s a setting under the Wireless Options called <strong>Multicast rate</strong> and it defaults to 2 Mbps but has options for 1, 2, 5.5 and 11 Mbps. Mine was set for 11 Mbps. Most people, including myself, would think that higher is better. But in this case, you&#8217;d be very, very wrong.</p>
<div id="attachment_285" class="wp-caption aligncenter" style="width: 577px"><a href="http://www.terryblanchard.com/wp-content/uploads/2010/11/MulticastError.png"><img class="size-full wp-image-285 " title="Multicast Rate" src="http://www.terryblanchard.com/wp-content/uploads/2010/11/MulticastError.png" alt="AirPort Extreme Wireless Network Options" width="567" height="412" /></a><p class="wp-caption-text">Multicast Rate Setting in Wireless Options</p></div>
<p>I remember the factory default setting for this option was 2 Mbps, not 11 Mbps. I&#8217;m not sure how or when this option changed, but I assume that I thought what most people would think when they see this option; a higher number meant more bandwidth. I hate not knowing what an option does, so I read up on it.</p>
<p>What exactly does the multicast rate do and what affect do the different settings have on your wireless network?</p>
<p>Essentially, the multicast rate is the minimum speed that a wireless device must be able to communicate at in order to connect to the router. It&#8217;s a Quality of Service (QoS) setting that only allows devices to connect to it based on this criteria. So, the lower the multicast rate, the further away, or more accurately, the weaker the wireless signal, are allowed to connect. Higher multicast rates mean that only close, strong signals are allowed. Multicast is asking what’s the minimum quality that is needed to allow a device and your AirPort Extreme to maintain a connection.</p>
<p>Therefore, turning up your multicast rate will decrease the range of your wireless network.</p>
<p>If you are experiencing your wireless devices constantly losing their wireless connections, and then restoring those connections automagically seconds later; check this setting. It&#8217;s probably too high.</p>
<p>I changed this option back to 2 Mbps and my screaming fast network is back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/11/09/why-is-my-wifi-so-damn-slow/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Upgrade All NIB Files to XIB</title>
		<link>http://www.terryblanchard.com/2010/11/01/nib-files-to-xib/</link>
		<comments>http://www.terryblanchard.com/2010/11/01/nib-files-to-xib/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 06:47:27 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Localization]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=246</guid>
		<description><![CDATA[When Xcode 3.0 was released Apple introduced a new file format for the source code-unfriendly NIB format to the XIB format. XIB files are text-based and far easier to work with when you need to diff you changes before submitting them to version control. XIB files are only used during development and turn into the [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />When Xcode 3.0 was released Apple introduced a new file format for the source code-unfriendly NIB format to the XIB format. XIB files are text-based and far easier to work with when you need to diff you changes before submitting them to version control. XIB files are only used during development and turn into the more efficient and smaller compressed NIB format when you build the product.</p>
<p>In a recent project I used <a href="http://www.arizona-software.ch/ilocalize/">iLocalize</a> 3.8.4 to manage the localization process. The problem with iLocalize is that it only exports in NIB format so my English resource files were in XIB format, but all of the localized resources were in NIB. Fortunately, there&#8217;s a quick and easy way to do this with a single Terminal window session. Just type:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> nib <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-L1</span> ibtool <span style="color: #660033;">--upgrade</span></div></div>
<p>and all of the NIB files in your folder will now have a corresponding XIB file.</p>
<p>iLocalize should do this for you automatically. Sadly, it seems like future development on this product has ceased.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/11/01/nib-files-to-xib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging &amp; Monitoring iPhone HTTP and HTTPS Requests</title>
		<link>http://www.terryblanchard.com/2010/09/21/debugging-monitoring-iphone-web-requests/</link>
		<comments>http://www.terryblanchard.com/2010/09/21/debugging-monitoring-iphone-web-requests/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 16:16:53 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Charles]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=230</guid>
		<description><![CDATA[As I write this, I&#8217;ve been working on an iPhone application that is very reliant on Internet connectivity. One of the challenges I encountered early in the development of this application was debugging the HTTP requests I was making and the responses I was getting back from the server. One of the requirements is that [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />As I write this, I&#8217;ve been working on an iPhone application that is very reliant on Internet connectivity. One of the challenges I encountered early in the development of this application was debugging the HTTP requests I was making and the responses I was getting back from the server. One of the requirements is that all communication was performed over HTTPS which clouded my debugging even further.</p>
<p>Meet Chuck, or <a title="Charles" href="http://www.charlesproxy.com/">Charles</a> as the more formal and official name goes. Chuck is my new best friend. Yup, we&#8217;re so close that I can call him Chuck. We&#8217;re tight.</p>
<p>Charles is a web proxy, HTTP Proxy, and HTTP Monitor that runs on your Mac. Your web browser (or any other Internet application) is then configured to access the Internet through Charles, and Charles is then able to record and display all of the data that is sent and received.</p>
<p>In Web and Internet development you are unable to see what is being sent and received between your web browser / client and the server. Without this visibility it is difficult and time-consuming to determine exactly where the fault is. Charles makes it easy to see what is happening, so you can quickly diagnose and fix problems.</p>
<p>This is great for running your application on the iPhone simulator on your Mac. You can download a free-trial, but trust me on this, you&#8217;ll be <a title="buying the full-blown version for $50" href="http://www.charlesproxy.com/buy/">buying the full version for $50</a> and thanking me later.</p>
<p>I was curious to know how some of the competing applications worked. While I can build and run <strong>my</strong> application in the iPhone simulator and use Charles to debug it, I couldn&#8217;t help but long for that same insight into other competing applications that I had on my actual iPhone.</p>
<p>Was there some way to have Charles work with my physical iPhone instead of the simulator so I could monitor it&#8217;s HTTP traffic?</p>
<p>Oh, hells yes!</p>
<p>It&#8217;s actually very easy to configure. Here&#8217;s all that you need to make this happen:</p>
<ul>
<li>Your Mac with Charles installed and running</li>
<li>Your iPhone with the applications you&#8217;d like to monitor</li>
<li>Both your iPhone and Mac with Charles must both be on the same WiFi network</li>
</ul>
<p>That&#8217;s it! Got that? Good, let&#8217;s configure it. First, we&#8217;ll configure Charles:</p>
<ol>
<li>From the Help menu, choose <strong><em>Install Charles CA SSL Certificate&#8230;</em></strong> This will allow you to debug and monitor HTTPS traffic.</li>
<li>If you are debugging or monitoring an SSL connection (or HTTPS request), you will need to configure this in Charles. From the Proxy menu, choose <strong><em>Client SSL Certificates&#8230;</em></strong></li>
<p style="text-align: center;"><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/CharlesSSLProxySettings.png"><img class="size-full wp-image-233 aligncenter" title="CharlesSSLProxySettings" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/CharlesSSLProxySettings.png" alt="Charles SSL Certificates Configuration" width="615" height="447" /></a></p>
<li>Ensure that <strong><em>Enable SSL Proxying</em></strong> is selected. One of the great things about Charles is that you can use wildcards when choosing what SSL sites you would like to monitor. In the above screenshot, I am monitoring all HTTPS traffic on any <strong>.com</strong> domain.</li>
<li>Run the <strong>Network Utility</strong> application and make note of your AirPort wireless IP address:</li>
</ol>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/NetworkUtilityIPAddress.png"><img class="aligncenter size-full wp-image-247" title="Network Utility IP Address" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/NetworkUtilityIPAddress.png" alt="Network Utility IP Address" width="678" height="425" /></a></p>
<p>Now that your Mac is setup with Charles and the HTTP proxy, we need to configure your iPhone to use that Mac as it&#8217;s Web Proxy. But first, we need to install the Charles CA certificate on your iPhone.</p>
<ol>
<li>Open up Safari and navigate to <a href="http://charlesproxy.com/charles.crt">(iOS 4) http://charlesproxy.com/charles.crt</a> or <a href="http://charlesproxy.com/iphoneconf">(iOS 3) http://charlesproxy/iphoneconf</a>. When you are prompted to install the Charles certificate, tap on the <strong><em>Install</em></strong> button.</li>
<p style="text-align: center;"><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneInstallCharlesCertificate.jpg"><img class="aligncenter size-full wp-image-267" title="iPhone Install CharlesCA Certificate" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneInstallCharlesCertificate.jpg" alt="iPhone Install CharlesCA Certificate" width="320" height="294" /></a></p>
<li>Open up your iPhone <em><strong>Settings</strong></em> application and tap on <strong><em>Wi-Fi</em></strong> settings. Tap on the blue disclosure indicator of your local Wi-Fi network</li>
<p style="text-align: center;"><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneDisclosureIndicatorNetworkSettings.png"><img class="aligncenter size-full wp-image-250" title="iPhone Disclosure Indicator Network Settings" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneDisclosureIndicatorNetworkSettings.png" alt="iPhone Disclosure Indicator Network Settings" width="320" height="372" /></a></p>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneDisclosureIndicatorNetworkSettings.png"> </a></p>
<li>Scroll down to the bottom of your Wi-Fi settings and tap on the <strong><em>Manual</em></strong> segment control in the <strong><em>HTTP Proxy</em></strong> settings.</li>
<li>Enter in the IP address you wrote down from your Mac running Charles. In my case, when I ran <strong><em>Network Utility</em></strong> I had the AirPort IP address of <strong><em>10.0.1.33</em></strong>. I put that IP address in my proxy settings as well as the default port Charles runs on, <strong><em>8888</em></strong>:</li>
<p style="text-align: center;"><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneDisclosureIndicatorNetworkSettings.png"></a><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneCharlesProxySetup.png"><img class="aligncenter size-full wp-image-260" title="iPhone Charles Proxy Setup" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneCharlesProxySetup.png" alt="iPhone Charles Proxy Setup" width="346" height="261" /></a></p>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/iPhoneDisclosureIndicatorNetworkSettings.png"></a></p>
<li>To verify your settings, open up Safari on your iPhone. As soon as you make an Internet request, Charles will prompt you on your Mac with a mesage box like the following. You want to click on the <strong><em>Allow</em></strong> button.</li>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/CharlesProxyAllow.png"><img class="aligncenter size-full wp-image-264" title="Charles Proxy Allow" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/CharlesProxyAllow.png" alt="Charles Proxy Allow" width="588" height="263" /></a></ol>
<p>That&#8217;s it! Now fire up that application you&#8217;ve always wondered about.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/09/21/debugging-monitoring-iphone-web-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Incrementing Version and Build Numbers with Xcode</title>
		<link>http://www.terryblanchard.com/2010/09/01/version-and-build-numbers-with-xcode/</link>
		<comments>http://www.terryblanchard.com/2010/09/01/version-and-build-numbers-with-xcode/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 09:21:18 +0000</pubDate>
		<dc:creator>Terry Blanchard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Versioning]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.terryblanchard.com/?p=198</guid>
		<description><![CDATA[&#8220;How can we automate our build number in this project? Perhaps a python or AppleScript?&#8221; I get this question a lot. I contract out my development services to companies who need Mac, iPhone, or iPad software designed and developed. Many of these companies have lots of Windows developers on board full-time and contract out their [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />&#8220;How can we automate our build number in this project? Perhaps a python or AppleScript?&#8221;</p>
<p>I get this question a lot. I contract out my development services to companies who need Mac, iPhone, or iPad software designed and developed. Many of these companies have lots of Windows developers on board full-time and contract out their Mac work so I understand that all-things Mac are new to them.</p>
<p>But this question always comes up. Always.</p>
<p>While they&#8217;re already thinking about some elaborate scripts to automate this process, I hold up my hands and say, &#8220;It&#8217;s already covered.&#8221;</p>
<p>I decided to blog about it because most people don&#8217;t know the name of the tool and can&#8217;t &#8220;Google&#8221; for it without stumbling across scripts to accomplish this task.</p>
<p>Apple includes a command-line tool called <a title="agvtool" href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=4&amp;ved=0CB4QFjAD&amp;url=http%3A%2F%2Fdeveloper.apple.com%2Fmac%2Flibrary%2Fdocumentation%2FDarwin%2FReference%2FManPages%2Fman8%2Fagvtool.8.html&amp;ei=Y_99TOuvMJKqsAPfw43BCw&amp;usg=AFQjCNG0RxCyEWB_vjPO6Y3U_UJenO3duA">agvtool</a> which handles my versioning needs. It&#8217;s not perfect, but it does what it needs to do and when used in a corporate environment with a build system, it&#8217;s fantastic.</p>
<p>What is it? In a nut shell, it&#8217;s a very focused &#8220;Find and Replace in Files&#8221; command-line tool. It searches through your program&#8217;s Info.plist file as well as the project .pbxproj file and updates them. You can even have it commit it&#8217;s changes with version control if you&#8217;re using Subversion or CVS.</p>
<p>The real number that needs to be constantly updated is the build number. Normally, the marketing version only changes at the beginning of a new branch or feature set. agvtool will help you out with both tasks. First, let&#8217;s tackle getting your project setup so you can display the following string in your iPhone About screen:</p>
<p>Version: 1.0 (Build 1)</p>
<p>The agvtool refers to the &#8220;1.0&#8243; part as the &#8220;marketing version&#8221; and &#8220;1&#8243; in the Build parenthesis as the project version. To update the build number we simply issue the following command from the project&#8217;s root directory which contains the .pbxproj and Info.plist files</p>
<pre>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">agvtool bump <span style="color: #660033;">-all</span></div></div>
</pre>
<p>This command will change all of the build numbers, or project versions in agvtool speak, to:</p>
<p>Version: 1.0 (Build 2)</p>
<p>Want to change the marketing version to 1.1?</p>
<pre>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">agvtool new-marketing-version <span style="color: #ff0000;">&quot;1.1&quot;</span></div></div>
</pre>
<p>Now our About box says:</p>
<p>Version: 1.1 (Build 2)</p>
<p>Cool, huh? Okay, so here&#8217;s how you setup your project to take advantage of this nifty little tool. First, we have to tell Xcode that we want to use agvtool for our versioning needs. From the <strong>Project</strong> menu, select <strong>Edit Project Settings</strong>. Ensure <strong>Configuration</strong> is set to <strong>All Configurations</strong> and <strong>Show</strong> is set to <strong>All Settings</strong>. Navigate down to the <strong>Versioning</strong> section and make the following changes:</p>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/ProjectVersionSettings.png"><img class="aligncenter size-full wp-image-219" title="Project Versioning Settings" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/ProjectVersionSettings.png" alt="Project Versioning Settings" width="556" height="422" /></a></p>
<p>Lastly, we need to update the Info.plist file. You need to set two values in, your Marketing Version is the <strong>Bundle versions string, short</strong>. If you don&#8217;t have this option in your plist file, select an item in the list and click on the <strong>+</strong> off to the far right. You can then select it from the list. The <strong>Bundle version</strong> is the build number. Set this value to match the one you placed in the <strong>Project Settings</strong> option for <strong>Current Project Version</strong>.</p>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/VersioningPlistSettings.png"><img class="aligncenter size-full wp-image-221" title="Versioning Plist Settings" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/VersioningPlistSettings.png" alt="Versioning Plist Settings" width="550" height="74" /></a></p>
<p>Now, whenever you&#8217;re ready to build an official release, just run:</p>
<pre>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">agvtool <span style="color: #660033;">-usesvn</span> bump <span style="color: #660033;">-all</span></div></div>
</pre>
<p>The <strong>-usesvn</strong> parameter is optional. For an official build, you&#8217;ll want to commit the files that were changed by <strong>agvtool</strong>.</p>
<p>Then call <strong>xcodebuild</strong>.</p>
<p>Earlier in the article I mentioned that agvtool isn&#8217;t perfect. Here&#8217;s what I mean by that comment. For an automated build, having a command-line tool is fantastic. However, if you run agvtool while you have the project open in Xcode, you get this:</p>
<p><a href="http://www.terryblanchard.com/wp-content/uploads/2010/09/ProjectHasChangedReadFromDisk.png"><img class="size-full wp-image-224" title="Project Has Changed. Read From Disk?" src="http://www.terryblanchard.com/wp-content/uploads/2010/09/ProjectHasChangedReadFromDisk.png" alt="Project Has Changed. Read From Disk?" width="435" height="114" /></a></p>
<p>Since agvtool went and changed the .pbxproj file while you had it open in Xcode, you get this. Simply click on &#8220;Read From Disk&#8221; and you&#8217;re back in business. More of an annoyance than a show-stopper.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryblanchard.com/2010/09/01/version-and-build-numbers-with-xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/47 queries in 0.092 seconds using disk: basic
Object Caching 1009/1171 objects using disk: basic

Served from: www.terryblanchard.com @ 2012-02-06 14:37:29 -->
