<?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:myblog_cluster,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://myblog_cluster/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://myblog_cluster/" rel="alternate" type="text/html"/>
  <updated>2008-07-22T16:21:27Z</updated>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-07-22:132</id>
    <published>2008-07-22T16:17:00Z</published>
    <updated>2008-07-22T16:21:27Z</updated>
    <link href="http://myblog_cluster/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://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-07-21:145</id>
    <published>2008-07-21T11:26:00Z</published>
    <updated>2008-07-22T09:51:43Z</updated>
    <category term="mac"/>
    <category term="misc"/>
    <category term="rant"/>
    <link href="http://myblog_cluster/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://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-07-10:141</id>
    <published>2008-07-10T08:19:00Z</published>
    <updated>2008-07-10T08:23:33Z</updated>
    <category term="misc"/>
    <category term="toys"/>
    <link href="http://myblog_cluster/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://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-06-11:136</id>
    <published>2008-06-11T12:54:00Z</published>
    <updated>2008-06-11T12:54:59Z</updated>
    <category term="fp"/>
    <category term="haskell"/>
    <category term="programming"/>
    <category term="rant"/>
    <link href="http://myblog_cluster/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>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-06-04:105</id>
    <published>2008-06-04T10:24:00Z</published>
    <updated>2008-06-04T13:28:01Z</updated>
    <category term="fp"/>
    <category term="programming"/>
    <link href="http://myblog_cluster/2008/6/4/what-is-programming-really" rel="alternate" type="text/html"/>
    <title>What is programming, really?</title>
<content type="html">
            &lt;p&gt;Warning: this is mainly an unfinished idea, something I haven&#8217;t quite well grasped yet. However, I have a Strong Feeling&amp;reg; in my guts that there&#8217;s something out there. I mean, there has to be, considering there&#8217;s
all the more stir around such languages as &lt;a href=&quot;http://caml.inria.fr&quot;&gt;Ocaml&lt;/a&gt;, &lt;a href=&quot;http://www.haskell.org&quot;&gt;Haskell&lt;/a&gt; and &lt;a href=&quot;http://www.erlang.org&quot;&gt;Erlang&lt;/a&gt;. And even Lisp is not dead yet, even though the idea is more than 40 years old now.&lt;/p&gt;


	&lt;p&gt;I&#8217;m of course ranting about &lt;a href=&quot;http://en.wikipedia.org/wiki/Functional_programming&quot;&gt;functional languages&lt;/a&gt;, hence referred to as &#8216;FP&#8217; (I haven&#8217;t entered the rant mode yet, but I will, please stay with me).&lt;/p&gt;


	&lt;p&gt;Ok. What follows is an unstructured, incoherent rambling about miscellaneous observations related to FP.&lt;/p&gt;


	&lt;p&gt;My main point ..one of them, at least, is that imperative programming, not &lt;em&gt;per se&lt;/em&gt;, but as it is usually done, is not &lt;em&gt;really&lt;/em&gt; programming, but it is rather something like moving wads of bytes from here to there, mangling
a bit over there eventually coming up with the satisfactory result and/or state, and potentially returning something.&lt;/p&gt;


	&lt;p&gt;The usual construction blocks in imperative programs are &lt;em&gt;expressions&lt;/em&gt; and &lt;em&gt;statements&lt;/em&gt;. But they are not independent, and do not surve any purpose alone; they are useful only in some very specific context, and to decipher the meaning of the code you have memorize loads of variables such as loop iterators, temporary variables, results
of several assignments and worst of all, maybe remember all sorts of intended side-effects introduced 
by the methods used; often &lt;em&gt;you&lt;/em&gt; have to emulate some sort of state machine to get the idea of how some code works. To make this less abstract, consider the following Java snippet implementing quicksort:&lt;/p&gt;


&lt;pre&gt;
    public static void quicksort(double[] a, int left, int right) {
        if (right &amp;lt;= left) return;
        int i = partition(a, left, right);
        quicksort(a, left, i-1);
        quicksort(a, i+1, right);
    }

    private static int partition(double[] a, int left, int right) {
        int i = left - 1;
        int j = right;
        while (true) {
            while (less(a[++i], a[right]));
            while (less(a[right], a[--j])) 
                if (j == left) break;
            if (i &amp;gt;= j) break;
            exchange(a, i, j);
        }
        exchange(a, i, right);
        return i;
    }
&lt;/pre&gt;

	&lt;p&gt;It &lt;em&gt;doesn&#8217;t even have all the details implemented&lt;/em&gt; (&lt;code&gt;less, exchange&lt;/code&gt;), but it conveys my idea well (I blatantly copied the code from somewhere; and I think it&#8217;s a good implementation for Java environment). For example, take the method &lt;code&gt;partition&lt;/code&gt;. It&#8217;s task is simple, and you know what it does because you&#8217;ve studied  all the common sort methods and know their &#8220;Big Oh&#8221; complexity classes by heart  (yes, &lt;strong&gt;you&lt;/strong&gt;, unless you are a weasel and gained a CS degree without studying The &lt;span class=&quot;caps&quot;&gt;CLR&lt;/span&gt; book well). But if you didn&#8217;t know already how &lt;code&gt;partition&lt;/code&gt; works, which is exactly the situation you 
confront in real life projects: quick &lt;del&gt;-&lt;/del&gt; how many minutes it takes for you to understand workings of partition, including edge cases and all execution branches, ie. really understand it? probably way more than necessary. Why? because you cannot understand the whole method just by completely understanding each of the expressions and statements contained.&lt;/p&gt;


	&lt;p&gt;Now, enter the same quicksort method, this time in Haskell:&lt;/p&gt;


&lt;pre&gt;
quicksort [] = []
quicksort (s:xs) = quicksort [x|x &amp;lt;- xs,x &amp;lt; s] ++ [s] ++ quicksort [x|x &amp;lt;- xs,x &amp;gt;= s] 
&lt;/pre&gt;

	&lt;p&gt;And yes, that is the whole implementation. Really!&lt;/p&gt;


	&lt;p&gt;You could argue that the Java example was contrived (and it was, trust me), but you should still get the point I&#8217;m fervently trying to make: functional programming deals with the &lt;em&gt;structure and data flow&lt;/em&gt;, encouraging programmers to &lt;em&gt;compute&lt;/em&gt; things by mapping a set of values to some other set of values through some particular &lt;em&gt;transformations&lt;/em&gt;. And it is the very nature of these transformations that is not well captured by the common imperative-style programs, because it allows programmers to achieve the desired results in 1.7642 gazillions of ways, more than 99% of which are (horribly) bad.&lt;/p&gt;


	&lt;p&gt;With FP things are a bit different, though. First, it usually prevents the programmer from resorting to Move Wads Of Bytes Here And There -method of &#8220;programming&#8221;. Erlang does it by discarding the concept of mutable variables. For example, the statement &lt;code&gt;Foo = 42&lt;/code&gt; is not an assignment in a usual sense; it &lt;em&gt;binds&lt;/em&gt; &lt;code&gt;Foo&lt;/code&gt; to value &lt;code&gt;42&lt;/code&gt;. This is also called &lt;em&gt;single assigment&lt;/em&gt;, which means that &lt;code&gt;Foo&lt;/code&gt; is &lt;em&gt;eternally bound&lt;/em&gt; to the value &lt;code&gt;42&lt;/code&gt;. Saying &lt;code&gt;Foo = 1&lt;/code&gt; afterwards would raise an error.&lt;/p&gt;


	&lt;p&gt;I guess you, my Gentle Reader, just discarded Erlang from the &#8220;languages I should learn&#8221; list. Please don&#8217;t do it, at least yet.&lt;/p&gt;


	&lt;p&gt;In concurrent programming, there are several traps for the unwary, like race conditions, locking problems
and others, but many of them are due to concurrent data modifications and side-effects, both of which often force programmer to synchronize access to some parts of the code. But these problems are note inherent in all programming paradigms. They are results of using a language &lt;em&gt;and&lt;/em&gt; design method intended for sequential, non-parallel data processing. Functional programming languages usually don&#8217;t have those restrictions. However, FP-style programming has additional benefits not restricted just to the domain of parallel programming; it is the &lt;em&gt;communication of intent&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;Of course, &lt;em&gt;your&lt;/em&gt; programming style could be quite different, and perhaps your code is the prime candidate for the book &#8220;Beautiful Code: 2nd edition&#8221;. But I&#8217;m talking about the mere mortals, as myself, here.&lt;/p&gt;


	&lt;p&gt;So FP focuses on the structure and flow; by avoiding state changes the programmer is coerced to partition problems to smaller subproblems, resulting in cleaner, more coherent result&#8212;largely due to the fact that creating a function which 
returns a list containing two items, a list of employees with salary below given threshold, and initials of the chief executive officer in another item, is a bad code smell that is easy to detect. But such method can be implemented far more subtly using a class with certain side effects, and the public api wouldn&#8217;t necessary look that bad (imagine an instance method &lt;code&gt;CompanyInformation#get_info()&lt;/code&gt;)&lt;/p&gt;


	&lt;p&gt;My problem is that many of my claims pro FP require more rigorous approach to really prove anything, and I don&#8217;t have anything concrete enough to stand my claim. So, I&#8217;m sorry, this was yet another half-written thought about a subject I find very intriguing, but lacks more than just polishing to be useful. But I&#8217;ll get back on to the subject before the end of this 
year. Promise.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-06-02:103</id>
    <published>2008-06-02T19:32:00Z</published>
    <updated>2008-06-03T06:11:38Z</updated>
    <category term="meta"/>
    <link href="http://myblog_cluster/2008/6/2/why-i-blog" rel="alternate" type="text/html"/>
    <title>Why I blog</title>
<content type="html">
            &lt;p&gt;Ok, let&#8217;s put this straight.&lt;/p&gt;


	&lt;p&gt;Why do I blog? There are already so &lt;a href=&quot;http://evang.eli.st/blog&quot;&gt;many&lt;/a&gt; &lt;a href=&quot;http://www.objectmentor.com/&quot;&gt;good&lt;/a&gt; &lt;a href=&quot;http://eigenclass.org/&quot;&gt;blogs&lt;/a&gt; out there, that no blog can &lt;em&gt;really&lt;/em&gt; add anything to those, except noise and
disinformation. Right? I almost can imagine the following conversation between me and my completely imaginary colleague named, umm, Juho.&lt;/p&gt;


	&lt;p&gt;Juho: So you write a blog too, eh?&lt;/p&gt;


	&lt;p&gt;Me: Yeah. Not that there&#8217;s anything worth reading, but I &lt;em&gt;really&lt;/em&gt; think I have to do it.&lt;/p&gt;


	&lt;p&gt;Juho: ...yeah, just like the other 2&#215;10^638 other nerds out there. So, what&#8217;s the subject?&lt;/p&gt;


	&lt;p&gt;Me: Uh.. programming stuff, mostly.&lt;/p&gt;


	&lt;p&gt;[Juho stares me blankly, pauses for an awkward 2.51378 seconds, during which I remembered that my latest article
described how to patch the latest CI tool to show failure status in &lt;span&gt;CO&lt;/span&gt;&lt;span&gt;LO&lt;/span&gt;&lt;span&gt;R&lt;/span&gt; (the crowd goes &#8220;OOooh&#8221; at this point) with excruciating detail spanning more than 1300 lines, thus suddenly making me to wish we&#8217;d get back to the subject of where 
&lt;a href=&quot;http://icanhascheezburger.com&quot;&gt;we can has cheezburger&lt;/a&gt; this time]&lt;/p&gt;


	&lt;p&gt;Me: Wait! I know there&#8217;s already zillions of those, but, you know, it&#8217;s really interesting! It&#8217;s almost like having Usenet conversations, with the exception of emphasizing &lt;em&gt;your&lt;/em&gt; ideas on the subject. I even get comments, many of them! So, it&#8217;s, like, interactive and
I learn stuff by writing about ..things. It helps me to stay up-to-date, and I perhaps I even get to give something bag to the blogosphere too!&lt;/p&gt;


	&lt;p&gt;[Juho tries to leave quietly, I pretend not to notice]&lt;/p&gt;


	&lt;p&gt;Me: It&#8217;s also like having a public CV on the &#8216;net, maybe helping you to get important contacts for the future. You&#8217;ll say stupid things for sure, but once in a blue moon you&#8217;ll pick something worth writing about and talk about it. I know I did! At least once!&lt;/p&gt;


	&lt;p&gt;Me: And, umm&#8230; [Now Juho really leaves me ranting alone by myself, and at this point I can&#8217;t continue pretending I failed to notice it, and as such I resort to the same tactics as cats; I pretend I was doing something completely else]&lt;/p&gt;


	&lt;p&gt;Ok. But I still maintain that I really have to. Why? &lt;a href=&quot;http://steve-yegge.blogspot.com/&quot;&gt;Yegge&lt;/a&gt; told me to! And it &lt;em&gt;is&lt;/em&gt; a good way to polish 
(or &lt;em&gt;develop&lt;/em&gt;, as in starting to learn a skill you precisely succeeded in lacking to have) your writing skills. It&#8217;s a very good way for seeking your dream job, too. Ok, at least if you&#8217;re working in the IT sector. I doubt the building industry seeks
professional workers by googling for them using particular, carefully selected keywords. I know &lt;em&gt;I would&lt;/em&gt; search people&#8217;s blogs if I were to hire anybody! And if you know me, you know I&#8217;d use something like&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;-java -enterprise -certifi(cate|ed) +(haskell || erlang || lisp || smalltalk || ocaml) &#38;&#38; bdd &#38;&#38; distributed &#38;&#38; (algorithm || math)&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;or something similar. Yeah. I&#8217;d definitely include some functional programming languages, even if I would only catch wannabes: 
if the person has heard of &lt;a href=&quot;http://caml.inria.fr/&quot;&gt;OCaml&lt;/a&gt; and is smart enough to even mention it, odds are that he&#8217;s more capable of designing any demanding Java/C++/C# apps in the long run&#8212;which is more important to the company than short-term benefits. Yeah. Then I&#8217;d check his internet provider&#8217;s B-class and grep my access log for any potential matches to this post. Yup, those nasty little cheaters.&lt;/p&gt;


	&lt;p&gt;...And minus &lt;em&gt;Visual Basic&lt;/em&gt;. I&#8217;d specifically filter out any candidates with having poor judgement enough to invest 
time in learning such piece of Private Sub Warning If I UtteredThose(Words) Then IWould Go Insane EndIf. 
And I&#8217;m &lt;em&gt;still&lt;/em&gt; not against Microsoft, they make lots of great software (really).  C# isn&#8217;t bad at all, on the contrary, and Microsoft even develops F#, a commercial Haskell -like programming language, if one should believe the rumours.&lt;/p&gt;


	&lt;p&gt;Where was I? oh, right, I digress. But it really is all about formulating your ideas in a more cohesive manner, getting a good job, influencing others, meeting very smart people and getting a Mac Book Pro. Yup.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-30:125</id>
    <published>2008-04-30T11:13:00Z</published>
    <updated>2008-04-30T11:52:44Z</updated>
    <link href="http://myblog_cluster/2008/4/30/new-ruby-project-on-windows-consider-it-twice" rel="alternate" type="text/html"/>
    <title>Starting a new Ruby project on Windows? Consider it twice</title>
<content type="html">
            &lt;p&gt;If you are about to start a new &lt;a href=&quot;http://www.ruby-lang.org&quot;&gt;Ruby&lt;/a&gt; / &lt;a href=&quot;http://www.rubyonrails.org&quot;&gt;Ruby on Rails&lt;/a&gt; project on Windows environment, you should probably reconsider your options. I have encountered many Windows-related problems during the development of a large, Windows/Ruby project&#8212;problems I doubt would have existed in other environments. I&#8217;ll try to summarize here some of the reasons why I think Ruby doesn&#8217;t rock in Windows.&lt;/p&gt;


	&lt;p&gt;First of all, Ruby is Open Source Software (OSS), which I consider a good thing. However, the problem is that most &lt;span class=&quot;caps&quot;&gt;OSS&lt;/span&gt; folks prefer environments that are easy to customize and automate, and in general &lt;span class=&quot;caps&quot;&gt;OSS&lt;/span&gt;-friendly; Windows clearly isn&#8217;t such a platform. So, even though Ruby runs nice in Windows, I&#8217;m quite sure that the win32-related libraries have much more bugs compared to other libraries, largely due to lower number of developers and users compared to the other platforms. The problems you can run into could be because of a library that uses a system call that doesn&#8217;t exist in Windows, or behaviour is different. For example, the library could use &lt;code&gt;fork()&lt;/code&gt; which Windows doesn&#8217;t have (and win32 equivalent doesn&#8217;t really work like &lt;code&gt;fork()&lt;/code&gt; does). Then there&#8217;s the problem 
of inablity to remove an open file, which results in to troubles more often than you&#8217;d think at first (two words: log rotation).&lt;/p&gt;


	&lt;p&gt;Third, Ruby is a relatively new language, and as such it doesn&#8217;t have as much tool support as say, Java or C#. There &lt;em&gt;are&lt;/em&gt; lots of fancy thingamajicks that make it easier to automate stuff like deployment and automatic testing, but they don&#8217;t run in Windows because of missing required libraries and/or functionality. For example, deep_test will never work in Windows &lt;small&gt;(this is a provocative statement camouflaged into a fool&#8217;s claim to make such a tool appear pronto)&lt;/small&gt;. And you can&#8217;t use such niceties
as &lt;a href=&quot;http://capify.org/&quot;&gt;Capistrano&lt;/a&gt; because you really can&#8217;t ssh into a Windows box. So to make deployment in Windows easier you have to create custom installers which is a &lt;span class=&quot;caps&quot;&gt;PITA&lt;/span&gt; (Pain In The Donkey) in general.&lt;/p&gt;


	&lt;p&gt;That doesn&#8217;t mean I&#8217;ll resort to C# from now on for every Win32 project if applicable, but I&#8217;ll certainly be much more apprehensive
about using Ruby + Win32 combination next time.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-25:93</id>
    <published>2008-04-25T14:01:00Z</published>
    <updated>2008-05-05T08:55:38Z</updated>
    <category term="meta"/>
    <category term="rant"/>
    <category term="ruby"/>
    <link href="http://myblog_cluster/2008/4/25/no-i-m-not-a-ruby-programmer" rel="alternate" type="text/html"/>
    <title>No, I'm not a "Ruby programmer"</title>
<content type="html">
            &lt;p&gt;Because I&#8217;m rather an enthusiastic of a person, I use to ramble on many things, ideas and any stuff in general I&#8217;m happy to  fiddle with.&lt;/p&gt;


	&lt;p&gt;So I talk a lot about gadgets &#8211; mostly of those I &lt;em&gt;wish&lt;/em&gt; I had &#8211; and ideas,
methodologies, technology and programming languages. And so I talk, rant, and sometimes even
hype (sorry!) about &lt;a href=&quot;http://www.ruby-lang.org&quot;&gt;Ruby&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;My point in writing this disclaimer, sort of, is that 
&lt;em&gt;I&#8217;m not a Ruby enthusiast&lt;/em&gt;. Ok, that&#8217;s a lie actually, but I said that for the sake of
discussion. Right, make that monologue instead.&lt;/p&gt;


&lt;div class=&quot;book-link&quot;&gt;&lt;a href=&quot;http://pragprog.com/titles/ruby&quot;&gt;&lt;img src=&quot;http://www.pragprog.com/images/covers/190x228/ruby.jpg&quot; alt=&quot;[]&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;My &lt;em&gt;whole point&lt;/em&gt; about ranting about computing stuff is an attempt, futile
perhaps, to open the eyes of some people working in the software 
industry. By &#8220;some people&#8221; I mean folks similar to that bloke on the other side of the corridor
who always thinks that &lt;em&gt;Java is teh best language eva&lt;/em&gt; for all kinds of
programming tasks. Yeah, &lt;em&gt;all kinds&lt;/em&gt;, really. And no, I don&#8217;t mean Java is bad (even though it lacks mixins, a clever solution to the Diamond Inheritance Problem without breaking Single Inheritance, it doesn&#8217;t have closures, no first-class methods, is noun-driven, way too verbose and on the top of it all, isn&#8217;t that pure OO language after all because not everything is an object). It was the first commercially successful replacement for that monstrous, inconsistent pile of hacks on top of symbolic assembly language, better known as C++. 
Besides, both Java and C++ were designed by people far more intelligent than I am, and they solved, at least partially, many of the problems back then. It&#8217;s not easy to design a language, and both C++ and Java were, though likely bashed by all generations to follow, probably necessary and important, intermediate steps for the languages to come (C#, maybe?).&lt;/p&gt;


	&lt;p&gt;But that guy on the other side of the corridor could as well be raving about C#. Or Ruby, if
it becomes the next leading enterprise-level solution platform (which I really doubt, because 
the amount of dynamicity (dynamite?) makes Ruby unsuitable for fancy-schmancy IDEs which allow you to move lumps of code here and there and
claim &#8220;look, ma! I&#8217;m refactoring!&#8221;). My point is that it should be obvious that different tasks call for different tools. This is
emphasized in companies that take on very diverse assignments, ranging from
industrial controller and measurement tools to financial analysis software, to
public network-based services. It might be relevant in specialized software
companies as well, though. For example, &lt;span class=&quot;caps&quot;&gt;COBOL&lt;/span&gt;, Java and maybe C# are the &lt;em&gt;de facto&lt;/em&gt; choices for
most financial companies, yet &lt;a href=&quot;http://www.janestcapital.com/&quot;&gt;some of them&lt;/a&gt;
choose rather to use &lt;a href=&quot;http://www.haskell.org&quot;&gt;Haskell&lt;/a&gt; or
&lt;a href=&quot;http://caml.inria.fr&quot;&gt;OCaml&lt;/a&gt; instead.&lt;/p&gt;


	&lt;p&gt;Marketing and policy-related issues aside, programmers themselves 
want to stick to their favourite, all-powerful language, hence
referred to as &lt;em&gt;Globb&lt;/em&gt; (though arbitrary, I guess it&#8217;s imperative, object-oriented
and uses explicit static typing), usually coming up with one of the following (bad) reasons:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;They have never thought of doing something differently, mostly because
  they don&#8217;t know different ways exist. A person given the task of creating a
  parser for some language might consider the task inherently very difficult, if
  the only languages he has worked with are statically typed and imperative. 
  Two words: pattern matching.&lt;/li&gt;
		&lt;li&gt;Lack of understanding due to ignorance. I&#8217;m quite sure most Globb programmers
  don&#8217;t much care about such things as continuations, coroutines, anonymous
  functions, higher-order functions, introspection or dynamic typing. They would
  regard most of those useless, because they don&#8217;t understand how to use them
  properly. Maybe they tried to use them but the result was a disaster, and as such they
  labeled the whole technique evil, I Dunno. This is the problem with programming and mathematics: non-mathematically inclined programmers say that maths is mostly useless when talking about programming, 
and that&#8217;s just because they think math is only about formulas and proofs that nobody can understand anyways.&lt;/li&gt;
		&lt;li&gt;Laziness. And I mean the &lt;em&gt;wrong&lt;/em&gt; kind, there&#8217;s also the good kind which makes
  you to automate things and keep things more &lt;a href=&quot;http://en.wikipedia.org/wiki/Don't_repeat_yourself&quot;&gt;&lt;span class=&quot;caps&quot;&gt;DRY&lt;/span&gt;&lt;/a&gt;. But that&#8217;s a different story.
  These people don&#8217;t want to learn new things, maybe because they don&#8217;t really
  like their profession that much. Or maybe they are afraid of investing an
  effort to learn something new that could be used only in that particular project.&lt;/li&gt;
		&lt;li&gt;...Or something else that I can&#8217;t think of or neglected to mention. Sorry, I&#8217;m in a lazy (the wrong kind) mood.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Then there&#8217;s the marketing and the problem of proving the customers that The
Globb Is Not The Ultimate Solution For All Problems Ever, but the whole issue
would be far less of a problem if developers themselves realized what&#8217;s wrong
with the one-tool-for-all attitude.&lt;/p&gt;


	&lt;p&gt;So, I just babble and hype about Ruby language because it&#8217;s clearly the best
&lt;em&gt;language&lt;/em&gt; I&#8217;ve ever worked with. 12 years ago that language was Perl, as 
the only other languages I new to practically exist were C, C++, Pascal, Basic and Scheme, the last
of which was just too obscure to me back then. Note the emphasis on language; the
current interpreters (practically the &lt;span class=&quot;caps&quot;&gt;MRI&lt;/span&gt; and JRuby versions) do leave stuff to
be desired. And yes, the language itself could be improved as well, as always, but most of my
concerns now are with the implementations, not the language itself. Then again, I think typing 
inference with optional explicit typing would be a great addition to the language, 
both for the documentation as well as helping editors to better understand structure 
of the program. It might also help in making the interpreter more efficient, but for me, 
that has never been a problem so far. As such I was quite thrilled to read about &lt;a href=&quot;http://www.cs.umd.edu/~jfoster/ruby.pdf&quot;&gt;statically typed
Ruby&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&quot;book-link&quot;&gt;&lt;a href=&quot;http://www.pragprog.com/titles/jaerlang&quot;&gt;&lt;img src=&quot;http://www.pragprog.com/images/covers/190x228/jaerlang.jpg&quot; alt=&quot;[]&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;By &#8220;best language&#8221; I mean that Ruby is succinct enough and allows me to focus more
on the problem to be solved and less on the implementation. And it is also one
of the most &#8220;programmable programming languages&#8221;, maybe second to none but &lt;span class=&quot;caps&quot;&gt;LISP&lt;/span&gt;
and it&#8217;s dialects, but I really can&#8217;t say much more of that as my FP experience is
yet rather limited (mostly I&#8217;ve fiddled with E-Lisp to add simple enhancements to Emacs, and
some basic exercises in Haskell and Erlang).&lt;/p&gt;


	&lt;p&gt;So, I&#8217;m quite likely to regard some other language as my favorite seven years
from now on, and it&#8217;s probably a language that doesn&#8217;t exist yet, but an
improved version of current languages allowing even cleaner hybrid use of OO and
functional programming. Or maybe it is some refined version of
&#8220;Erlang&#8221;http://www.erlang.org. But I&#8217;ll try to learn many different languages
with very different programming models, allowing me to improve my thinking using
current tools and see familiar things in a new light. That&#8217;s basically why
Pragmatic Programmers tell you to learn new (programming) language every year.&lt;/p&gt;


	&lt;p&gt;Now, off you go and read the &lt;a href=&quot;http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf&quot;&gt;thesis about
Erlang&lt;/a&gt;. Or if you 
are already an FP buff, read the &lt;a href=&quot;http://poignantguide.net/ruby/&quot;&gt;Poignant Guide&lt;/a&gt; instead.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Sorry for the original post, it was complete crap. I know I should reread the stuff I have written at least once. 
And I&#8217;m not even drunk when I write like That Famous Ex-Amazon Now Google Guy, so I don&#8217;t really have excuses. Ok, I&#8217;m often tired 
and in great need of sleep, but that has become
&lt;em&gt;status quo&lt;/em&gt; nowadays. &lt;b&gt;Sigh&lt;/b&gt;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; Kathy  Sierra has an &lt;a href=&quot;http://weblogs.java.net/blog/kathysierra/archive/2004/12/does_it_really.html&quot;&gt;alternative view&lt;/a&gt; on the subject which I really recommend you to read. So, even though I recommend a developer should know many languages, I think she really should master a language or two to be a real professional. And that language should be general enough and well supported, &lt;span class=&quot;caps&quot;&gt;IMO&lt;/span&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-14:118</id>
    <published>2008-04-14T13:19:00Z</published>
    <updated>2008-04-14T13:20:02Z</updated>
    <link href="http://myblog_cluster/2008/4/14/on-the-importance-of-general-skills-vs-specific-technologies" rel="alternate" type="text/html"/>
    <title>On the importance of general skills vs specific technologies</title>
<content type="html">
            &lt;p&gt;A while ago I discussed the subject of software development skills with my friend. The discussion 
revolved around the question of how much weight to put on specific technological skills
versus general skills related to software design, algorithms, architecture and stuff.&lt;/p&gt;


	&lt;p&gt;Well, &lt;a href=&quot;http://martinfowler.com&quot;&gt;Martin Fowler&lt;/a&gt; has already &lt;a href=&quot;http://martinfowler.com/bliki/PreferDesignSkills.html&quot;&gt;put it&lt;/a&gt; better than I ever could, so you should probably just read that instead.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-12:116</id>
    <published>2008-04-12T09:06:00Z</published>
    <updated>2008-04-12T09:07:48Z</updated>
    <category term="meta"/>
    <link href="http://myblog_cluster/2008/4/12/mephisto-updated" rel="alternate" type="text/html"/>
    <title>Mephisto updated</title>
<content type="html">
            &lt;p&gt;I just updated mephisto to most recent trunk snapshot. Some features may be missing for a while.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-11:115</id>
    <published>2008-04-11T10:05:00Z</published>
    <updated>2008-04-11T10:06:26Z</updated>
    <category term="quickie"/>
    <category term="ruby"/>
    <link href="http://myblog_cluster/2008/4/11/documenting-your-parameters" rel="alternate" type="text/html"/>
    <title>Documenting your parameters</title>
<content type="html">
            &lt;p&gt;Consider you are reading a chunk of code, and you see a method&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;mock_person('jack', 1, 24, 72, 180)&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;You&#8217;ll probably wonder what the parameters are. As you know, you should avoid using &lt;em&gt;magic constants&lt;/em&gt; in your code; they make it less readable, and if you have just numbers in the code, you can&#8217;t easily change all instances of, say, 4, to something else (how do you make difference between values of 4 you want to replace, and coincidental values of 4?). If the original developer had been smarter, he would&#8217;ve probably written something like&lt;/p&gt;


&amp;lt;filter:code&gt;
&lt;pre&gt;
name = 'jack'
uid = 1
age = 24
weight = 72
height=180
mock_person(name, uid, age, weight, height)
&lt;/pre&gt;
&amp;lt;/filter&gt;

	&lt;p&gt;but it&#8217;s not too pretty either; first, it bloats the code, second, it pollutes the namespace and allows modification of parameters later on. This wouldn&#8217;t be a problem with immutables, but what if any of the parameters was a mutable object with some state?&lt;/p&gt;


	&lt;p&gt;Luckily, an assignment statement in Ruby has a return value, which is the evaluated value of the right-side expression. So, 
a statement &lt;code&gt;name = 'jack'&lt;/code&gt; would return value &lt;code&gt;&quot;jack&quot;&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;Now, a simple call&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;mock_person(name='jack', uid=1, age=24, weight=72, height=180)&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;would return exactly the same object, while not polluting the caller&#8217;s scope.&lt;/p&gt;


	&lt;p&gt;Ok, it&#8217;s not &lt;span class=&quot;caps&quot;&gt;THAT&lt;/span&gt; useful, but especially when writing unit specs/tests (which should be very readable!) it allows for 
easy documentation of your parameters without any additional setup and/or hacks at all.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-09:114</id>
    <published>2008-04-09T15:21:00Z</published>
    <updated>2008-06-02T08:41:45Z</updated>
    <category term="hardware"/>
    <category term="iwantmacbookpro"/>
    <category term="rant"/>
    <link href="http://myblog_cluster/2008/4/9/an-ideal-computer" rel="alternate" type="text/html"/>
    <title>An ideal computer</title>
<content type="html">
            &lt;p&gt;I just wrote about &lt;a href=&quot;/2008/4/9/an-ideal-language&quot;&gt;an ideal language&lt;/a&gt;, which means that there are now two articles in the series
you can skip over, not wanting to know the kinds of stuff I day dream about (excluding the obvious light saber part, of which I&#8217;ve written before. Ahem).&lt;/p&gt;


	&lt;p&gt;Still with me? right, let&#8217;s get along with it.&lt;/p&gt;


	&lt;p&gt;An ideal computer would have at least the following characteristics:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;OS designed by the same folks (ok, company) as the hardware. It means that you have less compatibility problems, 
OS is better tuned and optimized for that particular piece of hardware, resulting in more robust and cohesive system as a whole.&lt;/li&gt;
		&lt;li&gt;Portability. I don&#8217;t even need to explain this.&lt;/li&gt;
		&lt;li&gt;Sleek outlooks. No, not sleek as in teenager-pimped-and-tuned-up cars with chromed parts and alumiunium bling-bling wheels. I mean &lt;em&gt;sleek&lt;/em&gt;. Bang&#38;Olufsen way, if you know what I mean. If you must carry it around (cf. above), you are already complaining about the awkwardness of having to hang it on your shoulder, backpack and stuff. So, you wish it would at least &lt;em&gt;look&lt;/em&gt; nice.&lt;/li&gt;
		&lt;li&gt;Impression of polished craftsmanship both in the OS and hardware. This is the most difficult part. It should be easy to use, but  contain enough power (&lt;em&gt;power&lt;/em&gt; in the broadest sense possible; I&#8217;m not speaking about just performance here) when you need it. It&#8217;s not all in the details, but they matter as well. In practice this means at least a working &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt;, probably redesigned from the scratch, as most modern GUIs in both &lt;em&gt;Unicen&lt;/em&gt; and &lt;em&gt;Win32&lt;/em&gt; ..say, suck, for the lack of a more appropriate term (sorry for sounding Yeggish again). But it should also have a nice, bash-like command line (even better, zsh) too, so that you can script system tasks as well. However, normal users should be able to do fine without it.&lt;/li&gt;
		&lt;li&gt;It must run Emacs, Ruby, gcc, Erlang, Haskell, Java, some version of &lt;span class=&quot;caps&quot;&gt;LISP&lt;/span&gt;.. I mean, it must be supported by the top 50 programming languesges, if there was such a list anywhere. With the exception of VB, which you don&#8217;t want to use anyway.&lt;/li&gt;
		&lt;li&gt;It must boot quickly, and resume from hibernation / deep sleep /whatever &lt;em&gt;fast&lt;/em&gt;. If I have to check some page, like when the next bus leaves, I don&#8217;t want to wait for two minutes in order to just read one darn-tootin&#8217; web page. And I don&#8217;t want to have my computer on all the time; that wouldn&#8217;t be green (even less &lt;a href=&quot;http://www.imdb.com/title/tt0119116/quotes&quot;&gt;supergreen&lt;/a&gt;).&lt;/li&gt;
		&lt;li&gt;It should combine best parts of popular operating system like Linux and Windows (programmability, ease of hacking, ease of installing and using hardware, usability) and none of the worse parts (incompleteness, buggy, never-finished software, virii (yes, that&#8217;s a proper spelling too), inability to automate things properly)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;fork()&lt;/code&gt; or equivalent with copy-on-write semantics. This is important, and one of the reasons why parallelizing processes with complete separation is often quite difficult in Windows. It might be just me, but hey, this is my blog :)&lt;/li&gt;
		&lt;li&gt;...It must be used by the majority of Ruby on Rails hackers :-}&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Ok, the last one was a joke, but it should have tipped you off already, if nothing else did.&lt;/p&gt;


	&lt;p&gt;There actually exists such a thing. I&#8217;ve seen it. I&#8217;ve even used very similar thing for two weeks, through a generous offer of a &lt;a href=&quot;http://tarvainen.wordpress.com/&quot;&gt;friend&lt;/a&gt;.&lt;/p&gt;


&amp;lt;drum&gt;

	&lt;p&gt;It&#8217;s called &lt;a href=&quot;http://www.apple.com/macbookpro/&quot;&gt;Mac Book Pro&lt;/a&gt;. And to say it out loud, as I already have; I&#8217;d probably switch to any (decent) job immediately, if they provided me one&lt;sup&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;. The presupposition of personal use is implied, naturally. It&#8217;s not just selfishness, but I honestly believe that the best tools allow you to do your work much better. All craftsmen know it well, and 
in that respect, software engineering is not an exception. Besides, it&#8217;s cheap. $2500 is less than one months pay, and given the amount of power and joy for the programmer it yields&#8230; it&#8217;s worth much more than that. And you&#8217;ll naturally buy a 30-inch Cinema Display and hook it up with your MacBook Pro to really &lt;a href=&quot;http://images.apple.com/displays/pdf/cinemadisplay30report.pdf&quot;&gt;boost your productivity&lt;/a&gt; . Programmers sure need screen estate to work effectively; &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; spec on one window, text editor/IDE on the next, bunch of terminals to do OS stuff and one window for displaying the software UI being developed. 1600&#215;1200 is good, but you really can&#8217;t match two 22&#8221;-inch monitors or one 2560&#215;1600 display.&lt;/p&gt;


	&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;strong&gt;Update 02.06.2008&lt;/strong&gt;: It seems tha after about 2 months or so, I got exactly that and a very interesting new job with excellent people as well. Can&#8217;t wait for my first assignment!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-09:98</id>
    <published>2008-04-09T09:51:00Z</published>
    <updated>2008-04-28T11:08:34Z</updated>
    <category term="programming"/>
    <category term="ruby"/>
    <link href="http://myblog_cluster/2008/4/9/an-ideal-language" rel="alternate" type="text/html"/>
    <title>An ideal language</title>
<content type="html">
            &lt;div&gt;&lt;a href=&quot;http://pragprog.com/titles/ruby&quot;&gt;&lt;img src=&quot;http://www.pragprog.com/images/covers/190x228/ruby.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;From the human (programmer) point of view, all computer languages suck. It&#8217;s not the fault of their designers; creating a 
successful programming language is &lt;em&gt;very difficult&lt;/em&gt;, as different tasks call for different kinds of tools. By definition, a general-purpose language will be always suboptimal for certain kinds of tasks. On the other hand, languages intended for specific use are seldom used for programming tasks, unless there is no viable option. This is easy to explain, as people don&#8217;t want to learn dozens of domain-specific languages to be able to work effectively.&lt;/p&gt;


	&lt;p&gt;Having used several programming languages, one should easily find out what features a language &lt;em&gt;should really have&lt;/em&gt;, on the assumption that all language features can be implemented in a consistent way and the combinations of those features do not create unwanted warts.&lt;/p&gt;


	&lt;p&gt;So, here are my thoughts:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Hybrid &lt;span class=&quot;caps&quot;&gt;OOP&lt;/span&gt;/functional language, with emphasis on imperative style
	&lt;ul&gt;
	&lt;li&gt;I find functional languages more beautiful in principle, but to gain wide-spread adoption (think of all the software industry) it must be something that is easy for all those Java/C++/C# folks to adapt to. By pure &lt;span class=&quot;caps&quot;&gt;OOP I&lt;/span&gt; mean that &lt;em&gt;everything&lt;/em&gt; is an object, including primitives, classes and methods (regarding &lt;em&gt;syntax&lt;/em&gt;; implementation may even resort to hacks as long as the object abstractions don&#8217;&#8216;t leak, as they do in Java). Ruby is like that, and it has an awesome design. Because classes are truly objects (of class Class) as well as methods, and combined with introspective features, it is a powerful tool for all kinds of metaprogramming tasks and a very capable language for modeling all kinds of things. &lt;em&gt;All kinds&lt;/em&gt;, as far as I&#8217;m concerned.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Strong, dynamic typing with some kind of &lt;em&gt;optional&lt;/em&gt; typing support 
	&lt;ul&gt;
	&lt;li&gt;Static typing doesn&#8217;t really help in creating bug-free programs. Successful compilation is far from working program. However, static typing does have certain advantages, mainly it allows the compiler to optimize stuff automatically, and it also helps in creating intelligent editors and IDEs. Optional typing could be supported through annotations or similar mechanism. Type inference is another viable solution, something where &lt;a href=&quot;http://www.haskell.org&quot;&gt;Haskell&lt;/a&gt; really shine (ok, Haskell is bright and shiny in many other ways too, but that&#8217;s a topic for completely another rambling).&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Single inheritance with mixins
	&lt;ul&gt;
	&lt;li&gt;This applies to &lt;span class=&quot;caps&quot;&gt;OOP&lt;/span&gt; languages only, but yeah. Single inheritance is a pretty concept, but if all your classes derive features only from 
one superclass at any time, and the only extension mechanism is pure abstract classes (interfaces), your language sucks more than ten Electrolux vacuumers combined.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Proper introspection
	&lt;ul&gt;
	&lt;li&gt;You should be able to find out what methods an object has, at least along with their arity, and the ability to create custom methods on the fly. How else will you be able to create funky &lt;span class=&quot;caps&quot;&gt;DSL&lt;/span&gt; languages, more suited for describing the models of the problem domain? Yeah, I thought you wouldn&#8217;t realize the benefit. That&#8217;s precisely why you think your &amp;lt;insert language name here&amp;gt; is suited for all your needs. It is exactly the same with math; if you can&#8217;t do math, you don&#8217;t understand it&#8217;s benefits. Naturally I don&#8217;t mean &lt;em&gt;you&lt;/em&gt;, but the other guy, the one who doesn&#8217;t read these kinds of blogs.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Every method should have a an owner, a class or module, but some modules/classes could be imported by default. Again, Ruby works exactly like that while not creating a &lt;a href=&quot;http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html&quot;&gt;tyrannic kingdom of nouns&lt;/a&gt;. Reason for this is mostly concerned with providing your custom implementations. Say you want to customize behaviour of all your print statements in your program. You don&#8217;t want to modify the source, as much of it is drawn from third party sources, and it would break the updates. So you overwrite Kernel::print or something similar. What, you can&#8217;t? I&#8217;m so sorry for you. &lt;strong&gt;Sooo&lt;/strong&gt; sorry.&lt;/li&gt;
		&lt;li&gt;Easy syntax for co-routines
	&lt;ul&gt;
	&lt;li&gt;I&#8217;m not sure if a &lt;em&gt;co-routine&lt;/em&gt; is a proper name for it, but if I had to choose three reasons.. no, make it two.. for why Ruby is such a nice language, I&#8217;m quite sure Ruby blocks would belong to that list.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;In short, I think Ruby is &lt;em&gt;quite close&lt;/em&gt; to my ideal language. And should be yours too. Please reread this article and ignore the invisible, specially encoded subliminal messages injected between the lines in the text until you agree with me. Now, good. At &lt;em&gt;this&lt;/em&gt; point I can admit that It does have its problems as well, but there aren&#8217;t many, and they are quite far from severe. In my opinion, some of those are&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The inability to choose between green and native threads
	&lt;ul&gt;
	&lt;li&gt;I &lt;em&gt;don&#8217;t&lt;/em&gt; think Ruby should use native threads; sometimes green threads (ie. 
threads are implemented in the interpreter) are really nice&#8212;they were not chosen for Ruby by accident. But sometimes you need true concurrency as well, so you should be really able to choose. This problem isn&#8217;t related to the language itself, but the current implementations, namely &lt;span class=&quot;caps&quot;&gt;MRI&lt;/span&gt; and JRuby. &lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Inability to configure GC behaviour / choose from different models
	&lt;ul&gt;
	&lt;li&gt;I don&#8217;t like Java too much, but at least there you can configure several aspects related to memory usage. But that&#8217;s because &lt;span class=&quot;caps&quot;&gt;JVM&lt;/span&gt; is an astonishing piece of &#8230;stuff, you know, the magical elven pixie dust kind of thing. Java has its shortcomings, but Java engineers are really bright people, as well as Gosling himself. We are still learning how to design languages, so one shouldn&#8217;t be too hard for picking.. umm.. on certain languages. And again, this problem is not related to the language but the implementations.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Lack of (optional) typing mechanism combined with powerful metaprogramming tools makes Ruby really hard for editors. Yeah, this is a language thing! Yay.&lt;/li&gt;
		&lt;li&gt;Performance
	&lt;ul&gt;
	&lt;li&gt;This is so often &lt;em&gt;not&lt;/em&gt; a problem, that I wanted to mention it last. However, sometimes it is. And even though doing C interfaces for Ruby should be quite easy, it should be possible to do it in Ruby. And this is partly a language thing, as without more compile-time information about types it is quite difficult to optimize.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I should have published this long ago, but I always wanted to make it longer. But &lt;a href=&quot;http://steve-yegge.blogspot.com/&quot;&gt;Steve Yegge&lt;/a&gt; has already said everything important about programming That Takes A Longer Posting To Blog About, so I publish this unfinished as it is. So there.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-04-03:113</id>
    <published>2008-04-03T10:16:00Z</published>
    <updated>2008-04-24T08:51:34Z</updated>
    <link href="http://myblog_cluster/2008/4/3/opt-out-telemarketing" rel="alternate" type="text/html"/>
    <title>Opt-out telemarketing</title>
<content type="html">
            &lt;p&gt;I&#8217;m quite annoyed by the current model of telemarketing. Many consider it even more frustrating than e-mail junk, yet
here in Finland, in order to &lt;em&gt;not&lt;/em&gt; receive any telemarketing phone calls you have to call certain number every three(?) years. The call costs you somewhat and takes time as well, as the line is often busy (no wonder).&lt;/p&gt;


	&lt;p&gt;However, I wouldn&#8217;t want to be &lt;strong&gt;mean&lt;/strong&gt; with the people who call me; I&#8217;d rather direct my anger and frustration towards the telemarketing companies. I mean, it should be possible to tell somebody that you don&#8217;t want to receive any TM calls &lt;em&gt;ever&lt;/em&gt;, Preferably via internet, to avoid queuing on the phone. I don&#8217;t know. But I refuse to call somewhere every three years just to &lt;em&gt;not&lt;/em&gt; receive crap.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update 21.04.2008:&lt;/strong&gt; A month or so ago I configured my phone to ignore calls from an unknown number. See &lt;a href=&quot;/about&quot;&gt;About&lt;/a&gt; page for more.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myblog_cluster/">
    <author>
      <name>edvard</name>
    </author>
    <id>tag:myblog_cluster,2008-03-12:104</id>
    <published>2008-03-12T11:15:00Z</published>
    <updated>2008-03-12T12:04:04Z</updated>
    <category term="church"/>
    <category term="faith"/>
    <category term="rant"/>
    <link href="http://myblog_cluster/2008/3/12/state-of-our-church" rel="alternate" type="text/html"/>
    <title>State of our church</title>
<content type="html">
            &lt;p&gt;Sorry, instead of my usual rants or blurbs about intricacies of programming I thought to rant about the state of our &lt;em&gt;church&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;It&#8217;s interesting &lt;del&gt;- no, sad really -&lt;/del&gt; how those among the clergy who most clearly indicate &lt;em&gt;actual belief in the Bible&lt;/em&gt; are oppressed by the church itself. Ok, this is nothing new, but the eagerness to put biblical people out of the ministry is appalling. It seems like the history repeats itself again. About 500 hundred years ago Christians (and many others) were tortured and burned at stake, because their biblical views didn&#8217;t work very will with the power-hungry institution called church, using religion only as means to control people and make them do their bidding. By the way, are you aware that etymologically &lt;em&gt;religion is rather close to _ligare&lt;/em&gt;, which means to bind? which in turn, in my opinion, defines religion quite well; it is not about &lt;em&gt;faith&lt;/em&gt; really, but of &lt;em&gt;control&lt;/em&gt; through rules, empty rituals and other things to divert the attention away from things that actually matter.&lt;/p&gt;


	&lt;p&gt;Well, of course it&#8217;s different now; people are not burned at stake for heresy, but sometimes I feel it&#8217;s like that only because we have laws (originally based on the Christian values, for what it&#8217;s worth) which prevent it. My whole point here is that the &lt;strong&gt;church shows much more anger and hatred&lt;/strong&gt; towards biblical ministers than &lt;strong&gt;secular people&lt;/strong&gt; in common. That&#8217;s kind of peculiar, no?&lt;/p&gt;


	&lt;p&gt;As an example, you could read about &lt;a href=&quot;http://rankinen.blogspot.com/2008/03/miksi-jo-nyt.html&quot;&gt;Jari Rankinen&lt;/a&gt; and draw your conclusions. I think you find it odd  no matter what &lt;em&gt;you&lt;/em&gt; believe (or not) in.&lt;/p&gt;


	&lt;p&gt;It&#8217;s no secret that many people among the clergy are actually atheists. They see Bible only as a moral guide, and their version of christianity is devoid of all the very central ideas in it (eg. miracles, who Jesus really was etc.)&#8212;yet they want to work in the church. I just don&#8217;t can&#8217;t understand it. I have much higher esteem to plain-vanilla atheists and agnostics who live true to their beliefs (or lack of it) than people who pretend to be something completely else.&lt;/p&gt;


	&lt;p&gt;The church is mad if it tries to compete with secular organizations and values. There are already gazillions of ethical organizations that &lt;em&gt;actually do good things&lt;/em&gt; much better than church ever can, because the whole reason for their existence is in accordance with their commitments and policies. So it&#8217;s only logical that the church should stick to its original meaning, and failing that, cease to exist. Otherwise it&#8217;s just a waste of resources and time.&lt;/p&gt;
          </content>  </entry>
</feed>
