<?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>Dr Nic &#187; Video</title>
	<atom:link href="http://drnicwilliams.com/category/video/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Mon, 21 May 2012 03:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Showcase of CoffeeScript &#8211; 2.5 mins for your next Dev Group meeting</title>
		<link>http://drnicwilliams.com/2010/05/28/showcase-of-coffeescript-2-5-mins-for-your-next-dev-group-meeting/</link>
		<comments>http://drnicwilliams.com/2010/05/28/showcase-of-coffeescript-2-5-mins-for-your-next-dev-group-meeting/#comments</comments>
		<pubDate>Fri, 28 May 2010 12:20:08 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mocra]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=733</guid>
		<description><![CDATA[If you are giving an &#8220;Introduction to CoffeeScript&#8221; talk at your local developer group in the future, I have a 2:30min video you might find exciting to show. CoffeeScript is so cool that I thought it really needed to be put to music. Hard rock music. AC/DC. I finished my session at NordicRuby with this [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>
<object id="sample-video" class="alignright" style="float: right" width="320" height="195" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20streaming.mov" /><param name='autoplay' value="false" /><param name='controller' value="true" /><param name='loop' value="false" /><embed src="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20streaming.mov" width="320" height="195" controller="true" autoplay="false" loop="false" scale="tofit" cache="true" pluginspage="http://www.apple.com/quicktime/download/"></embed></object></p>
<p>If you are giving an &#8220;Introduction to CoffeeScript&#8221; talk at your local developer group in the future, I have a 2:30min video you might find exciting to show. <a href="http://coffeescript.org/" target="_blank">CoffeeScript</a> is so cool that I thought it really needed to be put to music. Hard rock music. AC/DC.</p>
<p>I finished my session at <a href="http://nordicruby.com" target="_blank">NordicRuby</a> with this video and I think it helped get lots of people excited about CoffeeScript.</p>
<p>Because of it&#8217;s heavy dependence of the backing song &#8211; the screencast is boring without it &#8211; I&#8217;m kind of screwed as to how to distribute it to other presenters. The licensing rules of including music and it&#8217;s 600Mb size are prohibitive.</p>
<p>What the hell. I&#8217;ve included an inline sample above; and the links to the 600Mb version is below. All self-promotional &#8220;Dr Nic made this shiny video&#8221; bits have been removed. Go for gold. Share the CoffeeScript excitement.</p>
<h3 id="nordicruby">NordicRuby</h3>
<p><a href="http://nordicruby.com">NordicRuby</a> finished 5 days ago, but many of the attendees and speakers are only finally winding down. Executed with the style, excitement and pizazz of Unspace&#8217;s RubyFringe and FutureRuby conferences, I had a brilliant time in Gothenburg. If NordicRuby&#8217;s organiser&#8217;s <a href="http://elabs.se/">Elabs</a> host the event again in 2011 I highly recommend attending. Carefully selected and sequenced speakers from around the world, 30 minute talks with 30 minute breaks over two days, an hour of lightning talks each day, and parties every night. Phew.</p>
<p>To CJ and Lilly, the organisers, the other speakers and all the attendees, thanks for an awesome experience in Sweden. Looking forward to coming back next year.</p>
<h3 id="why_coffeescript">Why CoffeeScript?</h3>
<p>JavaScript has a wonderful feature or two: it&#8217;s everywhere and it&#8217;s getting really fast. Unfortunately, its syntax was heavily influenced by Java/C++ and other popular goliaths of the time. But the JavaScript runtime is sweet. JavaScript syntax, not so sweet. </p>
<p>Like .NET and it&#8217;s selection of languages, the JVM and it&#8217;s growing smorgasbord of languages, I think the JavaScript runtime could benefit from more experimentation with alternate languages and/or syntaxes. Objective-J was one attempt. CoffeeScript is another.</p>
<p>Of the two, I like CoffeeScript. A lot.</p>
<h3 id="demonstrating_coffeescript_at_dev_meetups">Demonstrating CoffeeScript at Dev meetups</h3>
<p>The video flies through core ideas pretty quickly, so I ran through syntax examples on a slide first, and then said &#8220;You know, I think this would go better to music,&#8221; and played the video.</p>
<p><img src="http://img.skitch.com/20100528-cf2ts4uqmn91dy8h7m7hj26iwy.png" width="500px"></p>
<h3 id="download_and_demo">Download and Demo</h3>
<p>The purpose of offering the 600Mb video version is for the growing number of people doing CoffeeScript talks at their local software dev groups. The music in it is not licensed, not mine, but sounds awesome.</p>
<p>Please play the video with speakers. AC/DC on mute is a cruel act. Also watching the text jump around without the music is probably weird to watch. AC/DC and CoffeeScript. Perfect match, I think.</p>
<p><a href="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20Dr%20Nic%20-%20Mocra.mov?torrent"><img src="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20cover.png" width="500px"></a></p>
<p>Formats: <a href="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20Dr%20Nic%20-%20Mocra.mov?torrent">Torrent</a> | <a href="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20Dr%20Nic%20-%20Mocra.mov">Download</a> (600Mb)</p>
<h3 id="tack_s_mycket">Tack så mycket</h3>
<p>Swedish for &#8220;Thank you very much,&#8221; pronounced like &#8220;tuck sa-meekeh&#8221; or thereabouts.</p>
<p>If you use the video at all, I&#8217;d really appreciate it if you left a comment below! </p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2010/05/28/showcase-of-coffeescript-2-5-mins-for-your-next-dev-group-meeting/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
<enclosure url="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20streaming.mov" length="2832999" type="video/quicktime" />
<enclosure url="http://s3.amazonaws.com/screencasts.drnicwilliams/Summary%20of%20CoffeeScript%20-%20Dr%20Nic%20-%20Mocra.mov" length="599670164" type="video/quicktime" />
		</item>
		<item>
		<title>First 5 Minutes of Stand Up Comedy</title>
		<link>http://drnicwilliams.com/2009/12/03/first-5-minutes-of-stand-up-comedy/</link>
		<comments>http://drnicwilliams.com/2009/12/03/first-5-minutes-of-stand-up-comedy/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 23:05:28 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=673</guid>
		<description><![CDATA[I thought you might be interested to see the fruits of my new hobby: stand up comedy. It should be running in &#8220;HD&#8221; for 20% more laughs. Video taken by Greg Fairbrother, my awesome Mocra Off Railers co-driver. I discovered a local Stand Up Comedy Course which started 6 weeks ago. The final &#8220;night&#8221; of [...]]]></description>
			<content:encoded><![CDATA[<p>I thought you might be interested to see the fruits of my new hobby: stand up comedy.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/2RM18SzE33M&amp;hl=en_US&amp;fs=1&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2RM18SzE33M&amp;hl=en_US&amp;fs=1&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>It should be running in &#8220;HD&#8221; for 20% more laughs. Video taken by Greg Fairbrother, my awesome <a href="http://mocraoffrailers.com">Mocra Off Railers</a> co-driver.</p>
<p>I discovered a local <a href="http://www.standupcomedycourse.com.au/">Stand Up Comedy Course</a> which started 6 weeks ago. The final &#8220;night&#8221; of the course was for the 8 of us to do a show for family and friends. I don&#8217;t remember reading about that on the sales brochure.</p>
<p>Nonetheless, knowing you had a 5 minute set to perform in front of your family and friends sets the expectation in your mind from day one that you don&#8217;t want to be shit. So we listened up, wrote as many jokes as we could think of, and hoped desperately we wouldn&#8217;t be a blubbering mess on the night.</p>
<p>It&#8217;s not all left to chance. Each week, the funny woman who ran the course, Fiona McGary, made us use the microphone on the stage. Either talk about our week, or list all the funny things you can think of about frogs. Or any other European people.</p>
<p>Each week we boldly attempted to make our other classmates laugh. At the start, they don&#8217;t. So I quickly learned to edit and then how to present comedy on stage. I tried to learn it fast because it&#8217;s weird telling a punch line, waiting for the laughs, and only being rewarded with a uncomfortable shared silence.</p>
<p>All my jokes started out crappy. So I attempted to edit them into &#8220;setup-punchline format&#8221;. Another phrase for &#8220;edit&#8221; is &#8220;delete half&#8221;. I&#8217;m a verbose writer. This turns out to suck awfully for stand up comedy. Or perhaps I should be a concise writer too. Oh the novelty of the idea.</p>
<p>Another way to edit a joke so it is ready for an audience is to delete all of it. Turns out, just because I thought of something funny doesn&#8217;t mean anyone else thinks it&#8217;s funny. Ewwww, that was an uncomfortable life lesson.</p>
<p>I don&#8217;t know anything else and the above is probably wrong too. The last six weeks have been a blur. Lots of practise, lots of editing, lots of writing, lots of testing ideas on Mocra staff when they aren&#8217;t expecting it, and weekly doses of disturbing reality at the Tuesday workshops when I realise I still have 10 years of more practise to go before David Letterman might ask me to come on his show. He&#8217;ll only be 112 years old by then, so fingers crossed.</p>
<p>I&#8217;m very appreciative of the 20+ family and friends who came along for the show. All the comedians were very appreciative of especially Lucas and Chendo who sat at the front and giggled like little girls all night.</p>
<p>Spending the last six weeks with the other noob comedians has been wonderful. It will be fun seeing everyone around the Open Mic rooms in Brisbane.</p>
<p>Finally, and most importantly, thanks to Fiona for running the course, and bumping us forward each week with the subtle phrase &#8220;that&#8217;s good; though it will need more editing.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/12/03/first-5-minutes-of-stand-up-comedy/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>ChocTop &#8211; packaging and deployment of Cocoa applications</title>
		<link>http://drnicwilliams.com/2009/02/03/choctop-packaging-and-deployment-of-cocoa-applications/</link>
		<comments>http://drnicwilliams.com/2009/02/03/choctop-packaging-and-deployment-of-cocoa-applications/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 20:24:54 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=421</guid>
		<description><![CDATA[I&#8217;m getting close to releasing a new Cocoa application, CommitChat, a sexy interface to having conversations for each commit in each watched project in GitHub. It was time to start thinking about packaging and distribution. The result is a new project for all Cocoa developers, called ChocTop, and a 30-minute tutorial screencast on how to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/' rel='bookmark' title='Permanent Link: Unit Testing iPhone apps with Ruby: rbiphonetest'>Unit Testing iPhone apps with Ruby: rbiphonetest</a> <small> Everything to love about Ruby: the concise, powerful language;...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div class="thumbnail"><a href="http://drnic.github.com/choctop"><img class="alignright"  src="http://img.skitch.com/20090202-xgk24ef8894yids6ru8qn11exq.preview.jpg" alt="ChocTop" /></a></div>
<p>I&#8217;m getting close to releasing a new Cocoa application, <a href="http://commitchat.com/">CommitChat</a>, a sexy interface to having conversations for each commit in each watched project in GitHub. It was time to start thinking about packaging and distribution. </p>
<p>The result is a new project for all Cocoa developers, called <a href="http://en.wikipedia.org/wiki/Choc-Top">ChocTop</a>, and a 30-minute tutorial screencast on how to use it. ChocTop is to Cocoa apps what <a href="http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe">Hoe is to RubyGems</a>; except prettier.</p>
<h3 id="packaging_cocoa_apps">Packaging Cocoa apps</h3>
<p>You can package and release Cocoa apps in a number of ways. Each app is actually a folder, so they need some packaging. Zip files are easy and the bonus is they auto-open when people download them. But for me, without a doubt, is the DMG packaging with a custom background image and the embedded symlink to the Applications folder, like the one for CommitChat below.</p>
<div class="thumbnail"><a href="http://commitchat.com"><img src="http://img.skitch.com/20090202-g46y7e3fqpc74i64bipyhtk5eh.preview.jpg" alt="CommitChat DMG" /></a></div>
<p>I&#8217;ve always loved it. It made me as a user feel that this piece of software was special. A custom DMG is like a piece of magic.</p>
<p>Now like most magic, its really only magical when you don&#8217;t know how its done. </p>
<p>But there in lies a problem. You want to release your own Cocoa software with a beautiful custom DMG but you don&#8217;t want to know how to do it. You want the magic, even as a developer, but that means you can&#8217;t know how to do it.</p>
<p>And trust me you do NOT want to know how to do it. Ever.</p>
<p><span id="more-421"></span></p>
<p>Instead of writing a blog post about how to do it, what custom AppleScript you need, what special <code>SetFile -a</code> attributes you need to set, and what special file names you need to use, it seems more humane to not tell you. Ever. That&#8217;s a promise. It&#8217;s just that bad.</p>
<h3 id="introducing_choctop">Introducing ChocTop</h3>
<p><a href="http://drnic.github.com/choctop"><img src="http://img.skitch.com/20090202-89fmpsnemp52r4bqi51iyktngx.jpg"></a></p>
<p>ChocTop packages and deploys any Cocoa application in a custom DMG, with generated Sparkle XML support.</p>
<h3 id="screencast">Screencast</h3>
<p><object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3049180&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3049180&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object></p>
<p><a href="http://vimeo.com/3049180">On Vimeo</a> | <a href="http://www.vimeo.com/download/video:87685244?e=1233561345&amp;h=73e93c78ab63146ed2f460e963bcdb72&amp;uh=ea4240c7d2ca97bf2c67dd997754d4b3">Download QuickTime Movie</a> from <a href="http://www.vimeo.com">Vimeo</a> (275Mb, 640x480px)</p>
<p>Vimeo has slightly offset the video + audio after uploading. Grab the original movie file if its causing you grief.</p>
<h3 id="instructions">Instructions</h3>
<p>ChocTop is a command-line installer plus rake tasks (watch the screencast if this is confusing), bundled<br />
as a RubyGem:</p>
<pre>sudo gem install choctop
install_choctop path/to/xcode/project</pre>
<p>Your project is given a Rakefile, a release<em>notes.txt and a release</em>notes_template.html.erb</p>
<p>You edit the Rakefile with your custom DMG asset information and/or remote file locations for the rsync upload process. CommitChat&#8217;s Rakefile includes:</p>
<pre lang="ruby">ChocTop.new do |s|
  s.host     = 'commitchat.com'
  s.base_url = 'http://commitchat.com/secret_path_to_beta'
  s.remote_dir = '/opt/apps/commitchat/secret_path_to_beta'

  s.background_file = "dmgbg.png"
  s.volume_icon = 'VolumeIcon.icns'
  s.app_icon_position = [106, 83]
  s.applications_icon_position = [422, 83]
end</pre>
<p>You also need to add <a href="http://sparkle.andymatuschak.org/" title="Sparkle: a free software update framework for the Mac">Sparkle</a> to your project, and the Info.plist properties such as <code>SUFeedURL</code>.</p>
<p>To generate a new DMG, run:</p>
<pre>rake dmg</pre>
<p>To generate a new DMG and push it up to the remote server, and subsequently have users automatically start downloading the latest + greatest automatically via Sparkle:</p>
<pre>rake dmg upload</pre>
<p>I&#8217;m very sorry. It is perhaps too easy. It probably should be harder to make it seem more useful.</p>
<p>The very cool part is that when the DMG is being designed + constructed from your Rakefile settings you actually can see it happening on the screen. The AppleScript that is executed actually operates upon the DMG whilst it is mounted, before unmounting it, compressing and read-only-ifying it. Its pretty to watch.</p>
<h3 id="more_information">More information</h3>
<ul>
<li>Homepage &#8211; <a href="http://drnic.github.com/choctop">http://drnic.github.com/choctop</a></li>
<li>Source &#8211; <a href="http://github.com/drnic/choctop" title="drnic's choctop at master - GitHub">http://github.com/drnic/choctop</a></li>
<li>Tickets &#8211; <a href="http://drnic.lighthouseapp.com/projects/24673-choctop">http://drnic.lighthouseapp.com/projects/24673-choctop</a></li>
</ul>
<h3 id="and_a_word_from_our_sponsor">And a word from our sponsor</h3>
<p><a href="http://mocra.com"><img src="http://mocra.com/wp-content/themes/mocra/images/mocra-logo.gif" height="48px" style="float: left; padding-right: 10px" /></a></p>
<p>Dr Nic works at <a href="http://mocra.com/" title="Mocra">Mocra</a>, a premier consultancy for Rails, iPhone and Cocoa development. We&#8217;re finishing some client projects soon and are available for new projects. <strong>Act fast!</strong></p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/' rel='bookmark' title='Permanent Link: Unit Testing iPhone apps with Ruby: rbiphonetest'>Unit Testing iPhone apps with Ruby: rbiphonetest</a> <small> Everything to love about Ruby: the concise, powerful language;...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/02/03/choctop-packaging-and-deployment-of-cocoa-applications/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Unit Testing iPhone apps with Ruby: rbiphonetest</title>
		<link>http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/</link>
		<comments>http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 19:26:02 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Gems]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=287</guid>
		<description><![CDATA[Everything to love about Ruby: the concise, powerful language; the sexy testing frameworks; and finally, the people. Everything to love about Objective-C: hmmm; well&#8230;; and finally, its the only high-level language you can use to write iPhone apps. On iPhone 2.0, to arrive on the 11th of July, you cannot run RubyCocoa. But you can [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2009/03/30/closing-in-on-the-dream-one-click-to-deploy-rails-apps/' rel='bookmark' title='Permanent Link: Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;'>Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;</a> <small> Got a simple app you want to build? Allocate...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://img.skitch.com/20080703-mqpqqhdk4e49x3yhhb8t2g9rjg.jpg" alt="rbiphonetest logo" style="float: right" /></p>
<p>Everything to love about <strong>Ruby</strong>: the concise, powerful language; the sexy testing frameworks; and finally, the people.</p>
<p>Everything to love about <strong>Objective-C</strong>: hmmm; well&#8230;; and finally, its the only high-level language you can use to write iPhone apps.</p>
<p>On iPhone 2.0, to arrive on the 11th of July, you cannot run RubyCocoa. But you can run it on your Mac, so let&#8217;s use it to unit test your Objective-C classes. This tutorial shows you how to get started using a new project <a href="http://github.com/drnic/rbiphonetest/">rbiphonetest</a> [<a href="http://github.com/drnic/rbiphonetest">GitHub</a> | <a href="http://drnic.lighthouseapp.com/projects/13763-rbiphonetest">Lighthouse</a> | <a href="http://groups.google.com/group/rbiphonetest">Google Group</a>]</p>
<p>If you followed some of my <a href="http://summize.com/search?q=iphoneruby">recent tweets</a>, this project was previously called &#8220;iphoneruby&#8221;. And alas, the screencast also calls it &#8220;iphoneruby&#8221; but that was a crap name. People thought it was a way to run Ruby on the iphone. I can&#8217;t do that yet. So, a far better name is &#8216;rbiphonetest&#8217;. [track on <a href="http://summize.com/search?q=rbiphonetest">summize</a>]</p>
<p>Even if you&#8217;ve never touched Objective-C, Cocoa, the iPhone SDK, nor RubyCocoa I recommend watching the video anyway. It should give you hope that if you make the transition to iPhone development you don&#8217;t have to go alone without Ruby: your trusty swiss army knife of language/libraries/tools.</p>
<p>The screencast is also available in <a href="http://drnicwilliams.com/wp-content/uploads/2008/06/rbiphonetest-introduction.mov">high-def video</a> (55Mb QuickTime)</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1262916&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1262916&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1262916?pg=embed&amp;sec=1262916">Unit Testing iPhone apps using Ruby</a> from <a href="http://www.vimeo.com/user289979?pg=embed&amp;sec=1262916">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1262916">Vimeo</a>.</p>
<h2 id="installation_and_usage">Installation and Usage</h2>
<p>To summarize the video, but change &#8216;iphoneruby&#8217; to &#8216;rbiphonetest&#8217;, you install the framework via RubyGems:</p>
<pre>sudo gem install rbiphonetest</pre>
<p>Then change to your project&#8217;s folder and install the test framework:</p>
<pre>rbiphonetest .</pre>
<p>Finally, for each generic, non-UIKit-framework-using class you want to test:</p>
<pre>script/generate model WidgetModel</pre>
<p>Then write your tests in <code>test/test_widget_model.rb</code></p>
<h2 id="supported_cocoa_iphone_frameworks">Supported Cocoa &amp; iPhone frameworks</h2>
<p>The mysterious, magical premise upon which rbiphonetest depends is possibly erroneous: that your Objective-C class can be compiled and tested against your OS X/Intel frameworks, and if your tests pass you assume you can then compile and include your class with the the iPhone/ARM frameworks.</p>
<p>I&#8217;m willing to go with this assumption until its proven dangerously flawed by some angry 20-year veteran of NextStep/Cocoa/iPhone. But really, how different could NSString be on the iPhone versus your Mac?</p>
<p>Fortunately there is one way to check for significant differences between your available Mac-based frameworks, such as Cocoa, and the iPhone-based frameworks, such as UIKit. We need to compare the framework names, header files and method signatures.</p>
<p>So for example, you cannot currently unit test any class that depends on/includes the UIKit framework. <em>Why?</em> It doesn&#8217;t exist on your Mac, so the Mac/Intel compiler cannot link it in. We&#8217;re compiling and running our tests with RubyCocoa, which itself is built against the Mac/Intel frameworks, not the iPhone frameworks. Hell, <a href="http://chopine.be/lrz/">Laurent</a> doesn&#8217;t even own an iPhone <img src='http://drnicwilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  [Laurent is the Apple-employee maintainer of <a href="http://rubycocoa.sourceforge.net/HomePage">RubyCocoa</a> and the newer <a href="http://trac.macosforge.org/projects/ruby/wiki/MacRuby">MacRuby</a>]</p>
<p>Similarly, its no use including/linking the Cocoa framework into your Objective-C class. <em>Why?</em> It doesn&#8217;t exist on the iPhone. It has its own UI frameworks, collectively called &#8216;UIKit&#8217;.</p>
<p>So for the moment we cannot test UI-related, iPhone-API-specific code. But we can test generic Objective-C. That&#8217;s better than a kick in the teeth. Surely. I mean, in the teeth&#8230; that&#8217;d friggin&#8217; hurt.</p>
<p>&#8220;Fair enough Dr Nic, so which frameworks <em>can</em> my code use and yet still unit test it with your oh-so-special test library thingy?&#8221; Keep your pants on, I&#8217;m getting there. [<a href="#keep-your-pants-on">ref</a>]</p>
<p>To the best of my ability, I&#8217;ve compared the two sets of frameworks and listed the available Frameworks that are available on both the iPhone and your Mac. There are about a dozen. The most important is called &#8216;Foundation&#8217;. It holds gold nuggets like &#8216;NSString&#8217;. </p>
<p>The list of <a href="http://github.com/drnic/rbiphonetest/wikis/platform-differences">platform differences</a> is on the wiki as a reference.</p>
<p>Note, this list doesn&#8217;t guarantee that any two framework classes &#8211; the iPhone and matching Mac framework &#8211; will behave the same. This list is compiled by finding the set of Frameworks with the same name on both platforms, e.g. Foundation.</p>
<p>Then it compares the set of public header files (Foundation.framework/Headers/*.h files) This comparison is by method signature. It pulls all lines from each header that start with + or &#8211; (+ is a class method and &#8211; is an instance method in Objective-C) and compares the two lists. If there is a single difference in the method signatures of the header files in the two platforms it is marked on the wiki page. You&#8217;ll need to look at the two header files yourself to see the differences. Some header files are ugly. C-based anything starts ugly and goes down from there, I think.</p>
<h2 id="python_testing_of_iphone_objective_c">Python testing of iPhone Objective-C?</h2>
<p>In the Python world there is PyObjC, a bridge-based twin to RubyCocoa. If you are a Python developer you could easily port this project to use PyObjC I would think. Ping me if you are attempting this and need any help.</p>
<h2 id="summary">Summary</h2>
<p>I think this project can give Ruby developers a happy place to work from as they write their Objective-C/iPhone code. You still need to wire up your UI views and controller classes manually, but if you push all the &#8220;oooh that code really needs some tests&#8221; classes away from the UI-dependent frameworks then you can hook it up to rbiphonetest and write your tests in Ruby.</p>
<p>Currently the generator creates test/unit test stubs. I personally then add the Shoulda gem into my test_helper.rb for my apps. If an rspec and/or test/spec developer can help with adding support to the generators I&#8217;m certain the large rspec user-base would be happy campers.</p>
<p>Similarly, someone might like to investigate using MacRuby to run the tests instead of RubyCocoa. Fast tests vs slow tests. You choose.</p>
<h3>What the?</h3>
<p>Sometimes I re-read what I&#8217;ve written and notice things that don&#8217;t seem to make sense, but are in my vocabulary nonetheless. Yep, the things you learn living in Australia.</p>
<p><strong id="keep-your-pants-on">&#8220;Keep your pants on&#8221;</strong> &#8211; this seems to imply that until I mentioned otherwise you were about to take your pants off. Hardly relevant at any stage during this article, we&#8217;d both agree. Most code-based blog articles are &#8220;pants on&#8221;. This phrase means &#8220;don&#8217;t get upset&#8221;. You can try to figure out how you go from &#8220;don&#8217;t get upset&#8221; to &#8220;keep your pants on&#8221;. I have no idea.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2009/03/30/closing-in-on-the-dream-one-click-to-deploy-rails-apps/' rel='bookmark' title='Permanent Link: Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;'>Closing in on The Dream: &#8220;one-click-to-deploy Rails apps&#8221;</a> <small> Got a simple app you want to build? Allocate...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
<enclosure url="http://drnicwilliams.com/wp-content/uploads/2008/06/rbiphonetest-introduction.mov" length="60255710" type="video/quicktime" />
		</item>
		<item>
		<title>Using Ruby within TextMate snippets and commands</title>
		<link>http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/</link>
		<comments>http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 01:51:56 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=279</guid>
		<description><![CDATA[I didn&#8217;t know you could run Ruby within TextMate snippets. As a consequence, a lot of the TextMate bundles I work on either have simplistic Snippets or the advanced code is run via Commands with code pushed into explicit Ruby files in the Support folder. But sometimes I just want a clever snippet. For example, [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t know you could run Ruby within TextMate snippets. As a consequence, a lot of the TextMate bundles <a href="http://github.com/search?q=drnic+tmbundle">I work on</a> either have simplistic Snippets or the advanced code is run via Commands with code pushed into explicit Ruby files in the Support folder.</p>
<p>But sometimes I just want a clever snippet. For example, I want the &#8216;cla&#8217; snippet to use the current filename to create the default class name instead of the current &#8216;ClassName&#8217; default. I want default foreign key names to be meaningful.</p>
<p>I&#8217;ve now figured this out (thanks to Ciaran Walsh), and &#8230;</p>
<p>Um, lost already? Ok, let me show you via screencast on <strong>Snippets and Commands with Ruby</strong> (<a href='http://drnicwilliams.com/wp-content/uploads/2008/06/textmate-snippets-running-ruby.mov'>QuickTime (11Mb)</a>):</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1152272&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1152272&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1152272?pg=embed&#038;sec=1152272">TextMate Snippets running Ruby</a> from <a href="http://www.vimeo.com/user289979?pg=embed&#038;sec=1152272">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&#038;sec=1152272">Vimeo</a>.</p>
<h3>Want to learn more about living with TextMate and Ruby?</h3>
<p>The TextMate website has a <a href="http://macromates.com/screencasts">series of videos</a>, including one by the Ruby.tmbundle&#8217;s own <a href="http://blog.grayproductions.net">James Edward Gray II</a> (JEG2).</p>
<p>In addition, there is the latest <a href="http://peepcode.com/products/textmate-for-rails-2">TextMate for Rails 2</a> Peepcode written by myself and spoken by Geoffrey Grosenbach. Its cheap at $9, good value at $15.50, and perhaps overpriced in the $20-$30 range. Lucky its only $9. </p>
<h3>The snippets used throughout the video</h3>
<p>The current Ruby.tmbundle snippet (activated via &#8216;cla&#8217;):</p>
<pre>class ${1:ClassName}
	$0
end</pre>
<p>An attempt to use regular expressions to convert the filename to a classname:</p>
<pre>class ${1:${TM_FILENAME/[[:alpha:]]+|(_)/(?1::\u$0)/g}}
	$0
end</pre>
<p>The final snippet, with embedded Ruby to do the heavy lifting (note: added &#8216;singluarize&#8217; to the snippet):</p>
<pre>
class ${1:`#!/usr/bin/env ruby
    require 'rubygems'
    require "active_support"
    puts ENV['TM_FILENAME'].gsub(/\.rb$/, '').camelize.singularize
    `}
	$0
end</pre>
<p>Add this to your own Ruby.tmbundle, or <a href="http://github.com/drnic/ruby-tmbundle">clone mine</a> (which is a clone of the original <a href="http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle">subversion repo</a>).</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://drnicwilliams.com/wp-content/uploads/2008/06/textmate-snippets-running-ruby.mov" length="11969747" type="video/quicktime" />
		</item>
		<item>
		<title>How to yell at people with GitHub from TextMate</title>
		<link>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/</link>
		<comments>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/#comments</comments>
		<pubDate>Wed, 28 May 2008 05:48:59 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=276</guid>
		<description><![CDATA[Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work? Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github&#8217;s commenting system add a full-flavoured remark about that person&#8217;s code. I&#8217;m not [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work?</p>
<p>Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github&#8217;s commenting system add a full-flavoured remark about that person&#8217;s code. I&#8217;m not sure if profanity is against the GitHub Terms of Service, but I&#8217;d rather ask forgiveness than permission.</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1077669&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1077669&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1077669?pg=embed&#038;sec=1077669">TextMate + GitHub &#8211; how to comment/discuss on a line via GitHub</a> from <a href="http://www.vimeo.com/user289979?pg=embed&#038;sec=1077669">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&#038;sec=1077669">Vimeo</a>.</p>
<p>Download and installation instructions are <a href="http://github.com/drnic/github-tmbundle/">available in all good bookstores</a>.</p>
<h3>Just for TextMate?</h3>
<p>There is an editor for Windows &#8211; <a href="http://www.e-texteditor.com/">E-TextEditor</a> &#8211; that was designed to support TextMate bundles. So far, the GitHub bundle doesn&#8217;t use any special features of TextMate&#8217;s latest-and-greatest UI libraries, so it should be usable on E-TextEditor.</p>
<p>Also, a <a href="http://github.com/solars/github-vim/tree/master">VIM project</a> has been created to port the GitHub bundle, by Christoph Blank. Cristoph can be found hanging around #hobo on irc as &#8216;solars&#8217;, if you want more goodies in the VIM bundle.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/28/how-to-yell-at-people-with-github-from-textmate/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>GitHub and TextMate Unite</title>
		<link>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/</link>
		<comments>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/#comments</comments>
		<pubDate>Mon, 26 May 2008 07:30:16 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=275</guid>
		<description><![CDATA[I wanted to go from a source file to the equivalent file on github. I wanted a selection of lines in TextMate editor to also be selected when I was taken to github.com. I wanted to cut back on my senseless killing of innocent pasties. Finally, I wanted to make a nice little video to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I wanted to go from a source file to the equivalent file on github. I wanted a selection of lines in TextMate editor to also be selected when I was taken to github.com. I wanted to cut back on my senseless killing of innocent <a href="http://pastie.caboo.se">pasties</a>. </p>
<p>Finally, I wanted to make a nice <a href="http://www.vimeo.com/1066882">little video</a> to show off the new <a href="http://github.com/drnic/github-tmbundle">GitHub.tmbundle</a>.</p>
<p><object width="550" height="393"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1066882&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1066882&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="393"></embed></object><br /><a href="http://www.vimeo.com/1066882?pg=embed&amp;sec=1066882">TextMate and GitHub: Show the current file in GitHub</a> from <a href="http://www.vimeo.com/user289979?pg=embed&amp;sec=1066882">Dr Nic</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1066882">Vimeo</a>.</p>
<h2 id="which_remote_repository_is_it_choosing">Which remote repository is it choosing?</h2>
<p>If you have multiple remote references to github.com repositories, then the algorithm picks one in the following order:</p>
<ol>
<li>A remote named &#8216;github&#8217;</li>
<li>A remote named &#8216;origin&#8217;</li>
<li>The first remote for a github.com repository</li>
</ol>
<p>What else could go in a GitHub textmate bundle?</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/' rel='bookmark' title='Permanent Link: Migrating project websites to github pages with sake tasks, new websites with jekyll_generator'>Migrating project websites to github pages with sake tasks, new websites with jekyll_generator</a> <small> Its almost Christmas time and that means presents. It...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/05/26/github-and-textmate-unite/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Rails 2.0 TextMate bundle &#8211; Tasty Tidbit &#8211; respond_to and view navigation</title>
		<link>http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/</link>
		<comments>http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 22:23:26 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/</guid>
		<description><![CDATA[The new release of the Rails TextMate bundle is coming soon. Its guaranteed to be shiny, sparkly and will fit in with any home or office decor. More importantly, it will be upgraded for Rails 2.0. Today is the first Tasty Tidbit &#8211; a demonstration of one of the snazzy new features coming to your [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>The new release of the Rails TextMate bundle is coming soon. Its guaranteed to be shiny, sparkly and will fit in with any home or office decor. More importantly, it will be upgraded for Rails 2.0.</p>
<p>Today is the first Tasty Tidbit &#8211; a demonstration of one of the snazzy new features coming to your Macintosh soon.</p>
<p>In this Tasty Tidbit, we look at respond_to and the ability to create and navigate to view templates based on the selected format block, such as wants.js -> .js.rjs.</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler"><param name="movie" value="http://www.viddler.com/player/52b07473/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/52b07473/" width="437" height="370" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler" ></embed></object></p>
<p>Cannot see the embedded video? Want the Hi-Def version? <a href="http://www.viddler.com/show_movie!orgFile.action?movieToken=52b07473">Download the video</a> (5 Mb).</p>
<h3>Contribute to the Bundle</h3>
<p>To clone the git repository and start sharing your own personal goodness, see <a href="http://drnicwilliams.com/2008/01/31/get-ready-for-the-textmate-trundle-to-rails-20-bundle/">previous article</a>.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2012/04/10/instant-new-rails-applications-with-the-app-scrolls/' rel='bookmark' title='Permanent Link: Instant new Rails applications with the App Scrolls'>Instant new Rails applications with the App Scrolls</a> <small>When I start a new project I want to start...</small></li><li><a href='http://drnicwilliams.com/2010/08/01/packaging-textmate-bundles-in-os-x-dmgs/' rel='bookmark' title='Permanent Link: Packaging TextMate bundles in OS X DMGs'>Packaging TextMate bundles in OS X DMGs</a> <small>Last week Engine Yard released a CLI for their Engine...</small></li><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/02/27/rails-textmate-tasty-tidbit-respond_to/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
<enclosure url="http://www.viddler.com/show_movie!orgFile.action?movieToken=52b07473" length="0" type="video/quicktime" />
		</item>
		<item>
		<title>Find objects in IRB directly from browser URLs</title>
		<link>http://drnicwilliams.com/2008/01/01/find-objects-in-irb-directly-from-browser-urls/</link>
		<comments>http://drnicwilliams.com/2008/01/01/find-objects-in-irb-directly-from-browser-urls/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 04:59:39 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Trick]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/01/01/find-objects-in-irb-directly-from-browser-urls/</guid>
		<description><![CDATA[A long time ago, I tired of going into the irb/console and finding objects/models using the traditional ActiveRecord command Person.find(15) and now I&#8217;m sitting pretty: I can paste in URLs to fetch objects. # No more of this: => Person.find(15) # instead: => people/15 people/15 is something you&#8217;ll copy+paste directly from your browser: http://localhost:3000/people/15 Of [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2007/08/12/magiccgi/' rel='bookmark' title='Permanent Link: MagicCGI shows OpenID user count'>MagicCGI shows OpenID user count</a> <small> In the last 20 days, 43 people have used...</small></li><li><a href='http://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facility-in-rails-to-talk-to-more-than-one-database-at-a-time/' rel='bookmark' title='Permanent Link: Magic Multi-Connections: A &#8220;facility in Rails to talk to more than one database at a time&#8221;'>Magic Multi-Connections: A &#8220;facility in Rails to talk to more than one database at a time&#8221;</a> <small>At this point in time there’s no facility in Rails...</small></li><li><a href='http://drnicwilliams.com/2006/08/22/bts-magic-models-vs-activerecords-efficiency/' rel='bookmark' title='Permanent Link: [BTS] Magic Models vs ActiveRecords &#8211; Efficiency'>[BTS] Magic Models vs ActiveRecords &#8211; Efficiency</a> <small>Dr Nic&#8217;s Magic Models are magical, that goes without saying....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>A long time ago, I tired of going into the irb/console and finding objects/models using the traditional ActiveRecord command <code>Person.find(15)</code> and now I&#8217;m sitting pretty: I can paste in URLs to fetch objects.</p>
<pre syntax="ruby">
# No more of this:
=> Person.find(15)
# instead:
=> people/15
</pre>
<p><code>people/15</code> is something you&#8217;ll copy+paste directly from your browser: <code>http://localhost:3000/<strong>people/15</strong></code></p>
<p>Of course, the url is based on your routing + controllers, so the assumption here is that your routes/controllers map to your active record models. That is, your app is smothered in RESTful love and cuddles.</p>
<p>Not following this? Here&#8217;s a <a href="http://drnicwilliams.com/wp-content/uploads/2008/01/urls_into_irb.mov">video</a>:</p>
<p><embed src="http://drnicwilliams.com/wp-content/uploads/2008/01/urls_into_irb.mov"  width="651" height="460" autoplay="false" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed></p>
<h3>How to make this work at home</h3>
<p>Copy and paste the <a href="http://pastie.textmate.org/133717">following</a> into your <a href="http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/">.irbrc file</a>:</p>
<textarea name="code" class="ruby" cols="60" rows="10">
# In irb, can type:
# people/6 instead of Person.find(6)
# That is, can paste in urls into irb to find objects.
class ModelProxy
  def initialize(klass)
    @klass = klass
  end
  def /(id)
    @klass.find(id)
  end
end

def define_model_find_shortcuts
  model_files = Dir.glob("app/models/**/*.rb")
  model_names = model_files.map { |f| File.basename(f).split('.')[0..-2].join }
  model_names.each do |model_name|
    Object.instance_eval do
      define_method(model_name.pluralize) do |*args|
        ModelProxy.new(model_name.camelize.constantize)
      end
    end
  end
end
</textarea>
<h3>Thanks goes to&#8230;</h3>
<p>The some original code for this comes via <a href="http://www.clarkware.com/cgi/blosxom/2007/09/03#ConsoleFindShortcut">Mike Clark</a>, who had the idea for syntax <code>activity(6)</code>. This was good.</p>
<p>I previously had another idea to support the syntax <code>6.to_activity</code> using the RubyGem <a href="http://drnicutilities.rubyforge.org/to_activerecord/">to_activerecord</a>. I still like the <code>id.to_class_name</code> structure of this and still use it.</p>
<p>But if I have a perfectly nice looking url sitting in front of me, I can now paste the <code>class_name/id</code> part into irb and I&#8217;m off and running.</p>
<p>Happy New Year.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2007/08/12/magiccgi/' rel='bookmark' title='Permanent Link: MagicCGI shows OpenID user count'>MagicCGI shows OpenID user count</a> <small> In the last 20 days, 43 people have used...</small></li><li><a href='http://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facility-in-rails-to-talk-to-more-than-one-database-at-a-time/' rel='bookmark' title='Permanent Link: Magic Multi-Connections: A &#8220;facility in Rails to talk to more than one database at a time&#8221;'>Magic Multi-Connections: A &#8220;facility in Rails to talk to more than one database at a time&#8221;</a> <small>At this point in time there’s no facility in Rails...</small></li><li><a href='http://drnicwilliams.com/2006/08/22/bts-magic-models-vs-activerecords-efficiency/' rel='bookmark' title='Permanent Link: [BTS] Magic Models vs ActiveRecords &#8211; Efficiency'>[BTS] Magic Models vs ActiveRecords &#8211; Efficiency</a> <small>Dr Nic&#8217;s Magic Models are magical, that goes without saying....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/01/01/find-objects-in-irb-directly-from-browser-urls/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
<enclosure url="http://drnicwilliams.com/wp-content/uploads/2008/01/urls_into_irb.mov" length="4838856" type="video/quicktime" />
		</item>
		<item>
		<title>Everything you wanted to know about Ruby.NET</title>
		<link>http://drnicwilliams.com/2007/10/29/everything-you-wanted-to-know-about-rubynet/</link>
		<comments>http://drnicwilliams.com/2007/10/29/everything-you-wanted-to-know-about-rubynet/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 21:01:42 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/10/29/everything-you-wanted-to-know-about-rubynet/</guid>
		<description><![CDATA[Recently Wayne Kelly spoke at the Brisbane Ruby and Rails Brigade about Ruby.NET (code repository). We figured he was some authority figure on the topic, as he wrote it, together with some other members of his QUT department, plus a growing number of Ruby.NET users and contributors. Local Microsoft officialdom sponsored the show with pizza [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li><li><a href='http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/' rel='bookmark' title='Permanent Link: Unit Testing iPhone apps with Ruby: rbiphonetest'>Unit Testing iPhone apps with Ruby: rbiphonetest</a> <small> Everything to love about Ruby: the concise, powerful language;...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://drnicwilliams.com/2007/10/13/rubynet-goes-open-source/">Recently</a> Wayne Kelly spoke at the <a href="http://ruby.meetup.com/74/">Brisbane Ruby and Rails Brigade</a> about <a href="http://plas2003.fit.qut.edu.au/Ruby.NET/">Ruby.NET</a> (<a href="http://code.google.com/p/rubydotnetcompiler/">code repository</a>). </p>
<p>We figured he was some authority figure on the topic, as he wrote it, together with some other members of his QUT department, plus a growing number of Ruby.NET users and contributors.</p>
<p>Local Microsoft officialdom sponsored the show with pizza and then drinks afterwards. Ok, I&#8217;m understating that &#8211; <a href="http://blogs.msdn.com/charles_sterling/">Charles Sterling</a> is an ex-.NET project manager, who is now in Oz for a Tour of Duty as an Evangelist. In his capacity as an evangelist, he giveth us thy pizza. Twas tasty too.</p>
<p>I believe Ruby.NET is in direct competition with IronRuby for the hearts and minds of Ruby/.NET/Windows developers. </p>
<p>Wayne starts the video below with a comparison of the two, plus a few other Ruby implementations (sorry <a href="http://blog.fallingsnow.net/">Evan</a>, <a href="http://rubini.us/">Rubinius</a> wasn&#8217;t mentioned).</p>
<p>Fortunately we were treated to a demo early in the show. Wayne had recently implemented Ruby code-behind for some of the drag-and-drop widgets that come with Visual Studio. It was very sexy to see all that Ruby being generated.</p>
<p>The video also includes lots of &#8220;why Ruby is hard to work with as a compiler writer&#8221;, and more importantly, there are lots of audience questions all throughout the talk. This might be why the talk is 1.45hrs long!! <img src='http://drnicwilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Enjoy&#8230; (and the <a href="http://files.meetup.com/280030/RubyTalk.ppt">slides</a> from Wayne)</p>
<p><embed style="width:550px; height:440px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=2174794818924732756&#038;hl=en" flashvars=""> </embed></p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/' rel='bookmark' title='Permanent Link: Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers'>Validate and Save your Ruby in TextMate &#8211; with secret Rubinus superpowers</a> <small>In some TextMate bundles, if you save a file it...</small></li><li><a href='http://drnicwilliams.com/2008/12/11/future-proofing-your-ruby-code/' rel='bookmark' title='Permanent Link: Future proofing your Ruby code. Ruby 1.9.1 is coming.'>Future proofing your Ruby code. Ruby 1.9.1 is coming.</a> <small> Bugger. I&#8217;m a Ruby monogamist. I use the Ruby...</small></li><li><a href='http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/' rel='bookmark' title='Permanent Link: Unit Testing iPhone apps with Ruby: rbiphonetest'>Unit Testing iPhone apps with Ruby: rbiphonetest</a> <small> Everything to love about Ruby: the concise, powerful language;...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/10/29/everything-you-wanted-to-know-about-rubynet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

