<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SickBiscuit &#187; code</title>
	<atom:link href="http://sickbiscuit.com/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://sickbiscuit.com/blog</link>
	<description>The personal blog of Steven Wilkin</description>
	<lastBuildDate>Sun, 27 Jun 2010 21:52:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>An experimental lifestream app</title>
		<link>http://sickbiscuit.com/blog/2010/06/27/an-experimental-lifestream-app/</link>
		<comments>http://sickbiscuit.com/blog/2010/06/27/an-experimental-lifestream-app/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 21:48:49 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=480</guid>
		<description><![CDATA[Some time ago DW and myself had an enthusiastic conversation about logging various aspects of our electronic lives: emails sent and received, RSS feeds read, incoming and outgoing phone calls, the list goes on.
At that time I&#8217;d already started tinkering with apps to track my efforts in the gym and changes in my bodyweight, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago <a href="http://twitter.com/davidbelfast">DW</a> and myself had an enthusiastic conversation about logging various aspects of our electronic lives: emails sent and received, RSS feeds read, incoming and outgoing phone calls, the list goes on.</p>
<p>At that time I&#8217;d already started tinkering with apps to track my efforts in the gym and changes in my bodyweight, I&#8217;ve used notebooks for this for years and thought it&#8217;d be interesting to have this information in electronic form.</p>
<h3>Sharpening skills</h3>
<p>While I was on the bench waiting for my current contract to start I was sharpening my skills through developing some small projects with the technologies I&#8217;d be using. One of those technologies was <a href="http://www.sqlite.org/">SQLite</a> which I knew of but didn&#8217;t have much hands on experience with.</p>
<p>I started by playing with the <a href="http://github.com/luislavena/sqlite3-ruby">Ruby interface to SQLite</a>, using it to insert and retrieve data from a simple database. I&#8217;ve since grown to love the simplicity and flexibility of SQLite and will no doubt use it again in the future.</p>
<p>I needed a practical application and thought back to my intentions to track my online activities. Now was as good a time as any to to tick this off the list of potential projects.</p>
<p>When I&#8217;d glued together some Ruby to parse the RSS feed of this blog I knew the basics were in place so I started on a simple Sinatra app to act as a web interface.</p>
<h3>Stumbling block</h3>
<p>I scoured the web for design inspiration and got a good start to the visual aspect of this project but couldn&#8217;t make my mind up over a few subtle items. Next thing my agent called: the purchase order finally came through and my contract was to start the next day.</p>
<p>The demands of adjusting to a new work environment meant I felt little motivation to work on anything on my own time and I became more interested in funneling my excess income into the stockmarket. The project joined those other half-finished unfortunates.</p>
<h3>A fresh jolt of motivation</h3>
<p>After a couple of months on the contract I started feeling a renewed motivation to get something of my own out there. I couldn&#8217;t  bare the thought of starting another project to not finish it so I set out to to whip this latest app into shape and release it as soon as possible and no later.</p>
<p>I dug through the uncommited changes in my working copy and made some arbitrary decisions which resulted in a design I felt was &#8220;good enough.&#8221; I modified my RSS parsing script to feed into SQLite and extended it to process my <a href="http://delicious.com/stevebiscuit">Delicious bookmarks</a> and <a href="http://www.last.fm/user/ahSyd">loved tracks on Last.fm</a>. I created pagination links, wrote a README and sorted out the hosting and cron jobs. Bingo.</p>
<h3>Check it out</h3>
<p>My original intention was to track much more of my online life and there&#8217;s some details I&#8217;d like to change but I love releasing code and I&#8217;m pleased with this first iteration.</p>
<p>The app is hosted at <a href="http://life.stevenwilkin.com">life.stevenwilkin.com</a> and the code is available on <a href="http://github.com/stevenwilkin/life.stevenwilkin.com">GitHub</a>, I hope you like it.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/06/27/an-experimental-lifestream-app/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Rails 3 Hello World</title>
		<link>http://sickbiscuit.com/blog/2010/06/08/rails-3-hello-world/</link>
		<comments>http://sickbiscuit.com/blog/2010/06/08/rails-3-hello-world/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 21:51:06 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=472</guid>
		<description><![CDATA[The past while I&#8217;ve been busy providing technical consultancy to BT and haven&#8217;t had much drive to work on anything on my own time. The itch has returned the past couple of weeks though so I thought I&#8217;d see what I&#8217;ve been missing in the Rails world and in what better way than getting a [...]]]></description>
			<content:encoded><![CDATA[<p>The past while I&#8217;ve been busy providing technical consultancy to <a href="http://bt.com">BT</a> and haven&#8217;t had much drive to work on anything on my own time. The itch has returned the past couple of weeks though so I thought I&#8217;d see what I&#8217;ve been missing in the Rails world and in what better way than getting a basic Rails 3 app up and running.</p>
<p>My environment was already setup for Rails 2.3.* and <a href="http://yehudakatz.com/2009/12/31/spinning-up-a-new-rails-app/">Yehuda Katz&#8217; post</a> served as a guide to get me up to speed with the beta loveliness.</p>
<h3>RubyGems 1.3.7 along with Thor and Bundler gems required</h3>
<p>My installed version of RubyGems was a couple of point releases behind, so I updated that and installed the necessary gems</p>
<pre>sudo gem update --system
sudo gem install thor bundler</pre>
<h3>Clone Edge Rails from GitHub</h3>
<pre>mkdir -p ~/code/rails/rails
git clone http://github.com/rails/rails.git ~/code/rails/rails</pre>
<h3>Generate a fresh app and install dependencies with Bundler</h3>
<pre>mkdir ~/code/rails/rails-3-demo
cd !$
ruby ~/code/rails/rails/bin/rails new . --dev
bundle install</pre>
<h3>Launch the web server</h3>
<pre>./script/rails server</pre>
<p>Browse to <a href="http://0.0.0.0:3000">http://0.0.0.0:3000</a> and you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/06/08/rails-3-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Home time revisited &#8211; redeveloping a CakePHP application with Sinatra</title>
		<link>http://sickbiscuit.com/blog/2010/03/24/home-time-revisited-redeveloping-a-cakephp-application-with-sinatra/</link>
		<comments>http://sickbiscuit.com/blog/2010/03/24/home-time-revisited-redeveloping-a-cakephp-application-with-sinatra/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 18:26:50 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=466</guid>
		<description><![CDATA[I&#8217;ve just released the latest iteration of hometi.me, a little nano-app I&#8217;ve mentioned before.
Deliberate Practice
It&#8217;s only a trivial app but I&#8217;ve a bit of free time before the start of a contract so I thought it would be good practice to redevelop it, a task I&#8217;d been ignoring for a long time.
Goodbye CakePHP, Hello Sinatra
The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released the latest iteration of <a href="http://hometi.me">hometi.me</a>, a little <a href="http://sickbiscuit.com/blog/2009/01/26/nano-apps/">nano-app</a> I&#8217;ve <a href="http://sickbiscuit.com/blog/2008/08/12/is-it-home-time-yet/">mentioned</a> <a href="http://sickbiscuit.com/blog/2008/09/09/home-time-is-a-little-closer/">before</a>.</p>
<h3>Deliberate Practice</h3>
<p>It&#8217;s only a trivial app but I&#8217;ve a bit of free time before the start of a contract so I thought it would be good practice to redevelop it, a task I&#8217;d been ignoring for a long time.</p>
<h3>Goodbye CakePHP, Hello Sinatra</h3>
<p>The original app was put together quickly with <a href="http://cakephp.org/">CakePHP</a>, a PHP-based framework I&#8217;ve used since my first paid programming gig. Since then though my interest and proficiency with Ruby and it&#8217;s frameworks has come more to the forefront. By choosing <a href="http://sinatrarb.com">Sinatra</a>, the app was given access to the rich Ruby ecosystem, including the joyful <a href="http://haml-lang.com/">HAML</a> and <a href="http://sass-lang.com/">SASS</a>.</p>
<p>The interesting aspect of this release is that all the logic is now implemented on the client-side using <a href="http://jquery.com/">Javascript</a>. Originally the countdown was calculated on the server-side and passed to the client with an AJAX call, but the server is more-or-less just hosting the markup, stylesheets and Javascript files required to get the app up and running in the browser.</p>
<h3>Heroku</h3>
<p>As this app doesn&#8217;t make use of a database or Cron jobs etc I thought I&#8217;d take the opportunity to move it from my own infrastructure and onto the awesomeness of <a href="http://heroku.com/">Heroku</a> whose free offering is a lot more performant than my little <a href="http://vpslink.com/?ref=CM6S0S">VPS</a>. Heroku is a service I&#8217;ve been playing with for a while now and it makes deploying a Ruby web app into production a breeze, assuming your project can work within it&#8217;s limitations.</p>
<p>All that&#8217;s left now is for the DNS changes to propagate. I&#8217;d like to show a bit more love to this app in the future, the controls to specify your own home time could be more intuitive for instance, but for now I&#8217;m content with the improvements I&#8217;ve made to it and it&#8217;s new home.</p>
<p>Is it passed your home time yet?</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/03/24/home-time-revisited-redeveloping-a-cakephp-application-with-sinatra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>node-shoutbox &#8211; a simple node.js demo</title>
		<link>http://sickbiscuit.com/blog/2010/03/19/node-shoutbox-a-simple-node-js-demo/</link>
		<comments>http://sickbiscuit.com/blog/2010/03/19/node-shoutbox-a-simple-node-js-demo/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 16:36:34 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=454</guid>
		<description><![CDATA[Last month, at the inaugural Super Happy Dev Castle, my buddy Dave Rice told me about a project he was working on involving node.js, an event-based I/O system for Javascript.
Javascript outside of the browser?
This concept seemed almost ridiculous to me at that time but I thought it was worth a look and cobbled together a [...]]]></description>
			<content:encoded><![CDATA[<p>Last month, at the inaugural <a href="http://www.superhappydevcastle.org/">Super Happy Dev Castle</a>, my buddy <a href="http://twitter.com/davidjrice">Dave Rice</a> told me about a project he was working on involving <a href="http://github.com/ry/node">node.js</a>, an event-based I/O system for Javascript.</p>
<h3>Javascript outside of the browser?</h3>
<p>This concept seemed almost ridiculous to me at that time but I thought it was worth a look and cobbled together a quick &#8220;Hello World.&#8221; I was greatly amused by creating a command-line app with Javascript but did nothing more about it until last week. I&#8217;m currently starting out as an independant contractor &#038; have a bit of spare bandwidth so I thought I&#8217;d put together something a bit meatier in order to learn more about this system &#038; to also sharpen up my Javascript skills.</p>
<p>Dave had shown me <a href="http://github.com/felixge/node-comment">node-comment</a> and I also studied <a href="http://github.com/ry/node_chat">node_chat</a>. From there I had just enough reference material to understand the mechanics of <a href="http://en.wikipedia.org/wiki/Push_technology#Long_polling">long-polling</a> and to start piecing together a simple real-time commenting system.</p>
<h3>What is node?</h3>
<p>In and of itself, node is not a web development stack. It provides an I/O platform of which HTTP handling is a part. People are building blogging and wiki engines, FTP servers and command-line tools with this thing, anything I/O based is possible and thankfully micro-frameworks like <a href="http://github.com/jed/fab/">(fab)</a> can ease the pain of creating web apps.</p>
<p>Node is still very young software, which I have felt the pain of. To serve up static content I wanted to use <a href="http://github.com/felixge/node-paperboy">paperboy</a> as it can be used as middleware within (fab), however mere days after the last update to the project the API it was relying upon in node changed fundamentally. Despite being new to node development I was able to <a href="http://github.com/stevenwilkin/node-paperboy">patch paperboy to work with node v0.1.31</a> and get on with my actual project. Another sticking point was the inability of (fab) to handle POSTed form variables, this functionality is planned for it&#8217;s next release though.</p>
<h3>Fun</h3>
<p>Ultimately, my app is of little practical use: it doesn&#8217;t make use of persistance or moderation and node&#8217;s suitability for the production environment may itself be questionable at this time, but it was quite a fun experience. From something I more-or-less despised a decade ago I&#8217;ve come to develop a real affection for coding Javascript over the past few years.</p>
<p>When I had the basics of the app laid-down I eagerly awaiting the moment when I could have it open in two browser windows and enter a comment into one and see it appear in the second. That moment came and it brought a smile to my face. I suggest you give it a go <img src='http://sickbiscuit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Get the code</h3>
<p>As a wise man once said, code speaks louder than words, so please be my guest and <a href="http://github.com/stevenwilkin/node-shoutbox">clone my demo on GitHub<a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/03/19/node-shoutbox-a-simple-node-js-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A dummy datasource for CakePHP</title>
		<link>http://sickbiscuit.com/blog/2010/02/14/a-dummy-datasource-for-cakephp/</link>
		<comments>http://sickbiscuit.com/blog/2010/02/14/a-dummy-datasource-for-cakephp/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 18:10:54 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=443</guid>
		<description><![CDATA[I was recently developing a project at work which at the beginning didn&#8217;t need a database. However, Cake was still testing the database connection and issuing a warning as a result when it couldn&#8217;t connect. My solution was to create a dummy datasource which silenced the warnings and allowed me to get on with the [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently developing a project at <a href="http://rehabstudio.com/">work</a> which at the beginning didn&#8217;t need a database. However, <a href="http://cakephp.org">Cake</a> was still testing the database connection and issuing a warning as a result when it couldn&#8217;t connect. My solution was to create a dummy datasource which silenced the warnings and allowed me to get on with the rest of development in relative peace.</p>
<p>The scope of the project changed and a database was required. The dummy datasource had to go so I thought I&#8217;d share it here before it was thrown to the winds.</p>
<p>Here&#8217;s the datasource, which belongs in <code>models/datasources/dbo/dbo_dummy.php</code>:</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> DboDummy <span style="color: #000000; font-weight: bold;">extends</span> DboSource <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> connect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connected</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">function</span> disconnect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000033;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connected</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>To use the datasource use the following in your <code>config/database.php</code>:</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> DATABASE_CONFIG <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000033;">$default</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'dummy'</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'database'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2010/02/14/a-dummy-datasource-for-cakephp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mashing up Twitter Trends and Google Images</title>
		<link>http://sickbiscuit.com/blog/2009/09/15/mashing-up-twitter-trends-and-google-images/</link>
		<comments>http://sickbiscuit.com/blog/2009/09/15/mashing-up-twitter-trends-and-google-images/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 09:50:40 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=397</guid>
		<description><![CDATA[I recently released the latest entry in my series of nano-apps.
As with my previous efforts, istrending.com serves serves no real purpose other than as an act of deliberate practice: going through the process of coming up with an idea, writing code, registering domain names, setting up Cron jobs and configuring deployment systems to get it [...]]]></description>
			<content:encoded><![CDATA[<p>I recently released the latest entry in my series of <a href="/blog/2009/01/26/nano-apps/">nano-apps</a>.</p>
<p>As with my previous efforts, <a href="http://istrending.com">istrending.com</a> serves serves no real purpose other than as an act of deliberate practice: going through the process of coming up with an idea, writing code, registering domain names, setting up Cron jobs and configuring deployment systems to get it all up and running in a production environment.</p>
<p>I questioned why I was even bothering with an app that was likely not going to see any traffic or be of use to people and when I hit a minor javascript problem the project was shelved for a few months. I recently had a fresh burst of enthusiasm though and got the usual sense of achievement when I deemed the code &#8220;ready enough&#8221; and a quick <code>cap deploy</code> took care of the rest.</p>
<p>The main problem I&#8217;ve faced with this app concerns the script used to update the list of trending topics: the Twitter search api has a known issue of returning HTML instead of JSON, which has on occasion caused my inbox to be filled with emails from the Cron daemon alerting me to failed jobs. I&#8217;m also not very happy with how the javascript carousel functions, so there&#8217;s some scope for improvement there.</p>
<p>The code is available on <a href="http://github.com/stevenwilkin/istrending.com">GitHub</a> as usual.</p>
<p>Next up is probably something bigger, very likely involving Rails. I&#8217;ve been reading up on the various testing methodologies used in the Ruby world and have written my first set of RSpec tests so I hoping my next release will at least have some test coverage. Other than that I&#8217;ll just have to see what ideas come to mind between now and then.</p>
<p>Any suggestions on what I should do next?</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/09/15/mashing-up-twitter-trends-and-google-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Because everyone needs their own URL shortening service</title>
		<link>http://sickbiscuit.com/blog/2009/04/21/because-everyone-needs-their-own-url-shortening-service/</link>
		<comments>http://sickbiscuit.com/blog/2009/04/21/because-everyone-needs-their-own-url-shortening-service/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:15:46 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=378</guid>
		<description><![CDATA[At the moment I&#8217;m in between paid work and have been using my time to generally enjoy life but to also improve my skills. I&#8217;m all about the skills.
As an act of deliberate practice to hone my skills with web-application development and to deepen my understanding of the Rails framework I&#8217;ve been adding to my [...]]]></description>
			<content:encoded><![CDATA[<p>At the moment I&#8217;m in between paid work and have been using my time to generally enjoy life but to also improve my skills. I&#8217;m all about the skills.</p>
<p>As an act of <a href="http://freakonomics.blogs.nytimes.com/2008/03/11/how-did-a-rod-get-so-good/">deliberate practice</a> to hone my skills with web-application development and to deepen my understanding of the Rails framework I&#8217;ve been adding to my collection of <a href="/blog/2009/01/26/nano-apps/">nano-apps</a>.</p>
<p>A while back I had an idea to develop a URL shortener just to see how little code would be required but decided the world really didn&#8217;t need another one. With time on my hands over Easter &#038; the curiosity of a technology entusiast I just started hacking and had a functioning prototype within a short time-frame.</p>
<p>I wasn&#8217;t keen on parting with my shiny pennies for a domain name considering my lack of income but I&#8217;d written the code and thought I&#8217;d may as well go the whole hog and get my work into the wild.</p>
<p>So, without further ado, I present <a href="http://io.gd/">io.gd</a> . As usual, code is available on <a href="http://github.com/stevenwilkin/io.gd">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/04/21/because-everyone-needs-their-own-url-shortening-service/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finally, after 2 and a half years, my Rails DVD catalogue is go</title>
		<link>http://sickbiscuit.com/blog/2009/04/16/finally-after-2-and-a-half-years-my-rails-dvd-catalogue-is-go/</link>
		<comments>http://sickbiscuit.com/blog/2009/04/16/finally-after-2-and-a-half-years-my-rails-dvd-catalogue-is-go/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 13:33:28 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Movies]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=369</guid>
		<description><![CDATA[Well, it only took me 2 and a half years but I finally used Rails to develop a catalogue for my DVD collection.
The catalogue loosely fits in with my series of nano-apps and is hosted on movies.stevenwilkin.com. The code is publicly available on GitHub for anyone who&#8217;s interested.
All&#8217;s left now is to actually use the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it only took me <a href="blog/2006/10/18/ruby-on-rails/">2 and a half years</a> but I finally used Rails to develop a catalogue for my DVD collection.</p>
<p>The catalogue loosely fits in with my series of <a href="/blog/2009/01/26/nano-apps/">nano-apps</a> and is hosted on <a href="http://movies.stevenwilkin.com/">movies.stevenwilkin.com</a>. The code is publicly available on <a href="http://github.com/stevenwilkin/movies.stevenwilkin.com">GitHub</a> for anyone who&#8217;s interested.</p>
<p>All&#8217;s left now is to actually <em>use</em> the system and fill in the details of my collection!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/04/16/finally-after-2-and-a-half-years-my-rails-dvd-catalogue-is-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An experiment with Sinatra, HAML and Blueprint CSS</title>
		<link>http://sickbiscuit.com/blog/2009/04/15/an-experiment-with-sinatra-haml-and-blueprint-css/</link>
		<comments>http://sickbiscuit.com/blog/2009/04/15/an-experiment-with-sinatra-haml-and-blueprint-css/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 15:04:17 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=360</guid>
		<description><![CDATA[In my last post I considered transforming stevenwilkin.com into a Sinatra app.
Well, I did it, although I&#8217;m only mentioning it now.
Not only was this my first experience with Sinatra but I also decided to try using HAML for the markup and Blueprint CSS to help with the styling. If I&#8217;m going to play with a [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="/blog/2009/02/15/first-production-rails-app/">last post</a> I considered transforming <a href="stevenwilkin.com">stevenwilkin.com</a> into a <a href="http://www.sinatrarb.com/">Sinatra</a> app.</p>
<p>Well, I did it, although I&#8217;m only mentioning it now.</p>
<p>Not only was this my first experience with Sinatra but I also decided to try using <a href="http://haml.hamptoncatlin.com/">HAML</a> for the markup and <a href="http://www.blueprintcss.org/">Blueprint CSS</a> to help with the styling. If I&#8217;m going to play with <em>a</em> new technology why not play with a <em>few</em> new technologies?</p>
<p>I found Sinatra quite straight forward: you match up a HTTP verb (eg &#8216;GET&#8217;) and a url (eg &#8216;/&#8217;) with a block of Ruby and the results can be sent directly to the browser or an optional view template can be rendered. Simple!</p>
<p>Instead of a Model-View-Controller pattern like many of us are accustomed to, Sinatra provides more of a Controller-View setup which I believe would make it more suited to smaller apps which don&#8217;t necessarily make use of a database or where a full-stack framework like Rails would be overkill. If I create any more nano-apps in the future I&#8217;ll more than likely use it again.</p>
<p>What really struck me during this experiment and made the whole thing worthwhile was HAML. The simplicity and clarity of it&#8217;s syntax was super refreshing and meant I had to do a lot less typing and didn&#8217;t have to remember to close divs etc, never mind it being white-space sensitive! All Ruby-based web development I&#8217;ve done since has used it.</p>
<p>I wasn&#8217;t fussed on Blueprint. I found having a grid background during the *ahem* design phase to be great but I probably didn&#8217;t make enough use of it&#8217;s features for it to really shine through. In terms of styling and CSS I didn&#8217;t take much time to look at <a href="http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html">SASS</a> and didn&#8217;t use it, but I&#8217;ve since reread the documentation and may well make use of it in the future.</p>
<p>The app was deployed onto Passenger, like my previous experiments. It took a small bit of google-fu to get the Capfile and Rack configuration tweaked correctly but once this was done pushing the code into production with Capistrano was a breeze. How did I ever survive without Capistrano?</p>
<p>The deeper I get into Ruby the cruder PHP seems, not to mention C#. The future seems exciting.</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/04/15/an-experiment-with-sinatra-haml-and-blueprint-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First production Rails app</title>
		<link>http://sickbiscuit.com/blog/2009/02/15/first-production-rails-app/</link>
		<comments>http://sickbiscuit.com/blog/2009/02/15/first-production-rails-app/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 16:41:59 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/?p=310</guid>
		<description><![CDATA[I released my first production Rails application, hugagoth.com, last night.
I first started playing with Rails over 2 years ago and it has taken me until now to take an app through from conception to initial deployment. And an interesting journey it has been.
When I first started investigating Rails I had never used a web framework [...]]]></description>
			<content:encoded><![CDATA[<p>I released my first production <a href="http://rubyonrails.org/">Rails</a> application, <a href="http://hugagoth.com/">hugagoth.com</a>, last night.</p>
<p>I first started playing with Rails <a href="/blog/2006/10/18/ruby-on-rails/">over 2 years ago</a> and it has taken me until now to take an app through from conception to initial deployment. And an interesting journey it has been.</p>
<p>When I first started investigating Rails I had never used a web framework before and the <a href="http://www.ruby-lang.org/">Ruby</a> language really confused me, but there were a few things I liked. I liked the idea of convention over configuration, opinionated software and the amazing community that has built up around this set of technologies.</p>
<p>Not long after this, I started work on another project and considered using it as the motivation to fully get to grips with Rails, but getting the job done was more important so I headed down the PHP route, having had a bit of experience with it over the years. I&#8217;m amazed that I now have <a href="/blog/2007/02/07/cakephp/">2 years of CakePHP</a> development experience. It gets a bad rep concerning it&#8217;s performance speed but if I&#8217;m doing any bespoke PHP work, <a href="http://cakephp.org/">Cake</a> is never far away.</p>
<p>Deploying Rails apps a couple of years ago seemed like quite an involved process, what with application servers, web servers, proxies and clusters but now with <a href="http://www.modrails.com/">Passenger</a>, getting a production environment up and running is a breeze. I&#8217;ve also developed a great love for <a href="http://capify.org/">Capistrano</a>, using it with non-Rails apps.</p>
<p>Calling <a href="http://hugagoth.com/">hugagoth.com</a> my first Rails app in the wild is a bit of a lie. When I discovered Passenger I wanted to see just how easy deployment now was so I converted my static, single-page <a href="http://stevenwilkin.com">professional site</a> into a Rails app. A bit overkill I know as it doesn&#8217;t even do anything, but a worthwhile experiment none-the-less.</p>
<p>It&#8217;s unlikely I&#8217;ll ever use Rails in my <a href="/blog/2008/06/04/a-developer-again-i-am/">current day job</a> so I&#8217;m unsure what I&#8217;ll be doing with this framework in the future. I&#8217;ll probably convert <a href="http://stevenwilkin.com">stevenwilkin.com</a> to run on <a href="http://www.sinatrarb.com/">Sinatra</a> just for kicks and if any interesting ideas come to mind, you never know!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2009/02/15/first-production-rails-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
