<?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 2010, Jakob Skjerning</copyright>
		<lastBuildDate>Mon, 08 Mar 2010 12:40:33 +0100</lastBuildDate>
		<generator>Movable Type (http://www.movabletype.org/?v=3.31)</generator>
		<ttl>600</ttl>		
		
				<item>
			<title>5 ways to run commands from Ruby</title>
			<description><![CDATA[<p>Every so often I have the need to execute a command line application from a Ruby application/script. And every single time I fail to remember what the different command-executing methods Ruby provides us with do.</p>

<p>This post is primarily a brain dump to aid my failing memory, and it was triggered by an <a href="http://github.com/koppen/redmine_github_hook/issues/issue/2">issue</a> with my <a href="http://github.com/koppen/redmine_github_hook">Redmine Github Hook plugin</a> where <span class="caps">STDERR </span>messages were not being logged.</p>

<p>The goal of this exercise is basically to figure out how to run a command and capture all its output - both <span class="caps">STDOUT </span>and <span class="caps">STDERR </span>- so that the output can be used in the calling script.</p>]]><![CDATA[<h2>err.rb</h2>

<p>The test script I&#8217;ll be running basically outputs two lines, one on <span class="caps">STDOUT, </span>the other on <span class="caps">STDERR</span>:</p>

<pre><code class="ruby">#!/usr/bin/env ruby
puts &quot;out&quot;
STDERR.puts &quot;error&quot;</code></pre>


<h2><a href="http://ruby-doc.org/core/classes/Kernel.html#M005960">Kernel#`</a> (backticks)</h2>

<blockquote><p>Returns the standard output of running cmd in a subshell. The built-in syntax %x{…} uses this method. Sets $? to the process status. </p></blockquote>

<pre><code>&gt;&gt; `./err.rb`
err
=&gt; &quot;out\n&quot;</code></pre>


<ul>
<li><span class="caps">STDERR </span>is output, but not captured</li>
<li><span class="caps">STDOUT </span>is captured</li>
</ul>




<h2><a href="http://ruby-doc.org/core/classes/Kernel.html#M005968">Kernel#exec</a></h2>

<blockquote><p>Replaces the current process by running the given external command.</p></blockquote>

<pre><code>&gt;&gt; exec('./err.rb')
out
err</code></pre>


<ul>
<li>Both <span class="caps">STDERR </span>and <span class="caps">STDOUT </span>is output. They aren&#8217;t captured as your process has been replaced so there is nothing to capture the output to.</li>
</ul>




<h2><a href="http://ruby-doc.org/core/classes/Kernel.html#M005971">Kernel#system</a></h2>

<blockquote><p>Executes cmd in a subshell, returning true if the command was found and ran successfully, false otherwise. An error status is available in $?. The arguments are processed in the same way as for Kernel::exec. </p></blockquote>

<pre><code>&gt;&gt; system('./err.rb')
out
err
=&gt; true</code></pre>


<ul>
<li>Both <span class="caps">STDERR </span>and <span class="caps">STDOUT </span>is output, but not captured.</li>
</ul>




<h2><a href="http://ruby-doc.org/core/classes/IO.html#M002242">IO#popen</a></h2>

<blockquote><p>Runs the specified command string as a subprocess; the subprocess‘s standard input and output will be connected to the returned IO object.</p></blockquote>

<pre><code>&gt;&gt; output = IO.popen('./err.rb')
=&gt; #&lt;IO:0x1017511b8&gt;
&gt;&gt; err
output.readlines
=&gt; [&quot;out\n&quot;]</code></pre>


<ul>
<li><span class="caps">STDOUT </span>is captured in a nice IO object</li>
<li><span class="caps">STDERR </span>is output</li>
</ul>




<h2><a href="http://ruby-doc.org/core/classes/Open3.html">Open3#popen3</a></h2>

<blockquote><p>Open stdin, stdout, and stderr streams and start external executable.</p></blockquote>

<pre><code>&gt;&gt; require 'open3'
=&gt; true
&gt;&gt; stdin, stdout, stderr = Open3.popen3('./err.rb')
=&gt; [#&lt;IO:0x101769da8&gt;, #&lt;IO:0x101769d30&gt;, #&lt;IO:0x101769c68&gt;]
&gt;&gt; stdout.readlines
=&gt; [&quot;out\n&quot;]
&gt;&gt; stderr.readlines
=&gt; [&quot;err\n&quot;]</code></pre>


<ul>
<li>Both <span class="caps">STDOUT </span>and <span class="caps">STDERR </span>are captured into nice IO objects.</li>
</ul>




<h2>Alternative: Using &#8216;nix redirection</h2>

<p>An alternative to Open#popen3 (terrible name) is using <a href="http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html">standard output redirection</a>:</p>

<p>&gt;&gt; `./err.rb 2&gt;&amp;1`<br />
=&gt; &#8220;err\nout\n&#8221;</p>

<p>This gives you both <span class="caps">STDOUT </span>and <span class="caps">STDERR </span>in one big string, which might be perfectly fine if you don&#8217;t require the granular control that popen3 brings to the table. </p>

<p>I am guessing this method would work for <a href="http://ruby-doc.org/core/classes/IO.html#M002242">IO#popen</a> as well as for the backticks.</p>]]></description>
			<link>http://mentalized.net/journal/2010/03/08/5_ways_to_run_commands_from_ruby/</link>
			<guid isPermaLink="false">2029@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/03/08/5_ways_to_run_commands_from_ruby/#comments</comments>
			<pubDate>Mon, 08 Mar 2010 12:40:33 +0100</pubDate>
			<category>Programming</category>
		</item>
				<item>
			<title>The software behind Substance Lab</title>
			<description><![CDATA[<p>When I founded <a href="http://substancelab.com">Substance Lab</a> I knew I wanted to build a virtual business - or at least as much as it could be. Why should petty details like physical locations decide whether I can help my clients? </p>

<p>From the get go, I chose primarily web applications to run my business on. Also, it kind of makes sense because that&#8217;s what I am building, and there is no better way to learn about good and bad web applications than using them yourself.</p>

<p>Let me give you a rundown of the most important ones.</p>]]><![CDATA[<h2>Source code hosting: <a href="http://github.com">Github</a></h2>

<p>All source code must be version controlled, and I use git for pretty much everything. <a href="http://github.com">Github</a> is a great companion, and various open source projects as well as private and client projects are hosted there.</p>


<h2>Issue tracking/project management: <a href="http://redmine.org">Redmine</a></h2>

<p>For all Substance Lab run projects I use my own, pimped out installation of <a href="http://redmine.org">Redmine</a>. Redmine is a great open source project management web application and it&#8217;s a great fit for software projects. It comes with git integration and a ton of plugins makes it possible to customize it to my needs.</p>


<h2>Invoicing: <a href="http://blinksale.com">Blinksale</a></h2>

<p>Blinksale is a sweet little invoicing app that I&#8217;ve been using ever since I started Substance Lab. I have clients here in Denmark and outside the <span class="caps">EU, </span>and I need the ability to invoice in different currencies. I also need fairly flexible <span class="caps">VAT </span>settings. Back in the days, Blinksale gave me all of that and I like its focus on invoicing and nothing else.</p>


<h2>Office apps: <a href="http://www.google.com/apps/index1.html">Google Apps for domains</a></h2>

<p>I&#8217;ve been using Google Apps for email and calendars for a long time and I am pretty happy with it. For some reason, I have never really warmed up to using the Document editor part of the Google Apps and I keep <a href="http://neooffice.org">NeoOffice</a> around for those. I do use the Spreadsheet editor a lot and feel totally business managery when I do.</p>

<p>As an aside, &#8220;substancelab.com&#8221; is run on <a href="http://code.google.com/appengine/">Google App Engine</a> (mainly for kicks) and is powered by <a href="http://webby.rubyforge.org/">Webby</a>.</p>

<p>Yes, Google owns me.</p>


<h2>And then there are the desktop apps</h2>

<p>Some stuff is still run locally on my machine, obviously. Code is written in <a href="http://macromates.org">TextMate</a>, documents are backed up and shared via <a href="http://dropbox.com">Dropbox</a>, the full harddrive is backed up locally using <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html">SuperDuper!</a> remotely using <a href="http://mozy.com">Mozy</a>, ears are being pleased via <a href="http://www.last.fm/download">http://last.fm</a> and meetings are held via <a href="http://gotomeeting.com">GoToMeeting</a>.</p>

<p>What amazing apps are you using that I absolutely must use?</p>]]></description>
			<link>http://mentalized.net/journal/2010/02/25/the_software_behind_substance_lab/</link>
			<guid isPermaLink="false">2019@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/02/25/the_software_behind_substance_lab/#comments</comments>
			<pubDate>Thu, 25 Feb 2010 21:54:01 +0100</pubDate>
			<category>Business</category>
		</item>
				<item>
			<title>Happy 8 year birthday, mentalized.net</title>
			<description><![CDATA[<p>8 years ago, I posted <a href="http://mentalized.net/journal/2002/02/20/this_is_a_weblog/">this</a> to mentalized.net:</p>

<blockquote><p>I have always promised myself that I would not fall prey to the blogging-fever that has been going around, and for a long time the title of my website actually was &#8220;This is not a weblog&#8221;&#8230;</p>

<p>Well, nothing lasts forever - neither did my opinion on weblogs. Welcome to my journal.</p></blockquote>

<p>8 years later, I am still going strong (albeit not as strong as 4 years ago) who&#8217;d have thunk?</p>

<h2>Holy time machine, blogman</h2>

<p>Back then, mentalized.net looked like this:</p>

<p><img src="/files/journal/mentalized/mentalized_2002.jpg" alt="" height="288" width="512" /></p>

<p>So very, very blog-like :)</p>]]></description>
			<link>http://mentalized.net/journal/2010/02/20/happy_8_year_birthday_mentalizednet/</link>
			<guid isPermaLink="false">2028@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/02/20/happy_8_year_birthday_mentalizednet/#comments</comments>
			<pubDate>Sat, 20 Feb 2010 12:32:00 +0100</pubDate>
			<category>Mentalized.net</category>
		</item>
				<item>
			<title>Webkit-based Xbox dashboard</title>
			<description><![CDATA[<p>Webkit - and Safari in particular - have been really aggressive in adding support for upcoming <span class="caps">CSS</span> 3 features - and some <span class="caps">CSS </span>features not yet part of any spec. </p>

<p>As much of this is still Webkit-specific it isn&#8217;t really something I get to use much on client work, but not being one to shy away from new, shiny things, I though it would be fun to dig into this.</p>

<p>I decided to recreate an interface familiar to Xbox players, namely the Xbox Dashboard. It seemed like a good candidate to try out techniques like <a href="http://webkit.org/blog/324/css-animation-2/"><span class="caps">CSS </span>animations</a>, <a href="https://developer.mozilla.org/en/CSS/@font-face">font-face</a>, <a href="http://www.w3.org/TR/css3-background/">multiple backgrounds</a>, <a href="http://webkit.org/blog/175/introducing-css-gradients/">gradients</a>, <a href="http://www.w3.org/TR/css3-color/"><span class="caps">RGBA </span>colors</a>, <a href="http://www.css3.info/css-drop-shadows/">drop shadows</a>, and <a href="http://www.css3.info/styling-scrollbars-the-webkit-way/">custom scrollbars</a> to name a few.</p>]]><![CDATA[<h2>The inspiration</h2>

<p>The original inspiration for the actual look and feel is the <a href="http://braid-game.com/news/?p=402">Braid theme</a> released by the great guys behind <a href="http://braid-game.com/">Braid</a> - I hope they&#8217;ll forgive me for using their graphics.</p>

<p>The original theme looks like:</p>

<p><img src="/files/journal/xbox_dashboard/braid_theme.jpg" alt="" height="288" width="512" /></p>

<p>My recreated version looks like:</p>

<p><a href="http://mentalized.net/files/journal/xbox_dashboard/"><img src="/files/journal/xbox_dashboard/experiment.jpg" alt="Screenshot of the experiment" /></a></p>

<p><a href="http://mentalized.net/files/journal/xbox_dashboard/">See the working demo here</a> - remember, <a href="http://webkit.org-based">Webkit</a> browsers only, so use <a href="http://apple.com/safari">Safari</a> or <a href="http://google.com/chrome">Chrome</a>.</p>

<p>I have tried to be generous with the comments in the source, feel free to dig in and see how things are made. Hopefully this can serve as inspiration/education for someone as it did for me.</p>


<h2>Boo, you&#8217;re using Javascript</h2>

<p>I tried briefly to make this work without Javascript using :target pseudo-selectors, but I never got it working. It might be possible to implement that, but my <span class="caps">CSS</span>-fu (or patience) wasn&#8217;t up for the task.</p>

<p>All the Javascript is doing is adding classes to the panels - .frontmost if it&#8217;s the active panel, .outside if it&#8217;s a panel that shouldn&#8217;t be visible. All animations and transformation is done in <span class="caps">CSS.</span></p>

<p>It should be possible to create the behavior in Javascript instead of <span class="caps">CSS.</span> It would be interesting to see, if for no other reason then to see it running in browsers outside of Webkit. <span class="caps">PDI.</span></p>


<h2>Issues</h2>

<h3>Performance</h3>

<p>The framerate in Safari is pretty bad. The framerate in mobile Safari on my iPod Touch is ghastly (and I totally miss not being able to swipe there). Chrome delivers the best performance by far.</p>

<h3>Visual artifacts</h3>

<p>When navigating between the panels and the animation is in progress, Safari doesn&#8217;t render the custom scrollbars. Instead it renders a transparent box there for some reason. Chrome handles that correctly.</p>

<p>I tried to add the reflections that&#8217;s visible on the actual Xbox Dashboard, but it simply caused too many visual artifacts in Safari. I&#8217;m guessing the combination of border-radius, scale, and rounding errors was tripping up the <a href="http://webkit.org/blog/182/css-reflections/">-webkit-reflection</a>.</p>


<h2>Should this ever be used in production?</h2>

<p>Features that are only supported by browsers used by <a href="http://en.wikipedia.org/wiki/Usage_share_of_web_browsers">10%</a> of the internet-browsing population? I think not.</p>

<p>It definitely could be interesting to see how well this could be made to work in other browsers. Most modern browsers aren&#8217;t far behind Safari, and it might be possible to make it degrade gracefully enough in Internet Explorer. That is, however, far outside the scope of my experiment.</p>]]></description>
			<link>http://mentalized.net/journal/2010/02/17/webkitbased_xbox_dashboard/</link>
			<guid isPermaLink="false">2025@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/02/17/webkitbased_xbox_dashboard/#comments</comments>
			<pubDate>Wed, 17 Feb 2010 11:20:00 +0100</pubDate>
			<category>Webdesign</category>
		</item>
				<item>
			<title>Hello Rails 3 World</title>
			<description><![CDATA[<p>A long time ago (one day short of exactly 4 years) I posted a super simple - and to be honest - pointless <a href="http://mentalized.net/journal/2006/02/06/hello_ruby_on_rails_world/">Hello World example using Ruby on Rails</a>. Back then the <a href="http://rubyonrails.org">Rails</a> version was 1.0. </p>

<p>Today marks the first beta release of the coming version of <a href="http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release">Rails, version 3.0</a> and I figured it&#8217;d be fun revisiting that post.</p>]]><![CDATA[<p>So, this is a step by step tutorial to getting over the first hurdle: Creating a “hello world” application in Ruby on Rails. This should work assuming you already have Rails 3 installed and running on your system:</p>




<ol>
  <li><pre><code class="shell">$ rails hello</code></pre></li>
  <li><pre><code class="shell">$ cd hello</code></pre></li>
  <li><pre><code class="shell">$ rails generate controller hello</code></pre></li>
  <li>
    <p>Open the file config/routes.rb. Almost at the bottom (line #57) is this line:</p>
    <pre><code class="ruby"># match ':controller(/:action(/:id(.:format)))'</code></pre>
    <p>Remove the # in front so the line looks like:</p>
    <pre><code class="ruby">match ':controller(/:action(/:id(.:format)))'</code></pre>
  </li>
  <li>Create a file named index.html.erb in app/views/hello containing the text 'Hello world'.</li>
  <li><pre><code class="shell">$ rails server</code></pre></li>
  <li>Navigate to <a href="http://localhost:3000/hello">http://localhost:3000/hello</a> in your browser and be greeted by your friendly application: "Hello world".</li>
</ol>




<p>PS: <a href="http://localhost:3000/">http://localhost:3000/</a> is (still) a lot prettier “Hello world”-ish page.</p>

<p><span class="caps">PPS</span>: Note that the Rails 3 example above actually has a step more than the Rails 1 ditto. This comes from the fact that Rails 3 doesn&#8217;t build a default route for you.</p>

<div class="aside versions">
The code in this article has been verified with:<br />
<ul>
  <li>Ruby: 1.8.7</li>
  <li>Rails: 3.0.0.beta</li>
</ul>
</div>]]></description>
			<link>http://mentalized.net/journal/2010/02/05/hello_rails_3_world/</link>
			<guid isPermaLink="false">2024@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/02/05/hello_rails_3_world/#comments</comments>
			<pubDate>Fri, 05 Feb 2010 11:09:30 +0100</pubDate>
			<category>Programming</category>
		</item>
				<item>
			<title>Freelancing lessons learned</title>
			<description><![CDATA[<p>A long long time ago, <a href="http://mentalized.net/journal/2008/11/20/side_job_versus_dayjob/">I quit my great job</a> at <a href="http://biq.dk">BiQ</a> to live primarily of my <a href="http://substancelab.com">freelance Ruby on Rails development work</a>.</p>

<p>It&#8217;s one of the best decisions I&#8217;ve ever made.</p>

<p>Being directly responsible for my own income has been fun, empowering, fulfilling, and pretty damn scary. I&#8217;ve met lots of great people, worked with <a href="http://substancelab.com/work">great customers on great projects</a>, and I&#8217;ve learned a lot of lessons in the process. Allow me to share a few of those lessons with you.</p>


<h2>Your network is important</h2>

<p>I am a geek. I am not particularly outgoing. Small talk is not a forté of mine. </p>

<p>However, as a freelancer, entrepreneur, or anyone running a business you cannot isolate yourself in a dark basement producing high quality work. You need to get out of your chair and meet people - partly in order to stay sane and get outside influences, but definitely also because your network is very important to your business.</p>

<p>I have gotten the majority of my customers through my network. If you provide a great service, your previous customers will happily recommend you and your coworkers will happily refer clients you. If you&#8217;re a great person, your friends are going to talk about you. </p>

<p>Leverage your network, and don&#8217;t forget to make yourself available for them as well.</p>


<h2>Running a business will consume you</h2>

<p>One of the things I have been most surprised by, is how much I think about the company. </p>

<p>There are always a ton of things to think about; processes that could be improved, ideas that might be worth pursuing, people to get in touch with.</p>

<p>Whenever I have some downtime; doing the dishes, walking the dog, watching television or in some other way allow my mind to wander, it tends to wander towards Substance Lab.</p>


<h2>You won&#8217;t bill out as many hours as you think</h2>

<p>Many other people have written about this point in length, but it is important enough to bear repeating. </p>

<p>If you plan on working reasonable hours - and you should - you cannot expect to work 8 billable hours per day. There are so many other tasks that you need to take care of, that a part of running the business. Admin, taxes, sales, marketing - <a href="http://hicksdesign.co.uk/journal/why-you-can-never-work-full-time-">Jon Hicks have a longer list</a>.</p>

<p>I have, on rare occasions been able to work 6-7 billable hours in a day, but more realistically, I count on around 3-4 billable hours on any given day.</p>


<h2>Scheduling is really hard</h2>

<p>Things will take longer than you think. Period. Couple that with the fact that you probably won&#8217;t be able to work as many hours as you figure, and you have a scheduling problem on your hands.</p>

<p>You want to minimize the amount of time without client work. But at the same time you need to leave buffers in place for when your estimates are flat out wrong or when something goes wrong and needs to be dealt with.</p>

<p>I wish I had any words of wisdom to dish out that would instantly transform you - well, myself - into a scheduling demi-god. Unfortunately, I don&#8217;t. For now, I am relying on optimism and a lot of running really fast when things get tight - hardly optimal.</p>


<h2>I&#8217;ve shown you mine&#8230;</h2>

<p>That&#8217;s just a few of the lessons I&#8217;ve learned over the last years of freelancing. If you do any freelancing or run your own business, what have you learned? What would you tell someone who&#8217;s thinking about starting out on their own?</p>]]></description>
			<link>http://mentalized.net/journal/2010/01/31/freelancing_lessons_learned/</link>
			<guid isPermaLink="false">2014@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/01/31/freelancing_lessons_learned/#comments</comments>
			<pubDate>Sun, 31 Jan 2010 20:21:00 +0100</pubDate>
			<category>Business</category>
		</item>
				<item>
			<title>ActiveRecord oddity of the day</title>
			<description><![CDATA[<p>Yesterday I got bit by this fairly obscure behavior in <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">ActiveRecord</a>: </p>

<pre><code class="ruby">&gt;&gt; person = Person.first
=&gt; #&lt;Person id: 1, name: &quot;Jakob&quot;, height: 170, created_at: &quot;2010-01-22 08:57:02&quot;, updated_at: &quot;2010-01-22 08:58:57&quot;&gt;
&gt;&gt; person.height = 169,5
=&gt; [169, 5]
&gt;&gt; person.height
=&gt; 1</code></pre>

<p>Uhm, huh? The above is from <a href="http://rubyonrails.org">Rails</a> 2.3.5 using <a href="http://sqlite.org/"><span class="caps">SQL</span>ite</a>, but I originally saw the issue running on <a href="http://postgresql.org">PostgreSQL</a>. </p>

<p>It turns out, that if the object you assign to an integer attribute/column does not respond to <code>to_i</code>, the attribute will be set to 1 - unless the object evaluates to <code>false</code> in which case the attribute will be set to 0.</p>

<p>My best guess is that ActiveRecord is trying to work around the lack of boolean columns in MySQL with this. So even though I am not using MySQL I still have to suffer its ineptitude. One just can&#8217;t win.</p>]]></description>
			<link>http://mentalized.net/journal/2010/01/22/activerecord_oddity_of_the_day/</link>
			<guid isPermaLink="false">2020@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/01/22/activerecord_oddity_of_the_day/#comments</comments>
			<pubDate>Fri, 22 Jan 2010 09:52:45 +0100</pubDate>
			<category>Programming</category>
		</item>
				<item>
			<title>URL ABC</title>
			<description><![CDATA[<p>Generally speaking, I am always late to memes - <a href="http://www.google.dk/search?q=URL+ABC">this one</a> is no different.</p>

<p>The concept is simple, started by <a href="http://2009.maxvoltar.com/articles/url-abc">Tim van Damme</a>: </p>

<blockquote><p>A simple game: Go to the address bar in your favorite browser, and type one letter. Start with “a”, end with “z”.</p></blockquote>

<ul>
  <li>A: <a href="http://apidock.com/rails" title="APIdock">apidock.com/rails</a></li>
  <li>B: <a href="http://blinksale.com" title="Blinksale">Internal blinksale.com site</a></li>
  <li>C: Client <a href="http://basecamphq.com" title="Basecamp">Basecamp</a> site</li>
  <li>D: Client <a href="http://redmine.org" title="Redmine">Redmine</a> site</li>
  <li>E: <a href="http://en.wikipedia.org" title="Wikipedia">en.wikipedia.org</a></li>
  <li>F: <a href="http://facebook.com" title="Facebook">facebook.com</a></li>
  <li>G: <a href="http://github.com" title="Github">github.com</a></li>
  <li>H: Internal <a href="http://highrisehq.com" title="Highrise">Highrise</a> site</li>
  <li>I: <a href="http://images.google.com" title="Google">images.google.com</a></li>
  <li>J: My <a href="http://backpackit.com" title="Backpack">Backpack</a> site</li>
  <li>K: <a href="http://kongregate.com" title="Kongregate">kongregate.com</a></li>
  <li>L: Client <a href="http://lighthouseapp.com" title="Lighthouse">Lighthouse</a> site</li>
  <li>M: <a href="http://mentalized.net" title="mentalized">mentalized.net</a></li>
  <li>N: Client staging site</a></li>
  <li>O: <a href="http://kongregate.com" title="Kongregate">kongregate.com</a></li>
  <li>P: <a href="http://planetstorm.com" title="Planetstorm">planetstorm.com</a></li>
  <li>Q: <a href="http://quotagio.us" title="Quotagious">quotagio.us</a></li>
  <li>R: <a href="http://wiki.railsbridge.org" title="RailsBridge">wiki.railsbridge.org</a></li>
  <li>S: <a href="http://substancelab.com" title="Substance Lab">substancelab.com</a></li>
  <li>T: <a href="http://twitter.com/mentalizer" title="Twitter">twitter.com/mentalizer</a></li>
  <li>U: <a href="http://upcoming.yahoo.com" title="Upcoming">upcoming.yahoo.com</a></li>
  <li>V: Client staging site</a></li>
  <li>W: Internal <a href="http://redmine.org" title="Redmine">Redmine</a> site</li>
  <li>X: <a href="http://live.xbox.com" title="XBox Live">live.xbox.com</a></li>
  <li>Y: <a href="http://youtube.com" title="YouTube">youtube.com</a></li>
  <li>Z: <a href="http://www.eizo.dk" title="Eizo">www.eizo.dk</a></li>
</ul>

<p>Funny how some sites I&#8217;ve rarely visited still appear. Neither live.xbox.com, eizo.dk, nor quotagio.us are particularly common destinations for me, but I guess not many domains have z, x, or q in them.</p>]]></description>
			<link>http://mentalized.net/journal/2010/01/13/url_abc/</link>
			<guid isPermaLink="false">2010@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/01/13/url_abc/#comments</comments>
			<pubDate>Wed, 13 Jan 2010 07:47:00 +0100</pubDate>
			<category>Life</category>
		</item>
				<item>
			<title>The tyranny of software updates</title>
			<description><![CDATA[<p>There you are, sitting at your desk. Your thoughts are coming alive on the glowing display in front of you, brought into existence by your fingers effortlessly running across the keyboard. The outside world has become a distant memory - even the music flowing into your ears from your headphones has grown muffled and removed. </p>

<p>You are in flow.</p>

<p>Suddenly an unexpected idea spawns in your head. This idea must be preserved and dealt with, but you can&#8217;t risk losing your flow, so you quickly launch your favorite notes application to jot the idea down before it escapes the grasp of your mind.</p>

<blockquote><p>A new version of UberNotesMaster is available, would you like to download it now?</p></blockquote>

<p>Stumped, you try to gauge whether the update is quick enough that you won&#8217;t lose your flow, but you have already lost. Your flow is interrupted, the idea is escaping, and your application is still not updated.</p>


<h2>Do you prefer the plague or cholera? </h2>

<p>Typically, when an application announces that it has a new version available, you have two options: </p>


<ul>
<li>Upgrade now and generally disrupt what you are doing</li>
<li>Ignore and continue to run outdated, potentially buggy and insecure software, and get annoyed the next time you launch the application.</li>
</ul>



<p>While I like upgrading my software as much as the next person, I launch an application for a reason; to use it - instead the application forces me to choose between performing the task at hand or get the latest version of the software. You know what, I want both!</p>


<h2>Possible solutions</h2>

<h3>Update after use</h3>

<p>Instead of asking me to update an application when I am actually trying to use it, how about dealing with the update after I am is done using the application?</p>

<p>This way, the upgrade dialog could appear when I quit the application, and the update would take place while I am doing my work in another application. A much smoother experience whose only interruption is easily dealt with. </p>

<p>It might, however, prove to be quite frustrating when you attempt to shut down your computer and all running applications want to update themselves. Also, OS X users are known to never actually shut down applications and also never restart their machines, so they would end up never updating.</p>


<h3>Background update</h3>

<p>A variation of the above would be to still ask me, the user, when I launch the application, but allow me to say &#8220;Yes, I want to update, please download and update in the background while I continue with my task at hand&#8221;. The actual update then happens after I quit the application, making the entire process almost invisible to me.</p>


<h3>Out of band updates</h3>

<p>We could also move the application update process out of the actual applications themselves. This strategy is known from the iTunes App store, where updates to all installed applications happen in the background while you&#8217;re doing other stuff. Smooth and seamless and allows you to maintain your installed software when /you/ are ready for it.</p>

<p>The process in itself is probably the smoothest offered, but it also bears the penalty of centralization. This software updater application somehow needs to know about all independent and unique applications you have installed and be able to update them.</p>

<p>Larger software vendors like Adobe have taken this approach and created their own - usually pretty crappy - updater applications. I would love to see something kickass here - preferably from the <span class="caps">ISV </span>community, but it could also be interesting seeing Apple build this into their own Software Updater app (or in the Windows equivalent if one exists).</p>


<p>Now, excuse me, I have to update my blogging application&#8230;</p>]]></description>
			<link>http://mentalized.net/journal/2010/01/08/the_tyranny_of_software_updates/</link>
			<guid isPermaLink="false">2015@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/01/08/the_tyranny_of_software_updates/#comments</comments>
			<pubDate>Fri, 08 Jan 2010 16:59:11 +0100</pubDate>
			<category>Software</category>
		</item>
				<item>
			<title>mentalized.net in 2009</title>
			<description><![CDATA[<p>A new year has arrived &#8212; what better time is there to look back at the year that passed? </p>


<h2>The decline of blog readers</h2>

<p>The number of visitors to <a href="http://mentalized.net">mentalized.net</a> keeps declining. This is hardly surprising; I don&#8217;t write as much as I used to here (I have a feeling <a href="http://twitter.com/mentalizer">Twitter</a> is eating up a bunch of potential articles), and a lot of content is probably being consumed off the site in news readers and other aggregators. </p>

<p>Still, I am quite happy having more than 125000 people visit my humble website and I owe each one of you my thanks.</p>


<h2>What people came for</h2>

<p>My collection of <a href="http://mentalized.net/activity-indicators">totally free, animated <span class="caps">GIF</span>s for showing Ajax activity</a> continues to reign supreme as the most popular content on mentalized.net. It is followed by my <a href="http://mentalized.net/journal/2005/10/10/building_your_very_own_web20_layout/">satirical web 2.0 webdesign tutorial</a>. </p>

<p>Both of those were published back in 2005 over 4 years ago, yet they still continue to draw readers to the website. The only article on the content top 10 that&#8217;s actually published in 2009 is <a href="http://mentalized.net/journal/2009/05/19/java_kicks_ruby_in_the_what_now/">my response to a Java developer spreading some <span class="caps">FUD</span></a> (which unfortunately detoriated into more <span class="caps">FUD </span>and mud-slinging).</p>

<h3>Top content on mentalized.net in 2009</h3>


<ol>
<li><a href="http://mentalized.net/activity-indicators/"><span class="caps">AJAX</span> Activity indicators</a></li>
<li><a href="http://mentalized.net/journal/2005/10/10/building_your_very_own_web20_layout/">Building your very own web 2.0 layout</a></li>
<li><a href="http://mentalized.net/journal/2006/01/24/no_such_file_to_load_mkmf/">No such file to load &#8212; mkmf</a></li>
<li><a href="http://mentalized.net/journal/2009/05/19/java_kicks_ruby_in_the_what_now/">Java kicks Ruby in the what now?</a></li>
<li><a href="http://mentalized.net/journal/2006/02/06/hello_ruby_on_rails_world/">Hello Ruby on Rails World</a></li>
<li><a href="http://mentalized.net/journal/2007/03/13/rails_20_deprecations/">Rails 2.0 deprecations</a></li>
<li><a href="http://mentalized.net/journal/2006/10/24/browser_size_does_matter_actual_numbers/">Browser size does matter - Actual numbers</a></li>
<li><a href="http://mentalized.net/journal/2004/12/09/hunting_down_vbscript_error_codes/">Hunting down <span class="caps">VBS</span>cript error codes</a></li>
<li><a href="http://mentalized.net/journal/2005/11/14/setting_the_request_content_type_in_rails/">Setting the request content type in Rails</a></li>
<li><a href="http://mentalized.net/journal/2005/11/29/ajax_activity_indicators/"><span class="caps">AJAX </span>activity indicators</a></li>
</ol>




<h2>How people got here</h2>

<p><a href="http://google.com">Google</a> is still, hands down, the biggest source of traffic for mentalized.net. Almost half of all visits have been referred by Google. For comparison, the next search engine on the list is <a href="http://bing.com">Bing</a> with less than 1% of Googles referrals.</p>

<p>Social media sites like <a href="http://digg.com">Digg</a>, <a href="http://twitter.com">Twitter</a>, and <a href="http://facebook">Facebook</a> still aren&#8217;t providing me with a lot of traffic. I must be &#8220;old media&#8221; - or perhaps my content simply isn&#8217;t the kind of content that cries out for immediate attention. </p>

<p>The only post I&#8217;ve made in 2009 that was in relation to &#8220;current events&#8221; (<a href="http://mentalized.net/journal/2009/05/19/java_kicks_ruby_in_the_what_now/">link</a>) did in fact get some traction on the social sites with roughly half the visitors coming from various social sites.</p>


<h2>2010?</h2>

<p>I am looking forward to redoing the above stats for mentalized.net when 2010 is over. I signed up for <a href="http://project52.info/">Project52</a> fully intent on accomplishing the goal (&#8220;to write at least 1 new article per week for 1 year&#8221;). Hopefully, getting back into the thrill of writing regular content should provide for better content that can at least break the decline of visits. Time will tell.</p>]]></description>
			<link>http://mentalized.net/journal/2010/01/02/mentalizednet_in_2009/</link>
			<guid isPermaLink="false">2011@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2010/01/02/mentalizednet_in_2009/#comments</comments>
			<pubDate>Sat, 02 Jan 2010 15:07:41 +0100</pubDate>
			<category>Mentalized.net</category>
		</item>
			
	</channel>
</rss>