<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>BloggEd - Blog</title>
  <id>tag:majakari.net,2009:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://majakari.net/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://majakari.net/" rel="alternate" type="text/html"/>
  <updated>2009-05-14T07:07:27Z</updated>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-05-14:333</id>
    <published>2009-05-14T07:04:00Z</published>
    <updated>2009-05-14T07:07:27Z</updated>
    <link href="http://majakari.net/2009/5/14/time-is-an-illusion" rel="alternate" type="text/html"/>
    <title>Time is an illusion</title>
<content type="html">
            &lt;p&gt;Months, weeks, years etc. doubly so.&lt;/p&gt;


	&lt;p&gt;Ok. Never, &lt;em&gt;ever&lt;/em&gt; program time-related logic using any other model except some linear, continuous, fixed-interval unit like epoch. Why? Because handling the epoch is so easy. Number of seconds since 1970-01-01 00:00. No special cases when the year changes, or week overlaps two months, taking into account leap years, months having different number of days and so on.&lt;/p&gt;


	&lt;p&gt;Of course, you &lt;em&gt;need&lt;/em&gt; those human-readable concepts like week and month. But they should be computed from the epoch (or similar), so that all actual processing happens with the same, simple unit.&lt;/p&gt;


	&lt;p&gt;Likely this comes naturally to most programmers, but sometimes a model like month in a given year comes so naturally, that you are lured to use month as a model, and it works, until you run into something that overlaps previous months and you hack in some incomprehensible solution involving dates, datetimes, conversions between those and myriad of obscure interval conversions like weeks in a month etc.&lt;/p&gt;


	&lt;p&gt;You&#8217;ve been warned.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-04-03:326</id>
    <published>2009-04-03T11:40:00Z</published>
    <updated>2009-04-03T11:43:56Z</updated>
    <category term="cooking"/>
    <category term="geek"/>
    <link href="http://majakari.net/2009/4/3/best-bun-i-ever-had" rel="alternate" type="text/html"/>
    <title>Best bun I ever had</title>
<content type="html">
            &lt;p&gt;This is &lt;em&gt;soo&lt;/em&gt; off-topic, but so delicious that I wanted to share it with all my loyal readers.&lt;/p&gt;


	&lt;p&gt;It&#8217;s an Augmented Cinnamon Boston Bun (the augmentation part is associated with the amount of
cinnamon). Best enjoyed with good company and a pint of skimmed, cold milk. I guarantee the result
is &lt;a href=&quot;http://graphjam.com/2008/06/09/song-chart-memes-cat-biting-preferences/&quot;&gt;nominal&lt;/a&gt;.&lt;/p&gt;


	&lt;h2&gt;Ingredients (SI units only, sorry!):&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Rather large baking bowl (metallic or ceramic) for the oven, cylindrical in shape (flat bottom), about 30-40 cm in diameter or two smaller
bowls&lt;/li&gt;
		&lt;li&gt;A rolling pin&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;half a liter of milk&lt;/li&gt;
		&lt;li&gt;yeast, 50 g&lt;/li&gt;
		&lt;li&gt;sugar, 2 dl&lt;/li&gt;
		&lt;li&gt;one and a half tsp of salt&lt;/li&gt;
		&lt;li&gt;1 egg&lt;/li&gt;
		&lt;li&gt;1 tbsb of cardamom&lt;/li&gt;
		&lt;li&gt;1 kg of wheat flour&lt;/li&gt;
		&lt;li&gt;150 g of margarine (suitable for baking)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;For filling:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;butter, 50 g&lt;/li&gt;
		&lt;li&gt;sugar, 0.5 dl&lt;/li&gt;
		&lt;li&gt;about 16 teaspoons of cinnamon&#8212;yes, about 8 times the amount in the original recipe. This is not for wussies.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;You also need one egg and small amount of margarine/butter for greasing as well as crystal sugar for
the topping.&lt;/p&gt;


	&lt;h2&gt;Phase one: preparing the dough&lt;/h2&gt;


	&lt;p&gt;First, warm the milk so that the yeast activates (for dried yeast, you need to make it about 42
&amp;deg;C) and mix the yeast in. Add sugar and salt. Stir in egg, cardamom and about 1 dl or so of
wheat flour. Then add margarine (warm it if necessary to get it in running form) and rest of wheat
flour. Beat the dough for three minutes or so. Make sure the dough feels homogenous enough. Let it 
rise for 1 hour (the dough volume should increase by about a factor of two).&lt;/p&gt;


	&lt;h2&gt;Phase two: filling the dough&lt;/h2&gt;


	&lt;p&gt;Split the dough in two parts to make the following part easier.&lt;/p&gt;


	&lt;p&gt;Use the rolling pin to flatten the dough in rectangular shape, about [3..5]mm thick. Grease the
dough evenly with butter, pour over sugar and cinnamon. The surface should now be saturated with
cinnamon. Next roll the dough along the longer side of the rectangle, and cut it into 5cm pieces.&lt;/p&gt;


	&lt;p&gt;Now repeat the phase for the other part of the dough if you split it in two.&lt;/p&gt;


	&lt;h2&gt;Phase three: Finalizing and putting it in the oven&lt;/h2&gt;


	&lt;p&gt;First preheat the oven to 175 &amp;deg;C. While waiting for the oven to heat, grease the bowl and evenly
position the cut rolls using a sparse algorithm (ie. for any given roll, the distance to all
adjacent rolls should be a constant included in the range [12..28]mm), so that the cut surface is
perpendicular to the diameter of the bowl bottom. Let rise for 20 to 30 minutes.&lt;/p&gt;


	&lt;p&gt;Last, grease the rolls with egg and scatter the rolls with crystal sugar. When the oven has reached
the target temperature, put the baking bowl in the oven and bake for 40 minutes using the lowest
position. When finished, cover the rolls with a suitable cloth to prevent premature dehumidisation.&lt;/p&gt;


	&lt;p&gt;Now, bask in the joy of delicious, cinnamonic bunniness.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-03-04:325</id>
    <published>2009-03-04T09:48:00Z</published>
    <updated>2009-03-04T09:53:24Z</updated>
    <category term="code"/>
    <category term="rails"/>
    <link href="http://majakari.net/2009/3/4/protecting-rails-apps-against-nil-foo_method-called-bug" rel="alternate" type="text/html"/>
    <title>Protecting Rails apps against nil.foo_method called bug</title>
<content type="html">
            &lt;p&gt;It&#8217;s a &lt;a href=&quot;http://github.com/EdvardM/null_object_guard/tree/master&quot;&gt;null object pattern guard&lt;/a&gt; for rails. &lt;span class=&quot;caps&quot;&gt;YMMV&lt;/span&gt;. WorksForMe&#8482; at the moment.&lt;/p&gt;


	&lt;p&gt;Oh yeah, I&#8217;m sure better solutions exist already. But a geek has to reinvent the wheel every time, no?&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-03-04:324</id>
    <published>2009-03-04T09:34:00Z</published>
    <updated>2009-03-04T09:46:34Z</updated>
    <link href="http://majakari.net/2009/3/4/lovin-git" rel="alternate" type="text/html"/>
    <title>Lovin' Git</title>
<content type="html">
            &lt;p&gt;There are so many features in &lt;a href=&quot;http://git-scm.org&quot;&gt;Git&lt;/a&gt; that ease development that I won&#8217;t even bother to &lt;em&gt;mention&lt;/em&gt; such
features as easy branching/merging, bisecting, stashing, splitting or combining previous local commits etc.&lt;/p&gt;


	&lt;p&gt;But one really, &lt;em&gt;really&lt;/em&gt; nice thing is &lt;code&gt;git add&lt;/code&gt; with flags &lt;code&gt;--interactive -p&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;The problem: you have fixed lots of things, and have tested some of them. Now you&#8217;d like to push only 
the small, well-tested changes to upstream. But the problem is that some files contain changes that
you &lt;em&gt;wish&lt;/em&gt; to publish, and some that you &lt;em&gt;don&#8217;t&lt;/em&gt; (because some changes are not tested yet).&lt;/p&gt;


	&lt;p&gt;Easy. You fire &lt;code&gt;git add --interactive -p&lt;/code&gt;, pick the changes you want to publish, and
then you push the changes to upstream using &lt;code&gt;git push&lt;/code&gt; (or &lt;code&gt;git svn dcommit&lt;/code&gt; if 
your team is still using The Rather Good But Still Inferior &lt;span class=&quot;caps&quot;&gt;SCM&lt;/span&gt;). And if you want to make sure you
are about to commit exactly the right thing, you say &lt;code&gt;git diff --cached&lt;/code&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-02-15:323</id>
    <published>2009-02-15T22:20:00Z</published>
    <updated>2009-02-15T22:22:58Z</updated>
    <category term="finnish"/>
    <category term="Finnish"/>
    <category term="thinking"/>
    <link href="http://majakari.net/2009/2/15/ajattelunaihetta" rel="alternate" type="text/html"/>
    <title>Ajattelunaihetta</title>
<content type="html">
            &lt;blockquote&gt;
		&lt;p&gt;Kannatan veronmaksua ja hyvinvointivaltiota, jossa kukaan ei joudu taivasalle. (Tämä on yksi syy siihen, miksi kieltäydyn olemasta minkään lajin oikeistolainen, mukaanlukien äärisellainen.) Ei ole tiukasti ottaen reilua, että kenellekään annetaan minkäänlainen asunto toisten kustannuksella, mutta kannatan sitä silti, koska vaihtoehto olisi paljon ikävämpi ja julmempi. Sosiaaliasujan, kuten muidenkin tulonsiirtojen vastaanottajan, on kuitenkin mielestäni oltava kiitollinen ja vältettävä vaatimuksia ja rutinaa. Minä esimerkiksi tunnen syvää kiitollisuutta ja nöyryyttä jokaisesta potkupuvusta, jonka perheeni on äitiyspakkausten (seksistinen nimitys) mukana maksutta saanut. Mieleenikään ei tulisi eräiden kanssakansalaisteni tavoin valittaa yleisönosastoilla, että lahjaksi saadut lastenvaatteet eivät ole kauden muotiväreissä.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Ote on suoraan Jussi Halla-Ahon tekstistä, mutta jotain minkä voisin allekirjoittaa täysin. Oli niin hyvin kuvattu, että tahdoin jakaa sen mol.. öh, kaikille lukijoilleni.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-02-05:322</id>
    <published>2009-02-05T11:05:00Z</published>
    <updated>2009-02-05T11:10:30Z</updated>
    <category term="finnish"/>
    <category term="Finnish"/>
    <category term="thinking"/>
    <link href="http://majakari.net/2009/2/5/ja-nyt-jotain-aivan-muuta" rel="alternate" type="text/html"/>
    <title>Ja nyt jotain aivan muuta</title>
<content type="html">
            &lt;p&gt;&lt;a href=&quot;http://www.halla-aho.com/scripta/&quot;&gt;Jussi Halla-Aho&lt;/a&gt; tekee niin teräviä havaintoja yhteiskunnasta ja ihmisten epäjohdonmukaisesta ajattelusta, että
äänestäisin häntä välittömästi eduskuntaan ja/tai presidentiksi, jos hän asettusi ehdokkaaksi.&lt;/p&gt;


	&lt;p&gt;Valitettavasti tietyn normaalijakauman oikealla puoliskolla on määritelmänomaisesti vähemmän ihmisiä kuin keskellä ja vasemmalla, mikä efektiivisesti tekisi hänen valituksi tulemisen lähimain mahdottomaksi.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2009-02-05:321</id>
    <published>2009-02-05T09:21:00Z</published>
    <updated>2009-02-05T09:27:11Z</updated>
    <category term="Code"/>
    <category term="github"/>
    <category term="programming"/>
    <link href="http://majakari.net/2009/2/5/github-lovin" rel="alternate" type="text/html"/>
    <title>Github lovin'</title>
<content type="html">
            &lt;p&gt;I will no longer spit out crappy pieces of code and post them to the Code section in my blog. Instead, I will post the crappy pieces to &lt;a href=&quot;http://github.com/EdvardM/&quot;&gt;GitHub&lt;/a&gt;, allowing other people to gawk and fork them at will. Maybe I&#8217;ll post something actually &lt;em&gt;usable&lt;/em&gt; there some day, who knows.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-12-09:314</id>
    <published>2008-12-09T16:11:00Z</published>
    <updated>2008-12-11T08:31:08Z</updated>
    <category term="duh"/>
    <category term="rails"/>
    <link href="http://majakari.net/2008/12/9/on-rails-migrations" rel="alternate" type="text/html"/>
    <title>On Rails migrations</title>
<content type="html">
            &lt;p&gt;You can learn lots of stuff from mistakes. Especially of your &lt;em&gt;own&lt;/em&gt;. And, uh, you can learn even more of the big ones.&lt;/p&gt;


	&lt;p&gt;So, I learned a &lt;strong&gt;lot&lt;/strong&gt; today. Hum.&lt;/p&gt;


	&lt;p&gt;To cut long story short: never use down migrates in production. That&#8217;s about it, yeah.&lt;/p&gt;


	&lt;p&gt;The long story starts at my deep inclination to automate every imaginable procedure consisting of monotonous, simple steps. 
Releasing new version of software is one of such tasks. With Rails, it&#8217;s basically &lt;code&gt;svn up/git pull&lt;/code&gt;, &lt;code&gt;rake db:migrate&lt;/code&gt; and maybe restarting the web server.&lt;/p&gt;


	&lt;p&gt;Unless you go sometimes backwards in migrations, if nothing else but to restore the database to a known, blank state. And maybe
you were &lt;em&gt;really asking for it&lt;/em&gt; and chose to modify old migrations to say, modify some column information. So you start to hack and end with something similar:&lt;/p&gt;


&lt;pre&gt;
  #update_server.sh
  #!/bin/sh

  CONFLICTS=$(svn st -u|grep -c &quot;^C&quot;)
  VER=$1
  if [[ $CONFLICTS == 0 ]] then
    backup_db_with_timestamp
    mongrel_rails cluster::stop -e production
    svn up
    if [[ $VER != &quot;&quot; ]] then
      rake db:migrate VERSION=VER RAILS_ENV=production
    end
    rake db:migrate after_release_stuff RAILS_ENV=production
    mongrel_rails cluster::start -e production
  else
    echo 'Resolve incoming conflicts first'
  end
&lt;/pre&gt;
Now, imagine you do something like the following:

  &lt;pre&gt;$ ./update_server.sh 123&lt;/pre&gt;

	&lt;p&gt;You&#8217;d assume that because 123 is passed to $1, the script downmigrates first to version 123 before doing the up-migrate.&lt;/p&gt;


	&lt;p&gt;Nope. It won&#8217;t. Instead, the script will run with &lt;code&gt;VERSION=VER&lt;/code&gt; (note the missing dollar sign) and Ruby&#8217;s Object#to_i will
convert any string containing no digits to zero. Yup; you will end up running&lt;/p&gt;


&lt;pre&gt;rake db:migrate VERSION=0 RAILS_ENV=production&lt;/pre&gt;

	&lt;p&gt;That&#8217;s a &lt;em&gt;really funny&lt;/em&gt; thing to do in a live, business critical production environment, destroying all user data. &lt;em&gt;Fortunately&lt;/em&gt; you backed up the db first, didn&#8217;t you?
Oh well.&lt;/p&gt;


	&lt;p&gt;There are other problems with running down migrations in production, like&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Most of the time you lose the data input by users&lt;/li&gt;
		&lt;li&gt;code may become out of sync with database schema&lt;/li&gt;
		&lt;li&gt;the number of current database states increases exponentially(!) given different times and version numbers in down migrations&lt;/li&gt;
		&lt;li&gt;It&#8217;s Just The Wrong Way To Do&#8482;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Using only forward-direction migrations in production you have access to all present data, allowing you to eg. remove 
old schemas and store old data to new data structures. And best of all, it makes the update script/rake task (or Capistrano recipe)
much more simple.&lt;/p&gt;


	&lt;p&gt;Update: my colleaque suggested to completely disallow down migrations in production mode, so I added the following extension to our project, which does
just that:&lt;/p&gt;


&lt;code&gt;
&lt;pre&gt;
# Prevent down migrations in production mode
module ActiveRecord
  class Migration
    class &amp;lt;&amp;lt; self
      alias_method :orig_migrate, :migrate unless self.respond_to?(:orig_migrate)
      def migrate(direction)
        raise 'Refusing to down migrate db in production mode!' if RAILS_ENV == 'production' &#38;&#38; direction == :down
        orig_migrate(direction)
      end 
    end
  end
end
&lt;/pre&gt;
&lt;/code&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-11-26:313</id>
    <published>2008-11-26T07:27:00Z</published>
    <updated>2008-11-26T07:30:37Z</updated>
    <link href="http://majakari.net/2008/11/26/agile-dinner-in-tampere" rel="alternate" type="text/html"/>
    <title>Agile dinner in Tampere</title>
<content type="html">
            &lt;p&gt;Instead of having our monthly &lt;a href=&quot;http://tampererb.info&quot;&gt;Tampere.rb&lt;/a&gt; meeting on Dec 4th, most of us are attending
&lt;a href=&quot;http://wiki.agilefinland.com/?Agile+Dinner+in+Tampere&quot;&gt;Agile dinner in Tampere&lt;/a&gt;. Feel free to join us!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-09-18:312</id>
    <published>2008-09-18T18:00:00Z</published>
    <updated>2008-09-18T18:05:02Z</updated>
    <category term="gmail"/>
    <category term="google"/>
    <category term="misc"/>
    <link href="http://majakari.net/2008/9/18/gmail-failure" rel="alternate" type="text/html"/>
    <title>GMail failure</title>
<content type="html">
            &lt;p&gt;I&#8217;m a happy GMail user. Have been so for almost a year now. Except for the last two days or so &#8211; it seems like it doesn&#8217;t detect any spam messages at the moment; I receive about one hundred spam messages a day, all to my inbox. Makes my email almost unusable. However, I trust the excellent folks at Google fix the problem in no time.&lt;/p&gt;


	&lt;p&gt;In the meantime, I guess I have to sort my inbox thrice a day.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-09-07:303</id>
    <published>2008-09-07T19:18:00Z</published>
    <updated>2008-09-18T18:00:05Z</updated>
    <category term="meta"/>
    <category term="oops"/>
    <link href="http://majakari.net/2008/9/7/oopsie" rel="alternate" type="text/html"/>
    <title>Oopsie</title>
<content type="html">
            &lt;p&gt;It seems like my nginx configuration pointed default virtual host to that of tampererb.info (hosted by the same server). Thanks
to my most loyal reader for the tip :)&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-07-22:132</id>
    <published>2008-07-22T16:17:00Z</published>
    <updated>2008-10-22T12:06:09Z</updated>
    <link href="http://majakari.net/2008/7/22/moving-to-new-job" rel="alternate" type="text/html"/>
    <title>Moving to new job</title>
<content type="html">
            &lt;p&gt;I&#8217;m about to start working at &lt;a href=&quot;http://www.adalia.fi&quot;&gt;Adalia&lt;/a&gt;. I&#8217;m quite excited about my new job, not least 
due to the fact that I&#8217;ll be granted the opportunity to design and build very challenging, complex systems, 
&lt;a href=&quot;http://www.ruby-lang.org/&quot;&gt;Ruby&lt;/a&gt; and Mac/Linux being the most prominent technologies I will be working with. 
Not only that, but the folks at Adalia seem to be not only smart but quite nice too. I&#8217;m honoured to join their
ranks!&lt;/p&gt;


	&lt;p&gt;However, I&#8217;m not all happy-happy-joy-joy. Why? Well, having been privileged to work at &lt;a href=&quot;http://www.atostek.com/&quot;&gt;Atostek&lt;/a&gt; is something 
I&#8217;m not taking lightly. To put it straight, all key people (and not only those) in Atostek are darn-tootin, 
&lt;em&gt;brilliantly smart&lt;/em&gt; people, you know, one-out-of-ten-thousand -kind of smart. I mean &lt;a href=&quot;http://steve-yegge.blogspot.com/2008/06/done-and-gets-things-smart.html&quot;&gt;Done, And Gets Things Smart&lt;/a&gt; type 
(it&#8217;s not a spelling error, see the entry for explanation). Really. And 
what I said about smart includes the &lt;span class=&quot;caps&quot;&gt;CEO&lt;/span&gt; too&#8212;she&#8217;s phenomenal. To put it short, I&#8217;m going to &lt;a href=&quot;http://icanhascheezburger.com/2008/01/18/funny-pictures-i-has-a-sad/&quot;&gt;has sad&lt;/a&gt; mah trusty mates at Atostek. Sniff.&lt;/p&gt;


	&lt;p&gt;Ok, I wouldn&#8217;t be changing jobs for worse. It&#8217;s quite a different industry I&#8217;m working with at Adalia, and 
the setup seems very good. I have great trust in our &lt;span class=&quot;caps&quot;&gt;CEO&lt;/span&gt; for where the company is heading, and I see huge potential 
in choice of technologies and type of people chosen for the company. Unfortunately I can&#8217;t say more at the moment, but
the future seems very, very interesting for me.&lt;/p&gt;


	&lt;p&gt;And thanks for the chief for getting me a &lt;a href=&quot;/2008/4/9/an-ideal-computer&quot;&gt;real computer&lt;/a&gt; to work with!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-07-21:145</id>
    <published>2008-07-21T11:26:00Z</published>
    <updated>2008-10-22T12:07:05Z</updated>
    <category term="mac"/>
    <category term="misc"/>
    <category term="rant"/>
    <link href="http://majakari.net/2008/7/21/confessions-of-a-mac-enthusiast" rel="alternate" type="text/html"/>
    <title>Confessions of a Mac convert</title>
<content type="html">
            &lt;p&gt;First off, my apologies to both of my astute readers, who quickly realised that it&#8217;s been a long time since I blurbed anything to teh intertubes. I was having a vacation, this time almost for real, using computer only an hour or two a day. Ok, maybe more, but not much. Family and stuff, you know.&lt;/p&gt;


	&lt;p&gt;Where was I? Oh. Yup. I joined the ranks of purchasing  a &lt;a href=&quot;http://macromates.com/&quot;&gt;$3000 text editor&lt;/a&gt;. Ok, &lt;a href=&quot;http://macromates.com/&quot;&gt;TextMate&lt;/a&gt;
costs only 39 €, but it is available on Mac only, and if you&#8217;d love to have a 21st century &lt;a href=&quot;http://www.gnu.org/software/emacs/&quot;&gt;Emacs&lt;/a&gt; -like überpower tool at your hands with
seamless OS support, you want to get Mac&#8212;just to be able to run TextMate.&lt;/p&gt;


	&lt;p&gt;Nevertheless, I&#8217;ve been nothing but astounded by the usability &lt;em&gt;and&lt;/em&gt; power of tools offered by &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; Leopard&lt;/a&gt; (not forgetting
the very nice engineering of Apple hardware itself). To put it short, back in ye olde days Macs used to be scorned by the True Computer Geeks such as programmers, Unix gurus and other people familiar with deeper workings of computer hardware and operatings systems. Ok, it was generally admitted that Macs are good for novices who just want to do simple things like 
write memos and stuff. There were some other niche areas where Macs were often used professionally, like audio and video processing.&lt;/p&gt;


	&lt;p&gt;Now, that all has changed. To me, it seems obvious that when discarding the old &lt;span class=&quot;caps&quot;&gt;OS 9&lt;/span&gt; and beginning with &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; (pronounced &#8220;OS ten&#8221; to avoid embarrasing attention), which is the current Mac operating system, Apple wanted to preserve everything they were famous for and very good at, and to throw along bunch of capabilities required by the more geeky computer users and hackers. No, let me put it another way; to say &lt;em&gt;throw&lt;/em&gt; lends for ill connotations&#8212;it sounds more like an afterthought, which couldn&#8217;t have resulted in such a seamless, consistent and fluent system as &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; Leopard is. No; they have to have designed it carefully from the very beginning, probably starting from scratch and perfecting it every now and then until the whole system, comprised of both the hardware and software, felt like a single, consistent entity.&lt;/p&gt;


	&lt;p&gt;I&#8217;ve been dissatisfied with both the Windows operating systems (XP/Vista) as well as Linux distributions for quite a long time (and I&#8217;ve tried many &#8211; I used solely &lt;a href=&quot;http://www.redhat.com/&quot;&gt;RedHat&lt;/a&gt; professionally over two years for software development, &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; even for longer, and finally &lt;a href=&quot;http://www.kubuntu.org/&quot;&gt;KUbuntu&lt;/a&gt; Linux). I mean, if you don&#8217;t want to spend hours configuring stuff and debugging problems, you have to appreciate ease of using Windows. Buy any hardware from the computer store and it just works in Windows. And if it doesn&#8217;t, you&#8217;re at least able to contact some commercial support service and have the problem fixed&#8212;after all, the 
product was usually designed for MS Windows, de facto standard OS, and very likely it came with some sorts of guarantee. And I won&#8217;t even mention the amount
of software available for MS systems. Especially if you want to play games every now and then. But then there&#8217;s the problem of automation and customization of the system itself. If you have to do something that you don&#8217;t have special software for, or you like to do some rather complex things automatically, Windows gives very little support. Don&#8217;t tell me you use .bat or .cmd files for scripting production-quality software. Bah! Three words: date/time scripting. To accomplish such tasks, you either find a special purpose software for that, or you code one yourself. Of course, being a hacker you install Linux, used by every cool kid in the town. It sure is the king of hackable OSes. For example,
if want to turn off unnecessary &lt;span class=&quot;caps&quot;&gt;VGA&lt;/span&gt; display and keyboard support for some embedded software, you can always just recompile the kernel and take the parts off you don&#8217;t need. And when it comes to communication, Linux is famous for supporting any imaginable protocol, with the probable exception of smoke signals. However, probably the best feature of any(?) Unix system is the philosophy of &lt;a href=&quot;http://en.wikipedia.org/wiki/Pipeline_(software)&quot; title=&quot;Wikipedia Entry: Pipeline_(software)&quot;&gt;pipes and filters&lt;/a&gt; combined with appropriate, simple but powerful tools such as grep, sed, tail and such. Those tools make it easy to do relatively complex tasks for processing text and/or system automation. For example, it takes only a simple shell script containing one to two lines to remotely back up all files more recent than two days over the network to some other machine using ssh or scp. Another example could be a poor man&#8217;s continuous integration tool, especially if combined with make (which is relatively standard unix tool). But in Unix world, there&#8217;s a price you have to pay, even though the OS itself and tools can be free. I mean, I&#8217;ve used Linux over 10 years and I have to admit that it&#8217;s not &lt;em&gt;truly&lt;/em&gt; plug and play, even the Ubuntu versions, though &lt;em&gt;sometimes&lt;/em&gt; you &lt;em&gt;can&lt;/em&gt; use printer right after plugging in the usb cable, or wireless adapter. But problems in
using external hardware are much more common than in MS world (understandably; it is not common that vendors
give out the internal specs of their hardware, especially for free) and your mileage &lt;em&gt;will&lt;/em&gt; likely vary. Moreover, not all software Unicen come with easy to use graphical user interfaces. In the long run, you have to learn syntax of several different configuration file formats 
as well as caveats and quirks. But the worst of all, which took me a long time to understand, is that most open source software suffers from certain development problem, obvious in all Linux distributions I&#8217;ve used and in several applications as well.&lt;/p&gt;


	&lt;p&gt;In my opinion, the problem is not technical but psychological. As a software programmer, I know that creating new features, starting new projects and making code work faster is much more fun than making it more &lt;em&gt;robust&lt;/em&gt; and otherwise polishing it. Being driven by pure volunteerism alone, &lt;span class=&quot;caps&quot;&gt;OSS&lt;/span&gt; developers attempt to make software robust only if they are enough disciplined or ambitious. I don&#8217;t mean this as an insult. Come on, it&#8217;s obvious! I know &lt;em&gt;I&#8217;ve&lt;/em&gt; seldom finished any work I&#8217;ve written for free, and those that I have, I&#8217;ve never bothered to make them very robust, user-friendly or anything that is expected from software packages available at the store shelves. At work you&#8217;re more or less forced to, which is a good thing. Sure, Emacs is very robust and stable, capable of uptimes of months and more, but it&#8217;s been developed for &lt;em&gt;decades&lt;/em&gt;. About time, you could say. Besides, it&#8217;s still ugly. But the reason for changing to TextMate is not ugliness but usability. Due to lack of elegant scoping system used in TextMate, Emacs keyboard shortcuts are way too long. And I don&#8217;t want to bother customizing all keyboard shortcuts to my taste in every machine I use. There&#8217;s wisdom in living with defaults, and TextMate defaults are just fine. Ok; at least I&#8217;ve switched to TextMate in &lt;a href=&quot;http://www.ruby-lang.org/&quot;&gt;Ruby&lt;/a&gt; (on &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;Rails&lt;/a&gt;) development, because it&#8217;s the 
most supported editor for doing precisely that stuff. There are bundles for Ruby, Ruby on Rails, &lt;a href=&quot;http://merbivore.com/&quot;&gt;Merb&lt;/a&gt;, &lt;a href=&quot;http://rspec.info/&quot;&gt;RSpec&lt;/a&gt; and whatnot. It might be that I still resort to Emacs when typesetting &lt;a href=&quot;http://www.latex-project.org/&quot;&gt;LaTeX&lt;/a&gt; documents, though I&#8217;ll definitely give TM&#8217;s LaTeX bundle a shot. Last, not all my computers at home are Macs. Yet. Crap.&lt;/p&gt;


	&lt;p&gt;As for the rant above about &lt;span class=&quot;caps&quot;&gt;OSS&lt;/span&gt;, note that I&#8217;m not labeling &lt;em&gt;all&lt;/em&gt; OSS as crap, or even blaming the open source model itself. However, I &lt;em&gt;do&lt;/em&gt; have lost my trust in open-source operating systems deployed at &lt;em&gt;end-user points&lt;/em&gt;. I still favor Linux in servers because setting up a &lt;a href=&quot;http://en.wikipedia.org/wiki/Domain_Name_System&quot;&gt;&lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt;&lt;/a&gt;, mail or web server doesn&#8217;t have to be easy and it&#8217;s not something I do daily. But I do want to be able to run my routine tasks so that the tools are practically &lt;em&gt;invisible&lt;/em&gt; and I can focus on the task at hand. And the illusion of invisible tools really does fade somewhat if the program dumps core, recovering from sleep mode leaves your screen blank forcing you to reboot, copying files from your digital camera requires editing of /etc/fstab using a syntax you always have to look up from the manual page, or anything similar. No, I only managed with Linux so far because it was the best choice I knew of, and I was mostly capable to fix the problems myself, or circumvent them if necessary. When Linux phenomenon started spread back in the &#8216;95 or so, it was so remarkable system back then and had so much potential that I really wanted to believe it reach superiority as a platform, no matter the task at hand. But that was mostly when I was still a single, and I didn&#8217;t realize that in reality, I spent many hours every week just trying to configure some things properly and searching for properly working versions of the software I wanted to use, alluring myself to the belief of ease of use.&lt;/p&gt;


	&lt;p&gt;Now, thanks to this 64-bit, pure goodness of an OS sporting a Mach-based kernel and supporting up to 4 TB (yes, that&#8217;s terabytes, equalling 4000 GB) of &lt;span class=&quot;caps&quot;&gt;RAM I&lt;/span&gt;&#8217;m able to &lt;em&gt;Just Get Things Done&lt;/em&gt; quickly and easily, be it programming, automating complex stuff or programming software with my copy of TextMate. And when I just want to watch videos, print stuff, listen to music, read e-mail or accomplish any of the more meager tasks without thinking about missing codecs, unsupported proprietary standards or incomplete implementations and ugly excuses for an interface, I just do it without hassles. Besides, the included software in &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; is far more usable than Windows counterparts. Take notepad/wordpad and paint as examples. Seriously? Even novices often abhor those tools due to lack of every single features except copy/paste and save as. Meh. With &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; you can actually get job done. TextMate is the only app I&#8217;ve purchased so far, and I&#8217;ll likely get &lt;a href=&quot;http://www.apple.com/iwork/&quot;&gt;iWork&lt;/a&gt; later, but it&#8217;s only $79 and offers a full office suite. Or I&#8217;ll just tug along using
&lt;a href=&quot;http://www.neooffice.org/&quot;&gt;NeoOffice&lt;/a&gt; (Mac port of &lt;a href=&quot;http://www.openoffice.org/&quot;&gt;OpenOffice&lt;/a&gt; suite).&lt;/p&gt;


	&lt;p&gt;Oh, and did I mention how fast &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; is to use, and how quickly it recovers from sleep? ok, you wouldn&#8217;t believe it anyways. I won&#8217;t.&lt;/p&gt;


	&lt;p&gt;So far, after using Mac for a month my only gripe is the lack of commercial games. Sure, the situation is improving all the time and it&#8217;s way better than it was for Linux &lt;em&gt;ever&lt;/em&gt; (even with Loki software around). Like, I can get &lt;strong&gt;World of Warcraft&lt;/strong&gt; for Mac, or Lucasart&#8217;s &lt;strong&gt;Galactic Battlegrounds&lt;/strong&gt; or even &lt;strong&gt;Empire at War&lt;/strong&gt;, all native apps without any emulators or such; the situation is definitely better with current games, as current Macs are based on intel architecture as well (and NVidia graphics cards). But Apple store still mentions only about few hundred popular titles compared to thousands available for PC. Fortunately, I can probably play &lt;a href=&quot;http://www.companyofheroesgame.com/&quot;&gt;Company of Heroes&lt;/a&gt; using the &lt;a href=&quot;http://www.parallels.com&quot;&gt;Parallels&lt;/a&gt; software.&lt;/p&gt;


	&lt;p&gt;Sure, Macs come with a price tag a tad higher than PCs. But what you get is more than worth the extra cost. You just have
to experience it to believe it.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-07-10:141</id>
    <published>2008-07-10T08:19:00Z</published>
    <updated>2008-09-05T04:54:29Z</updated>
    <category term="misc"/>
    <category term="toys"/>
    <link href="http://majakari.net/2008/7/10/fun-with-marble-coaster" rel="alternate" type="text/html"/>
    <title>Fun with marble coaster</title>
<content type="html">
            &lt;p&gt;Ok, I won&#8217;t start reviewing &lt;em&gt;toys&lt;/em&gt;. But let this be an exception. Seldom I have encountered such a great piece of design and engineering in reasonable price as with &lt;a href=&quot;http://tinyurl.com/6nz6yc&quot;&gt;Quercetti Skyrail&lt;/a&gt; series.
Not only for kids (Samuel plays an hour or two with it every day), it provides lots of fun for those 
interested in math, physics and engineering. Not surprisingly, most videos in YouTube related to the kit are made by adults fascinated by the marble coasters.&lt;/p&gt;


	&lt;p&gt;Yeah. I&#8217;m &lt;em&gt;definitely&lt;/em&gt; going to get few box of those to my office. Hint: 28 meters of marble track for those moments when some &lt;a href=&quot;http://en.wikipedia.org/wiki/Heisenbug#Heisenbugs&quot;&gt;Heisenbug&lt;/a&gt; fails to manifest itself during the debugging phase. Mmm.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://majakari.net/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:majakari.net,2008-06-11:136</id>
    <published>2008-06-11T12:54:00Z</published>
    <updated>2008-08-29T16:55:11Z</updated>
    <category term="fp"/>
    <category term="haskell"/>
    <category term="programming"/>
    <category term="rant"/>
    <link href="http://majakari.net/2008/6/11/a-blog-link" rel="alternate" type="text/html"/>
    <title>Notes on The Functional Programming Language</title>
<content type="html">
            &lt;p&gt;I dislike the idea of writing blogs with no content other than links with vague descriptions, 
but &lt;em&gt;this time&lt;/em&gt; I wanted to make an exception. The reason: it seems like somebody&#8217;s train of thought
runs along the same tracks as mine, except that he writes better than me and is more focused on functional 
programming, and it seems like I could stop writing about them and just point to 
&lt;a href=&quot;http://notes-on-haskell.blogspot.com/instead&quot;&gt;his blog&lt;/a&gt;. I guess you could be able to deduce the particular flavor of the language by deciphering the url linked):&lt;/p&gt;


	&lt;p&gt;Now, go read &lt;a href=&quot;http://notes-on-haskell.blogspot.com/&quot;&gt;http://notes-on-haskell.blogspot.com/&lt;/a&gt;. Good stuff
for you language enthusiastics out there.&lt;/p&gt;
          </content>  </entry>
</feed>
