<?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>Floyd's Thoughts... &#187; OS X</title>
	<atom:link href="http://www.floydprice.com/category/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.floydprice.com</link>
	<description>Because Everything is Interesting!!!</description>
	<lastBuildDate>Fri, 18 Jun 2010 05:32:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to respond to the IPhone Shake Gesture</title>
		<link>http://www.floydprice.com/2009/10/how-to-respond-to-the-iphone-shake-gesture/</link>
		<comments>http://www.floydprice.com/2009/10/how-to-respond-to-the-iphone-shake-gesture/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 19:48:02 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[UIKit]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=148</guid>
		<description><![CDATA[The IPhone 3.0 SDK includes support for detecting when a user &#8220;Shakes&#8221; the IPhone, this is intended to be a usability feature allowing app developers to implement Refresh or Read All functions on shake, wow those crazy guys at Apple really do know how to innovate! It&#8217;s pretty easy to implement all you need to [...]]]></description>
			<content:encoded><![CDATA[<p>The IPhone 3.0 SDK includes support for detecting when a user &#8220;Shakes&#8221; the IPhone, this is intended to be a usability feature allowing app developers to implement Refresh or Read All functions on shake, wow those crazy guys at Apple really do know how to innovate!</p>
<p>It&#8217;s pretty easy to implement all you need to do is register your view controller as the first responder and listen for the motion event.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span> viewDidAppear<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>BOOL<span style="color: #009900;">&#41;</span>animated<span style="color: #009900;">&#123;</span>
	<span style="color: #009900;">&#91;</span>super viewDidAppear<span style="color: #339933;">:</span>animated<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>self becomeFirstResponder<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Once your controller is the First Responder you can receive the motion event like so:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>motionEnded<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>UIEventSubtype<span style="color: #009900;">&#41;</span>motion withEvent<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>UIEvent <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span>event
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>motion <span style="color: #339933;">==</span> UIEventSubtypeMotionShake<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		refresh<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This will work beautifully but you will however notice that any views you present over this one will not respond to all touch events, for instance the keyboard will not show when you touch a text field, this is because you need to resign the First Responder before you present the view like so:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>IBAction<span style="color: #009900;">&#41;</span>showMyCustomView <span style="color: #009900;">&#123;</span>    
	<span style="color: #009900;">&#91;</span>self resignFirstResponder<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#91;</span>self presentModalViewController<span style="color: #339933;">:</span>myCustomViewController animated<span style="color: #339933;">:</span>YES<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see this is all pretty easy and the only gotcha is the First Responder stuff, which also is pretty trivial.</p>
<p>Enjoy and please people, Shake Responsibly!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2009/10/how-to-respond-to-the-iphone-shake-gesture/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Sourceforge Design</title>
		<link>http://www.floydprice.com/2008/09/new-sourceforge-design/</link>
		<comments>http://www.floydprice.com/2008/09/new-sourceforge-design/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 12:27:06 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[sourceforge]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=125</guid>
		<description><![CDATA[Wow, isn&#8217;t the new SourceForge style absolutely awful?]]></description>
			<content:encoded><![CDATA[<p>Wow, isn&#8217;t the new <a href="http://sourceforge.net/">SourceForge</a> style absolutely awful?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/09/new-sourceforge-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails in the Enterprise</title>
		<link>http://www.floydprice.com/2008/08/rails-in-the-enterprise/</link>
		<comments>http://www.floydprice.com/2008/08/rails-in-the-enterprise/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 11:20:57 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=70</guid>
		<description><![CDATA[I love Rails and use it all the time, fortunately the company i work for builds web products that lend them selves to the Rails way, however we also do consultancy work for larger Enterprise companies where Rails doesn&#8217;t lend itself so well. I&#8217;d love to see Rails include features that would ease its adoption [...]]]></description>
			<content:encoded><![CDATA[<p>I love Rails and use it all the time, fortunately the <a href="http://www.componentworkshop.com">company</a> i work for builds <a href="http://www.codespaces.com">web products</a> that lend them selves to the Rails way, however we also do consultancy work for larger Enterprise companies where Rails doesn&#8217;t lend itself so well.</p>
<p>I&#8217;d love to see Rails include features that would ease its adoption within the enterprise, here are a few things that i&#8217;d like to see:</p>
<p><strong>Better support for Windows</strong><br />
Now it hurts me to say this as everybody here loves OS X and our products are built for OS X or linux deployment but many (i&#8217;m inclined to think most) enterprises use Windows for deployment of internal intranet apps. </p>
<p>With the release of <a href="http://www.modrails.com">Mod_rails</a>, deploying ruby apps into production is now only easy its reliable, Enterprises organizations need both of these things, but i think they need them on windows too.</p>
<p><strong>Support for Stored Procs</strong><br />
Now i now its pretty easy to add this support (and i will get to that later) but having Stored Procs support baked into Rails would make using Rails in a enterprise environment so much easier.</p>
<p>We have been to many large companies to build large internal intranet applications and in every one of them we have had to interface with legacy systems via APIs that are exposed by stored procs.</p>
<p>Telling a client that you are going to use Rails in this environment consistently produces a look of horror from the clients technical guys and follows with a Rails can only do Object Relational Mapping discussion. </p>
<p>Any (that i have met) technical architect in the corporate work will dismiss rails for its (perceived) lack of Stored Proc support.</p>
<p>I&#8217;d like to see this functionality baked in to rails and advertised as a &#8220;Feature&#8221;.</p>
<p><strong>Integrated Development Environment</strong><br />
Right now i can think of at least 6 IDE&#8217;s that support rails and thats not including TextMate (which i use).</p>
<p>Of all the IDE&#8217;s that i have tried NetBeans is the best, it has good all round support for rails but even still, its miles away from what a corporate developer would consider a good IDE for rails development. </p>
<p>Developers need refactoring tools in any language but the need for good refactoring is greater with dynamic languages, netbeans has one refactoring option enable when using rails &#8220;Rename&#8221; and even that doesn&#8217;t safely rename.</p>
<p>Now i&#8217;m not suggesting we need <a href="http://www.jetbrains.com/resharper/">Resharper</a> for rails before corporate developers adopt rails but somewhere in between resharper and what we have now would be a good start.</p>
<p><strong>Address the Scaffolding Myths.</strong><br />
Every rails developer knows that scaffolding was (pre rails v2.x) pretty useless but served a good purpose in helping to increase the Buzz around rails with the promise of one click application stubs. </p>
<p>In rails 2.0 scaffolding is <strong>Slightly</strong> more useful in that it creates nice Restful controllers and some pages to help you get going with the first few resources in your application however, the Rails community needs to address the perception thats rails is all about scaffolding.</p>
<p>So many times i have had conversations with Tech Leads, Development Managers, Developers, etc about rails being more than scaffolding, usually they are amazed to hear that most rails developers don&#8217;t even use scaffolding in there apps.</p>
<p>Its as if this great little feature of rails is holding it back in the minds of &#8220;serious&#8221; corporate developers, who don&#8217;t see scaffolding for what it is.</p>
<p><strong>Database Support</strong><br />
Active Resource is an amazing piece of work, I often go through the Code Base to see how certain things are done and find myself gushing over the code in there its amazing&#8230; </p>
<p>However, since Rails v1.2.6 the core team seem to have lost interest in Databases other than sqlite and mysql, which is all good and well for the the Web 2.0 community, however corporate guys need Oracle and/or Microsoft SQL Server support out of the box, and it seems that using either of these engines now requires extra gems and some hacking around. I have had many conversations with devs who &#8220;tried&#8221; to use rails but couldn&#8217;t get it to connect to Oracle. After looking around the web they often got frustrated by the contradicting and out of dat solutions to this problem and gave up.</p>
<p>If rails is living on its promise to give database independence and Rapid development thought active records object relational mapping magic it can&#8217;t force corporate developers down a wild goose chasing for gems, it need to work &#8211; Out of the box.</p>
<p><strong>The Solution&#8230;</strong><br />
Well rails is young and i&#8217;m certain that these issues will be resolved given time, however i think its the responsability of all rails developers to increase its presence in the Corporate world when and where ever we can.</p>
<p>As such I&#8217;m going to start a <strong><a href="http://gotrubyonrails.com">Rails in the Enterprise</a></strong> site where issues such as the ones i have highlighted can be discussed, resolved and communicated to the corperate world.</p>
<p>I&#8217;m like to see this site become a one stop resource for corporate developers who are trying to use rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/rails-in-the-enterprise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Productivity Tip</title>
		<link>http://www.floydprice.com/2008/08/productivity-tip/</link>
		<comments>http://www.floydprice.com/2008/08/productivity-tip/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 22:01:47 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=64</guid>
		<description><![CDATA[This is less of a tip and more a of my own metaphorical &#8220;Kit up the Back Side&#8221; that happened to me a few weeks ago. While looking for some software to audit the applications i had on my Mac came across Slie. Now slife doesn&#8217;t audit apps it actually monitors and records the activity [...]]]></description>
			<content:encoded><![CDATA[<p>This is less of a tip and more a of my own metaphorical &#8220;Kit up the Back Side&#8221; that happened to me a few weeks ago.</p>
<p>While looking for some software to audit the applications i had on my <a href="http://www.apple.com/macbookpro/">Mac</a> came across <a href="http://www.slifelabs.com/">Slie</a>. </p>
<p>Now slife doesn&#8217;t audit apps it actually monitors and records the activity of applications that you use. </p>
<p>What makes slife so useful is that it renders the data about your application usage in a timeline representing the day, so you get an idea of which application consumed most of your time.</p>
<p><img src="http://www.floydprice.com/wp-content/uploads/2008/08/slife-screenshot.png" alt="slife-screenshot.png" border="0" width="480" height="328" /></p>
<p>My expectation of the slife results for a common day would be some email and browser activity in the morning followed my some hard core TextMate activity up until lunch where email, soduko and safari would be used, come the afternoon another good block of TextMate, sprinkle a bit of NetNewsWirs across the entire day and there you go, another productive day from me <img src='http://www.floydprice.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
</p>
<p>Well this is all good an well but the reality is somewhat different, the results actually show that i spend much more time in mail and safari and a hell of a let less time in TextMate, for me this is a real kick up the back side! I value my time and investing so much of it in &#8220;Surfing&#8221; or &#8220;Emailing Friends&#8221; is not a good us of my valuable time. </p>
<p>I now run slife all the time, and review my own activity at least on day a week.</p>
<p><strong>Net result</strong> : I now spend more time &#8220;working&#8221; so i can get my task done sooner&#8230; which gives me more time to surf <img src='http://www.floydprice.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/productivity-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passenger (mod_rails) Preferences Pane for OS X</title>
		<link>http://www.floydprice.com/2008/08/passenger-mod_rails-preferences-pane-for-os-x/</link>
		<comments>http://www.floydprice.com/2008/08/passenger-mod_rails-preferences-pane-for-os-x/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 19:52:49 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=23</guid>
		<description><![CDATA[If like me you have started using Phusion Pasenger for development sites as well as production sites and you are fortunate to work on a Mac, you will really appreciate the Passenger Preferences Pane by Eloy Duran. Using it, is as simple as&#8230; Step 1 Point it at your rails folder. Step 2 Give it [...]]]></description>
			<content:encoded><![CDATA[<p>If like me you have started using <a href="http://modrails.com/">Phusion Pasenger</a> for development sites as well as production sites and you are fortunate to work on a Mac, you will really appreciate the <a href="http://www.fngtps.com/2008/06/putting-the-pane-back-into-deployment">Passenger Preferences Pane</a> by Eloy Duran.</p>
<p>Using it, is as simple as&#8230;</p>
<p><strong>Step 1</strong> Point it at your rails folder.</p>
<p><strong>Step 2</strong> Give it a host name to use.</p>
<p><strong>Step 3</strong> LOL, there is no Step Three</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/passenger-mod_rails-preferences-pane-for-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily Dose #1</title>
		<link>http://www.floydprice.com/2008/08/daily-dose/</link>
		<comments>http://www.floydprice.com/2008/08/daily-dose/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 18:08:28 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Daily Dose]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=3</guid>
		<description><![CDATA[A few links to get us going&#8230; IPhone Development iphone-universal Normalized CSS &#038; HTML framework to develop iPhone webdev applications C# Simple REST Client Some .NET code for consuming RESTful web services. Rails Understanding Map and Reduce Some underused collection functions in Ruby OS X Utils Expandrive Cool app that allows you to mount a [...]]]></description>
			<content:encoded><![CDATA[<p>A few links to get us going&#8230;</p>
<h3>IPhone Development</h3>
<p><a href="http://code.google.com/p/iphone-universal/">iphone-universal</a><br />
Normalized CSS &#038; HTML framework to develop iPhone webdev applications</p>
<h3>C#</h3>
<p><a href="http://jamescrisp.org/2008/08/08/simple-rest-client/">Simple REST Client</a><br />
Some .NET code for consuming RESTful web services.</p>
<h3>Rails</h3>
<p><a href="http://railspikes.com/2008/8/11/understanding-map-and-reduce">Understanding Map and Reduce</a><br />
Some underused collection functions in Ruby</p>
<h3>OS X Utils</h3>
<p><a href="http://www.magnetk.com/expandrive">Expandrive</a><br />
Cool app that allows you to mount a sFtp folder.</p>
<p><a href="http://www.red-sweater.com/marsedit/">MarsEdit</a><br />
Powerful Blog Publishing For Your Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/daily-dose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
