tag:interblah.net,2008-06-01:kind/bloginterblah.net - blog2008-06-01T13:37:19+00:00leaving-reevootag:interblah.net,2008-11-09:/leaving-reevoo2008-11-10T22:49:40+00:002008-11-09T17:14:46+00:00james<h1>Leaving Reevoo</h1>
<p><img class="right" src="http://farm1.static.flickr.com/47/135488458_58be94baff.jpg"></p>
<p>There's an interesting mixture of sadness and excitement whenever you leave a job, but I'm particularly feeling it as I prepare to move on from my current employer <a href="http://www.reevoo.com">Reevoo</a>. I've had the privilege of working with a solid team of truly excellent people: </p>
<ul>
<li><a href="http://blog.floehopper.org">James Mead</a>, the mastermind behind <a href="http://mocha.rubyforge.org">Mocha</a>; </li>
<li><a href="http://blog.seagul.co.uk">Chris Roos</a>, liberator of <a href="http://the-local-paper.co.uk/">local information</a>; </li>
<li><a href="http://www.po-ru.com/">Paul Battley</a>, liberator of <a href="http://po-ru.com/projects/iplayer-downloader/">BBC programming</a>; </li>
<li><a href="http://www.lukeredpath.co.uk/">Luke Redpath</a>, who is already busting out <a href="http://gallery.me.com/lukeredpath#100007&view=carouseljs&bgcolor=dkgrey&sel=9">iPhone apps</a>; </li>
<li><a href="http://redpoint.everythingbehind.com/">Ben Sales</a> and Craig Smith, bouldering supremos;</li>
<li><a href="http://clockworkninja.co.uk/">Tom Lea</a>, <a href="http://www.google.com/search?q=joel+gluth">Joel Gluth</a>, <a href="http://www.google.com/search?q=louis+garman">Louis Garman</a> and <a href="http://www.google.com/search?q=matt+house">Matt House</a>, all equally awesome in their own ways.</li>
</ul>
<p>... in black and white, as well in real life, an impressive collection of smart developers and engineers. Which made my decision all the more difficult, although I take solace in knowing that it won't be the last time I get the chance to work with these people - the <a href="http://lrug.org">Ruby community in London</a> isn't too huge, after all!</p>
<h2>Onwards and upwards</h2>
<p>So what's next? Good question. I don't have another cosy full-time job to drop into, because I've decided to take the leap into self-employment. That's right - I'm going free range. Am I crazy, what with all the financial doom and gloom going around these days? Maybe. But - there's no time like the present. </p>
<p><a href="http://rubymanor.org">Ruby Manor</a> has sold out, and we're looking forward to seeing if our conference experiment has worked. After that we're almost at Christmas, and then the shiny face of 2009 will smile upon us. 2009 - we really are living in the future, aren't we.</p>
<p>In the not-too-distant future I'll have more to say about what I'm going to do next, but for the moment I'd just like to say that it's been an excellent experience working at <a href="http://www.reevoo.com">Reevoo</a>, and when I say 'Au Revoir' to my friends on Webber Street in mid December, I'll be wishing them all the best in the future.</p>
<p><a href="http://interblah.net/leaving-reevoo">0 comments for leaving-reevoo</a></p>ruby-manor-is-gotag:interblah.net,2008-10-02:/ruby-manor-is-go2008-10-02T14:52:26+00:002008-10-02T10:48:53+00:00james<h1>Ruby Manor is GO!</h1>
<p><img style="float: right;" src="http://interblah.net/assets/ruby-manor.png" width="240px" height="200px" /></p>
<p>We've just make the <a href="http://rubymanor.eventwax.com/ruby-manor-2008">tickets available</a> for <a href="http://interblah.net/ruby-manor">ruby-manor</a>, and folks are already snapping them up. Most conferences offer a variety of different ticket types, giving you optional access to tutorials, expos, or parties. We've tried to fit in with this, by offering our own ticket classifications:</p>
<ul>
<li><strong>Sith tickets</strong> - <strike>two of these are available</strike> sold out! There will be a Master and an Apprentice. No doubt the apprentice will eventually try and STRIKE THE MASTER DOWN.</li>
<li><strong>Ruby Manor CORE</strong> - Gives you access to unprecidented levels of opinionation. <strike>Only one left</strike> sold out too, but we added a new <strong>Manti-core</strong> ticket to balance it out!</li>
<li><strong>Enterprise</strong> - no learning allowed, as you'll only be given buzzword summaries of the presentations.</li>
</ul>
<p>... and a bunch more. I suggest you <a href="http://rubymanor.eventwax.com/ruby-manor-2008">sign up</a> soon, before all the fun tickets are gone and you only get a shiny foil hat to protect you from the thought police.</p>
<p><a href="http://interblah.net/ruby-manor-is-go">0 comments for ruby-manor-is-go</a></p>defensio-to-the-rescuetag:interblah.net,2008-08-14:/defensio-to-the-rescue2008-08-14T21:34:21+00:002008-08-14T21:34:01+00:00james<h1>Defensio to the rescue</h1>
<p>When I come back to interblah.net, I normally have a quick look at the <a href="http://interblah.net/index">index</a> page to see if any new comments are awaiting my attention. And recently that's revealed a few interesting comments (thanks!), and hundreds of spam comments.</p>
<p>I deliberately didn't do anything clever to combat spam, but I got a bit sick of it today, so I've started sending comments to <a href="http://interblah.net/Defensio">Defensio</a> to stem the flow. The implementation was very simple (see github for details), and hopefully that'll stem the flow of links to naughty filth on my site.</p>
<p>Except for the links that <em>I</em> add, of course.</p>
<p><a href="http://interblah.net/defensio-to-the-rescue">3 comments for defensio-to-the-rescue</a></p>ruby-manor-announcementtag:interblah.net,2008-08-01:/ruby-manor-announcement2008-08-01T16:33:38+00:002008-08-01T15:38:33+00:00james<h1>Ruby Manor</h1>
<p><img style="float: right;" src="/assets/ruby-manor.png" width="240px" height="200px" /></p>
<p>I just posted an <a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/309843">initial anouncement</a> for <a href="http://interblah.net/ruby-manor">ruby-manor</a> to the ruby/rails/lrug mailing lists.</p>
<p>It's an idea we've been kicking around since a beery campfire talk after RailsConf in Portland - would it be possible to put ona Ruby conference-ish thing, but subtract all of the unfortunately common <strike>bullshit</strike> problems that conferences I've been to share:</p>
<ol>
<li>the outlandish expense</li>
<li>the poor relevancy of most of the talks</li>
<li>the roulette you play when incurring 1. without knowing the state of 2. </li>
</ol>
<p>So we have a few ideas about how to do it differently. Head over to <a href="http://rubymanor.org">the ruby manor site</a> to let us know if you're interested.</p>
<p><a href="http://interblah.net/ruby-manor">0 comments for ruby-manor</a></p>syntax-highlighting-demotag:interblah.net,2008-07-17:/syntax-highlighting-demo2008-07-17T17:33:23+00:002008-07-17T15:47:35+00:00james<h1>Syntax Highlighting</h1>
<p>Working through some of the outstanding issues for <a href="http://interblah.net/vanilla-rb">vanilla-rb</a>, I've implemented some simple syntax highlighting (<a href="http://lazyatom.lighthouseapp.com/projects/11797-vanilla/tickets/16">Ticket 16</a>):</p>
<p><pre class="code ruby"><code><span class="keyword">class </span><span class="class">Ruby</span>
<span class="keyword">def </span><span class="method">coloured</span><span class="punct">(</span><span class="ident">with</span><span class="punct">='</span><span class="string">syntax</span><span class="punct">')</span>
<span class="keyword">if</span> <span class="ident">with</span> <span class="punct">=~</span> <span class="punct">/</span><span class="regex">joy</span><span class="punct">/</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">Hello, You Coloured World You</span><span class="punct">"</span>
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span></code></pre></p>
<p>It's pretty simple behind the scenes, although there are a few conceptual choices which I may revisit. Here's the scoop.</p>
<h2>Blocks of content</h2>
<p>I recently fixed code syntax highlighting on the <a href="http://interblah.net/rails-engines">rails-engines</a> site, which is built using the reasonably-excellent <a href="http://interblah.net/radiant-cms">radiant-cms</a> system. In Radiant, you markup blocks of content, typically like this:</p>
<p><pre class="code html"><code><r:code lang="ruby">
class Blah
def something
end
end
</r:code></code></pre></p>
<p>Radiant lets you define <em>tags</em> that wrap around content within the page, making this pretty simple.</p>
<p>However, <a href="http://interblah.net/vanilla">vanilla</a> doesn't work like that, or at least it doesn't at the moment. The building block of a page is the <a href="http://interblah.net/snip">snip</a>, not a chunk of text wrapped in a tag. There's no tag processing going on here at all, beyond the single, magically snip inclusion that makes it all work. This presents a problem when we want to treat a certain piece of text differently to the rest of the body of a snip.</p>
<h2>The Vanilla Way</h2>
<p>Since the building block is the snip, the natural thing to do is to move the code snippet into its own snip, and include that via a <a href="http://interblah.net/code">code</a> dynasnip (see below for the self-syntax-highlighted source!). And so this call </p>
<p>{code ruby,test-code-highlighting}</p>
<p>works nicely for us. After the call to the <a href="http://interblah.net/code">code</a> dynasnip, the first parameter is the language, and the second is the snip name to include:</p>
<p><pre class="code ruby"><code><span class="keyword">class </span><span class="class">Included</span>
<span class="keyword">def </span><span class="method">from_another_snip</span>
<span class="keyword">return</span> <span class="punct">"</span><span class="string">syntax highlighted!</span><span class="punct">"</span>
<span class="keyword">end</span>
<span class="keyword">end</span></code></pre></p>
<p>... but it's a pain to have to move every code sample out into its own snip (although that's certainly useful for larger chunks of code.</p>
<p>The solution to this, is to allow rendering of individual <em>parts</em> of snips via syntax highlighting. By adding the snip part to the parameter list</p>
<p>{code ruby,syntax-highlighting-demo,rubycodesample}</p>
<p>we get</p>
<p><pre class="code ruby"><code><span class="keyword">class </span><span class="class">Test</span>
<span class="keyword">def </span><span class="method">initialize</span><span class="punct">(</span><span class="ident">name</span><span class="punct">=</span><span class="constant">nil</span><span class="punct">)</span>
<span class="ident">puts</span> <span class="punct">"</span><span class="string">Hello, World</span><span class="punct">"</span>
<span class="keyword">end</span>
<span class="keyword">end</span></code></pre></p>
<p>The code dynasnip is rendering the <a href="http://interblah.net/syntax-highlighting-demo/rubycodesample.raw">rubycodesample</a> part of this very blog post!</p>
<h2>Next steps</h2>
<p>While this certainly works, it's a pain to have to reference the current snip in order to get to the snip part. I have to do this with the <a href="http://interblah.net/comments-are-alive">comments</a> dynasnip too, in order to find all the snips that are related to it. We could solve this if:</p>
<ol>
<li>Each renderer knew which snip it was rendering - currently true :)</li>
<li>Each renderer knew which renderer called it - not currently possible :(</li>
</ol>
<p>Ideally, the <em>code</em> dynasnip would be able to ask it's renderer (the <em>Ruby</em> renderer) to ask the renderer that is invoking it (in the case of this post, the <em>Markdown</em> renderer) which snip is doing the including. With me? </p>
<pre>Code dyna
--> rendered by Ruby Renderer
--> invoked by Markdown Render while rendering this blog post</pre>
<p>Yeah, it's a bit complicated, but it's probably worth it; it could help avoid circular rendering problems at the same time.</p>
<p>Anyway - syntax highlighting. Woot!</p>
<h2>Super Bonus Appendix</h2>
<p>Here's the code from the <a href="http://interblah.net/code">code</a> dynasnip, highlighting itself, like an eternal self-consuming snake. Don't say I didn't warn you!</p>
<p><pre class="code ruby"><code><span class="ident">require</span> <span class="punct">'</span><span class="string">syntax/convertors/html</span><span class="punct">'</span>
<span class="keyword">class </span><span class="class">CodeHighlighter</span> <span class="punct"><</span> <span class="constant">Dynasnip</span>
<span class="keyword">def </span><span class="method">handle</span><span class="punct">(</span><span class="ident">language</span><span class="punct">,</span> <span class="ident">snip_to_render</span><span class="punct">,</span> <span class="ident">part_to_render</span><span class="punct">='</span><span class="string">content</span><span class="punct">')</span>
<span class="ident">snip</span> <span class="punct">=</span> <span class="constant">Vanilla</span><span class="punct">.</span><span class="ident">snip</span><span class="punct">(</span><span class="ident">snip_to_render</span><span class="punct">)</span>
<span class="ident">text</span> <span class="punct">=</span> <span class="ident">snip</span><span class="punct">.</span><span class="ident">__send__</span><span class="punct">(</span><span class="ident">part_to_render</span><span class="punct">.</span><span class="ident">to_sym</span><span class="punct">)</span>
<span class="ident">convertor</span> <span class="punct">=</span> <span class="constant">Syntax</span><span class="punct">::</span><span class="constant">Convertors</span><span class="punct">::</span><span class="constant">HTML</span><span class="punct">.</span><span class="ident">for_syntax</span><span class="punct">(</span><span class="ident">language</span><span class="punct">)</span>
<span class="ident">code</span> <span class="punct">=</span> <span class="ident">convertor</span><span class="punct">.</span><span class="ident">convert</span><span class="punct">(</span><span class="ident">text</span><span class="punct">,</span> <span class="constant">false</span><span class="punct">)</span>
<span class="punct">%(</span><span class="string"><pre class="code </span><span class="punct">)</span> <span class="punct">+</span> <span class="ident">language</span> <span class="punct">+</span> <span class="punct">%(</span><span class="string">"><code></span><span class="punct">)</span> <span class="punct">+</span> <span class="ident">code</span> <span class="punct">+</span> <span class="punct">%(</span><span class="string"></code></pre></span><span class="punct">)</span>
<span class="keyword">end</span>
<span class="constant">self</span>
<span class="keyword">end</span></code></pre></p>
<p><a href="http://interblah.net/syntax-highlighting-demo">2 comments for syntax-highlighting-demo</a></p>reevoo-labstag:interblah.net,2008-07-04:/reevoo-labs2008-07-04T09:39:45+00:002008-07-04T09:32:26+00:00james<h1>Reevoo Labs Lives!</h1>
<p>At <a href="http://interblah.net/reevoo">reevoo</a>, we rely heavily on open source software. As a part of this, we're all very keen on contributing back to the community, both in terms of cold, hard source code, and in sharing our experiences developing software</p>
<p>My colleague <a href="http://interblah.net/luke-redpath">luke-redpath</a> has just pushed our new <a href="http://interblah.net/reevoo-labs">reevoo-labs</a> site live:</p>
<p><img src="http://labs.reevoo.com/assets/2008/7/3/reevoolabs_cropped.jpg" width="600" height="190"></p>
<p>I'm looking forward to posting there about some of the issues we're grappling with at <a href="http://interblah.net/reevoo">reevoo</a>: how to test well, how testing affects refactoring, and trying to innovate on the web whilst still remaining commercially viable. <a href="http://labs.reevoo.com">Check it out.</a></p>wham-bam-thank-you-spamtag:interblah.net,2008-07-02:/wham-bam-thank-you-spam2008-07-17T17:37:10+00:002008-07-02T21:48:36+00:00james<h1>Wham, Bam, Thank You Spam!</h1>
<p>My ultra-secure commenting system has finally fallen foul of the malicious robots of spammers. They're probably terrorists, hijacking the precious interblah.net-page-rank fluids to build some kind of <em>net-bomb</em>. Unthinkable!</p>
<p>Anyway, this is good for me, because it forces me to develop some new stuff to counter the spam. And the first step is being able to delete snips. Here's my quick-n-dirty <a href="http://interblah.net/dynasnip">dynasnip</a> for the moment:</p>
<p><h1>delete</h1>
<p>Usage: (no details)</p>
<pre class="code ruby"><code><span class="ident">require</span> <span class="punct">'</span><span class="string">vanilla/dynasnip</span><span class="punct">'</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">vanilla/dynasnips/login</span><span class="punct">'</span>
<span class="keyword">class </span><span class="class">Delete</span> <span class="punct"><</span> <span class="constant">Dynasnip</span>
<span class="ident">include</span> <span class="constant">Login</span><span class="punct">::</span><span class="constant">Helper</span>
<span class="keyword">def </span><span class="method">handle</span>
<span class="keyword">return</span> <span class="ident">login_required</span> <span class="keyword">unless</span> <span class="ident">logged_in?</span>
<span class="ident">name</span> <span class="punct">=</span> <span class="ident">app</span><span class="punct">.</span><span class="ident">request</span><span class="punct">.</span><span class="ident">params</span><span class="punct">[</span><span class="symbol">:snip_to_delete</span><span class="punct">]</span>
<span class="ident">snip_to_delete</span> <span class="punct">=</span> <span class="constant">Vanilla</span><span class="punct">.</span><span class="ident">snip</span><span class="punct">(</span><span class="ident">name</span><span class="punct">)</span>
<span class="ident">snip_to_delete</span><span class="punct">.</span><span class="ident">destroy</span> <span class="keyword">if</span> <span class="ident">snip_to_delete</span>
<span class="punct">"</span><span class="string">Snip <span class="expr">#[snip 'name' cannot be found]</span> has been deleted.</span><span class="punct">"</span>
<span class="keyword">end</span>
<span class="constant">self</span>
<span class="keyword">end</span></code></pre>
<p>(If the dynasnip only contains a class name, it's probably loaded from the Vanilla application directly. This is typical of the basic dynasnips like link_to, etc)</p></p>
<p>I've also added the link to the template, but this in turn raises some interesting, unanswered questions about how to take Vanilla.rb from an interesting toy into a proper web platform.</p>
<p><a href="http://interblah.net/wham-bam-thank-you-spam">0 comments for wham-bam-thank-you-spam</a></p>mashed-2008tag:interblah.net,2008-06-22:/mashed-20082008-07-17T15:13:34+00:002008-06-22T14:37:57+00:00james<h1>Mashed 2008</h1>
<p>Well, I'm just back from <a href="http://mashed08.backnetwork.com/">Mashed 2008</a>, but before my brain shuts down due to lack of sleep (thanks, people playing RockBand all night, you are <em>awesome</em>), I just wanted to post a video of our (prize-winning!) hack.</p>
<p>We took some of the (somewhat odd) XML subtitle feeds that the BBC generate, and extracted interesting words at specific points in time. We then hooked this up to some flash (originally developed by <a href="http://ten4design.co.uk/">TEN4 Design</a>), stolen from <a href="http://dylan.sonybmgmusic.co.uk/create">Sony BMG</a>, and quite thoroughly hacked, presenting it alongside content from the BBC Redux corresponding to the subtitles, to produce this. </p>
<p>I like to call it <em>Subterranean Homesick News</em>:</p>
<p><object width="400" height="300"> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1214166&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /> <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1214166&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p><strike>I'll post a link to the full video once it's ready</strike> <a href="http://vimeo.com/1214367">Here's the longer video</a> - I particularlly like the Hissy fit. I think there are some great moments in it (as well, as some not so great bits, but that's what you get after 24 hours of sleepless hackery).</p>
<p>Anyway, I hope you enjoy it.</p>
<h2>Behind the Scenes</h2>
<p>The hack involves some Ruby, some Javascript, some Flash, and some magic. The animated Bob Dylan isn't pre-rendered with the subtitles - that's all live thanks to <a href="http://www.techbelly.com">Ben Griffiths</a> flash deconstruction skills (learned on the spot, no less). The interesting terms are the result of a collaboration between myself and <a href="http://jamesandre.ws">James Andrews</a> (although whereever you see good words, it's his work - all the not-so-good words are my fault).</p>
<p>Anyway - great fun. I'll amend this post with the timestamps of some of my favourite moments in the movie. (#mashed tag for robotic things.)</p>
<h2>Epilogue</h2>
<ul>
<li><a href="http://www.oreillygmt.co.uk/2008/07/subterranean-ho.html">Our interview for O'Reilly GMT on the southbank</a></li>
<li><a href="http://jamesandre.ws/post/39521431/mashed-2008-team-bob">James Andrews' post</a></li>
<li><a href="http://www.techbelly.com/2008/06/24/mashed08-team-bob/">Ben's post</a></li>
<li><a href="http://mashedlit.blogspot.com/2008/06/subterranean-homesick-news.html">Someone else likes our subversion</a></li>
</ul>
<p><a href="http://interblah.net/mashed-2008">4 comments for mashed-2008</a></p>more-vanilla-tweakstag:interblah.net,2008-06-04:/more-vanilla-tweaks2008-06-04T22:46:14+00:002008-06-04T22:46:14+00:00james<h1>More Vanilla Tweaks</h1>
<p>So thanks for your patience thus far. My grand <a href="http://interblah.net/vanilla">vanilla</a> experiment is going relatively well. Lessons learned so far:</p>
<ul>
<li>Links in atom feeds need to be absolute, not relative;</li>
<li>Folks like to post empty comments.</li>
</ul>
<p>I've updated some of the documentation so <a href="http://github.com/lazyatom/vanilla-rb/tree/master/README">it should be a bit clearer</a> how you can play with your own <a href="http://interblah.net/vanilla-rb">vanilla-rb</a> clones:</p>
<pre><code>$ gem install gem install soup sqlite3-ruby rack ratom RedCloth BlueCloth
$ git clone git://github.com/lazyatom/vanilla-rb.git
$ cd vanilla-rb
$ rake setup
$ rackup lib/vanilla.ru
</code></pre>
<p>Let me know how it goes...</p>
<p><a href="http://interblah.net/more-vanilla-tweaks">2 comments for more-vanilla-tweaks</a></p>comments-are-alivetag:interblah.net,2008-06-03:/comments-are-alive2008-07-17T15:03:08+00:002008-06-03T22:32:43+00:00james<h1>Comments Are Alive!</h1>
<p>I just pushed a first attempt at a super simple commenting dyna - you can see it in operation on this (view <a href="http://interblah.net/comments-are-alive.raw">raw</a>) and the previous blog post. It operates very simply, is almost certainly ripe for abuse and spamming, but lets walk before we run, yeah?</p>
<p>Next up, some proper instructions about how to get vanilla running.</p>
<p><a href="http://interblah.net/comments-are-alive">2 comments for comments-are-alive</a></p>