<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>Mentalized</title>
		<link>http://mentalized.net/journal/</link>
		<description>The online journal of Jakob Skjerning, a freelance web application developer</description>
		<language>en-us</language>		
		<copyright>Copyright 2009, Jakob Skjerning</copyright>
		<lastBuildDate>Tue, 19 May 2009 11:46:00 +0100</lastBuildDate>
		<generator>Movable Type (http://www.movabletype.org/?v=3.31)</generator>
		<ttl>600</ttl>		
		
				<item>
			<title>Java kicks Ruby in the what now?</title>
			<description><![CDATA[<p>When I first read the <a href="http://java.sys-con.com/node/965189">Java Kicks Ruby on Rails in the Butt article</a> by Javier Paniza, I brushed it aside as something from the time when Rails was just getting traction and people using related, established technologies started feeling threatened.</p>

<p>I then noticed the date - turns out the article is only a few days old! Color me confused, could that article really have been written in 2009? I thought we had left the <span class="caps">FUD</span>-spreading behind us.</p>

<p>In an effort to educate Javier - and hopefully others - I decided to rewrite the Rails part of his article the way he would have written it had he had more knowledge and experience with Rails. </p>]]><![CDATA[<h2>Models</h2>

<p>First order of business when creating a Rails application is to generate the basic structure. This sets up our directory structure, configuration file, and all the other goodness that makes it easy to find ones way around a Rails project:</p>

<pre><code class="shell">$ rails cookbook2
      create  
      create  app/controllers
      ...
$ cd cookbook2</code></pre>

<p>We need to store recipes and categories, so let&#8217;s create two models with their database tables. Since Javier doesn&#8217;t like passive code generation, I&#8217;ll try to limit that in this tutorial, hence I am using the model generator rather than the scaffold generator for this:</p>

<pre><code class="shell">$ ./script/generate model Recipe category_id:integer title:string description:string instructions:text
$ ./script/generate model Category name:string
$ rake db:migrate</code></pre>

<p>This creates our models and the relevant database tables with the specified fields. No <span class="caps">SQL </span>is required, no need to mess around in more or less usable database <span class="caps">GUI</span>s. We&#8217;re also getting the inklings of an eventual test suite created for us.</p>


<h2>Controllers</h2>

<p>At this point we need to create some controllers we can access through a browser. The easiest way - at least the way that&#8217;s easiest to describe in words - is to simply use the controller generator twice:</p>

<pre><code class="shell">$ ./script/generate controller recipes
$ ./script/generate controller categories</code></pre>

<p>This creates two controllers of 2 lines each - obviously trivial to do by hand. I&#8217;ll leave that as an exercise for the code generation wary reader.</p>


<h2>The not so secret ingredient</h2>

<p>It&#8217;s time to install the secret ingredient, which is what Javier really wanted to be comparing <a href="http://openxava.org">his project</a> with. <a href="http://github.com/relevance/streamlined/tree/master">Streamlined</a> is a framework (seems everything is these days?) that &#8220;&#8230; allows you to quickly generate useful user interfaces, declaratively&#8221;:</p>

<pre><code class="shell">$ ./script/plugin install git://github.com/relevance/streamlined.git</code></pre>

<p>In order to hook Streamlined properly into our application, a few files need to changed (we&#8217;re actually writing code now, for the first time). First, add one line to the Application Controller:</p>

<pre><code class="ruby"># app/controllers/application_controller.rb:
class ApplicationController &lt; ActionController::Base
  ...
  layout 'streamlined'
  ...
end</code></pre>

<p>Both the controllers we created before needs a single line added, increasing their line count by 50%!</p>

<pre><code class="ruby"># app/controllers/categories_controller.rb:
class CategoriesController &lt; ApplicationController
  acts_as_streamlined
end</code></pre>

<pre><code class="ruby"># app/controllers/recipes_controller.rb:
class RecipesController &lt; ApplicationController
  acts_as_streamlined
end</code></pre>

<p>The next step is optional, and you can skip it if you like navigating by changing the <span class="caps">URL </span>in the address bar of your browser. If you prefer navigation you can click on, add a single method to the ApplicationHelper:</p>

<pre><code class="ruby"># app/helpers/application_helper.rb:
module ApplicationHelper
  def streamlined_side_menus
    [
      ['Recipes', {:controller =&gt; 'recipes'}],
      ['Categories', {:controller =&gt; 'categories'}]
    ]
  end
end</code></pre>

<p>Time to start our application and see how it looks</p>

<pre><code class="shell">$ ./script/server</code></pre>

<p><img src="/files/journal/cookbook2/recipes.png" alt="" height="384" width="512" />
<img src="/files/journal/cookbook2/export.png" alt="" height="384" width="512" /></p>

<p>Wow, look at that. Note that you can filter the entries, sort the columns, export to a variety of formats, and pagination is built in. Looks almost production ready, doesn&#8217;t it? </p>

<p>Looking back, it looks like I wrote a massive 9 lines of code (3 if you skipped the optional step, 13 if you created the two controllers manually). No unused application code has been generated. </p>

<p>Little work, polished result indeed.</p>


<h2>Adding a relationship</h2>

<p>Let&#8217;s round this article off by refuting yet another false claim in Javiers article. To create a relationship - or association, as we call it in the Rails world - all you need to do is add a single line to your model:</p>

<pre><code class="ruby"># app/models/recipe.rb:
class Recipe &lt; ActiveRecord::Base
  belongs_to :category
end</code></pre>

<p><img src="/files/journal/cookbook2/edit_recipe.png" alt="" height="384" width="512" /></p>

<p>Now refresh the page for creating a new recipe. Voila, there&#8217;s a dropdown box for assigned categories to recipes. There is no need to write any <span class="caps">HTML, </span>restart the server, or recompile anything for that matter.</p>


<h2>Conclusion</h2>

<p>Interestingly enough, while Javiers article is filled with inaccuracies and is based on his lack of knowledge of Rails and its ecosystem, I don&#8217;t particularly disagree with his conclusion.</p>

<p>Rails does use passive code generation, and yes, if you want to extend or refine the generated code you have to actually edit it. You know, that sounds an awful lot like programming to me.</p>

<p>That said, I seriously disagree with the idea that productivity can be measured using contrived examples, and that a technology can be evaluated based on cursory knowledge gained from a 2 year old tutorial.</p>]]></description>
			<link>http://mentalized.net/journal/2009/05/19/java_kicks_ruby_in_the_what_now/</link>
			<guid isPermaLink="false">2001@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2009/05/19/java_kicks_ruby_in_the_what_now/#comments</comments>
			<pubDate>Tue, 19 May 2009 11:46:00 +0100</pubDate>
			<category>Programming</category>
		</item>
				<item>
			<title>Launch: Lokalebasen</title>
			<description><![CDATA[<p>It&#8217;s not like this has been a secret until now, but <a href="http://www.lokalebasen.dk" title="Lokalebasen: Find ledige kontorlokaler til leje og salg">Lokalebasen</a>, the most recent <a href="http://substancelab.com" title="Freelance web application development">client work built by me</a> (in collaboration with <a href="http://casperfabricius.com">Casper Fabricius</a>) has launched.</p>

<p><a href="http://www.lokalebasen.dk" title="Uvildig portal for erhvervslejemål">Lokalebasen</a> allows realtors and other providers of offices, warehouses and production facilities to connect with companies looking for a location to buy or rent in Denmark. And so far, the site has been successful.</p>

<p><img src="/files/journal/lokalebasen/lokalebasen.jpg" alt="" height="288" width="512" /></p>]]><![CDATA[<p>We quietly launched a version of <a href="http://www.lokalebasen.dk" title="Uafhængig portal for ledige kontorlokaler, produktionslokaler og lagerlokaler i Danmark">Lokalebasen</a> in January and have been continuously improving the site and experience since then. When we launched, the site was functional, but far from complete. Nevertheless, people looking for offices etc. still managed to find it, and the first deals have already been closed thanks to <a href="http://www.lokalebasen.dk" title="Lokalebasen: Kontorlokaler til leje">Lokalebasen</a>. </p>

<p>This is really a testament to agile and test driven development (well, actually <span class="caps">BDD </span>to be specific). It basically means <a href="http://www.lokalebasen.dk" title="Lokalebasen">Lokalebasen</a> have been able to fund part of the development of the site with actual revenue from the site itself. </p>

<p>That sure beats waiting for income for a few more months while we perfect the site. A big win for releasing early, releasing often - and in particular for the client.</p>]]></description>
			<link>http://mentalized.net/journal/2009/04/17/launch_lokalebasen/</link>
			<guid isPermaLink="false">2000@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2009/04/17/launch_lokalebasen/#comments</comments>
			<pubDate>Fri, 17 Apr 2009 12:46:44 +0100</pubDate>
			<category>Projects</category>
		</item>
				<item>
			<title>Testing HTML emails with Rails and Litmus</title>
			<description><![CDATA[<p>Every so often, a client wants their web application to send out emails that could benefit from a bit richer styling than what&#8217;s provided with your basic text emails. Occasionally, they&#8217;re right, and you find yourself walking down the path of <span class="caps">HTML </span>emails. But beware! That path is perilous and behind every corner lurks the big, all-consuming monsters of <span class="caps">HTML </span>emails; Email clients.</p>


<h2>Thar be monsters in them woods</h2>

<p>It quickly turns out that pretty much every email client renders <span class="caps">HTML </span>differently than the next. It&#8217;s sort of like cross-browser issues, but without the comfort of <span class="caps">CSS </span>hacks, conditional comments, UserAgent checking, and IE-specific stylesheets. </p>

<p>Instead, you find yourself facing more email clients than there are browsers, many used by enterprises that don&#8217;t mind running several year old versions of programs. Realistically speaking, it&#8217;s only feasible to have access to a fraction of those email clients.</p>]]><![CDATA[<p>On <a href="http://www.lokalebasen.dk">Lokalebasen</a> we are currently going through an iteration of designing a bunch of <span class="caps">HTML </span>emails and found ourselves spending too much time guessing how email clients reacted to our <span class="caps">HTML </span>emails, only to be proven wrong when we finally sent them to someone using some obscure email client ::Outlook 2007 cough cough::</p>


<h2>Litmus</h2>

<p>This is where <a href="http://litmusapp.com/email-testing">Litmus</a>, a web application for cross-browser testing enters the stage. While Litmus doesn&#8217;t magically make all email clients render <span class="caps">HTML </span>the same way, it allows you to at least see how your email appears in the <a href="http://litmusapp.com/email-testing">most used email clients</a>, ranging from Hotmail (remember that one?) over Mail.app to several versions of Outlook and Lotus Notes.</p>

<p><img src="/files/journal/litmus/litmus.jpg" alt="" height="160" width="512" /></p>

<p>That&#8217;s all fine and dandy when you&#8217;re testing &#8220;static&#8221; emails, which are basically <span class="caps">HTML </span>files on your local machine. However, when your email is built dynamically in a web application and you&#8217;d like to see how it might appear to your users, it gets a bit tedious.</p>

<p>Sure, you can receive the emails yourself and forward them to your Litmus account. However, don&#8217;t expect the result to be representative of what your users will actually see. Your email client will probably do stuff to the email it received before fowarding it, so we need to cut the middleman (in this case, ourselves) out of the equation.</p>


<h2>Rails, Github and plugins save the day</h2>

<p>Litmus has a nifty little feature (hidden under &#8220;Extras&#8221;) that gives you a single email address you can send emails to and have them tested in the available email clients. Our task then became getting all emails from the application sent to the same email address.</p>

<p>We dug around, and ended up using the <a href="http://github.com/pboling/sanitize_email/tree/master">Sanitize Email plugin</a>. That allowed us to configure our local machines to send all emails created in development environment directly to our Litmus account, while in test and production environments the application respectively doesn&#8217;t send emails and sends emails to their actual recipients.</p>

<p>We can then either use the development app as a user would and see the emails in Litmus, or we can trigger individual emails directly from the console.</p>

<h3>About the Sanitize Email plugin</h3>

<p>We did end up having to modify the plugin ever so slightly to have it work with our application, which is running Rails 2.2.3. Through the wonders of <a href="http://git-scm.com/">Git</a> and <a href="http://github.com">GitHub</a> forking, you can get the modified version at <a href="http://github.com/koppen/sanitize_email/tree/master">http://github.com/koppen/sanitize_email/tree/master</a>.</p>


<h2>Eternal bliss?</h2>

<p>One thing that would make this workflow a lot better, is if we could somehow get Litmus to not create a new test for each email we send, but rather add new versions to an existing test of that same email. I imagine it might be possible by looking at just the email subject line. </p>

<p>While the above is not the perfect workflow, and the feedback cycle is still kinda slow (building screenshots for 27 email clients does take some time), it sure is nice to be able to actually see what ones users will see on their screens - without having to invest in superfluous software like Microsoft Office and Lotus Notes.</p>]]></description>
			<link>http://mentalized.net/journal/2009/04/08/testing_html_emails_with_rails_and_litmus/</link>
			<guid isPermaLink="false">1999@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2009/04/08/testing_html_emails_with_rails_and_litmus/#comments</comments>
			<pubDate>Wed, 08 Apr 2009 14:16:50 +0100</pubDate>
			<category>Webdesign</category>
		</item>
				<item>
			<title>Size still matters</title>
			<description><![CDATA[<p>A couple of years ago (wow, has it been that long already?) I posted the results from my research into browser viewport widths, <a href="http://mentalized.net/journal/2006/10/24/browser_size_does_matter_actual_numbers/">Size Does Matter</a>.</p>

<p>Back then, I pointed out that basing your designs on the width of the screen was pointless. Far from every visitor would actually use the full width of their screen for their browser - only 66% on average. The wider your screen, the less likely you were to maximize your browser.</p>

<p>Even though massive flatscreen monitors regularly appear in cereal boxes and as <a href="http://www.kindersurprise.com/home.html">Kinder surprises</a> these days, the reality isn&#8217;t much different from what it was 2 years ago; Make your designs wider than 800 pixels and expect a good chunk of your visitors to get a horizontal scrollbar.</p>


<h2>Choosing a design width</h2>

<p>When determining what width to give your design the primary goal must be that as many visitors as possible should be able to view the entire design without getting a horizontal scrollbar (<a href="http://www.useit.com/alertbox/20050711.html">scrolling horizontally is bad, mmkay</a>).</p>

<p>The following chart shows the percentage of visitors that will not get a horizontal scrollbar for specific pixel widths. It also shows the figures from my 2006 study:</p>

<p><img src="/files/journal/size_still_matters/visitors_without_scrollbars.jpg" alt="" height="300" width="512" /></p>

<p>It&#8217;s interesting to note, that the available width has clearly increased since 2006. Back then, if you were to make your design 800 pixels wide, roughly 10% of your visitors would get a horizontal scrollbar. Today, that number is around 5%. It&#8217;s getting easier to justify going above the 800 pixels mark.</p>

<p>Another interesting thing to note is the two steep drop-off points occuring in both graphs after 1000 and 1250 pixels. Both of those correspond pretty well to a maximized browser in the two most widespread screen widths; 1024 and 1280 pixels. </p>

<p>The remnants of a drop-off is also visible right before the 800 pixel mark, but it&#8217;s almost not visible indicating that 800 pixels wide screens are becoming a thing of the past.</p>


<h2>What does a smart designer do?</h2>

<p>The above numbers are based on my statistics gathered from <a href="http://mentalized.net">mentalized.net</a>. A smart designer will obviously measure this on the actual site in question before making a desicion. </p>

<p>Unfortunately, many statistics packages still only provide the useless screen size metric instead of the useful viewport width one. <a href="http://haveamint.com">Mint</a> is still the only one I know of that tracks viewport widths - and that&#8217;s through a <del>plugin</del> <a href="http://www.haveamint.com/peppermill/pepper/9/real_estate/">pepper</a>.</p>


<h2>What does a lazy designer do?</h2>

<p>If you&#8217;re stuck with a statistics package that doesn&#8217;t provide you with the figures you need to make a decision, you&#8217;ll have to settle for my advice - just like I did when designing the <a href="http://substancelab.com">Substance Lab</a> website (a rare case of me doing what I say, I admit).</p>

<p>Back in 2006 I recommended that you &#8220;optimize your designs for a width of 770 pixels while making sure they scale [&#8230;] to 960 pixels&#8221;. Now, more than 2 years later, that recommendation hasn&#8217;t changed much, unfortunately. </p>

<p>With a design width of 770 pixels only 2% of your visitors should encounter the dreaded horizontal scrollbar. At 960 pixels, the number has climbed to 7% - that&#8217;s 1 in every 14th visitor.</p>

<p>Personally, I don&#8217;t see the value in optimizing for 2% of my visitors. I wouldn&#8217;t, however, be happy knowing that 7% of my visitors were getting a less than optimal experience. You have to decide for yourself - and for your customers - where your accepted cut-off point is. </p>]]></description>
			<link>http://mentalized.net/journal/2009/02/19/size_still_matters/</link>
			<guid isPermaLink="false">1998@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2009/02/19/size_still_matters/#comments</comments>
			<pubDate>Thu, 19 Feb 2009 22:25:00 +0100</pubDate>
			<category>Webdesign</category>
		</item>
				<item>
			<title>Side job versus dayjob</title>
			<description><![CDATA[<p>I have been moonlighting as a <a href="http://substancelab.com">freelance webdeveloper</a> for the last couple of years. The first year, I was using my spare evenings and weekends until I began having trouble finding enough time to dedicate to new projects. </p>

<p>My reaction was to cut down on <a href="http://biq.dk">my dayjob</a>, leaving me with more time to focus on <a href="http://substancelab.com/work/">my own clients</a> (and less time to focus on BiQ, forcing us to <a href="http://mentalized.net/journal/2007/09/27/biq_is_hiring/">hire another developer</a>).</p>

<p>However, it was only a matter of time before I&#8217;d run into that luxury problem again. Once again, having to turn down cool new projects due to lack of time left me with the same choice I took roughly a year ago. And once again, I decided to cut down on my dayjob.</p>


<h2>Half a dayjob minus half a day job equals&#8230;?</h2>

<p>Do the math and you&#8217;ll notice that it leaves me no time to work for BiQ. And you&#8217;d be correct. Starting this December, I will be a full time <a href="http://substancelab.com">independent web application developer</a>. I am super excited (and slightly scared) about this change. </p>

<p>If you have a great idea for a website, why don&#8217;t you <a href="mailto:%6A%61%6B%6F%62%40%6D%65%6E%74%61%6C%69%7A%65%64%2E%6E%65%74">drop me a line</a> and we&#8217;ll talk about it - I love giving good ideas the execution they deserve.</p>]]></description>
			<link>http://mentalized.net/journal/2008/11/20/side_job_versus_dayjob/</link>
			<guid isPermaLink="false">1997@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2008/11/20/side_job_versus_dayjob/#comments</comments>
			<pubDate>Thu, 20 Nov 2008 15:56:27 +0100</pubDate>
			<category>Life</category>
		</item>
				<item>
			<title>Rails Camp DK 2008</title>
			<description><![CDATA[<p>Take 12 attendees (one from Italy, way to go, Fransesco!), 11 Apple laptops (and one Windows one, I believe), 1 wifi hotspot, mix it all together in <a href="http://flickr.com/photos/wa7son/2981895522/">a cottage</a> in <a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=langegyde+75%2C+denmark&amp;sll=55.056251%2C10.453148&amp;sspn=0.061353%2C0.129089&amp;ie=UTF8&amp;t=h&amp;ll=55.045618%2C10.462825&amp;spn=0.007302%2C0.016952&amp;z=16&amp;iwloc=addr">the middle of nowhere</a>, sprinkle it with a tad of <a href="httpL//ruby-lang.org">Ruby</a>, <a href="http://git.or.cz/">Git</a>, and <a href="http://drnicwilliams.com/2008/06/18/what-is-gitjour-gemjour-starjour/">*jour</a> and let is stew for 2 days and 2 nights. </p>

<p>What you get is a <a href="http://railscamp08.org/#dk_october_2008">Rails Camp</a>, and the above recipe was cooked with great success last weekend. Thomas Watson has <a href="http://flickr.com/photos/wa7son/sets/72157608360965512/">a bunch of pictures from the event</a>.</p>

<h2>Retrospect</h2>

<p>Like <a href="http://chopmo.wordpress.com/2008/10/27/back-from-rails-camp-dk-08/">Chopmo</a> I enjoyed meeting members of the still growing Ruby community I hadn&#8217;t met before. </p>

<p>Looking back at the event, I might as well add a few observations - probably mostly echoing Chopmos post.</p>

<h3>Internet access</h3>

<p>My biggest pet peeve before the actual event was the notion that everyone seemed so worried about not having internet for the two days. To me, that was part of the fun. In the end, though, we did indeed have Internet access at the cottage.</p>

<p>Luckily, it wasn&#8217;t a terribly fast connection, but it was bearable, and I must admit I liked the infusion of emails and IMs from the outside world. That said, I think we could easily have come better prepared (like having the *jour stuff installed and working) and have managed without internet just fine. </p>


<h3>Geeks are introverts, even the Rails-kind</h3>

<p>I am not sure how much the presence of an Internet connection contributed to this, but as geeks go, we spend a lot of time staring into our own laptop screen. I realize I am as guilty of this as the next guys, but just doing something by yourself is the path of least resistance, and you can do that at home. Rails Camp should shake up the old patterns.</p>


<h2>Improvements?</h2>

<h3>Demos/presentations</h3>

<p>I like the idea of scheduling things. Make everyone give a demo or presentations of sorts. Thing is, it doesn&#8217;t have to be Steve Jobs keynote quality - as Laust clearly proved ;) Demos are best as it can often be done without any preparation.</p>

<p>The main benefit of this is to drag people away from the screen and focus attention on something shared between the group. Perhaps do this every other hour for like 15 minutes. </p>

<h3>Games</h3>

<p>Okay, so I am a gamer, which obviously biases me in this direction. I do, however, think that having Guitar Hero or a Wii or something else present to drag people away from their laptops would be a good idea. Again, break the existing molds.</p>

<h3>Shared projects</h3>

<p>I luckily managed to -sucker-convince another person into working on the Bottleships project with me (I&#8217;ll post more about that eventually), which was awesome. I would have loved to see more people contributing, though, but so be it.</p>

<p>One way to perhaps achieve this, would be to take a Barcamp style approach to projects. Everyone writes their project idea somewhere, perhaps pitches it to the group, and then people vote on what project they&#8217;d prefer to work on/help with, and only the top projects are picked. </p>

<p>People whose project didn&#8217;t get picked should be encouraged to go to one of the other projects so noone is left sitting around for one self.</p>


<h2>Don&#8217;t get me wrong</h2>

<p>I had lots of fun, and I&#8217;ll definitely attend the next camp if possible. Thanks a lot to all who attended, and especially thanks to <a href="http://www.linkedin.com/in/henrikloevborg">Henrik</a> for getting it all organized.</p>]]></description>
			<link>http://mentalized.net/journal/2008/10/30/rails_camp_dk_2008/</link>
			<guid isPermaLink="false">1996@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2008/10/30/rails_camp_dk_2008/#comments</comments>
			<pubDate>Thu, 30 Oct 2008 12:05:36 +0100</pubDate>
			<category>Life</category>
		</item>
				<item>
			<title>Rails Rumble 2008</title>
			<description><![CDATA[<p><a href="http://railsrumble.com">Rails Rumble 2008</a> is in full effect. Rails Rumble is a 48 hour Rails development contest, and I and two others from the <a href="http://copenhagenrb.dk">Copenhagen Ruby Brigade</a> have decided to enter the fray.</p>

<h2>2 hours to go</h2>

<p>The time is getting close to midnight and my eyelids are getting to close to the floor - or so it feels. We&#8217;re done, there&#8217;s no way we can manage any more improvements.</p>

<p>The last hour we&#8217;ve been doing bugfixes by deleting the stuff that&#8217;s not working. When something is buggy with no time (or energy) to fix it, and you refuse to deploy low quality stuff, that&#8217;s the way to go about it. Oh well.</p>

<p>Rails Rumble 2008 is over for us, looking forward to going through all the apps - some of them are looking really amazing.</p>


<h2>3.5 hours to go</h2>

<p>Fatigue is definitely setting in now. We&#8217;re doing stupid mistakes and things aren&#8217;t moving nearly as quickly as it has been. But, we&#8217;ve been able to check off some of the items on the &#8220;nice to have&#8221; list, which is&#8230; well&#8230; nice. Looks like my ability to blog doesn&#8217;t increase the more tired I get, either.</p>

<p>Anyways, the site has been deployed, and we don&#8217;t want to risk doing anything major to it for the remainder of the contest - we&#8217;re bound to break something if we do.</p>

<p>So without further ado I give you <a href="http://quotagious.r08.railsrumble.com">Quotagious - the most awesome way to store and find quotes</a>.</p>



<h2>7 hours to go</h2>

<p>Uh oh, less than a regular day of work left. Actually, a lot less as it&#8217;s highly unlikely we&#8217;ll stay awake until the deadline, it being at 2AM our time and tomorrow being a work day.</p>

<p>Funny how tons of small things crop up as we get closer to the deadline. Luckily we have the features we aimed for done. And they would&#8217;ve been deployed had it not been for the fact that something took the server down. Oh well, with no staging environment stuff like that happens.</p>

<p>Thomas has been working on Twitter integration for the last few hours. We didn&#8217;t want to be the only Rails Rumble app not hooked up to Twitter somehow&#8230; Performance optimizations and even more usability improvements have been my focus for the last few hours - our beta testers are ruthless, thanks guys :)</p>

<p>In related news, we&#8217;re now down to 99% Ruby code, 1% Javascript :(</p>


<h2>12 hours to go</h2>

<p>75% through the competition. So far I have been focused on usability and making the site look nice. Thomas has started on one of the fancier features, and my wife has been doing beta-testing for us.</p>

<p>Having someone outside the team look over the application is invaluable, even if done remotely. We&#8217;ve already implemented some changes, primarily in relation to wording and program flow in order to make it clearer what the application is and how it works.</p>

<p>The application is pretty solid, and we&#8217;ve added a &#8220;stable&#8221; tag to it. So if we end up messing it totally up the last twelve hours, at least we&#8217;ll have something to deploy. We&#8217;ve also started working purely in feature branches (yay Git) to lessen the risk that we end up deploying something half-implemented and broken.</p>


<h2>Day 2 - 17 hours to go</h2>

<p>Good morning, time to dive back into the code after a short nights sleep. Unfortunately, the more interesting stuff will have to wait, as the nights beta-testing revealed a few serious issues that needs to be fixed; primarily usability-wise. I have a feeling that we won&#8217;t get many favourable votes if people cannot sign up or log in.</p>



<h2>26 hours to go</h2>

<p>Yawn, tiredness is definitely setting in, but we&#8217;ve come a long way by now. The core functionality is working and seems solid - although I am sure it&#8217;s all an illusion that shatters the moment a real user gets involved. We&#8217;ve even got around to adding the majority of the UI theme. </p>

<p>UI-wise we had originally decided on just buying a stock theme somewhere, but we ended up doing it ourselves. I had some visual ideas I wanted to try out, and most the themes we could find in the short time we&#8217;d put aside for it, didn&#8217;t feel right and/or would need too much modification after the fact. So we&#8217;re rolling our now - support for <span class="caps">IE6</span>? Yeah, right.</p>

<p>For the last couple of hours we&#8217;ve been mainly doing minor stuff, none of us really feel like tackling the bigger ToDo items. Looking at the bright side, this means we&#8217;ve got a fairly complete&#8217;ish application now not even halfways through the competion.</p>

<p>The plan for tomorrow is to dig into the more interesting stuff; the features that move the application away from &#8220;meh, this is just a script/generate scaffold job&#8221; and into <a href="http://blog.railsrumble.com/2008/10/17/in-this-corner">Championship belt</a> status - or at least, that&#8217;s the plan.</p>

<p>The plan for right now: Sleeping.</p>


<h2>32 hours to go</h2>

<p>The first long workday (and then some) has passed - and we&#8217;re still going strong. However fatigue is becoming noticeable and I suspect we&#8217;ll be heading away from the computers to do something different very soon.</p>

<p>The application is really shaping up. We&#8217;re dealing with a bunch of fairly intricate edge cases we discover as we learn more about data model, and Test Driven Development is really helping us out here.</p>

<p>Our To Do list for today is growing thin, and it looks like we might be able to start working on polish and cool stuff already today.</p>



<h2>37 hours to go</h2>

<p>5 hours in, and we&#8217;ve started questioning our data model. It&#8217;s not even that it&#8217;s that complex. We&#8217;ve got 5 models, but it should probably be just 4. Too bad we can&#8217;t figure out if it&#8217;ll make things easier or harder cutting the one model.</p>

<p>Another thing we&#8217;ve been running into is the desire to make things too good. When you&#8217;re facing a 48 hour deadline you have to settle for good enough. There&#8217;s simply no time to go &#8220;Hrm, that <span class="caps">URL </span>doesn&#8217;t like exactly like I&#8217;d like it to, let&#8217;s just tweak it a liiiiiiittle bit&#8230;&#8221; - before you know it, you look at the clock and it&#8217;s an hour later.</p>


<h2>42 hours to go</h2>

<p>Due to the competition starting at 1AM our time we figured we&#8217;d be wiser to start the competition by sleeping, so by now we&#8217;ve only been at it for roughly 3 hours. Progress so far: Breakfast has been eaten, and a basic application skeleton has been deployed to our server, running a very, very, very basic version of our core functionality.</p>

<p>We&#8217;ve used <a href="http://github.com/fudgestudios/bort/">Bort</a> (as I am sure a ton of other teams has as well) as the base for the application, and I am sure we&#8217;ve have saved some time doing just that. </p>

<p>Next time around I&#8217;ll probably take a look at the base application <em>before</em> actually basing an application on it, though. Not that there has been any issues, but we did waste some time figuring out some Bort details. Luckily, it&#8217;s time to dig into the meat of the application now.</p>]]></description>
			<link>http://mentalized.net/journal/2008/10/18/rails_rumble_2008/</link>
			<guid isPermaLink="false">1995@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2008/10/18/rails_rumble_2008/#comments</comments>
			<pubDate>Sat, 18 Oct 2008 09:42:29 +0100</pubDate>
			<category>Projects</category>
		</item>
				<item>
			<title>ImmediateFeedbackFormatter - Better formatted RSpec output</title>
			<description><![CDATA[<p>On one of my projects the specs are now taking a full 10 minutes to run on my machine. Needless to say, it&#8217;s mightily annoying seeing a spec failure in the output knowing you&#8217;ll have to wait for 10 minutes before you get the details of what&#8217;s failing and you can get to fixing it.</p>

<p>Luckily my co-worker, <a href="http://www.linkedin.com/in/laustrud">Laust Rud Jensen</a>, had that same itch and decided to scratch it. Unfortunately he doesn&#8217;t have a website to post about these things, so I am posting it for him:</p>


<h2>Laust speaks</h2>

<blockquote>

<p>Itch: specs are slow and RSpec progress feedback is either extremely verbose, or you have to wait for the full spec run to complete before you can see what failed.</p>

<p>Scratch: I&#8217;ve hacked together a new simple RSpec formatter called ImmediateFeedbackFormatter, with code based on the existing SpecdocFormatter.</p>

<pre><code>My spec/spec.opts file now contains:
--require
spec/rspec_immediate_feedback_formatter.rb
--format
Spec::Runner::Formatter::ImmediateFeedbackFormatter
--colour
--loadby
mtime
--backtrace</code></pre>

<p>The require and format options are needed to use the ImmediateFeedbackFormatter.</p>

<p>This new formatter will print full error details as soon as they are found. Successful or pending examples are written only as a dot in the output. Name of a spec group is only printed if errors occur within the group, so much less unnecessary output is generated.</p>

</blockquote>


<h2>Download it</h2>

<p>For now, you can get the basic formatter <a href="http://mentalized.net/files/rspec/rspec_immediate_feedback_formatter.rb">here</a> - hopefully it&#8217;ll sneak into RSpec proper or end up somewhere more accessible (and with tests and whatnot).</p>

<p>Install it by putting it somewhere in your project (spec/ for example), and require it in your spec.opts as shown above.</p>]]></description>
			<link>http://mentalized.net/journal/2008/10/16/immediatefeedbackformatter_better_formatted_rspec_output/</link>
			<guid isPermaLink="false">1994@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2008/10/16/immediatefeedbackformatter_better_formatted_rspec_output/#comments</comments>
			<pubDate>Thu, 16 Oct 2008 14:08:21 +0100</pubDate>
			<category>Programming</category>
		</item>
				<item>
			<title>change:healthcare on CNN</title>
			<description><![CDATA[<p>My longest running client, <a href="https://changehealthcare.com">change:healthcare</a>, has been <a href="http://edition.cnn.com/2008/HEALTH/09/25/ep.cutting.health.costs/index.html">featured on the <span class="caps">CNN </span>website</a> and is <a href="http://company.changehealthcare.com/blog/cnn-thanks/">scheduled to appear on air</a> this weekend - what a great achievement.</p>

<p>I&#8217;ve worked with Christopher, one of the founders, and the rest of <a href="http://company.changehealthcare.com/company-bios/">the team</a> for the last few years, going from a static website with just 5 pages to an increasingly complex Ruby on Rails application helping people make sense of their medical bills and providers.</p>

<p>These guys (and gals) are the real deal. They are in this to change healthcare for the better - <a href="http://www.myhealthcareiskillingme.com/">publishing a free <span class="caps">PDF </span>book</a> and getting on <span class="caps">CNN </span>are just a few of the steps on the way.</p>

<p>Congratulations.</p>]]></description>
			<link>http://mentalized.net/journal/2008/09/26/changehealthcare_on_cnn/</link>
			<guid isPermaLink="false">1993@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2008/09/26/changehealthcare_on_cnn/#comments</comments>
			<pubDate>Fri, 26 Sep 2008 09:29:07 +0100</pubDate>
			<category>Projects</category>
		</item>
				<item>
			<title>Things I learned from the Microsoft ads</title>
			<description><![CDATA[
<ol>
<li>Windows is confusing and all about nothing - just like any episode of the Seinfeld show.</li>
<li><a href="http://daringfireball.net/linked/2008/09/17/msft-advertising">Microsoft needs to piggyback</a> on Apples creativity.</li>
<li>Even though everyone and their brother use Windows, <a href="http://www.youtube.com/watch?v=kkZdkHylJ3w">group pressure</a> isn&#8217;t going to make me switch away from OS X.</li>
</ol>



<p>Ah well, at least the <a href="http://www.youtube.com/watch?v=afR5J7eskno">Gates/Seinfeld episodes</a> were somewhat amusing.</p>]]></description>
			<link>http://mentalized.net/journal/2008/09/23/things_i_learned_from_the_microsoft_ads/</link>
			<guid isPermaLink="false">1992@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2008/09/23/things_i_learned_from_the_microsoft_ads/#comments</comments>
			<pubDate>Tue, 23 Sep 2008 13:38:36 +0100</pubDate>
			<category>Software</category>
		</item>
			
	</channel>
</rss>