<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10titles.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemtitles.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <title>toolmantim articles</title>
  
  <link href="http://toolmantim.com/articles" hreflang="en" rel="alternate" type="text/html" />
  <author>
    <name>Tim Lucas</name>
    <uri>http://toolmantim.com/</uri>
    <email>t.lucas@toolmantim.com</email>
  </author>
  <id>tag:toolmantim.com,2009-01-04:/articles</id>
  <updated>2009-09-09T00:00:00+10:00</updated>
  <link rel="self" href="http://feeds.feedburner.com/toolmantim" type="application/atom+xml" /><feedburner:emailServiceId>toolmantim</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly>This is a feed designed to be used with a feed reader. A feed reader allows you to keep up to date with a bunch of different sites without having to go browse all their webpages -- you automatically get notified of any updates. To the right are links to some feed readers, otherwise go to http://www.toolmantim.com to read the web version.</feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/wdtee</id>
    <title type="html">The WDS09 Tee</title>
    <published>2009-09-09T00:00:00+10:00</published>
    <updated>2009-09-09T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/wdtee" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><strong>I've always been a t-shirt kind of guy.</strong></p>
        
        <p>Tees are one of the perks you get from living in the warm and mild city of Sydney. Whether it's the shortest coldest day in winter, or the hottest brightest day in summer, you'll no doubt find me, and a bunch of other Sydney-siders, donning the mighty tee.</p>
        
        <p>Right now <a href="http://hellotherecanary.com/">Carla</a> and I are currently packing our lives into boxes, preparing to move to Coogee Beach for the summer. Whilst procrastinating the task of packing two garbage bags worth of old tees to take to <a href="http://www.vinnies.org.au/">Vinnies</a> it's only fitting that I drum up some tee purchasing excitement, this time with the release of <strong><a href="http://tshirt09.webdirections.org/">tshirt09.webdirections.org</a></strong> - the official tee for the Web Directions South conference.</p>
        
        <p><a href="http://tshirt09.webdirections.org/"><img src="http://toolmantim.com/images/articles/wdtee/wds09tee-screenshot.jpg" alt="The WDS09 Tee website" /></a></p>
        
        <h2>The design</h2>
        
        <p>It seems that I've replaced my habit of impulsive Threadless tee purchasing (I was there for the first print of <a href="http://www.threadless.com/product/114/Flowers_in_the_Attic">Flowers in the Attic</a> man, I WAS THERE!) with a habit of dragging Carla in to design geek tees for every geek event I help organise. Last May I dragged her in, once again, to whip up a new design for the <a href="http://railscamptee.com/">Rails Camp tee</a>, and like all good things a new one-pager Sinatra app had to be built to pimp it: <a href="http://railscampteev3.agencyrainford.com/">railscampteev3.agencyrainford.com</a>.</p>
        
        <p>Maxine saw this shiny ordering process and asked if she could have a site just like it for a tshirt project for Web Directions. Anything for a free tee!</p>
        
        <p><img src="http://toolmantim.com/images/articles/wdtee/designs.jpg" alt="Sketches and mockups" /></p>
        
        <p>After some sketches and a couple of balsamiq mockups I had a pretty good idea of how I wanted it to work. The next step was to bust out some photoshop.</p>
        
        <p><img src="http://toolmantim.com/images/articles/wdtee/photoshop.jpg" alt="Photoshop designs" /></p>
        
        <p>The build was done with the trusty combination of <a href="http://www.sinatrarb.com/">Sinatra</a>, <a href="http://haml-lang.com/">HAML</a>, <a href="http://sass-lang.com/">SASS</a> and <a href="http://github.com/quackingduck/fancyviews">fancyviews</a>. Deployment and hosting is on the awesome that is <a href="http://heroku.com/">Heroku</a>.</p>
        
        <h2>Embedding custom typefaces with @font-face</h2>
        
        <p>Forget <a href="http://www.mezzoblue.com/tests/revised-image-replacement/">image-replacement</a>, <a href="http://www.mikeindustries.com/blog/sifr/">sifr</a> and <a href="http://wiki.github.com/sorccu/cufon/about">cufon</a>—<a href="http://webfonts.info/">@font-face</a> has traction with most of the major browsers now (IE6+, Firefox 3.5+, Safari 3.1+, Opera, etc).</p>
        
        <p>I simply grabbed a couple of free fonts (<a href="http://www.theleagueofmoveabletype.com/fonts/4-chunk">ChunkFive</a> by <a href="http://www.theleagueofmoveabletype.com/">The League of Movable Type</a> and <a href="http://new.myfonts.com/fonts/larabie/zorque/">zorque</a> by <a href="http://www.larabiefonts.com/">Ray Larabie</a>), converted them to EOT for IE, and declared them via CSS:</p>
        
        <pre><code class="css">@font-face {
  font-family: "ChunkFive";
  src: url("/chunkfive.eot");
  src: local("ChunkFive"), url("/chunkfive.otf") format("opentype"); }</code></pre>
        
        <p>Using it is as simple as:</p>
        
        <pre><code class="css">h1 {
  font-family: "ChunkFive";
}</code></pre>
        
        <p><img src="http://toolmantim.com/images/articles/wdtee/typefaces.jpg" alt="Custom typefaces" /></p>
        
        <p>One of the many advantages to using <code>@font-face</code> is we get back all the standard webby things such as inline links and images.</p>
        
        <h2>Motion blur with sprites</h2>
        
        <p>The blurry tshirt effects were made using <a href="http://en.wikipedia.org/wiki/Sprite_(computer_graphics)">sprites</a>.</p>
        
        <p><img src="http://toolmantim.com/images/articles/wdtee/sprites.jpg" alt="Sprites" /></p>
        
        <p>Above is the 5 frame sprite used to animate the male tee. At different stages during the animation I change the offset of the background image to give the effect of motion blur. I did try to get away with just 3 frames but adding an extra two meant I could go with more angle and blur.</p>
        
        <h2>Decorating dom nodes with $$</h2>
        
        <p>For the JS I used a <a href="http://yehudakatz.com/">Yehuda Katz</a> and <a href="http://github.com/quackingduck">Myles Byrne</a> inspired trick of attaching methods directly to DOM nodes using jQuery's <code>data</code> method.</p>
        
        <pre><code class="javascript">// Decorates dom elements with methods
$$ = function(elem, methods) {
  if (methods) $(elem).data("controller", methods);
  return $(elem).data("controller");
}</code></pre>
        
        <p>This allows you to construct an object model around the DOM, like so:</p>
        
        <pre><code class="javascript">$(function() {
  var cut = $("#cut"),
      maleTee = cut.find(".m-tee");
  $$(cut, {
    show: function() {
      cut.show();
      maleTee.animate({left:"400px"});
    }
  });</code></pre>
        
        <p>All the local variables are like instance variables, accessible through closure. To get a handle on the object with your custom functions you can use a selector:</p>
        
        <pre><code class="javascript">$$("#cut").show();</code></pre>
        
        <p>or if you've already got a jquery collection object you can call <code>$$</code> on it instead:</p>
        
        <pre><code class="javascript">var cut = $("#cut");
$$(cut).show();</code></pre>
        
        <h2>The final test</h2>
        
        <p>In the end I'm pretty happy with the result, all that's left now is to see if it sells some tees.</p>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/bananajour</id>
    <title type="html">LAN hacking with Bananajour</title>
    <published>2009-06-11T00:00:00+10:00</published>
    <updated>2009-06-11T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/bananajour" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Yesterday I released <a href="http://github.com/toolmantim/bananajour">Bananajour</a>, a LAN-based, bonjour-aware, git collaboration tool with a healthy potassium-enriched web interface.</p>
        
        <p><a href="http://github.com/toolmantim/bananajour"><img src="http://toolmantim.com/images/articles/bananajour/screenshot.png" alt="Screenshot of local view of Bananajour 2.1.3" /></a></p>
        
        <p>It was at <a href="http://flickr.com/groups/rails-camp/pool/tags/railscamp2">Railscamp 2</a> in November 07 that found I found myself in the <a href="http://www.flickr.com/photos/lachie/2082955158/in/pool-rails-camp">the presentation pit</a> trying to explain git to 20 of my fellow hackers. I wanted to explain how it worked and to demo the power of its commit and repository model.</p>
        
        <p>Being fairly new to git it took just 3 minutes of rambling through the obscure git commands <a href="http://www.flickr.com/photos/lachlanhardy/2079703845/in/pool-rails-camp">to send Lachie to sleep</a>, the 19 others in the room quickly following. I wanted to get 3 laptops set up with a publicly served git repository that we could pull between and show decentralised collaboration. What I thought would be straight forward turned out to be <strong>friggin hard</strong>, especially compared to setting up a shared svn repository.</p>
        
        <p>Luckily for us LAN collaboration with git has gone from total pain-in-the-ass to pretty-darn-good thanks to tools such as <a href="http://gitorious.org/">gitorious</a> and <a href="http://github.com/chad/gitjour/tree/master">gitjour</a>. Gitorious was rad and served us well for while, and gitjour really kicked ass—hats off to Chad, Evan and Rich—and though it was a far cry from the comforts of github and gitorious it was light-weight and decentralised and was <a href="http://drnicwilliams.com/2008/06/18/what-is-gitjour-gemjour-starjour/">quite a hit at Railscamp 3</a>.</p>
        
        <p>Gitjour's old conference hack code (our <a href="http://log.lachstock.com.au/past/2008/10/19/gitjour-the-quickening/">railscamp fork</a> not withstanding) combined with a few design gotchas warranted a new approach. Ever since Railscamp 3 and the prolific gitjouring I'd wanted to build a git network aggregator. It's pretty much impossible to do a <code>git log</code> of a remote repository without fetching the repository itself, and after wanting to build a good web UI for each repository I discovered I could simply have each web interface serve up JSON directly from its repositories using grit, advertise these feeds and projects via bonjour and <strong>BANG</strong>! We'd have all the ingredients we need for git <del>world</del> LAN domination.</p>
        
        <p>Having started Bananajour before camp I thought I'd have it done in time. 33 hours after leaving Sydney, with zero sleep and plenty of drinking and hacking, and it was ready for a <code>gem install</code>. Apart from gem compatibility issues (damn you Rack 1.0.0 not playing nicely with Sinatra!) it got a fair bit of use at Railscamp, with muchos hacking from <a href="http://github.com/atnan">Nathan de Vries</a>, <a href="http://github.com/lachlanhardy">Lachlan Hardy</a>, <a href="http://github.com/nullobject">Josh Bassett</a>, <a href="http://github.com/quackingduck">Myles Byrne</a>, <a href="http://github.com/benhoskings">Ben Hoskings</a>, <a href="http://github.com/brettgo1">Brett Goulder</a>, <a href="https://github.com/tissak">Tony Issakov</a>, and <a href="http://github.com/MarkBennett">Mark Bennett</a>. After much refactoring on return from the sunshine state it is now ready for general consumption.</p>
        
        <p>To get up and started you simply need to:</p>
        
        <pre><code>sudo gem install toolmantim-bananajour --source http://gems.github.com
</code></pre>
        
        <p>Once that's done run <code>bananajour</code> and you're up and running.</p>
        
        <p>The slides for the bananajour presentation I gave this week at <a href="http://rubyonrails.com.au/">Sydney Ruby Oceania group</a> are <a href="http://www.slideshare.net/toolmantim/introducing-bananajour">up on slideshare</a> and be sure to check out the readme on the <a href="http://github.com/toolmantim/bananajour">github project page</a> for more info on usage and hacking instructions. Support, feature discussions and rants should be forwarded to the <a href="http://groups.google.com/group/bananajour">bananajour google group</a>.</p>
        
        <p><a href="http://carlahackettdesign.com/">Carla Hackett</a>, the brain behind <a href="http://railscamptee.com/">railscamp tee 1, 2</a> and <a href="http://railscampteev3.agencyrainford.com/">3</a>, is reponsible for the awesome logo. Hit her up for all your design lovin.</p>
        
        <p>The Bananajour aggregation app, a central app to show the commit activity across the entire network, never got built in the end—it was worth pouring more love into Bananajour itself—but if someone is keen there's already a name and a logo for it: <strong>Bananarama</strong>!</p>
        
        <p>Oh, and keep an eye out for the peanut.</p>
        
        <p><img src="http://toolmantim.com/images/articles/bananajour/peanut.png" alt="Peanut" /></p>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/im_a_little_teapot</id>
    <title type="html">I'm a little teapot</title>
    <published>2009-01-15T00:00:00+11:00</published>
    <updated>2009-01-15T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/im_a_little_teapot" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Like any good standards-based teapot <a href="http://toolmantim.com/">toolmantim.com</a> is now compliant with <a href="http://tools.ietf.org/html/rfc2324#section-2.3.2">Section 2.3.2</a> of <span class="caps">RFC2324</span>: the Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0).</p>
        
        
        	<p>You too can be a good teapot citizen thanks to a ruby gem so fresh out of the oven it’ll burn your fingers: <a href="http://github.com/toolmantim/teapot/">teapot</a>—a new piece of innovative <a href="http://rack.rubyforge.org/">Rack</a> middleware technology enabling you to do such feats as:</p>
        
        
        <pre><code class="shell">
$ curl -i -X BREW toolmantim.com
HTTP/1.1 418 I'm a teapot
Date: Thu, 15 Jan 2009 13:31:30 GMT
Server: Apache
Vary: User-Agent
Content-Length: 36
Content-Type: text/plain; charset=UTF-8

Care for a cup of English Breakfast?
</code></pre>
        
        	<p>Alternative Ruby teapot implementations of <span class="caps">RFC3224</span> include <a href="http://rails.lighthouseapp.com/projects/8994/tickets/1556">a patch to Rails</a> by <a href="http://chrislloyd.com.au/">Chris Lloyd</a> and the <a href="http://github.com/harukizaemon/acts_as_teapot">acts_as_teapot plugin</a> by <a href="http://www.redhillconsulting.com.au/blogs/simon/">Simon Harris</a>.</p>
        
        
        	<p>Those wanting a more short and stout implementation are advised to architect their own solutions. Frankly I think it’s much more polite to offer a cup of tea than waving your arms about like a flaming galah.</p>
        
        
        	<p>See the <a href="http://github.com/toolmantim/teapot/">readme on github</a> for installation instructions and teapot-enable your Rack application today!</p>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/refreshed-realigned-and-ready-for-09</id>
    <title type="html">Refreshed, realigned and ready for 2009</title>
    <published>2009-01-04T00:00:00+11:00</published>
    <updated>2009-01-04T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/refreshed-realigned-and-ready-for-09" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>It was over 2.5 years ago I did anything major to toolmantim.com. For the last 2.4 years I’ve wanted to redesign it and the past 1.5 years I’ve wanted to re-code it. Top that off with working on the new (but yet to be released) <a href="http://agencyrainford.com">Agency Rainford</a> site and Carla’s <a href="http://hellotherecanary.com">Hello Canary</a> I’d had enough and found some hours between <a href="http://flickr.com/photos/toolmantim/3142586197/">Squatter</a> and <a href="http://flickr.com/photos/toolmantim/3134787020/">ridiculously well-decorated desserts</a> these holidays to get something new up.</p>
        
        
        	<h2 id="menki">Menki</h2>
        
        
        <div class="pic right two">
          <a href="http://www.flickr.com/photos/toolmantim/3161120053/"><img src="http://farm4.static.flickr.com/3106/3161120053_1f13717bf7_m.jpg" width="142" height="240" alt="The Menki design" /></a>
        </div>
        
        	<p>It was about 9 months ago I started writing <a href="http://github.com/toolmantim/menki">Menki</a>, the <a href="http://enkiblog.com/">Enki</a>-inspired blogging software that was never to be. <a href="http://github.com/hassox">hassox</a> and <a href="http://lachstock.com.au/">lachlanhardy</a> pitched in with patches—hell, Lachlan even noticed a <span class="caps">PSD I</span>’d pushed and coded up the design for the Menki site w/o me even knowing—total dude. Though Menki wasn’t to be a few spare holiday hours pushing to github and here it is, the new toolmantim, shiny and ready for your viewing.</p>
        
        
        	<h2 id="ze-codes">Simplifying ze codes</h2>
        
        
        	<p>Releasing generalised code for reuse by other developers has never particularly interested me, I’m much more excited about doing the simplest thing possible and sharing my learnings with others similar to myself (teach a man to fish yakyakyak). The idea of creating and supporting blog software that has a bunch of features I have no use for quite frankly scares me.</p>
        
        
        	<p>My immediate requirements were simple:</p>
        
        
        	<ol>
        	<li>Create and preview articles (the last revision of toolmantim had this, as well as auto-saving of drafts)</li>
        		<li>All style and site changes as I authored an article</li>
        		<li><span class="caps">ATOM</span> for the articles</li>
        		<li>A mechanism for article feedback</li>
        	</ol>
        
        
        	<p>From <a href="http://github.com/toolmantim/toolmantim/tree/master/Readme.textile">the readme</a>:</p>
        
        
        <blockquote>
          <p>The idea is that you want publishing to be previewable, simple and versioned. You want to be able to tweak the appearance of your site as you produce more complex articles. You want to simply add an image to your site, not build a whole admin providing file uploads. The major downside (if it is indeed at all a downside) is to publish you need access to your repo so you can git commit and cap deploy, though I could imagine using github’s web editing features to add articles and trigger a site update w/o touching a terminal.</p>
          <p>It’s somewhat similar to <a href="http://github.com/karmi/marley">Marley</a> and other sintra-based blogging apps with the following big exceptions:</p>
          <ul>
            <li>You can use any markup format thanks to <span class="caps">HAML</span>’s filters (e.g. <code>:markdown</code>)</li>
            <li>There is no commenting. This forces more quality feedback via email and other blog posts, forces you to properly integrate feedback into the article and avoids the maintenance headache of comment spam.</li>
          </ul>
        </blockquote>
        
        	<p>Feel free to steal and plunder, and you’ve <a href="http://github.com/search?q=blog">plenty of other options</a> if you want something different. If you’re keen to use it or see something extracted then give me a holler.</p>
        
        
        	<h2 id="new-design">A new design</h2>
        
        
        	<p>Luckily I have the honour to work with some brilliant designers and don’t often get a chance to give design and front-end coding some time. Things like setting up <a href="http://toolmantim.com/?grid">a grid</a> (props to <a href="http://24ways.org/2008/making-modular-layout-systems"><span class="caps">JSM</span>’s 24ways post</a>), fidgeting with source order and wearing my finger out with trackpad photoshopping has been jolly good fun. This new design borrows heavily where the Menki design left off.</p>
        
        
        	<p>There’s still more work to do on the article layout—for example I’d like to have a left gutter for small images—but it’s a good start.</p>
        
        
        	<p>It would have been a shame to let the Menki logo and website join its cousins in the land of designs-never-published—after all, it was bashed together from the kitchen table of <a href="http://nerfpalace.org/">the nerf palace</a>.</p>
        
        
        	<h2 id="comments-and-discussion">Comments and discussion</h2>
        
        
        	<p>I’ve debated long and hard about whether to include comments and what value they give the site. Different types of feedback require different tools and consideration and I think it’s the mishmash of all the types of feedback which makes comments ultimately too unwieldy.</p>
        
        
        	<h3>Errors and ommissions</h3>
        
        
        	<p>Many of the technical articles are old, such as a <a href="http://toolmantim.com/articles/getting_rails_talking_to_sqlserver_on_osx_via_odbc">Getting Rails talking to SQLServer on <span class="caps">OSX</span> via <span class="caps">ODBC</span></a>, and discussing software I haven’t touched since writing about it. Errors and corrections end up in the comments and once the article is updated there’s a spattering of redundant comments. Comments like these should simply be integrated and discarded, so I’m choosing to leave these to email.</p>
        
        
        	<h3>Open-ended discussions</h3>
        
        
        	<p>I’ve tried spurring a discussion by an article which poses a question, such as <a href="http://toolmantim.com/articles/full_blown_apis_with_respond_to">Full-blown APIs with respond_to?</a></p>
        
        
        	<p>I’d much prefer to email people I know or a mailing list—this small corner of the web is definitely not the right place for this kind of discussion.</p>
        
        
        	<h3>Social commentary and congratulations</h3>
        
        
        	<p>They feel good to leave and to receive but twitter is probably more suited to these, especially when most of the time they’re from friends.</p>
        
        
        	<h3>Social media and openness</h3>
        
        
        	<p>And then there’s that whole <a href="http://liako.biz/2008/12/thank-you-2008-you-finally-gave-new-media-a-name/">Social Media thang</a>.</p>
        
        
        	<p>Open conversations and accountability are important—I like that if you disagree with your standard blog post you can just have a rant right there in the textarea.</p>
        
        
        	<p>Making tools to do this well is hard: live preview, update notifications, spam management, etc. I just don’t want to spend my time writing and maintaining that code.</p>
        
        
        	<p>Twitter is too brief, emails too closed and you can always publish your thoughts in an article (it’s been <a href="http://gilesbowkett.blogspot.com/2007/05/rails-developers-junior-and-senior.html">done before</a>)... so I’m not sure what the answer is. I’ve thought of integrating <a href="http://disqus.com/">disqus</a> but I’m not sure that’s the right answer either.</p>
        
        
        	<p>In the mean time I’ve included the old comments in the articles until I converge on some kind of consensus.</p>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/how_to_start_building_a_website_for_your_business</id>
    <title type="html">How to start building a website for your business</title>
    <published>2008-12-26T00:00:00+11:00</published>
    <updated>2008-12-26T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/how_to_start_building_a_website_for_your_business" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Having recently worked on <a href="http://hell,otherecanary.com/">Hello Canary</a> and the yet-to-be-launched <a href="http://agencyrainford.com/">Agency Rainford</a> and <a href="http://numberhouse.com.au/">Number House</a> sites I wanted to jot down my ideas for how you should start to approach building a brochure-style site for your own business.</p>
        
        
        	<p>The purpose is to provide a first-step in thinking about your site from a user-centred frame of mind.</p>
        
        
        	<p>This is very much a first draft so feel free to tear it apart, leave comments and send patches:</p>
        
        
        	<p><strong><a href="http://gist.github.com/40002">How to build a website</a></strong></p>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/geekery_catchup</id>
    <title type="html">Geekery catchup</title>
    <published>2008-12-02T00:00:00+11:00</published>
    <updated>2008-12-02T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/geekery_catchup" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>It’s been a busy few months.</p>
        
        
        	<p>September saw <a href="http://www.webdirections.org/">Web Directions</a> where I gave a preso with <a href="http://www.c41.com.au/">Pete Ottery</a> on <a href="http://www.slideshare.net/toolmantim/developing-for-iphone-presentation">Developing for the iPhone</a> as well as <a href="http://webjam.com/webjam8">Webjam 8</a>.</p>
        
        
        	<p>November saw <a href="http://www.edgeoftheweb.org.au/">Edge of Web</a> in Perth where <a href="http://www.slideshare.net/toolmantim/developing-for-the-iphone-presentation">I presented again on the iPhone</a>, though this time without Pete, as well as <a href="http://webjam.com.au/webjam9">Webjam 9</a> in Perth Western Australia, after which I flew direct to <a href="http://railscamps.com/">Railscamp</a> in Adelaide for a <a href="http://flickr.com/photos/toolmantim/sets/72157609406563810/">weekend of drunken hacking</a>.</p>
        
        
        	<p>Now with all that behind me (bar fellow <a href="http://agencyrainford.com/">AR</a> Mike’s <a href="http://www.osdc.com.au/2008/papers/index.html">presentation on Story Driven Web Development</a> at <a href="http://www.osdc.com.au/"><span class="caps">OSDC</span></a> on Thursday) and <a href="http://hellotherecanary.com/">Carla’s new website</a> having launched this morning I’m finally able get back to a semi-sane lifestyle and at least post my presentations and thoughts from all this geekery.</p>
        
        
        	<h2>Web Directions 2008</h2>
        
        
        	<p><a href="http://flickr.com/photos/roguemm/2890118028/"><img src="http://farm4.static.flickr.com/3112/2890118028_b7e822fae2.jpg" title="Pete and Tim" alt="Pete and Tim" /></a></p>
        
        
        	<p>Unfortunately <a href="http://themaninblue.com/">Cameron</a> and I didn’t do our usual last-minute-social-network-hackfest for the conference attendees because I was peaking out about my presentation and I was busy building something else.</p>
        
        
        	<p>After the conference organisers vowed to get a penny out of me for attending this year they came back begging, asking Pete and I to present on “something iphone” seeing as we’d recently launched <a href="http://iphone.news.com.au/">iphone.news.com.au</a>.</p>
        
        
        	<p>Having only built iphone.news.com.au and having to make many-a-compromise I felt a little under-experienced to be talking best-practice, and also slightly hypocritical in saying “do as I say not as I do” so I set out to design and build another app from scratch.</p>
        
        
        	<p><a href="http://www.slideshare.net/toolmantim/developing-for-iphone-presentation"><img src="http://cdn.slideshare.net/wd-iphone-combined-for-slideshare-1222737902765562-8-thumbnail?1224420241" class="thumb" title="Presentation slides" alt="Presentation slides" /></a></p>
        
        
        	<p>I was intending on building my own iphone JS framework with a design that I actually agreed with but ended up concluding that all that front-end framework junk is a total waste of time unless you’re prototyping native iphone applications (for more explanation see my <a href="http://www.slideshare.net/toolmantim/developing-for-the-iphone-presentation">Edge of the Web preso</a>).</p>
        
        
        	<p>I needed to build an iphone version of a site that already existed, was somewhat-interesting and that I had complete creative control over—<a href="http://webjam.com.au/">the Webjam site</a> was the obvious candidate.</p>
        
        
        	<p>If you browse to the webjam website on your iphone or ipod touch, or browse on your desktop to <a href="http://webjam.com.au/">webjam.com.au/home.mobile</a>, you’ll see what I built: simple handset-agnostic styling, fat-finger-friendly links, context-sensitive cross-linking between regular and mobile site, non-obstrusive JS photo browsing and other bits and pieces.</p>
        
        
        	<p>The presentation I gave was the first half of a two-part preso. You can find <a href="http://www.slideshare.net/toolmantim/developing-for-iphone-presentation">the slides complete with audio on Slideshare</a>.</p>
        
        
        	<h2>Webjam 8</h2>
        
        
        	<p><a href="http://www.flickr.com/photos/charliebrewer/2898729610/"><img src="http://farm4.static.flickr.com/3029/2898729610_9a47e50b85.jpg" title="Webjam 9 - Bar Broadway - Sydney" alt="Webjam 9 - Bar Broadway - Sydney" /></a></p>
        
        
        	<p>After the post-conference drinks on the final night of the conference we had our first <a href="http://webjam.com.au/">Webjam</a> for almost exactly a year.</p>
        
        
        	<p>Mad props to <a href="http://lstoll.net/">Lincoln</a>, <a href="http://lachstock.com.au/">Lachlan</a>, <a href="http://scenariogirl.com/">Lisa</a> and everyone else who pitched in to the site (which <span class="caps">FYI</span> can be found at <a href="http://github.com/webjam/webjam">github.com/webjam/webjam</a>).</p>
        
        
        	<p>I ran the <span class="caps">SMS</span> voting as per usual (thanks to <a href="https://www.directsms.com.au/">DirectSMS</a> hooking us up again with a number) and we had <a href="http://webjam.com.au/news/2008/webjam8-mixes-it-up">19 awesome presos</a>.</p>
        
        
        	<p>Good times.</p>
        
        
        	<h2>Edge of the Web</h2>
        
        
        	<p><a href="http://www.edgeoftheweb.org.au/">Another conference</a>, another presentation… very similar to the Web Directions one but much more focused and I think I came across much clearer. It was an almost completely new presentation with a bit more of a balanced view.</p>
        
        
        	<p>If you’re developing a mobile or iphone version of an existing site I highly recommend having a squiz at <a href="http://www.slideshare.net/toolmantim/developing-for-the-iphone-presentation/">my presentation</a>.</p>
        
        
        	<p>I was pretty impressed with what they pulled off for a first-time conference, though it would have been good to have a bit more of a specific angle on the whole event… a <a href="http://rubyfringe.com/">rubyfringe</a> style event: webfringe?</p>
        
        
        	<h2>Webjam 9</h2>
        
        
        	<p><a href="http://flickr.com/photos/kaysmoljak/3025213360/"><img src="http://farm4.static.flickr.com/3189/3025213360_40d026b745.jpg" title="Web Jam 9: working the room" alt="Web Jam 9: working the room" /></a></p>
        
        
        	<p>From zero webjams in 12 months to two webjams in two months—<a href="http://webjam.com.au/webjam9">Webjam 9</a> went off without a hitch in a mad old uni bar with some really good presos (including Darcy’s very cool <a href="http://blog.ninjahideout.com/posts/the-laughing-bird">Ruby-powered twitter to <span class="caps">IRC</span> bridge</a>).</p>
        
        
        	<h2>Railscamp 4</h2>
        
        
        	<p><a href="http://www.flickr.com/photos/toolmantim/3042078715/" title="Mad scientist by toolmantim, on Flickr"><img src="http://farm4.static.flickr.com/3195/3042078715_2a4ec9ec3e.jpg" width="500" height="333" alt="Mad scientist" /></a></p>
        
        
        	<p>All the required Railscamp ingredients: a weekend away w/o internet, a case of pale ale, a 12-pack of rum &amp; coke, 70 or so peeps with 60 or so mac lappies, a shite-load of <a href="http://github.com/benschwarz/gitjour/tree/master">gitjour</a>.</p>
        
        
        	<p>Ryan, the most awesome host, did <a href="http://frozenplague.net/2008/11/railscamp-4/">a write  of what goes into running an event like this</a> and <a href="http://flickr.com/photos/tags/railscamp4">the railscamp4 flickr tag</a> will give you a good idea of how awesome it was.</p>
        
        
        	<p>Of course the logical thing after all this was to do a straight 20hr drive home with 5 people in a tiny car:</p>
        
        
        	<p><a href="http://www.flickr.com/photos/toolmantim/3045342238/" title="Band of Brothers or Band of Fools? by toolmantim, on Flickr"><img src="http://farm4.static.flickr.com/3224/3045342238_08d64b84db.jpg" width="500" height="333" alt="Band of Brothers or Band of Fools?" /></a></p>
        
        
        	<h2>and finally… Agency Rainford</h2>
        
        
        	<p>This year has been a bit of whirlwind and I haven’t had a chance to announce to the world what Michael and I are building over here.</p>
        
        
        	<p>Michael and I formed <a href="http://agencyrainford.com/">Agency Rainford</a> earlier this year in an effort to be a bit smarter about our development work, chomp off larger projects involving many of the great people we know in the ozzie web and Ruby community and to take projects on from start-to-finish rather than just as hired guns for development.</p>
        
        
        	<p>Both Mike and I had previously loved working on <a href="http://culturalawards2008.lgsa.org.au/">Cultural Awards 2008</a> and other such projects where a small team of designers and developers own the problem from start-to-finish: everything from finding requirements, conceptual design, visual design and build.</p>
        
        
        	<p><a href="http://flickr.com/photos/cood/2786126424/"><img src="http://farm4.static.flickr.com/3078/2786126424_8809c5194f.jpg" title="The AR Stamp" alt="The AR Stamp" /></a></p>
        
        
        	<p>We knew this ninja-team approach worked really well and after an opportunity to help <a href="http://www.pearsoned.com.au/">Pearson Education Australia</a> bring their textbooks to the United Arabs Emirates we got the ball rolling, hired Carla to do <a href="http://hellotherecanary.com/portfolio/agency-rainford-branding/">a most-awesome brand</a>, I finished up with <a href="http://vtalk.net/">vtalk</a>, we gathered <a href="http://flickr.com/photos/toolmantim/2717866289/">some great guys</a> and worked our asses off to deliver an app for Pearson in a crazy-short amount of time.</p>
        
        
        	<p>Now we’re starting the Aussie version for Pearson with a new team and a new approach to the problem, and alongside this we’re busy figuring out the process of scaling the AR ninja-team approach to larger projects.</p>
        
        
        	<p>Next year we’re keen to start looking at some office space where we can get a great bunch of people together (anybody got a chunk of decent space in Surry Hills suitable for 8 or so desks and <a href="http://workatjelly.com/">Jelly’s</a> every fornight?) and then <a href="http://sxsw.com/"><span class="caps">SXSW</span></a> in March with a 7 day road trip afterwards.</p>
        
        
        	<p>...and our website sometime soon too.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1556">
              <p class="author">
                <a href="http://www.yob.id.au">James Healy</a>
              </p>
              <div class="body">
                <p>Interesting. My day job is in the book industry, and the company I work for does some business with Pearson.</p>
                
                
                	<p>Looking forward to seeing what you do with their site.</p>
              </div>
            </li>
            <li id="comment_1557">
              <p class="author">
                <a href="http://hughevans.net">Hugh</a>
              </p>
              <div class="body">
                <p>Yeah its interesting, we do some work with Pearson as well. I’m off to see them in Minneapolis again in January. Minus 20 degrees C, should be fun :/</p>
                
                
                	<p>Carla’s design work is sensational <span class="caps">BTW</span> :)</p>
              </div>
            </li>
            <li id="comment_1558">
              <p class="author">
                Pete Ottery
              </p>
              <div class="body">
                <p>was great to see you work your way thru the whole ‘how to approach iphone dev’  question.</p>
                
                
                	<p>and best of luck with the whole agency rainford thing. not that you’ll need it ;-)</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/fixtureless_datas_with_machinist_and_sham</id>
    <title type="html">Fixtureless datas with Machinist and Sham</title>
    <published>2008-10-27T00:00:00+11:00</published>
    <updated>2008-10-30T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/fixtureless_datas_with_machinist_and_sham" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Not long ago <a href="http://notahat.com/">Pete Yandell</a> bestowed upon us an alternative to <a href="http://github.com/thoughtbot/factory_girl">FactoryGirl</a> and other fixture methods: <a href="http://github.com/notahat/machinist/">Machinist</a>.</p>
        
        
        	<p>Unfortunately I hadn’t had a chance to check it out before my <a href="http://faces.rubyonrails.com.au/groups/sydney/meetings/2008-10-08/presos/2">Cucumbers and Factory Girls presentation last month at <span class="caps">RORO</span> Sydney</a> so I couldn’t say much about it, but I’ve just started using for the 2009 revision of the <a href="http://culturalawards.lgsa.org.au/"><span class="caps">LGSA</span> Cultural Awards</a> website.</p>
        
        
        	<h2>What’s Machinist?</h2>
        
        
        	<p>Equipped with a <code>Lathe</code>, Machinist allows you to craft beautifully valid and well-populated ActiveRecord models.</p>
        
        
        	<p>It’s extremely handy if you want an alternative to <span class="caps">YML</span> fixtures or you’re sick seeing the ugly <code>save(false)</code>.</p>
        
        
        	<p>Machinist also includes Sham: a class allowing to you to create repeatable dummy data for your text fixtures. Sham helps to remove magic strings whilst ensuring your test data is deterministic.</p>
        
        
        	<h2>Installing Machinist</h2>
        
        
        	<p>It’s a Rails plugin, so simply:</p>
        
        
        <code>./script/plugin install git://github.com/notahat/machinist.git</code>
        
        	<p>Then create your <code>spec/blueprint.rb</code> and require it from your <code>spec/spec_helper.rb</code> like so:</p>
        
        
        <pre><code class="ruby">require File.join(File.dirname(__FILE__), 'blueprint')</code></pre>
        
        	<p>Similarly for your <code>features/steps/env.rb</code>:</p>
        
        
        <pre><code class="ruby">require File.join(RAILS_ROOT, 'spec', 'blueprint')</code></pre>
        
        	<h2>Defining your blueprints</h2>
        
        
        	<p>Machinist extends <code>ActiveRecord::Base</code> with the class methods <code>blueprint</code>, for defining the blueprint:</p>
        
        
        <pre><code class="ruby">
Post.blueprint do
  title "Hello world" 
  text "&lt;p&gt;Hello there&lt;/p&gt;"*3
  slug "some-slug" 
  published_on Date.today
end
</code></pre>
        
        	<p>and <code>make</code>, for creating objects from the blueprint:</p>
        
        
        <pre><code class="ruby">
post = Post.make
post.new_record? #=&gt; false
post.title #=&gt; "Hello world" 
</code></pre>
        
        	<h2>Sham on you!</h2>
        
        
        	<p>Machinist includes Sham: a class allowing to you to create repeatable dummy data for your text fixtures.</p>
        
        
        	<p>You define your sham’s like so (here we’re using the Faker gem):</p>
        
        
        <pre><code class="ruby">
Sham.title { Faker::Lorem.sentence }
Sham.body { Faker::Lorem.paragraphs }
Sham.slug { Faker::Lorem.words(1).first.downcase }
</code></pre>
        
        	<blockquote>
        		<p><em>Note: shamelessness is also obtainable through the addition of a single letter:</em> <code>uninitialized constant Shame (NameError)</code></p>
        	</blockquote>
        
        
        	<p>Using your shams in your blueprint is easy:</p>
        
        
        <pre><code class="ruby">
Post.blueprint do
  title { Sham.title }
  text { Sham.body }
  slug { Sham.slug }
  published_on Date.today
end
</code></pre>
        
        	<p>You don’t have to use Faker in your sham—to generate a random date you could simply do:</p>
        
        
        <pre><code class="ruby">
Sham.date do
  Date.civil((1990...2009).to_a.rand,
             (1..12).to_a.rand,
             (1..28).to_a.rand)
end
</code></pre>
        
        	<p>and use it in your blueprint just like the others:</p>
        
        
        <pre><code class="ruby">
Post.blueprint do
  title { Sham.title }
  text { Sham.body }
  slug { Sham.slug }
  published_on { Sham.date }
end
</code></pre>
        
        	<h2>Using them with specs and features</h2>
        
        
        	<p>To use your blueprints in your specs simply call <code>make</code>:</p>
        
        
        <pre><code class="ruby">
describe "Blog#to_param" do
  it "returns 'year-slug'" do
    blog = Blog.make
    blog.to_param.should == "#{blog.year}-#{blog.slug}" 
  end
end
</code></pre>
        
        	<p>It’s exactly the same for features/stories:</p>
        
        
        <pre><code class="ruby">
Given "there's a blog post" do
  Post.make
end
</code></pre>
        
        	<h2>How does it compare to FactoryGirl?</h2>
        
        
        	<p>Machinist’s syntax is definitely cleaner. The equivalent blueprint in FactoryGirl looks like:</p>
        
        
        <pre><code class="ruby">
Factory.define :post do |p|
  u.title "Hello world" 
  p.text "&lt;p&gt;Hello there&lt;/p&gt;"*3
  p.slug "some-slug" 
  p.published_on Date.today
end
</code></pre>
        
        	<p>or more realistically:</p>
        
        
        <pre><code class="ruby">
Factory.define :post do |p|
  p.title "Hello world" 
  p.text "&lt;p&gt;Hello there&lt;/p&gt;"*3
  p.slug { Factory.next(:slug) }
  p.published_on { Factory.next(:published_on_date) }
end

Factory.sequence(:slug) {|n| "slug-#{n}"}
# ...
</code></pre>
        
        	<p>To generate sequences in sham you simply accept a block parameter, for example:</p>
        
        
        <pre><code class="ruby">
Sham.slug {|n| "slug-#{n}" }
</code></pre>
        
        	<p>Machinist’s ways of defining associations are also much cleaner if everything matches up:</p>
        
        
        <pre><code class="ruby">
Comment.blueprint do
  post
end
</code></pre>
        
        	<p>and if you’ve an association with a custom <code>class_name</code> you can call <code>make</code> yourself:</p>
        
        
        <pre><code class="ruby">
Post.blueprint do
  author { User.make }
end
</code></pre>
        
        	<h2>Contribute or follow development</h2>
        
        
        	<p>The <a href="http://github.com/notahat/machinist">machinist github repo</a> is the best place to start.</p>
        
        
        	<p>You could even move <a href="http://github.com/webjam/webjam/tree/master/spec/factories.rb ">webjam’s <code>spec/factories.rb</code></a> to Machinist and send a pull request if you’re really keen ;)</p>
        
        
        	<p>If you’re a Victorian head to the <a href="http://groups.google.com/group/rails-oceania/browse_thread/thread/bf70bf2d254f1987">October Melbourne <span class="caps">RORO</span> meetup</a> where Pete will be demonstrating how to lathe Ruby objects with his new contraption.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1542">
              <p class="author">
                <a href="http://notahat.com/">Pete Yandell</a>
              </p>
              <div class="body">
                <p>Thanks for the write-up! A few things to add that haven’t made it into the documentation yet:</p>
                
                
                	<p>A blueprint should take care of creating all the data that your test doesn’t care about, leaving you to define the data that it does care about in the test setup. For example, you might have an editable flag on a comment and want to write some tests for it. In your test you want to be able to write:</p>
                
                
                <pre>
@comment = Comment.make(:editable =&gt; true)</pre>
                
                	<p>But a comment can’t exist without an author, and some body text, and a post. So you put those in the blueprint:</p>
                
                
                <pre>
Comment.blueprint do
  post { Post.make }
  author { Sham.author_name }
  body { Sham.comment_body }
end</pre>
                
                	<p>You can even abbreviate this to:</p>
                
                
                <pre>
Comment.blueprint do
  post
  author { Sham.author_name }
  body { Sham.comment_body }
end</pre>
                
                	<p>Machinist will automatically do the Post.make for you.</p>
                
                
                	<p>You mentioned that Machinist doesn’t have sequence generation. Wrong! Sham lets you do this:</p>
                
                
                <pre>
Sham.author_name {|index| "Author number #{index}" }</pre>
                
                	<p>There will be some more extensive docs (and probably a screencast) on all of this sometime soon.</p>
              </div>
            </li>
            <li id="comment_1544">
              <p class="author">
                <a href="http://toolmantim.com/">Tim Lucas</a>
              </p>
              <div class="body">
                <p>thanks Pete.</p>
                
                
                	<p>That’s rockin, I didn’t know about the sequence generation.</p>
                
                
                	<p>I’ve updated the Machinist vs FactoryGirl section with new details and examples.</p>
              </div>
            </li>
            <li id="comment_1545">
              <p class="author">
                <a href="http://mocra.com">Dr Nic</a>
              </p>
              <div class="body">
                <p>We’re using machinist + faker. They make me happy.</p>
              </div>
            </li>
            <li id="comment_1546">
              <p class="author">
                <a href="http://openmonkey.com/">Tim Riley</a>
              </p>
              <div class="body">
                <p>Hi all, and thanks for the informative post, Tim!</p>
                
                
                	<p>I’ve been using Faker’s Lorem Ipsum generator to generate seed data in my apps. I got a bit tired of looking at the unrealistic Latin through the app, so I ended up using markov chains &amp; real english source data to generate more realistic looking seed data. This might be worth a look if you’re using Faker for more than just populating models in your tests.</p>
                
                
                	<p>I wrote up the approach here: http://log.openmonkey.com/post/55783578/using-markov-chains-to-provide-english-language-seed</p>
              </div>
            </li>
            <li id="comment_1547">
              <p class="author">
                <a href="http://openmonkey.com/">Tim Riley</a>
              </p>
              <div class="body">
                <p>Sorry, here is the link formatted to be click-friendly :)</p>
                
                
                	<p><a href="http://log.openmonkey.com/post/55783578/using-markov-chains-to-provide-english-language-seed">Using Markov Chains to provide English language seed data for your Rails application</a></p>
              </div>
            </li>
            <li id="comment_1549">
              <p class="author">
                Sam Livingston-Gray
              </p>
              <div class="body">
                <p>Your equivalent FactoryGirl samples all call methods on p, except for the first line (“u.title [...]”).  Typo?</p>
              </div>
            </li>
            <li id="comment_1550">
              <p class="author">
                <a href="http://toolmantim.com/">Tim Lucas</a>
              </p>
              <div class="body">
                <p>@drnic happy is good. Good is happy.</p>
                
                
                	<p>@timriley nice… interesting about Markov. For sample data that’d be mighty handy.</p>
                
                
                	<p>@sam: yep, a typo. Fixed and thanks!</p>
              </div>
            </li>
            <li id="comment_1553">
              <p class="author">
                <a href="http://johnjwright.com">John Wright</a>
              </p>
              <div class="body">
                <p>Any idea how to use this from <span class="caps">IRB</span>?  I think it would be convenient for testing out different scenarios in irb as well.</p>
              </div>
            </li>
            <li id="comment_1554">
              <p class="author">
                <a href="http://toolmantim.com/">Tim Lucas</a>
              </p>
              <div class="body">
                <p>@johnwright: yeah you should be able to simply <code>require 'spec/blueprint'</code> and off you go.</p>
              </div>
            </li>
            <li id="comment_1555">
              <p class="author">
                John Wrigt
              </p>
              <div class="body">
                <p>Yes, that works assuming your <span class="caps">RAILS</span>_ENV=test so that machinists and sham are required and the machinist module is included in ActiveRecord::Base as is done in vendor/plugins/machinists/init.rb.</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/roro_august_meetup_roundup_and_my_preso_slides</id>
    <title type="html">RORO August meetup roundup and my preso slides</title>
    <published>2008-08-14T00:00:00+10:00</published>
    <updated>2008-08-14T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/roro_august_meetup_roundup_and_my_preso_slides" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>At the <a href="http://rubyonrails.com.au/2008/8/2/sydney-meetup-august-2008"><span class="caps">RORO</span> Sydney meetup</a> last night we had an awesome line-up of presos, a new venue and a really fun vibe… it’s feeling more like a webjam than a tech meetup!</p>
        
        
        	<p>I gave a presentation on the process we went through to improve the performance of <a href="http://iphone.news.com.au">iphone.news.com.au</a>. Grab the <a href="http://toolmantim.com/files/presentations/2008_08_13/Tim%20Lucas%20-%20Improving%20Performance%20of%20iphone.news.com.au.pdf"><span class="caps">PDF</span> of the slides</a> or you can check it out on <a href="http://www.slideshare.net/toolmantim/improving-performance-of-iphonenewscomau">SlideShare</a> if that’s your thang.</p>
        
        
        	<p><a href="http://faces.rubyonrails.com.au/users/101-xaviershay">Xavier Shay</a> gave a preso on why Mephisto is no good if you’re a developer building a blog and why you wanna get a good base, fork it and build on it in vanilla Rails.</p>
        
        
        	<p><a href="http://faces.rubyonrails.com.au/users/52-carlw2">Carl Woodward</a> gave a super quick demo of <a href="http://www.djangoproject.com/">Django</a> which I’m hoping he’ll have a chance to flesh out next month.</p>
        
        
        	<p><a href="http://faces.rubyonrails.com.au/users/51-Andys%5E">Andrew Snow</a> gave a juicy preso on Ruby Metaprogramming and mentioned one thing that had never occured to me.</p>
        
        
        <pre><code class="ruby">Person.instance_eval do
  # ... add some class methods
end</code></pre>
        
        	<p><a href="http://faces.rubyonrails.com.au/users/19">David Lee</a> fought off the hecklers and glitches to give a whirlwind console demo of getting up and running with <a href="http://git.or.cz/">Git</a> which was a lot of fun. I vote for having one super-of-the-moment console demo every month if we can find brave enough souls.</p>
        
        
        	<p>... and the big announcement, another <a href="http://railscamp08.org/">Rails Camp</a> is going down in Adelaide in November and numbers are limited so start cajoling your respective financiers sooner rather than later.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1525">
              <p class="author">
                <a href="http://steveandglo.com">Steve Lead</a>
              </p>
              <div class="body">
                <p>I didn’t understand a word of your presentation (apart from iPhone) but I really liked the style – simple and elegant</p>
              </div>
            </li>
            <li id="comment_1526">
              <p class="author">
                <a href="http://toolmantim.com">Tim Lucas</a>
              </p>
              <div class="body">
                <p>thanks Steve! You can blame <a href="http://carlahackettdesign.com/">Carla</a> for the design.</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/why_things_have_been_a_little_quiet</id>
    <title type="html">Why things have been a little quiet…</title>
    <published>2008-07-11T00:00:00+10:00</published>
    <updated>2008-07-11T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/why_things_have_been_a_little_quiet" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="http://www.flickr.com/photos/toolmantim/2657287969/" title="Pete &amp; I had a baby by toolmantim, on Flickr"><img src="http://farm4.static.flickr.com/3163/2657287969_3c82fe1ebf_o.jpg" width="441" height="500" alt="Pete &amp; I had a baby" /></a></p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1511">
              <p class="author">
                <a href="http://www.grillpanda.com">Matt</a>
              </p>
              <div class="body">
                <p>Oh man, did it leave you with the runs?</p>
              </div>
            </li>
            <li id="comment_1512">
              <p class="author">
                <a href="http://www.sultanasandwich.com">James Hill</a>
              </p>
              <div class="body">
                <p>Awesome work… soon every company in aus will be lining up for!</p>
                
                
                	<p>@matt teehee… oooh it’s actually a London restaurant.. perhaps we should check it out.. Let’s take adam and say we’re going for something tame like sushi.</p>
              </div>
            </li>
            <li id="comment_1513">
              <p class="author">
                <a href="http://www.learnosity.com">Gav</a>
              </p>
              <div class="body">
                <p>That’ll teach you not to eat curry.
                Nice photo… you could be a hand model! ;-)</p>
              </div>
            </li>
            <li id="comment_1514">
              <p class="author">
                <a href="http://andyhoward.id.au">Andy Howard</a>
              </p>
              <div class="body">
                <p>Looks awesome mate, nice work!</p>
              </div>
            </li>
            <li id="comment_1515">
              <p class="author">
                <a href="http://drnicwilliams.com">Dr Nic</a>
              </p>
              <div class="body">
                <p>Very nice work. The fancy logo sites on my dashboard now.</p>
                
                
                	<p>Pity most of the headlines are too long to be readable! :)</p>
                
                
                	<p>Did you do the other sites too?</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/merb_mongrel_not_mongrel_merb</id>
    <title type="html">Merb → Mongrel, not Mongrel → Merb</title>
    <published>2008-05-30T00:00:00+10:00</published>
    <updated>2008-05-30T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/merb_mongrel_not_mongrel_merb" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>It might have been blazingly obvious to others but I only just got my head around what a production setup of <a href="http://www.merbivore.com/">Merb</a> involves. After wrecking my head dreaming up custom rackup files to run vendor’d edge Merb I finally realised I was thinkin old-skool.</p>
        
        
        	<p>Your typical Rails stack goes <em>balancer → mongrel → Rails</em>.</p>
        
        
        	<p>I naively went upon setting up something similar for a production Merb app: <em>balancer to thin to Merb</em>. This actually works just fine thanks to thin’s baked-in support for Merb… but it’s not really what you want. You’ll also find it hard to use frozen Merb.</p>
        
        
        	<p>Thanks to geniuses that are <a href="http://github.com/ezmobius/">ezra</a> and <a href="http://github.com/wycats/">yehuda</a>, to run merb in production is actually the same as development—you use <code>merb</code>!</p>
        
        
        	<p>Merb itself hooks up to which ever adapter you want it to speak to the web through… whether it be mongrel, thin, ebb or mycoolnewrackhandler.</p>
        
        
        	<p>so… what you really want to do is: <em>balancer → Merb → thin</em>.</p>
        
        
        	<p>A nice Merb deployment recipe that’s ticking along for me nicely at the moment:</p>
        
        
        	<ul>
        	<li><a href="http://nginx.net/">nginx</a> for vhosting, asset serving and proxying to the merb instances</li>
        		<li>merb booted using <a href="http://github.com/eldiablo/merb-manage/">merb-manage</a></li>
        		<li>the <a href="http://code.macournoyer.com/thin/">thin</a> merb adapter</li>
        	</ul>
        
        
        	<p>Soon I’ll chuck in <a href="http://haproxy.1wt.eu/">haproxy</a> for load balancing across merb instances.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1497">
              <p class="author">
                <a href="http://drnicwilliams.com">Dr Nic</a>
              </p>
              <div class="body">
                <p>Bahumbug. Nothing related to deployment is “blazingly obvious” :) All articles on the topic are justified.</p>
              </div>
            </li>
            <li id="comment_1498">
              <p class="author">
                <a href="http://hughevans.net">Hugh</a>
              </p>
              <div class="body">
                <p>Would thin’s support for unix socket connections still work in this setup do you think?</p>
              </div>
            </li>
            <li id="comment_1499">
              <p class="author">
                <a href="http://macournoyer.com">marcournoyer</a>
              </p>
              <div class="body">
                <p>@hugh you can use unix socket w/ thin form the merb script by specifying a path to a socket file for the -h option:</p>
                
                
                	<p>merb -a thin -h /tmp/thin.sock</p>
              </div>
            </li>
            <li id="comment_1500">
              <p class="author">
                <a href="http://hughevans.net">Hugh</a>
              </p>
              <div class="body">
                <p>@marcournoyer awesome, thin rocks. Thanks :)</p>
              </div>
            </li>
            <li id="comment_1504">
              <p class="author">
                <a href="http://bubbal.co.uk">Sam Nardoni</a>
              </p>
              <div class="body">
                <p>I know this comment is side tracking a little, but passenger (mod_rails) now supports rack. Have you thought about using that?</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/haml_merb_helpers_very_noice</id>
    <title type="html">HAML + Merb Helpers? Very noice.</title>
    <published>2008-04-17T00:00:00+10:00</published>
    <updated>2008-04-17T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/haml_merb_helpers_very_noice" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>A year after the <a href="http://merbivore.com">Merb</a> and <a href="http://haml.hamptoncatlin.com/"><span class="caps">HAML</span></a> gravy train whooshed by I’m finally giving them a run for their money.</p>
        
        
        	<p>...and whilst the snippet below may be old news to some, I’m sure there’s a bunch of us whom might not have had the pleasure of using both <span class="caps">HAML</span> and Merb Helpers.</p>
        
        
        	<p>Witness the following piece of view code:</p>
        
        
        <pre><code>%h2 New post

- form_for(@post, :action =&gt; url(:admin_posts)) do
  %p= text_control      :title,  :label =&gt; "Title" 
  %p= text_control      :slug,   :label =&gt; "Slug" 
  %p= text_area_control :body,   :label =&gt; "Body" 
  %p= select_control    :format, :label =&gt; "Format",
                                 :collection =&gt; Formatter.formatters, 
                                 :selected =&gt; MenkiConfig.default_post_format
  %p
    = submit_button "Publish" 
    = submit_button "Save as Draft" 
</code></pre>
        
        	<p>See the lack of block parameter on the <code>form_for</code>? Notice the <code>:label</code> option. A <code>select_control</code> whose <span class="caps">API</span> simply works. Very noice.</p>
        
        
        	<p>The end result:</p>
        
        
        <pre><code>&lt;h2&gt;New post&lt;/h2&gt;
&lt;form method="post" action="/admin/posts"&gt;
&lt;p&gt;
  &lt;label for="post_title"&gt;Title&lt;/label&gt;&lt;input type="text" class="text" name="post[title]" value="" id="post_title"/&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;label for="post_slug"&gt;Slug&lt;/label&gt;&lt;input type="text" class="text" name="post[slug]" value="" id="post_slug"/&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;label for="post_body"&gt;Body&lt;/label&gt;&lt;textarea name="post[body]" id="post_body"&gt;&lt;/textarea&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;label for="post_format"&gt;Format&lt;/label&gt;&lt;select name="post[format]" id="post_format"&gt;&lt;option value="html"&gt;html&lt;/option&gt;&lt;option value="textile"&gt;textile&lt;/option&gt;&lt;option value="markdown" selected="selected"&gt;markdown&lt;/option&gt;&lt;option value="haml"&gt;haml&lt;/option&gt;&lt;/select&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;button type="submit"&gt;Publish&lt;/button&gt;
  &lt;button type="submit"&gt;Save as Draft&lt;/button&gt;
&lt;/p&gt;
&lt;/form&gt;</code></pre>
        
        	<p>If you’re writing your own view code and not being handed <span class="caps">HTML</span> mockups, or you can get your designer to speak <a href="http://haml.hamptoncatlin.com/"><span class="caps">HAML</span></a>, I highly recommend checking it out.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1485">
              <p class="author">
                Jason
              </p>
              <div class="body">
                <p>Have tried <span class="caps">HAML</span> and <span class="caps">SASS</span> but ultimately felt adding another layer of cream on the cake did not make for a tastier cake.</p>
                
                
                	<p><span class="caps">HTML</span> is a basic building block. Many people understand it. It’s straight forward. Adding another level of abstraction complicates things. <span class="caps">HAML</span> is nice, but be careful!</p>
              </div>
            </li>
            <li id="comment_1530">
              <p class="author">
                Rob Mathews
              </p>
              <div class="body">
                <p><span class="caps">HAML</span> is taking stuff I just had all figured out, and making it impossible to do simple stuff like selects and forms, all to save a few characters. Very clever (not). Also, documentation of the basic stuff is crap. This site here is the first one I’ve seen that deigns to discuss how to write a form post in haml, for example.</p>
              </div>
            </li>
            <li id="comment_1531">
              <p class="author">
                <a href="http://toolmantim.com">Tim Lucas</a>
              </p>
              <div class="body">
                <p>Rob: the form markup above is Merb specific, not even template language specific, so if you’re using Rails the above probably won’t work.</p>
                
                
                	<p>Agreed that there could be some more beginner level <span class="caps">HAML</span> doccos… the RDoc’s isn’t the best thing at times.</p>
                
                
                	<p>In vanilla <span class="caps">HAML</span> a form post would look like:</p>
                
                
                <pre><code>
%form{:action =&gt; "/register", :method =&gt; "post"}
  %p
    %select{:name =&gt; "title"}
      %option{:value =&gt; "mr"} Mr
      %option{:value =&gt; "ms"} Ms
</code></pre>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/to_fork_or_branch</id>
    <title type="html">To Fork or Branch</title>
    <published>2008-04-17T00:00:00+10:00</published>
    <updated>2008-04-17T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/to_fork_or_branch" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <blockquote>
        		<p>Just because you can doesn’t mean you should.</p>
        	</blockquote>
        
        
        	<p>Once you get your mittens on a tool that can ease distributed development it’s very tempting to distribufy<sup><a href="#243-fn1">1</a></sup> everything but sometimes all you need is to intelligently use branching.</p>
        
        
        	<h2>The classic use case for multiple repositories</h2>
        
        
        	<p>One good example of the multiple repository setup is <a href="http://github.com/lifo/doc-rails/tree/master">Pratik’s Rails Documentation repository</a>, a fork of the Rails repository used to improve the documentation. Pratik can entrust people to contribute patches directly, as well as picking and choosing from people’s own repositories. As Pratik is part of Rails core he can merge patches back into the main repository at his own discretion. This setup helps the doc team rally around a single repository, lowers the perceived barrier to partipation (“woot he accepted my patch!”) and provides a network of trust.</p>
        
        
        	<p>Another example would be a project with a large development team consisting of several sub-teams.</p>
        
        
        	<p>The whole project has a grandaddy repository that is the beautiful, stable, deliverable code. Only the sub-team lead’s get commit access to the golden repository.</p>
        
        
        	<p>Each ninja-sub-team has their own repository with their own shared branches and their own copy of the golden repository’s master branch. They can see the activity of their team, set up systems around their own branches and there’s a definitive source for the sub-team’s work.</p>
        
        
        	<p>Every week each sub-team’s lead (aka “poor bastard”) would be responsible for pulling in all the changes from the golden master and integrating it with that week’s changes. Once everything is <span class="caps">AOK</span> and, assuming the team’s code passed QA, the lead pushes their changes up to the golden master. This distributed setup helps control the integration bottlenecks and enforces a network of trust and quality control.</p>
        
        
        	<p>Another good use case for creating separate repositories/forks is when you simply want to disconnect yourself from the team and go do your own thing, and simply working on a branch on the central repository won’t suit. You may end up rallying a team around whatever you’re doing, or you might not want others prying on your weirdo experiments.</p>
        
        
        	<h2>The two person team</h2>
        
        
        	<p>Take for example: the two person team working on a single repository. Hopefully you both trust one another and are in somewhat constant communication. You need tools which help you work independently whilst still integrating each other’s work efficiently.</p>
        
        
        	<p>One distriburific<sup><a href="#243-fn2">2</a></sup> way of setting it up would be each person has their own remote repositories accessible to the other person. On Github this would be the equivalent of forking a project, with two separate forks being developed and merged into on another.</p>
        
        
        	<p>This is setup is simple if you’re only trying to maintain a master branch, but when you start introducing stable/beta/experimental branches that you’re both contributing to and keeping in sync between repositories the overheads of managing and merging the repositories starts to outweigh any benefits of having them separate.</p>
        
        
        	<p>If your project needs a definitive source, and definitive “stable” and “beta” branches, so you can point to for deployments etc then chances are you want a centralised repository. This would be a different and slightly less distriburific setup, having a single remote repository which the two developers have access to commit to (on Github this would be the equivalent of adding collaborators to a repository), but it’s a lot less overhead to manage.</p>
        
        
        	<p>The single remote repository acts as the definitive source and can have the definitive stable/beta/experimental branches that you both need to collaborate on. There’s also the advantage that it’s much easier to keep track of development activity and what branches the other developer is working on.</p>
        
        
        	<p>Why you’d work around a single repository is for the same reasons a sub-team within a big project might work around a single repository: it eases collaboration between the team members and creates a definitive source.</p>
        
        
        	<h2>You want to be developing, not managing the development process</h2>
        
        
        	<p>Whilst it might seem fun for everybody to be forking and running their own repositories sometimes all you need are branches and a central repository. For trusted teams simply adding collaborators to your project brings less management overhead than having to manage merging their changes yourself. For larger teams, or wanting to split up sub-projects, or simply wanting to disconnect yourself from the team and do your own thing, sometimes separate repositories makes more sense.</p>
        
        
        	<p>It’s very tempting to distribufy<sup><a href="#243-fn1">1</a></sup> everything but sometimes all you need is to intelligently use branching.</p>
        
        
        <p id="243-fn1"><sup>1</sup> dis·trib·u·fy—the act of separating red and green M&amp;Ms.</p>
        
        <p id="243-fn2"><sup>2</sup> dis·trib·u·ri·fic—fantastically distributed in the most distributed way possible.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1480">
              <p class="author">
                Jeremy Pinnix
              </p>
              <div class="body">
                <p>Thanks Tim. This is a timely post as my small team just started using Git/Github today. The initial reaction was to fork our project, but we quickly found out that adding collaborators made more sense.</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/github_vs_gitorious_and_centralised_development_revisited</id>
    <title type="html">Github vs Gitorious and centralised development revisited</title>
    <published>2008-04-17T00:00:00+10:00</published>
    <updated>2008-04-17T00:00:00+10:00</updated>
    <link href="http://toolmantim.com/articles/github_vs_gitorious_and_centralised_development_revisited" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>This is somewhat of a follow on to my <a href="http://toolmantim.com/article/2008/3/31/moving_on_from_centralised_decentralised_development_or_whats_after_github_and_gitorious">previous criticisms of centralising decentralised development</a> where I was worried that services such as <a href="http://github.com/">Github</a> and <a href="http://gitorious.org/">Gitorious</a> were introducing unnecessary centralised workflows and dependencies.</p>
        
        
        	<p>Since then the <a href="http://weblog.rubyonrails.org/2008/4/11/rails-premieres-on-github">official Rails repo has moved to Github</a> and I’ve been <a href="http://github.com/toolmantim">slowly adding various tid-bits</a>, and having a bit more experience using Github I really like it, and much more so than Gitorious. I prefer the <code>/user/project</code> focus rather than Gitorious’s <code>/project/fork</code> focus, the activity timeline, and being able to ‘watch’ repos. Looking at the interface every day doesn’t give you a headache either.</p>
        
        
        	<p>...and none of this is to say that Gitorious doesn’t fill a need, or Gitorious isn’t good at what it does—we’ll be using a slightly hacked version to coordinate all the development at the upcoming <a href="http://railscamp08.org/">RailsCamp 08</a> and I think it’ll fit the use case perfectly—it’s just that a superior design and experience does count for a lot, even with the most low-level of dev tools.</p>
        
        
        	<p>...and before you cry <a href="http://www.koziarski.net/archives/2007/12/1/they">‘hey there they-brigade, it’s open-source!’</a> I did get Gitorious up-and-running locally and spoke to a local hotshot IA/designer <a href="http://www.philoye.com/">Phil Oye</a> to ask if he’d care to do a redesign. To be honest neither of us cared enough, or felt enough pain, to spend the months… we’re much more excited by building end-user-focussed web apps.</p>
        
        
        	<p>I’m a big fan of design-driven-development, something which Github has done from the get-go… it’s just both fortunate and unfortunate that Github’s an actively supported but closed-source tool.</p>
        
        
        	<p>There’s truth in saying you’re not totally locked into these centralised development services, but only as far as the code itself is concerned. Pull requests, network relations and comments aren’t going anywhere regardless of how distributed git itself can be, and if your development process relies on using those collaboration tools then you’re quite strictly tied into that particular centralised system.</p>
        
        
        	<p>Once Github’s collaboration data (pull requests, comments, watchers, networks, etc) becomes available via <a href="http://github.com/guides/the-github-api">their <span class="caps">API</span></a> it will at least create potential for portability and more truly distributed activities, possibly creating the opportunity to extract defacto standards in how these systems could communicate with one another.</p>
        
        
        	<p>Bug fixes, comments and activity appearing and being fixed in repositories across the internet in tandem… teams on different systems that suit them best collaborating… is there something to the idea?</p>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/moving_on_from_centralised_decentralised_development_or_whats_after_github_and_gitorious</id>
    <title type="html">Moving on from centralised-decentralised development, or: what’s after github and gitorious?</title>
    <published>2008-03-31T00:00:00+11:00</published>
    <updated>2008-03-31T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/moving_on_from_centralised_decentralised_development_or_whats_after_github_and_gitorious" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h2>Kittens are dropping</h2>
        
        
        	<p><a href="http://flickr.com/photos/teamaskins/1537313407/"><img src="http://farm3.static.flickr.com/2412/1537313407_9f1c31276b_m.jpg" title="Every time you repeat yourself, Lachie kills a kitten" alt="Every time you repeat yourself, Lachie kills a kitten" /></a></p>
        
        
        	<p><a href="http://flickr.com/photos/teamaskins/1537313407/">Every time you repeat yourself, Lachie kills a kitten – Ben Askins</a></p>
        
        
        	<p>One of the more popular new ideas us Rubyists have got our hands on to, git and the ideals of distributed development, has definitely taken off and doesn’t look to be slowing.</p>
        
        
        	<p>In response to all this gittyness two great code hosting platforms have popped up: <a href="http://gitorious.org/">Gitorious</a> a self-hosting free and open-source repository hosting platform; and <a href="https://github.com/">Github</a>, a slick, commercial repository hosting platform.</p>
        
        
        	<p>But stop. Before you go and move everything to one of these new services, let me tell you this: Everytime someone uses a centralised service to house their decentralised development Linus, not <a href="http://flickr.com/photos/teamaskins/1537313407/">Lachie</a> this time, kills a kitten.</p>
        
        
        	<h2>Join us in the playpen</h2>
        
        
        	<p>Don’t get me wrong—github is a sweet service, with a sweet design, new ideas and made by a cracker of a team; and gitorious is a fantasticly free and open service. It’s not that I don’t like gitorious and github—I love them in fact—I just get the feeling there’s a bigger problem that’s not getting enough attention.</p>
        
        
        	<p>I think we absolutely need services like Github and Gitorious because, as a whole, we don’t quite understand the dynamics of interaction and communication in a distributed development environment.</p>
        
        
        	<p>Who forks? How many forks? Where are the forks? Who’s fork is up-to-date? Who’s is authoritative? How do we request colloboration (push &amp; pull)? How do we track what’s going on? How do the end users affect what’s important, what gets pulled upstream?</p>
        
        
        	<p>Github and gitorious’s strength are as communication tools. They help make visible the distributed development activity—you get to see repository activity, forks and merge requests.</p>
        
        
        	<p>&gt; What we learn from history is that people don’t learn from history.</p>
        
        
        	<p>Whilst these services help us learn a lot, what about the glaring hole in their attractiveness: centrality. Let’s rewind to a slide from <a href="http://www.youtube.com/watch?v=4XpnKHJAok8">Linus’ tech talk on Git</a>:</p>
        
        
        	<p><img src="http://toolmantim.com/images/blog/distributed_development.jpg" alt="" /></p>
        
        
        	<p>Does that diagram look familiar? Substitute the central blue frowny face on the left with either github or gitorious.</p>
        
        
        	<p>Downtime. Take for example yesterday’s github downtime. Github’s still beta and not currently open for reg, so the downtime is understandable, but as there’s an increasingly large number of new Ruby and Rails project being hosted on Github the centralised nature is starting to show it’s big ugly head. The problem is multiplied when every fork of the project is hosted on the same service—I couldn’t find a copy of the next Textmate Rails bundle anywhere… they were all hosted on Github.</p>
        
        
        	<p>Replication and redundancy. I’m reminded of <a href="http://tantek.com/presentations/2005/09/microformats-evolution/">Tantek Celic’s <span class="caps">WE05</span> talk</a> on Microformats where he said the web’s tendency to replicate files and data, the sheer chaos of data sharing on the web, created a kind of backup—if a certain file wasn’t available on a given server you could be sure, given it was popular enough, to find it elsewhere. Not the case if everything is hosted in the same spot.</p>
        
        
        	<h2>Looking to the future</h2>
        
        
        	<p>As much as we need playpens of innovation we also need solid, open and distributed tools that help us create an ecosystem of innovation and community.</p>
        
        
        	<p>Do we <strong>need</strong> to sacrifice distributed and open development to gain these benefits of communication and interaction?</p>
        
        
        	<p>As we use tools such as gitorious and github let’s dream, and plan, an open and distributed system which provides the same level of communication and interaction whilst keeping with the distributed and open development model.</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1455">
              <p class="author">
                <a href="http://lachstock.com.au">Lachlan Hardy</a>
              </p>
              <div class="body">
                <p>These are some great points, Tim. Especially about playpens of innovation versus solid open tools. The first thing that springs to mind when I read this is: “how do we build a simple usable <span class="caps">GUI</span> for our local Git hosting?”</p>
                
                
                	<p>But as I said to you the other day while we were cussing out Github for being unavailable (we were a little ‘in the moment’, I think, and forgot we were dealing with a closed beta – big ups to Chris Wanstrath for sending an invite to some punk he didn’t know and to Dr Nic for the geekiest wedding present a Rubyist could want right now: another invite)... Right, where was I? What time is it? Ugh.</p>
                
                
                	<p>Anyway, as I was saying, I think both Github and Gitorious (as sweet as they are) are old thinking applied to new problems. And that’s okay because, as I think you’re saying here, we’re not even sure what those new problems are yet. We’re too new to this. As a community.</p>
                
                
                	<p>I’m sure there are hardcore kernel hackers out there who’ve encountered some of this before, but they’re probably not Rubyists and our problems are different to theirs. And we’ll have different ways to solve them.</p>
                
                
                	<p>Let’s not forget the Pythonistas (what do the Pythonic call themselves?) – there are a hell of a lot of Python repositories on Github. And a bunch of other sexy languages too. This isn’t just a Ruby problem. We shouldn’t look only to our own community for solutions. This is a broader issue for everyone using distributed source control.</p>
                
                
                	<p>I’d love to see folks run with your questions, build on that list and start answering them. We might start with some old thinking, but I’m sure we’ll grow from there.</p>
              </div>
            </li>
            <li id="comment_1456">
              <p class="author">
                Alex Mankuta
              </p>
              <div class="body">
                <p>Take a look at <a href="http://launchpad.net/">Launchpad</a>. While they support only Bazaar they have some nice features other should adopt. Like remote branches. You can have everything of LP like bug tracker, blueprints and all the community and keep your code in your repository elsewhere.</p>
              </div>
            </li>
            <li id="comment_1457">
              <p class="author">
                <a href="http://www.travisswicegood.com">Travis Swicegood</a>
              </p>
              <div class="body">
                <p>Excellent post and mirrors a lot of what I’ve been thinking.  What we need is distributed versions of that communication data.  I’m thinking things like trackbacks on clone and such modifying repository metadata.  With that, the sites like Github could parse the data and help make it visual, but there’s no dependency on them.</p>
              </div>
            </li>
            <li id="comment_1458">
              <p class="author">
                <a href="http://nathanherald.com">Nathan</a>
              </p>
              <div class="body">
                <p>It’s kinda like blogger.com is for blogging: hosted, not as customizable, but does alright for starting out because it breaks the barriers for entry down.</p>
                
                
                	<p>github’s downtime was irrelevant for my projects. I use github as a means to distribute what I do to others easily. If I set up my own self-hosted UI for people to browse my git repos (or my forks) then it might suffer downtime as well. git-format-patch really is the best way for me to get code changes to team members if they need it quick.</p>
                
                
                	<p>I do see many people using it as a central repository, but I don’t think github forces you into that model. I see github as the public branch that I push to as an authority where anyone can download the latest code. Linus has this as well, a public repo that he pushes to when he feels like it.</p>
                
                
                	<p>github is not the center of <em>my</em> development, it’s one of those yellow smilies out on the edge :)</p>
              </div>
            </li>
            <li id="comment_1459">
              <p class="author">
                <a href="http://nathanherald.com">Nathan</a>
              </p>
              <div class="body">
                <p>Also, I do agree Travis that the communication data should be standardized and portable across systems. That would allow for easier collaboration between disparate UI’s or systems.</p>
              </div>
            </li>
            <li id="comment_1460">
              <p class="author">
                <a href="http://blog.mmediasys.com">Luis Lavena</a>
              </p>
              <div class="body">
                <p>I second Alex Mankuta comment.</p>
                
                
                	<p>The whole idea of decentralized <span class="caps">VCS</span> is that you can have everything <strong>elsewhere</strong>, but we are putting everything on the same bucket.</p>
                
                
                	<p>What will be great if both services can work with remote forks monitoring.</p>
                
                
                	<p>Bazaar as example provide some dumb protocol publishing, like ftp and sftp. I see some problem with Git on that topic: I need to setup a Git server just to share my fork with others.</p>
                
                
                	<p>Also, <strong>fork</strong> isn’t as good as it sounds… keep track of so many “variations” of the same work can get complex and make my eyes bleed :-P</p>
                
                
                	<p>Take a look at the <a href="http://github.com/wycats/merb-core/network">network</a> (fork list) of merb-core.</p>
                
                
                	<p>Take that as example, when you see the commits log from these forks, you mostly see “merge with”... keeping the fork up-to-date, but I don’t see any particulay contribution there that justify the fork.</p>
                
                
                	<p>Anyway, just a silly point of view from someone who doesn’t like <em>fork</em> everything.</p>
              </div>
            </li>
            <li id="comment_1461">
              <p class="author">
                <a href="http://www.timocracy.com">Tim Connor</a>
              </p>
              <div class="body">
                <p>There isn’t any problem with using the faux-centralized services, because it’s git.  You still have a local copy and can push it up anywhere you want if they go down.  Yeah, it’d be a mild inconvenience, the first time, but once you have it up on your own server, and it’s up on github, and somewhere else….</p>
                
                
                	<p>Maybe down the road it will be a smart network of redundant nodes, but it’s not like having some of them on github now prevents that.</p>
              </div>
            </li>
            <li id="comment_1462">
              <p class="author">
                <a href="http://johansorensen.com">Johan Sorensen</a>
              </p>
              <div class="body">
                <p>The point of Gitorious is mainly exposure to ease collaboration. That means that there has to be a known place where contributors can get their repository from, and likewise a place for you to find your contributors changes. That inherently means that there has to exist a somewhat centralized point that at the very least acts as a starting point for collaboration.</p>
                
                
                	<p>Using that point as the only one isn’t the right way to do it. Gitorious.org itself for instance is deployed from another branch on anther server all together, but the repository on the site acts as my “hey, here’s my changes”. Like wise, the clones off the project on gitorious acts as their respective owners’ showcase/notification to me of their changes. The people running gitorious on their own internal company servers, run it from a fork somewhere behind their firewalls.</p>
                
                
                	<p>But, I get what your point it and I somewhat agree (and it’s been a topic on the <a href="http://groups.google.com/group/gitorious/browse_frm/thread/c50cec74f9f67b4d">mailinglist</a> <a href="http://groups.google.com/group/gitorious/browse_frm/thread/40a541377060cb34">too</a>) that it’s something to aim for. However, you also have to balance it against the fact that in order to build a community around your project, you need at least a point for it to rotate around. For Git itself that’s the mailinglist, it doesn’t get any more centralized than that, but that doesn’t have to be the only place where git development takes place (it isn’t), but it’s where the development is being discussed and reviewed That part is the key purpose behind gitorious (or at least, a take on it), it’s not there yet it but it’s well underway. And further decentralization is definitely something to aim for, as long as the cost isn’t inherent fragmentation.</p>
              </div>
            </li>
            <li id="comment_1463">
              <p class="author">
                <a href="http://www.atnan.com">Nathan de Vries</a>
              </p>
              <div class="body">
                <p>This is one of the reasons why I get a bit hot under the collar when developers relatively new to <span class="caps">DVCS</span> start advocating a model which is inherantly broken. I think Github looks fantastic, but at the moment I think it’s altogether missing the point. Or perhaps more accurately, its users are missing the point.</p>
                
                
                	<p>One of the major reasons Github has become the “central blue frowny face” is that they decided to create a social network <strong>and</strong> provide a Git repository hosting service, with no seperation between the two. This means that the majority of Github users are using Github like <span class="caps">SVK</span> with a remote repository &amp; local checkout, and pushing upstream when they’re connected to the interwebs.</p>
                
                
                	<p>Of course, this is a side effect of Git which requires smarts on both the client &amp; server, and Github’s done pretty damn well when it comes to providing a decent Git hosting service. You can understand why everything is centralised, because Github’s workflow is optimised for that.</p>
                
                
                	<p>In contrast, sites like Ohloh.net provide the social aspect of collaborative development, while leaving it up to the developers to maintain their repository. In the case of Ohloh.net, developers can link in their <span class="caps">CVS</span>, SVN or Git repositories, which allows others to discover the project and potentially help out. Launchpad has a similar approach with their “Remote Branches”, minus the social interaction.</p>
                
                
                	<p>Github needs to move away from the “one-stop-git-shop” concept, and act more like a smiley out on the edge.</p>
              </div>
            </li>
            <li id="comment_1464">
              <p class="author">
                <a href="http://railsfreak.com">Josh Owens</a>
              </p>
              <div class="body">
                <p>Is there really an issue here?  Github being down did what to you?  Stopped you from committing?  Stopped you from deploying via github?</p>
                
                
                	<p>This seems like a simple issue to solve… Setup a “server” and put the repo on it, then just add another remote on your local machine and push to it, or setup a cron script to do a pull on the server side.</p>
                
                
                	<p>Don’t fault github or gitorious if you don’t leverage the distributed nature of git.</p>
              </div>
            </li>
            <li id="comment_1465">
              <p class="author">
                <a href="http://www.atnan.com">Nathan de Vries</a>
              </p>
              <div class="body">
                <p>@Josh Owens: It may help if you read what Tim wrote.</p>
                
                
                	<p>The issue is that Github has centralised a decentralised workflow. The example given was that despite 27 people forking the Rails Textmate bundle, <strong>all of them were hosted on Github</strong>. In the event that Github goes down (which it did), it’s unavailable everywhere.</p>
              </div>
            </li>
            <li id="comment_1466">
              <p class="author">
                <a href="http://railsfreak.com">Josh Owens</a>
              </p>
              <div class="body">
                <p>Nathan,</p>
                
                
                	<p>Would it make you happy if I wrote a quick script to add into the github post-receive hook field that would auto pull your repo to a publicly available git repo on your box?  I mean, it might take 10 minutes to get this great feature, and then we are back to yellow smileys?</p>
                
                
                	<p>Tim,</p>
                
                
                	<p>You want smart nodes?  It is pretty easy to use something like god + a ruby script to accomplish this, or even the post-receive script that I mentioned above.  Or write a post-commit hook for your own git repo and auto-push to github instead?</p>
                
                
                	<p>Come on guys.  Non-issue.</p>
              </div>
            </li>
            <li id="comment_1467">
              <p class="author">
                <a href="http://www.mustacheinc.com">mustache</a>
              </p>
              <div class="body">
                <p>Github at its simplest solves the biggest problem with dcvs, exposing your repository to other people. Are we supposed to just add a million users to our laptops and let people pull via ssh?</p>
                
                
                	<p>The argument that ‘what if github goes down’ doesn’t even make sense. How is it different if github goes down than if you weren’t using github at all? Either way, your repository isn’t publicly available.</p>
                
                
                	<p>All using github does is add another clone in the cloud that people can pull from on a whim.</p>
              </div>
            </li>
            <li id="comment_1481">
              <p class="author">
                mdub
              </p>
              <div class="body">
                <p>Git, a <span class="caps">BETTER</span> better <span class="caps">CVS</span>. :-)</p>
              </div>
            </li>
            <li id="comment_1501">
              <p class="author">
                slicks
              </p>
              <div class="body">
                <p>@ Josh:</p>
                
                
                	<p>Would it make you happy if people did the same thing with svn?</p>
                
                
                	<p>The point is that the workflow is still centralized. Everyone using github (as their <strong><span class="caps">MAIN</span></strong> sharing medium) is kidding themselves in thinking that they’ve somehow adopted a decentralized workflow. Sure, you can make offline commits while github is down—but if people are tracking you through that one site it won’t matter what you do locally until it’s back up. You could hack your local repo and mirror it somewhere else—sure.. you can do that with just about any <span class="caps">SCM</span> with relative ease—but I bet most people won’t find out about the mirror until the centralized server is back up.</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
  <entry>
    <id>tag:toolmantim.com,2009-01-04:/articles/presentation_rails_two_dot_oh</id>
    <title type="html">Presentation: Rails Two Dot Oh</title>
    <published>2008-02-07T00:00:00+11:00</published>
    <updated>2008-02-07T00:00:00+11:00</updated>
    <link href="http://toolmantim.com/articles/presentation_rails_two_dot_oh" hreflang="en" rel="alternate" type="text/html" />
    <content type="xhtml" xml:base="http://toolmantim.com/" xml:lang="en">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>At <a href="http://rubyonrails.com.au/2008/1/4/sydney-january-2008-meetup">last months’s <span class="caps">RORO</span> Sydney meetup</a> I gave a short presentation on the changes you should know about in Rails 2.0.</p>
        
        
        	<p>Much to <a href="http://drnicwilliams.com/">Dr Nic</a>’s dismay this was mostly the same presentation I gave at the November Melbourne Ruby meetup and <a href="http://wiki.railscamp07.org/">Railscamp 2</a>.</p>
        
        
        	<p>Without further ado…</p>
        
        
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_toolmantim_17"><param name="movie" value="http://www.viddler.com/player/1e4fae04/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/1e4fae04/" width="437" height="370" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_toolmantim_17" /></object>
        
        	<p>The intro screens were put together with a <a href="http://rubycocoa.sourceforge.net/HomePage">RubyCocoa</a> app that <a href="http://smartbomb.com.au/">Lachie Cox</a> put together which automates the <a href="http://www.blender.org/">Blender</a> rendering and compositing. Very kewl. Now all we need is dual video tracks, one showing the presenter, one with the screencast, and another microphone in the audio, and we’ll be set!</p>
        <div id="archived-comments">
          <h1>Archived comments</h1>
          <p>Comments were previously allowed on articles. Though no new comments are being accepted you can see the old comments below.</p>
          <ol>
            <li id="comment_1470">
              <p class="author">
                <a href="http://falkayn.blogspot.com">Angus McDonald</a>
              </p>
              <div class="body">
                <p>Tim,</p>
                
                
                	<p>Good presentation (as usual), I’m missing the Sydney <span class="caps">RORO</span>, my only Ruby these days is using Watir for testing <span class="caps">ASP</span>.NET apps.</p>
                
                
                	<p>I’ve <a href="http://falkayn.blogspot.com/2008/04/8-little-known-things-about-falkayn.html">tagged</a> you with that old ‘8 little known things about me’ meme. Hope you don’t mind!</p>
                
                
                	<p>Cheers,
                Angus</p>
              </div>
            </li>
            <li id="comment_1471">
              <p class="author">
                <a href="http://toolmantim.com">Tim Lucas</a>
              </p>
              <div class="body">
                <p>Thanks Angus! Ahhh well at least you’re sneaking it in somehow. Hope to see you tomorrow night and at Railscamp.</p>
              </div>
            </li>
          </ol>
        </div>
      </div>
    </content>
  </entry>
</feed>
