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

<channel>
	<title>desgrange.net &#187; software</title>
	<atom:link href="http://blog.desgrange.net/tag/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.desgrange.net</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 21:00:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sony DSC-HX5V</title>
		<link>http://blog.desgrange.net/2011/07/04/sony-dsc-hx5v/</link>
		<comments>http://blog.desgrange.net/2011/07/04/sony-dsc-hx5v/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 20:00:20 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1348</guid>
		<description><![CDATA[For my next holidays I bought a new camera (since the previous one died last year) and I wanted a quite cheap camera (I suck at taking pictures) with a GPS in order to have the coordinates of the shots easily. I decided to buy a Sony DSC-HX5V which is well rated for its pictures [...]]]></description>
			<content:encoded><![CDATA[<p>For my next holidays I bought a new camera (since the previous one died last year) and I wanted a quite cheap camera (I suck at taking pictures) with a GPS in order to have the coordinates of the shots easily.</p>
<p>I decided to buy a Sony DSC-HX5V which is well rated for its pictures quality.</p>
<p>This post is about the GPS receiver inside the camera. If you are like me, you don&#8217;t like/want to install extra software for things like a camera. Usually camera makers provide poor softwares and they are quite always not compatible with plenty of things. So I didn&#8217;t installed the software provided with the camera.</p>
<p>I tried using the camera a bit and I noticed that acquiring GPS signal was painfully slow, which is quite normal for a GPS when it&#8217;s not assisted in any kind of way to know its position or the satellites positions (while a smartphone usually can know its approximate position from the cell tower it&#8217;s connected to and/or can download satellites positions from a website).</p>
<p>After looking a bit in the camera menu and looking on the internet, it&#8217;s possible to add a file with satellites positions for the next 30 days in the memory card and the camera use it to help locating itself.</p>
<p>From nearly 2 minutes to find it&#8217;s position it dropped to less than 20 seconds, which is now acceptable.</p>
<p>The software provided by Sony does that (writing the satellites position on the memory card) at least the Windows version. On Mac OS it doesn&#8217;t seem to work and of course, there is no version of this software running on Linux.</p>
<p>The manual way to do that is to:</p>
<ul>
<li>download the file from Sony&#8217;s website: <a href="http://control.d-imaging.sony.co.jp/GPS/assistme.dat" onclick="pageTracker._trackPageview('/outgoing/control.d-imaging.sony.co.jp/GPS/assistme.dat?referer=');">http://control.d-imaging.sony.co.jp/GPS/assistme.dat</a></li>
<li>optionally check the file is not corrupted with the associated md5 found here: <a href="http://control.d-imaging.sony.co.jp/GPS/assistme.md5" onclick="pageTracker._trackPageview('/outgoing/control.d-imaging.sony.co.jp/GPS/assistme.md5?referer=');">http://control.d-imaging.sony.co.jp/GPS/assistme.md5</a></li>
<li>write the <code>assistme.dat</code> file to the memory card (not the internal camera memory) in the folder <code>Private/SONY/GPS/</code> (you may have to create it)</li>
<li>check that the assist data are valid in the settings menu of the camera</li>
</ul>
<p>This procedure is from <a href="http://blog.brixandersen.dk/?p=153" onclick="pageTracker._trackPageview('/outgoing/blog.brixandersen.dk/?p=153&amp;referer=');">Henrik Brix Andersen&#8217;s blog</a>. Check it to find a perl script he did to automate that. One guy provided a simple application to do that automatically each time you plug your camera on Mac OS: <a href="https://code.google.com/p/gpsassist-update/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/gpsassist-update/?referer=');">https://code.google.com/p/gpsassist-update/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2011/07/04/sony-dsc-hx5v/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pwad on GitHub</title>
		<link>http://blog.desgrange.net/2011/04/11/pwad-on-github/</link>
		<comments>http://blog.desgrange.net/2011/04/11/pwad-on-github/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 20:00:10 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[pwad]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1315</guid>
		<description><![CDATA[This week-end I moved pwad to GitHub. I already blogged about pwad, a utility software I wrote to download pictures from picasa web. I was hosting it on my server but since I&#8217;m using git as SCM I decided to move it to GitHub (well, the main reason is that I wanted to play with [...]]]></description>
			<content:encoded><![CDATA[<p>This week-end I moved <a href="http://github.com/ldesgrange/pwad" onclick="pageTracker._trackPageview('/outgoing/github.com/ldesgrange/pwad?referer=');">pwad</a> to <a href="http://github.com" onclick="pageTracker._trackPageview('/outgoing/github.com?referer=');">GitHub</a>.</p>
<p><a href="/2010/11/01/pwad/">I already blogged about pwad</a>, a utility software I wrote to download pictures from picasa web. I was hosting it on my server but since I&#8217;m using git as SCM I decided to move it to <a href="http://github.com" onclick="pageTracker._trackPageview('/outgoing/github.com?referer=');">GitHub</a> (well, the main reason is that I wanted to play with <a href="http://github.com" onclick="pageTracker._trackPageview('/outgoing/github.com?referer=');">GitHub</a> <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p>
<p>Anyway, now pwad&#8217;s official website is <a href="http://github.com/ldesgrange/pwad" onclick="pageTracker._trackPageview('/outgoing/github.com/ldesgrange/pwad?referer=');">http://github.com/ldesgrange/pwad</a> (and current version is 0.4).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2011/04/11/pwad-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FOSDEM 2011</title>
		<link>http://blog.desgrange.net/2011/01/31/fosdem-2011/</link>
		<comments>http://blog.desgrange.net/2011/01/31/fosdem-2011/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 21:00:35 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Belgium]]></category>
		<category><![CDATA[Brussels]]></category>
		<category><![CDATA[FOSDEM]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1292</guid>
		<description><![CDATA[FOSDEM (Free and Open Source Software Developers’ European Meeting) 2011 is happening this week-end (5-6 february) in Brussels as usual. I&#8217;m not living there anymore but I&#8217;m going to FOSDEM this year again. This meeting is really open source developer oriented, several communities are meeting there (debian, mozilla, kde, enlightenment…) and I&#8217;m unfortunately not involved [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/FOSDEM" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FOSDEM?referer=');">FOSDEM</a> (Free and Open Source Software Developers’ European Meeting) 2011 is happening this week-end (5-6 february) in Brussels as usual. I&#8217;m not living there anymore but I&#8217;m going to <a href="http://www.fosdem.org" onclick="pageTracker._trackPageview('/outgoing/www.fosdem.org?referer=');">FOSDEM</a> this year again.</p>
<p>This meeting is really open source developer oriented, several communities are meeting there (<a href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">debian</a>, <a href="http://www.mozilla.org/" onclick="pageTracker._trackPageview('/outgoing/www.mozilla.org/?referer=');">mozilla</a>, <a href="http://www.kde.org/" onclick="pageTracker._trackPageview('/outgoing/www.kde.org/?referer=');">kde</a>, <a href="http://www.enlightenment.org/" onclick="pageTracker._trackPageview('/outgoing/www.enlightenment.org/?referer=');">enlightenment</a>…) and I&#8217;m unfortunately not involved in any of this, so lots of tracks are too specific for me. Nonetheless some of them are more &#8220;general&#8221; and sound interesting.</p>
<p><a href="/2010/02/03/fosdem-2010">Last year I was wondering how to contribute</a> a bit to the open source community, the only thing I did was small piece of software (called <a href="http://pwad.desgrange.net/" onclick="pageTracker._trackPageview('/outgoing/pwad.desgrange.net/?referer=');">pwad</a>) to download <a href="http://picasa.google.com/" onclick="pageTracker._trackPageview('/outgoing/picasa.google.com/?referer=');">picasa</a> albums sent by friends. I can do better than that.</p>
<p>Anyway, FOSDEM is a great event, if you are in Brussels at that time, you should definitely go there and at least have a look of what&#8217;s happening. Last year I learned very interesting stuff and ideas that I hope will be nicely integrated in mainstream software/operating systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2011/01/31/fosdem-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mirror SVN</title>
		<link>http://blog.desgrange.net/2010/12/06/mirror-svn/</link>
		<comments>http://blog.desgrange.net/2010/12/06/mirror-svn/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 21:00:51 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1269</guid>
		<description><![CDATA[I had this set of commands in a file on my desk for ages, so lets share it before everybody moves to git. For some reasons you may want to replicate a subversion repository. For instance if you have a big SVN with lots of users, you may want a master SVN and read-only slaves. [...]]]></description>
			<content:encoded><![CDATA[<p>I had this set of commands in a file on my desk for ages, so lets share it before everybody moves to <a href="http://en.wikipedia.org/wiki/Git_(software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Git_software?referer=');">git</a>.</p>
<p>For some reasons you may want to replicate a <a href="http://en.wikipedia.org/wiki/Apache_Subversion" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apache_Subversion?referer=');">subversion</a> repository. For instance if you have a big <a href="http://subversion.apache.org/" onclick="pageTracker._trackPageview('/outgoing/subversion.apache.org/?referer=');">SVN</a> with lots of users, you may want a master SVN and read-only slaves. Or maybe your SVN is quite big and doing a full backup each time is too long so you want to do a kind of incremental backup.</p>
<p>Let say you have a subversion repository at http://svn.example.com/repository and you want to create a mirror of that repository. First you have to create an empty repository on the mirror server:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ svnadmin create /path/to/repository</pre></div></div>
<p>Then you have to activate the revision property change hook. To do that you need to create a file in the hooks directory (/path/to/repository/hooks/). This file is a bit different depending on your platform. On windows you need to create an empty file &#8220;pre-revprop-change.cmd&#8221;. On <a href="http://en.wikipedia.org/wiki/Unix-like" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Unix-like?referer=');">*nix</a> the file is &#8220;pre-revprop-change&#8221;, must be executable and return 0:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">pre-revprop-change</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="co0">#!/bin/sh</span>
<span class="kw3">exit</span> <span class="nu0">0</span></pre></div></div>
<p>Now the mirror need to be initialized with the master content:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ svnsync init file:///path/to/repository http://svn.example.com/repository </pre></div></div>
<p>This step can be quite long, your master SVN is copied revision by revision to the mirror. When it&#8217;s done the only thing you have to do is run the following command from time to time in order to synchronize the mirror with the master:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ svnsync sync file:///path/to/repository </pre></div></div>
<p>That&#8217;s all. But you can also migrate to <a href="http://git-scm.com/" onclick="pageTracker._trackPageview('/outgoing/git-scm.com/?referer=');">git</a> and don&#8217;t bother about backups (mostly <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/12/06/mirror-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restore grub</title>
		<link>http://blog.desgrange.net/2010/11/15/restore-grub/</link>
		<comments>http://blog.desgrange.net/2010/11/15/restore-grub/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 21:00:49 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1250</guid>
		<description><![CDATA[My server was installed a long time ago and it seems that the partitions were created in a way that grub does not like. And when grub does not like something you have good chances of having a computer not booting. Since I have the problem from time to time, let&#8217;s write a reminder on [...]]]></description>
			<content:encoded><![CDATA[<p>My server was installed a long time ago and it seems that the partitions were created in a way that <a href="http://en.wikipedia.org/wiki/GNU_GRUB" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GNU_GRUB?referer=');">grub</a> does not like. And when <a href="http://www.gnu.org/software/grub/" onclick="pageTracker._trackPageview('/outgoing/www.gnu.org/software/grub/?referer=');">grub</a> does not like something you have good chances of having a computer not booting.</p>
<p>Since I have the problem from time to time, let&#8217;s write a reminder on how to fix this.</p>
<p>Sometime there are grub updates, and on the next reboot, well, nothing happens. Hopefully, my hosting provider provides an option to boot my server on a <a href="http://en.wikipedia.org/wiki/Ubuntu_(operating_system)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ubuntu_operating_system?referer=');">Ubuntu</a> <a href="http://en.wikipedia.org/wiki/Live_CD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Live_CD?referer=');">live CD</a> (my server is running <a href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> but that&#8217;s fine).</p>
<p>When <a href="http://www.ubuntu.com/" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/?referer=');">Ubuntu</a> has finished booting, I can ssh on it and list my hard drive partitions:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># fdisk -l /dev/sda
(…)
 Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          12       96389+  83  Linux
/dev/sda2              13       19324   155123640   83  Linux
/dev/sda3           19325       19454     1044225   83  Linux</pre></div></div>
<p>Here sda1 is my boot partition, sda2 is my root partition ans sda3 is swap. Let&#8217;s mount that:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># mount /dev/sda2 /mnt
# mount /dev/sda1 /mnt/boot</pre></div></div>
<p>Now we have to change the &#8220;root&#8221; directory from the live CD to my server&#8217;s disk so we can simulate being running on my server&#8217;s disk:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># chroot /mnt</pre></div></div>
<p>And now we can reinstall grub:</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># grub-install /dev/sda</pre></div></div>
<p>In my case I have to give the <code>--force</code> option to install grub. That&#8217;s all, I can now restart my <a href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a> server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/11/15/restore-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BudgetView</title>
		<link>http://blog.desgrange.net/2010/11/08/budgetview/</link>
		<comments>http://blog.desgrange.net/2010/11/08/budgetview/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 21:00:02 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1246</guid>
		<description><![CDATA[2ème billet d&#8217;affilé où je parle d&#8217;un logiciel, mais cette fois-ci ce n&#8217;est pas un petit logiciel fait par moi-même, mais une vrai application pour gérer votre budget (faite par des amis, donc je fais un peu de publicité). BudgetView est donc une application vous permettant de gérer, organiser, planifier votre budget assez facilement. Ce [...]]]></description>
			<content:encoded><![CDATA[<p>2ème billet d&#8217;affilé où je parle d&#8217;un logiciel, mais cette fois-ci ce n&#8217;est pas un petit logiciel fait par moi-même, mais une vrai application pour gérer votre budget (faite par des amis, donc je fais un peu de publicité).</p>
<p><a href="http://www.mybudgetview.fr/" onclick="pageTracker._trackPageview('/outgoing/www.mybudgetview.fr/?referer=');">BudgetView</a> est donc une application vous permettant de gérer, organiser, planifier votre budget assez facilement. Ce n&#8217;est pas une application en ligne, donc vos données restent bien chez vous et ne sont pas envoyées sur l&#8217;internet à des inconnus, mais bien un logiciel à télécharger et à lancer sur votre ordinateur. <a href="http://www.mybudgetview.fr/telechargement" onclick="pageTracker._trackPageview('/outgoing/www.mybudgetview.fr/telechargement?referer=');">BudgetView</a> fonctionne sur <a href="http://fr.wikipedia.org/wiki/Mac_OS_X" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Mac_OS_X?referer=');">Mac OS X</a>, <a href="http://fr.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Linux?referer=');">Linux</a>, <a href="http://fr.wikipedia.org/wiki/Microsoft_Windows" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Microsoft_Windows?referer=');">Windows</a> (et vu que c&#8217;est écrit en <a href="http://fr.wikipedia.org/wiki/Java_(langage)" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Java_langage?referer=');">Java</a>, il y a certainement moyen de faire fonctionner l&#8217;application sur d&#8217;autres systèmes). Vous téléchargez vos relevés de comptes sur le site de votre banque, vous les importez dans BudgetView et voilà (il faut quand même catégoriser quelques dépenses et après ça dépend de ce que vous voulez faire).</p>
<p>J&#8217;utilise BudgetView depuis pas mal de temps maintenant, et comme toute bonne application, l&#8217;idée c&#8217;est d&#8217;avoir à s&#8217;en servir le moins souvent possible (mon but dans la vie n&#8217;est pas de perdre mon temps devant mon ordinateur, mais de faire des choses intéressantes). Personnellement je me sers de BudgetView environ une fois par mois, pendant 15 minutes. Pour gérer mon budget, ça va, c&#8217;est assez rapide (faut dire que mon budget, je le laisse un peu vivre sa vie, mais au moins BudgetView me permet de savoir à l&#8217;avance dans combien de temps je vais passer dans le rouge).</p>
<p>La mauvaise nouvelle ? Ce n&#8217;est pas <a href="http://fr.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Open_source?referer=');">open source</a> et c&#8217;est payant, mais ça va, c&#8217;est pas trop cher : 30 € (ouais enfin 29,90 €). Il y a une période d&#8217;essai de 30 jours, ça peut toujours vous donner une idée de ce que vaut l&#8217;application. En ce qui me concerne je pense qu&#8217;une période d&#8217;essai de 45 ou 60 jours aurai été un peu plus appropriée vue que BudgetView affiche les informations par mois, 1 seul mois d&#8217;essai c&#8217;est un peu limitant (quoique, vous pouvez toujours télécharger un historique plus long sur le site de votre banque pour voir l&#8217;évolution passée de votre budget).</p>
<p>Bref, si vous cherchez un logiciel pour gérer votre budget qui soit à la fois simple et puissant, <a href="http://www.mybudgetview.fr/telechargement" onclick="pageTracker._trackPageview('/outgoing/www.mybudgetview.fr/telechargement?referer=');">essayez BudgetView</a> <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/11/08/budgetview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>pwad</title>
		<link>http://blog.desgrange.net/2010/11/01/pwad/</link>
		<comments>http://blog.desgrange.net/2010/11/01/pwad/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 21:00:27 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[picasa]]></category>
		<category><![CDATA[pwad]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1239</guid>
		<description><![CDATA[I&#8217;m not very fond of services like picasa, but some of my friends use that to share pictures with me. Unfortunately, retrieving pictures from a friend&#8217;s picasa web album is a pain. I have tried to find how to do that and usually the tips I found were not so great and softwares were outdated/not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.desgrange.net/wp-content/uploads/2010/11/pwad-logo_64.png"><img class="alignleft size-full wp-image-1241" title="pwad-logo_64" src="http://blog.desgrange.net/wp-content/uploads/2010/11/pwad-logo_64.png" alt="" width="64" height="64" /></a>I&#8217;m not very fond of services like <a href="http://picasaweb.google.com/" onclick="pageTracker._trackPageview('/outgoing/picasaweb.google.com/?referer=');">picasa</a>, but some of my friends use that to share pictures with me. Unfortunately, retrieving pictures from a friend&#8217;s picasa web album is a pain. I have tried to find how to do that and usually the tips I found were not so great and softwares were outdated/not maintained anymore.</p>
<p>Being a software developer, I decided to write a small software to do that, so I created &#8220;<a href="http://pwad.desgrange.net/" onclick="pageTracker._trackPageview('/outgoing/pwad.desgrange.net/?referer=');">pwad</a>&#8221; (aka Picasa Web Album Downloader). Yes, I know, I&#8217;m bad at finding names.</p>
<p>You just have to copy the link provided in the picasa email you receive when a friend shares an album with you, paste it in pwad and click on the download button.</p>
<p>It&#8217;s <a href="http://en.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source?referer=');">open source</a> (<a href="http://www.apache.org/licenses/LICENSE-2.0" onclick="pageTracker._trackPageview('/outgoing/www.apache.org/licenses/LICENSE-2.0?referer=');">Apache License 2.0</a>), it&#8217;s written in <a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Java_28programming_language_29?referer=');">Java</a>, so you need Java (at least version 6) installed on your computer. I haven&#8217;t packaged the application with an installer yet, double-clicking on it should be enough to launch it, but first you have to download it from: <a href="http://pwad.desgrange.net/wiki/download" onclick="pageTracker._trackPageview('/outgoing/pwad.desgrange.net/wiki/download?referer=');">http://pwad.desgrange.net/wiki/download</a> (current version is 0.3).</p>
<p>If you find this application useful, bugged, etc. you can leave feedback and comments on this post.</p>
<p><strong>UPDATE:</strong> pwad has been moved to GitHub <a href="http://github.com/ldesgrange/pwad" onclick="pageTracker._trackPageview('/outgoing/github.com/ldesgrange/pwad?referer=');">http://github.com/ldesgrange/pwad</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/11/01/pwad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTunes 10, Firefly, forked-daapd</title>
		<link>http://blog.desgrange.net/2010/09/02/itunes-10-firefly-forked-daapd/</link>
		<comments>http://blog.desgrange.net/2010/09/02/itunes-10-firefly-forked-daapd/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 20:00:29 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[daap]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[forked-daapd]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1220</guid>
		<description><![CDATA[Apple recently introduced the new version of iTunes: iTunes 10. For those, like me, who are using Firefly to broadcast their music on their local network, you may have seen that iTunes 10 does not show the content of your remote playlist anymore . The bad news is that a lot of commercial products are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a> recently introduced the new version of <a href="http://en.wikipedia.org/wiki/ITunes" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ITunes?referer=');">iTunes</a>: iTunes 10. For those, <a href="/2009/03/01/using-a-linux-server-for-your-mac/">like me</a>, who are using <a href="http://www.fireflymediaserver.org/" onclick="pageTracker._trackPageview('/outgoing/www.fireflymediaserver.org/?referer=');">Firefly</a> to broadcast their music on their local network, you may have seen that iTunes 10 does not show the content of your remote playlist anymore <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . The bad news is that a lot of commercial products are using it (especially <a href="http://en.wikipedia.org/wiki/Network-attached_storage" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Network-attached_storage?referer=');">NAS</a> devices like <a href="http://www.drobo.com/" onclick="pageTracker._trackPageview('/outgoing/www.drobo.com/?referer=');">Drobo</a>…).</p>
<p>Someone started a thread about that on Apple&#8217;s forum: <a href="http://discussions.apple.com/thread.jspa?threadID=2564925" onclick="pageTracker._trackPageview('/outgoing/discussions.apple.com/thread.jspa?threadID=2564925&amp;referer=');">http://discussions.apple.com/thread.jspa?threadID=2564925</a></p>
<p>One guy says to have a look to <a href="http://github.com/jasonmc/forked-daapd" onclick="pageTracker._trackPageview('/outgoing/github.com/jasonmc/forked-daapd?referer=');">forked-daapd</a> which is a full rewriting of Firefly. So I did. On my <a href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> box, <a href="http://packages.debian.org/testing/forked-daapd" onclick="pageTracker._trackPageview('/outgoing/packages.debian.org/testing/forked-daapd?referer=');">a package is available in &#8220;testing&#8221;</a>:</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install forked-daapd</pre></div></div>
<p>Change the directory where the music is in /etc/forked-daapd.conf, restart and that&#8217;s all. Then go to iTunes, the shared library should be visible and filled with your music!</p>
<p>Since Firefly is a dead project (no activity for a while), everybody using it should migrate to forked-daapd.</p>
<p>Note: this is my 100th post on this blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/09/02/itunes-10-firefly-forked-daapd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do not check email adresses!</title>
		<link>http://blog.desgrange.net/2010/06/21/do-not-check-email-adresses/</link>
		<comments>http://blog.desgrange.net/2010/06/21/do-not-check-email-adresses/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 20:00:46 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1144</guid>
		<description><![CDATA[You may have noticed that on some rare websites (≈99.999 % of internet websites), you have to provide an email address when you register. And most of the time the application running the website check if the email address you entered is valid. But you know what? Most software developers (you know, the guys staying [...]]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that on some rare websites (≈99.999 % of internet websites), you have to provide an email address when you register. And most of the time the application running the website check if the email address you entered is valid.</p>
<p>But you know what? Most software developers (you know, the guys staying all day long in front of computers, the guys you call when you have a problem with your computer because they have some magical power that allows them to fix your problems) don&#8217;t know what a valid email address is!</p>
<p>Why do I say such things? Because each time I register on a website, it complains that I should enter a valid email address… but my email address is valid actually! What I&#8217;m complaining about is not that they check email addresses of course, I&#8217;m complaining about the fact they are rejecting valid ones. Like for an email spam filter, you don&#8217;t care that some spam emails still reach your inbox, but you hate when a valid email is dropped because it was considered spam.</p>
<p>Unfortunately, most email address filters that have been written are rejecting a lot of valid email addresses. Why? Because checking that an email address has a valid format is very difficult. Have a look at this <a href="http://en.wikipedia.org/wiki/Email_address#RFC_specification" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Email_address_RFC_specification?referer=');">summary of RFC&#8217;s email address format</a>, you will understand what I mean.</p>
<p>So, if you are a software developer and you have to check the validity of email addresses, don&#8217;t bother much checking the email address format (or the strict minimum like &#8220;there is a &#8216;@&#8217; and a &#8216;.&#8217;) because even an email address that have a valid format may be invalid (in the way that the corresponding email account does not exists).</p>
<p>For registration process it&#8217;s easily solved by asking the user to click on a confirmation link you send them to the given email address. Only then you will know that the email address is really valid.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/06/21/do-not-check-email-adresses/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Les Cast Codeurs</title>
		<link>http://blog.desgrange.net/2010/06/14/les-cast-codeurs/</link>
		<comments>http://blog.desgrange.net/2010/06/14/les-cast-codeurs/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 20:00:52 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[french]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1122</guid>
		<description><![CDATA[Si vous êtes développeur Java, vous connaissez certainement le podcast The Java Posse, 4 experts (Tor Norbye, Carl Quinn, Dick Wall et Joe Nuxoll) du monde Java (au sens large) parlant des news concernant Java, la JVM et tout ce qui touche de près ou de loin (voire de très loin) à ça, sur un [...]]]></description>
			<content:encoded><![CDATA[<p>Si vous êtes développeur <a href="http://fr.wikipedia.org/wiki/Java_%28technique%29" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Java_28technique_29?referer=');">Java</a>, vous connaissez certainement le podcast <a href="http://javaposse.com/" onclick="pageTracker._trackPageview('/outgoing/javaposse.com/?referer=');">The Java Posse</a>, 4 experts (<a href="http://blogs.sun.com/tor/" onclick="pageTracker._trackPageview('/outgoing/blogs.sun.com/tor/?referer=');">Tor Norbye</a>, <a href="http://www.linkedin.com/in/carlquinn" onclick="pageTracker._trackPageview('/outgoing/www.linkedin.com/in/carlquinn?referer=');">Carl Quinn</a>, <a href="http://dickwallsblog.blogspot.com/" onclick="pageTracker._trackPageview('/outgoing/dickwallsblog.blogspot.com/?referer=');">Dick Wall</a> et <a href="http://joeracer.blogspot.com/" onclick="pageTracker._trackPageview('/outgoing/joeracer.blogspot.com/?referer=');">Joe Nuxoll</a>) du monde Java (au sens large) parlant des news concernant Java, la <a href="http://fr.wikipedia.org/wiki/JVM_%28informatique%29" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/JVM_28informatique_29?referer=');">JVM</a> et tout ce qui touche de près ou de loin (voire de très loin) à ça, sur un ton en général très décontracté et humoristique.</p>
<p>Il y a un peu plus d&#8217;un an maintenant, 4 français (<a href="http://blog.emmanuelbernard.com/" onclick="pageTracker._trackPageview('/outgoing/blog.emmanuelbernard.com/?referer=');">Emmanuel Bernard</a>, <a href="http://glaforge.free.fr/weblog/" onclick="pageTracker._trackPageview('/outgoing/glaforge.free.fr/weblog/?referer=');">Guillaume Laforge</a>, <a href="http://www.antoniogoncalves.org/" onclick="pageTracker._trackPageview('/outgoing/www.antoniogoncalves.org/?referer=');">Antonio Goncalves</a> et <a href="http://massol.myxwiki.org/" onclick="pageTracker._trackPageview('/outgoing/massol.myxwiki.org/?referer=');">Vincent Massol</a>) ont décidé de faire quelque chose de similaire, le podcast <a href="http://lescastcodeurs.com/" onclick="pageTracker._trackPageview('/outgoing/lescastcodeurs.com/?referer=');">Les Cast Codeurs</a>, mais dans la <a href="http://fr.wiktionary.org/wiki/langue_de_Moli%C3%A8re" onclick="pageTracker._trackPageview('/outgoing/fr.wiktionary.org/wiki/langue_de_Moli_C3_A8re?referer=');">langue de Molière</a>. Je dois avouer qu&#8217;au début je ne voyais pas trop l&#8217;intérêt, étant donné que nous travaillons dans un secteur très anglophone, ça me semblait assez redondant avec The Java Posse, à part peut-être pour les quelques irréductibles gaulois qui ne comprennent toujours rien à l&#8217;anglais (et il semblerait qu&#8217;il y en ait encore pas mal en France <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>Récemment je me suis décidé à en écouter quelques épisodes, et c&#8217;est plutôt pas mal, même si dans l&#8217;idée c&#8217;est assez proche du Java Posse, le contenu et l&#8217;approche sont assez différents pour que ce ne soit pas complètement redondant. Sans compter que l&#8217;actualité française et européenne du domaine (si si, il y en a) est un peu plus abordée. C&#8217;est entre autre par Les Cast Codeurs que j&#8217;ai découvert le <a href="http://www.brussels-jug.be/" onclick="pageTracker._trackPageview('/outgoing/www.brussels-jug.be/?referer=');">BruJUG</a>.</p>
<p>Continuez comme ça les gars, ça me fait quelque chose de plus à écouter dans le métro <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/06/14/les-cast-codeurs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Power of Abstraction</title>
		<link>http://blog.desgrange.net/2010/06/01/the-power-of-abstraction/</link>
		<comments>http://blog.desgrange.net/2010/06/01/the-power-of-abstraction/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 20:00:34 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1139</guid>
		<description><![CDATA[During last BruJUG third half-time, Alex Snaps told us about a presentation by Barbara Liskov (also known for the Liskov Substitution Principle) in which she tell us a bit of computer science history, how the data abstraction emerged and so on. It&#8217;s a very interesting presentation, it&#8217;s quite amazing to see that most of programming [...]]]></description>
			<content:encoded><![CDATA[<p>During last <a href="http://www.brussels-jug.be/" onclick="pageTracker._trackPageview('/outgoing/www.brussels-jug.be/?referer=');">BruJUG</a> third half-time, <a href="http://www.jroller.com/greenhorn/" onclick="pageTracker._trackPageview('/outgoing/www.jroller.com/greenhorn/?referer=');">Alex Snaps</a> told us about a presentation by <a href="http://en.wikipedia.org/wiki/Barbara_Liskov" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Barbara_Liskov?referer=');">Barbara Liskov</a> (also known for the <a href="http://en.wikipedia.org/wiki/Liskov_substitution_principle" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Liskov_substitution_principle?referer=');">Liskov Substitution Principle</a>) in which she tell us a bit of computer science history, how the data abstraction emerged and so on.</p>
<p>It&#8217;s a very interesting presentation, it&#8217;s quite amazing to see that most of programming languages principles where designed 30-40 years ago. If you are a developer, I recommend you to watch <a href="http://www.infoq.com/presentations/liskov-power-of-abstraction" onclick="pageTracker._trackPageview('/outgoing/www.infoq.com/presentations/liskov-power-of-abstraction?referer=');">Barbara Liskov&#8217;s presentation: &#8220;The Power of Abstraction&#8221;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/06/01/the-power-of-abstraction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BruJUG</title>
		<link>http://blog.desgrange.net/2010/05/31/brujug/</link>
		<comments>http://blog.desgrange.net/2010/05/31/brujug/#comments</comments>
		<pubDate>Mon, 31 May 2010 20:00:39 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Brussels]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1130</guid>
		<description><![CDATA[Last wednesday (May 26th) was the first BruJUG session, and I was there . So, what&#8217;s BruJUG? It&#8217;s Brussels&#8217; Java User Group, so if you are a Java developer living/working in Brussels, you might be interested to attend BruJUG sessions in order to learn some stuff, talk with other developers, exchange some ideas, have a [...]]]></description>
			<content:encoded><![CDATA[<p>Last wednesday (May 26th) was the first <a href="http://www.brussels-jug.be/" onclick="pageTracker._trackPageview('/outgoing/www.brussels-jug.be/?referer=');">BruJUG</a> session, and I was there <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>So, what&#8217;s BruJUG? It&#8217;s Brussels&#8217; <a href="http://java.sun.com/community/usergroups/" onclick="pageTracker._trackPageview('/outgoing/java.sun.com/community/usergroups/?referer=');">Java User Group</a>, so if you are a <a href="http://en.wikipedia.org/wiki/Java_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Java_programming_language?referer=');">Java</a> developer living/working in <a href="http://en.wikipedia.org/wiki/Brussels" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Brussels?referer=');">Brussels</a>, you might be interested to attend BruJUG sessions in order to learn some stuff, talk with other developers, exchange some ideas, have a good beer…</p>
<p>When I was in <a href="http://en.wikipedia.org/wiki/Paris" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Paris?referer=');">Paris</a>, I was going quite often to the <a href="http://www.parisjug.org/" onclick="pageTracker._trackPageview('/outgoing/www.parisjug.org/?referer=');">ParisJUG</a>, which was the first JUG in France. BruJUG just started but it&#8217;s not the first one in <a href="http://en.wikipedia.org/wiki/Belgium" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Belgium?referer=');">Belgium</a>, there is also <a href="http://www.bejug.org/" onclick="pageTracker._trackPageview('/outgoing/www.bejug.org/?referer=');">BeJUG</a> which is moving from cities to cities in Belgium.</p>
<p>What happens in Wednesday&#8217;s session? First of all it was in <a href="http://en.wikipedia.org/wiki/Google" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Google?referer=');">Google</a>&#8216;s office, aka GooglePlex,  which is quite a nice one and there was two presentations, a non-technical one on <a href="http://en.wikipedia.org/wiki/Content_strategy" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Content_strategy?referer=');">content strategy</a> and a technical one on <a href="http://ehcache.org/" onclick="pageTracker._trackPageview('/outgoing/ehcache.org/?referer=');">ehcache</a> (and a bit of <a href="http://www.terracotta.org/" onclick="pageTracker._trackPageview('/outgoing/www.terracotta.org/?referer=');">terracotta</a> of course). Both were very interesting, you can read the<a href="http://www.brussels-jug.be/?p=681" onclick="pageTracker._trackPageview('/outgoing/www.brussels-jug.be/?p=681&amp;referer=');"> session post on BruJUG website</a> or <a href="http://www.brussels-jug.be/wiki/doku.php?id=events:2010_05_session1" onclick="pageTracker._trackPageview('/outgoing/www.brussels-jug.be/wiki/doku.php?id=events_2010_05_session1&amp;referer=');">on BruJUG&#8217;s wiki</a> (there are some pictures too!).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/05/31/brujug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to WordPress</title>
		<link>http://blog.desgrange.net/2010/05/03/moving-to-wordpress/</link>
		<comments>http://blog.desgrange.net/2010/05/03/moving-to-wordpress/#comments</comments>
		<pubDate>Mon, 03 May 2010 20:00:45 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dotclear]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1075</guid>
		<description><![CDATA[I started blogging a long time ago using COREBlog on Plone on Zope (if I remember right), then I moved on dotclear 1 with some friends, then I opened my own blog again using dotclear 2… and now I&#8217;m using WordPress. Why moving from dotclear to WordPress? First of all, my linux server moved to [...]]]></description>
			<content:encoded><![CDATA[<p>I started blogging a long time ago using <a href="http://coreblog.org/" onclick="pageTracker._trackPageview('/outgoing/coreblog.org/?referer=');">COREBlog</a> on <a href="http://plone.org/" onclick="pageTracker._trackPageview('/outgoing/plone.org/?referer=');">Plone</a> on <a href="http://www.zope.org/" onclick="pageTracker._trackPageview('/outgoing/www.zope.org/?referer=');">Zope</a> (if I remember right), then I moved on <a href="http://dotclear.org/" onclick="pageTracker._trackPageview('/outgoing/dotclear.org/?referer=');">dotclear</a> 1 with some friends, then I opened my own blog again using dotclear 2… and now I&#8217;m using <a href="http://wordpress.org/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/?referer=');">WordPress</a>.</p>
<p>Why moving from <a href="http://en.wikipedia.org/wiki/Dotclear" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Dotclear?referer=');">dotclear</a> to <a href="http://en.wikipedia.org/wiki/WordPress" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/WordPress?referer=');">WordPress</a>? First of all, my <a href="http://en.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux?referer=');">linux</a> server moved to <a href="http://en.wikipedia.org/wiki/PHP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PHP?referer=');">PHP</a> 5.3… with is not supported by dotclear yet. So I had to install an alpha version of dotclear that supported it… kind of. It was a true <a href="http://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Software_release_life_cycle_Alpha?referer=');">alpha version</a> (meaning lots of stuff were not working anymore, if you used to navigate on my blog you may have noticed that). And I feel a bit like dotclear is on the dying side (maybe it&#8217;s not true, but that&#8217;s my feeling). I don&#8217;t know if it&#8217;s related by the departure of the creator of dotclear (<a href="http://neokraft.net/" onclick="pageTracker._trackPageview('/outgoing/neokraft.net/?referer=');">Olivier Meunier</a>) last year, maybe they are adjusting from that change, but in the mean time, dotclear is not moving fast enough and I had to do something about getting my blog working.</p>
<p>I know, since I&#8217;m a developer, I could have helped dotclear guys supporting PHP 5.3, by fixing some bugs… I don&#8217;t remember PHP a lot but it&#8217;s a quite simple language, I should have been able to help quite quickly I think. But I&#8217;m also lazy and I did wanted to try WordPress since some people recommended it to me.</p>
<p>So, this is my first post written with WordPress, and it&#8217;s quite nice, the interface is quite good but I have to admit that it&#8217;s far from being perfect too.</p>
<h2>Installation</h2>
<p>As usual I used the <a href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">debian</a> package, which is already an improvement over dotclear since there is no dotclear debian package. On the downside, I encountered several bugs that seems to stupid to be there. And looking on the internet, they are known bugs, but not fixed. For instance:</p>
<ul>
<li>You can&#8217;t specify an absolute path for your upload folder (which is what is done by default by the debian package… so uploading anything was not possible until I changed the path)</li>
<li>When you try to install a theme or a plugin using the admin interface, WordPress checks if it&#8217;s authorized to write files first, if not WordPress allows you to upload it through FTP. That&#8217;s nice except that the script checking authorization is bugged (and that FTP is a protocol that should died but that&#8217;s an other story <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). The script checks that the user executing it is the owner of… the script file! instead of checking that it&#8217;s the owner of the theme/plugin directory. Since they do the things right in debian, the script is owned by root but executed by www-data (apache&#8217;s user). So I had to change the owner of the script to make it work.</li>
</ul>
<h2>Migration</h2>
<p>In WordPress tools, there is a script to import data from dotclear… which does not really work. Maybe it was done for dotclear 1, or my alpha version did have a lot of changes but obviously there was a lot of differences between what the import script was excepted and what my dotclear database looked like. I customized it a bit so it was able to import my posts and comments but I had some encoding issues (mostly solved), and of course I had to upload again all the pictures, audio files and videos… It took me several evenings to do the migration. Maybe I should have done it all by myself without using the original script.</p>
<p>After the import, the comment count was not set on the blog posts and I saw that other people had the problem (comment count not matching the actual number of comments) at some point for a reason or an other and the solution I saw was usually a small PHP script looping on each post and executing the same <a href="http://en.wikipedia.org/wiki/SQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SQL?referer=');">SQL</a> query. So here is the same solution but with only one SQL query, no PHP involved:</p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;"><span class="kw1">UPDATE</span> wp_posts <span class="kw1">SET</span> comment_count <span class="sy0">=</span> <span class="br0">&#40;</span><span class="kw1">SELECT</span> count<span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="kw1">FROM</span> wp_comments <span class="kw1">WHERE</span> wp_comments<span class="sy0">.</span>comment_post_id <span class="sy0">=</span> wp_posts<span class="sy0">.</span>id<span class="br0">&#41;</span>;</pre></div></div>
<h2>Usage</h2>
<p>I just started using it. For the people reading my blog from the <a href="http://en.wikipedia.org/wiki/RSS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/RSS?referer=');">RSS</a> feed, check out the new <a href="http://en.wikipedia.org/wiki/URL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/URL?referer=');">URL</a>. On the overall it looks quite simple, but there are some stuff I don&#8217;t really like. For instance I have to use categories. So I put everything in the &#8220;Uncategorized&#8221; category. On dotclear I was able to say that I don&#8217;t want to use categories. Tags are way much better than categories… and they are optional.</p>
<p>The visual editor is quite good but the <a href="http://en.wikipedia.org/wiki/HTML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTML?referer=');">HTML</a> editor is a &#8220;simple HTML&#8221; editor, not showing the full HTML, and switching from one editor to the other change the HTML code you may have write, and sometimes you don&#8217;t want to. For instance putting <code>audio</code> and <code>video</code> tags (<a href="http://en.wikipedia.org/wiki/HTML5" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTML5?referer=');">HTML 5</a> tags) in an <a href="http://en.wikipedia.org/wiki/XHTML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/XHTML?referer=');">XHTML</a> 1 page… is not really allowed, and switching from the HTML editor to the Visual editor simply remove them <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . There is no <a href="http://en.wikipedia.org/wiki/Wiki_markup" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Wiki_markup?referer=');">wiki syntax</a>, I can understand that choice but I was a bit used to it.</p>
<p>The plugin and theme system work quite well (except for the bug I talked about earlier). For the theme I chose <a href="http://wordpress.org/extend/themes/garland-revisited" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/themes/garland-revisited?referer=');">Garland-revisited</a>, which is a copy of <a href="http://en.wikipedia.org/wiki/Drupal" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Drupal?referer=');">Drupal</a>&#8216;s default theme (I used <a href="http://drupal.org/" onclick="pageTracker._trackPageview('/outgoing/drupal.org/?referer=');">Drupal</a> once and I had to customized the theme for the website but I love their Garland theme, so here is a way to have it <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>I also like the idea of having fixed pages. And I should start by filling the &#8220;about&#8221; page. That&#8217;s all for today, I still have a lot of stuff to configure.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/05/03/moving-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Post FOSDEM 2010</title>
		<link>http://blog.desgrange.net/2010/02/08/post-fosdem-2010/</link>
		<comments>http://blog.desgrange.net/2010/02/08/post-fosdem-2010/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Belgium]]></category>
		<category><![CDATA[Brussels]]></category>
		<category><![CDATA[FOSDEM]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=707</guid>
		<description><![CDATA[So last week-end I was at FOSDEM. First, it’s quite huge. Several thousand geeks in one location (if somebody hates open source, it’s the place to drop a bomb, lots of projects might also die afterward (I’m just saying that it’s not so cool on a risk management point of view, I’m not encouraging anybody [...]]]></description>
			<content:encoded><![CDATA[<p>So last week-end I was at <a hreflang="en" href="http://en.wikipedia.org/wiki/FOSDEM" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FOSDEM?referer=');">FOSDEM</a>. First, it’s quite huge. Several thousand <a hreflang="en" href="http://en.wikipedia.org/wiki/Geek" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Geek?referer=');">geeks</a> in one location (if somebody hates <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source?referer=');">open source</a>, it’s the place to drop a bomb, lots of projects might also die afterward (I’m just saying that it’s not so cool on a risk management point of view, I’m not encouraging anybody to do such a bad thing <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )). A lot of smart people, good ideas, interesting stuff to see, to hear and free <a hreflang="en" href="http://en.wikipedia.org/wiki/WiFi" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/WiFi?referer=');">WiFi</a> everywhere (such thing would be illegal in France nowadays :-\).</p>
<p>As usual with conferences, goodies review. What do we get: &#8211; conference program (on paper) &#8211; a bag (made from <a hreflang="en" href="http://en.wikipedia.org/wiki/Biodegradation" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Biodegradation?referer=');">biodegradable</a> material)</p>
<p>That’s all good to me. Quite eco-friendy and nothing is unnecessary.</p>
<p>Here is the list of sessions I attended:</p>
<h5>Welcome (<a href="http://fosdem.org/2010/about/fosdem#team" onclick="pageTracker._trackPageview('/outgoing/fosdem.org/2010/about/fosdem_team?referer=');">FOSDEM Staff</a>)</h5>
<p>Quick <a hreflang="en" href="http://archive.fosdem.org/" onclick="pageTracker._trackPageview('/outgoing/archive.fosdem.org/?referer=');">history of the FOSDEM</a> and of course the <a href="http://www.0xdeadbeef.com/weblog/2010/02/the-fosdem-dance/" onclick="pageTracker._trackPageview('/outgoing/www.0xdeadbeef.com/weblog/2010/02/the-fosdem-dance/?referer=');">FOSDEM dance</a>.</p>
<h5>Promoting Open Source Methods at a Large Company (Brooks Davis)</h5>
<p>Brooks Davis told us how they managed to bring some of the open source way of working in a big aerospace company. I find incredible that in a company working for aerospace (and even any company doing software) some developers are still not using any <a hreflang="en" href="http://en.wikipedia.org/wiki/Revision_control" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Revision_control?referer=');">version control system</a>.</p>
<h5>Evil on the Internet (<a hreflang="en" href="http://www.cl.cam.ac.uk/~rnc1/" onclick="pageTracker._trackPageview('/outgoing/www.cl.cam.ac.uk/_rnc1/?referer=');">Richard Clayton</a>)</h5>
<p>Quick presentation of what “bad people” are doing on the internet and how it works, with live examples of <a hreflang="en" href="http://en.wikipedia.org/wiki/Phishing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Phishing?referer=');">phishing</a>/fake banks/fake escrow websites.</p>
<p>Visit the <a hreflang="en" href="http://wiki.aa419.org/index.php/Main_Page" onclick="pageTracker._trackPageview('/outgoing/wiki.aa419.org/index.php/Main_Page?referer=');">AA419 website</a> for more information.</p>
<h5>Mozilla Europe/Mozilla Foundation (<a href="http://standblog.org/blog/" onclick="pageTracker._trackPageview('/outgoing/standblog.org/blog/?referer=');">Tristan Nitot</a>/<a hreflang="en" href="http://weblogs.mozillazine.org/gerv/" onclick="pageTracker._trackPageview('/outgoing/weblogs.mozillazine.org/gerv/?referer=');">Gervase Markham</a>)</h5>
<p>Some info on current status and future stuff at <a hreflang="en" href="http://en.wikipedia.org/wiki/Mozilla_Foundation" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mozilla_Foundation?referer=');">Mozilla</a>. Some discussion about the <a hreflang="en" href="http://www.computerworld.com/s/article/9142416/FAQ_How_the_IE_ballot_screen_works" onclick="pageTracker._trackPageview('/outgoing/www.computerworld.com/s/article/9142416/FAQ_How_the_IE_ballot_screen_works?referer=');">ballot screen</a>.</p>
<p>Personal note: the ballot screen will appear for every Windows XP/Vista/7 users how do not have installed any other web browser. This is a decision of the <a hreflang="en" href="http://en.wikipedia.org/wiki/European_Commission" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/European_Commission?referer=');">European Commission</a> imposed to <a hreflang="en" href="http://en.wikipedia.org/wiki/Microsoft" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Microsoft?referer=');">Microsoft</a>. But what about people working at the European Commission? Are they going to see the ballot screen on their computers? Obviously, like in any company managing their computers, this is going to be blocked in order to keep the “homogeneity” and ease of system administration. Guess what? I am working at the EC (as external contractor). Since I’m a developer, I can install whatever I want^H^H^H^Hneed on my work computer so I don’t have the problem (and in fact since I’m doing a bit of web development I’ve all major web browsers installed). Anyway, I will see if my colleagues get some choice for their web browser.</p>
<h5><a hreflang="en" href="http://en.wikipedia.org/wiki/FLOSS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FLOSS?referer=');">FLOSS</a>: a key to self-determination in Internet life (<a hreflang="en" href="http://blog.lizardwrangler.com/" onclick="pageTracker._trackPageview('/outgoing/blog.lizardwrangler.com/?referer=');">Mitchell Baker</a>)</h5>
<p>OK, I can’t really summarize but it was interesting. Free and open source software have values, freedom related ones (at least). To some extent we can see those values in how the internet has been built and we need to be sure that those values are still going to drive the future of the internet and even take a more predominant place.</p>
<h5>Hackability (<a hreflang="en" href="http://en.wikipedia.org/wiki/Tristan_Nitot" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Tristan_Nitot?referer=');">Tristan Nitot</a>/<a href="http://blog.mozbox.org/" onclick="pageTracker._trackPageview('/outgoing/blog.mozbox.org/?referer=');">Paul Rouget</a>)</h5>
<p>Do you want the internet to be a place only for for-profit companies to sell you their products? I hope not (if you do, what the hell are you doing here?). An important thing that will prevent that is to be sure that the internet is hackable. That mean we can do what we want with it, event if it was not designed for.</p>
<p>I would like to give an example of a hackable product by design: a <a hreflang="en" href="http://en.wikipedia.org/wiki/Lego" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Lego?referer=');">Lego</a> box. When you buy a <a href="http://www.lego.com" onclick="pageTracker._trackPageview('/outgoing/www.lego.com?referer=');">Lego</a> box, it’s shipped with a manual with one or two (sometimes more) patterns to build what Lego thinks you might want to build with. But obviously, it’s for fun, and Lego does not forbid you to do anything else with it, on the contrary, they encourage you to do stuff they didn’t think you could do with it… and it’s quite normal since Lego bricks are done to <a hreflang="en" href="http://www.toxel.com/inspiration/2008/10/11/collection-of-incredible-lego-creations/" onclick="pageTracker._trackPageview('/outgoing/www.toxel.com/inspiration/2008/10/11/collection-of-incredible-lego-creations/?referer=');">build whatever you want</a>.</p>
<p>On the internet it’s quite the same. You have bricks. Different kind of bricks, versatile ones (<a hreflang="en" href="http://en.wikipedia.org/wiki/Bit" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Bit?referer=');">bits</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Byte" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Byte?referer=');">bytes</a>) on top of which people have created more complex bricks (<a hreflang="en" href="http://en.wikipedia.org/wiki/HTML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTML?referer=');">HTML</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/HTTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTTP?referer=');">HTTP</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/SMTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SMTP?referer=');">SMTP</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/IMAP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IMAP?referer=');">IMAP</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/XMPP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/XMPP?referer=');">XMPP</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/XML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/XML?referer=');">XML</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/CSS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/CSS?referer=');">CSS</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/JavaScript" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/JavaScript?referer=');">JavaScript</a>…) allowing you to do any kind of things. But there are some stuff that are not following that concept. Take <a hreflang="en" href="http://en.wikipedia.org/wiki/Adobe_Flash" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Adobe_Flash?referer=');">Flash</a> for instance, here you have the Logo box already mounted and you can’t unmount it, you can play a bit with it but not that much.</p>
<p>Paul did a demo showing that the web is hackable (changing the <a hreflang="en" href="http://en.wikipedia.org/wiki/User_interface" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/User_interface?referer=');">UI</a> of a website and with the help of <a hreflang="en" href="http://en.wikipedia.org/wiki/Firefox" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firefox?referer=');">Firefox</a>/<a hreflang="en" href="http://en.wikipedia.org/wiki/Greasemonkey" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Greasemonkey?referer=');">Greasemonkey</a> change how to interact with the website), that <a href="http://www.mozilla.com/firefox" onclick="pageTracker._trackPageview('/outgoing/www.mozilla.com/firefox?referer=');">Firefox</a> is hackable (switching from a tab to an other by shaking his <a hreflang="en" href="http://en.wikipedia.org/wiki/Wiimote" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Wiimote?referer=');">wiimote</a>!).</p>
<h5>HTML 5 (Paul Rouget)</h5>
<p>The “theorical” part of the presentation was done by someone else but I don’t have his name (sorry). Anyway, since most of the stuff I developed so far were web applications, I was quite interested in this presentation (and of course because I have been too lazy to check by myself what’s new in <a hreflang="en" href="http://en.wikipedia.org/wiki/HTML5" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTML5?referer=');">HTML 5</a>).</p>
<p><a hreflang="en" href="http://dev.w3.org/html5/spec/spec.html" onclick="pageTracker._trackPageview('/outgoing/dev.w3.org/html5/spec/spec.html?referer=');">HTML 5</a> syntax, very pragmatic. HTML has been slaughtered on so many web pages that web browsers are now very good at understanding the understandable. So of course, instead of imposing a drastic syntax (like XML based stuff requires usually) that nobody is going to apply, HTML 5 is quite “user friendly” (in  the way that you can type whatever you want, it’s going to work (uppercase, lowercase, it doesn’t care, you don’t close your tags? not a problem…)). I think web browsers (except IE of course <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) are the perfect example of “be strict in what you send, but generous in what you receive”.</p>
<p>Anyway, lots of new tags like <code>header</code>, <code>footer</code>, <code>aside</code>, of course <code>video</code>, <code>canvas</code>…</p>
<p>Paul did an amazing demo with a “simple webpage” turning out to be an interactive presentation with CSS transitions, video playing, 2D transformations, 3D ones… impressive.</p>
<h5>Amarok 2.2 Rocking (<a hreflang="en" href="http://www.krohlas.de/blog/" onclick="pageTracker._trackPageview('/outgoing/www.krohlas.de/blog/?referer=');">Sven Krohlas</a>)</h5>
<p>I was an <a hreflang="en" href="http://en.wikipedia.org/wiki/Amarok_%28software%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Amarok_28software_29?referer=');">Amarok</a> user for a long time but since I switched to the <a hreflang="en" href="http://en.wikipedia.org/wiki/Macintosh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Macintosh?referer=');">Mac</a> it’s not the case anymore (even though <a href="http://amarok.kde.org/" onclick="pageTracker._trackPageview('/outgoing/amarok.kde.org/?referer=');">Amarok</a> runs on Mac). Anyway, the moodbar is back!</p>
<p>I haven’t played a lot with Amarok 2.x, but I don’t feel very comfortable with the UI. In 2.2 it’s a bit better. Maybe a part of the problem is that I don’t like KDE’s default theme.</p>
<p>It was a conference on free (as in free speech) softwares, but there are not only softwares that are free, there is also music. Go to <a href="http://www.jamendo.com" onclick="pageTracker._trackPageview('/outgoing/www.jamendo.com?referer=');">Jamendo</a> and listen/download a bit of music, you might discover good music under <a hreflang="en" href="http://en.wikipedia.org/wiki/Creative_Commons" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Creative_Commons?referer=');">Creative Commons</a> licenses (I recommend: <a href="http://www.jamendo.com/en/artist/Diablo_Swing_Orchestra_%282%29" onclick="pageTracker._trackPageview('/outgoing/www.jamendo.com/en/artist/Diablo_Swing_Orchestra_282_29?referer=');">Diablo Swing Orchestra</a> and <a hreflang="en" href="http://www.jamendo.com/en/artist/david.tmx" onclick="pageTracker._trackPageview('/outgoing/www.jamendo.com/en/artist/david.tmx?referer=');">David TMX</a>)</p>
<h5>NoSQL for Fun &amp; Profit (Tim Anglade)</h5>
<p>A quick overview of what is <a hreflang="en" href="http://en.wikipedia.org/wiki/NoSQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/NoSQL?referer=');">NoSQL</a>, no technical details, more a presentation for managers. Anyway, like lots of people I have suffered of <a hreflang="en" href="http://en.wikipedia.org/wiki/SQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SQL?referer=');">SQL</a>. For several reasons, first, it’s hard to find a project where a relational database is not badly used, a <a hreflang="en" href="http://en.wikipedia.org/wiki/RDBMS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/RDBMS?referer=');">RDBMS</a> can be very good at what it does (like <a hreflang="en" href="http://en.wikipedia.org/wiki/PostgreSQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PostgreSQL?referer=');">PostgreSQL</a>), it still needs to be used correctly, and secondly, because it was almost the only way “managers” did know about storing data. Who have never seen that kind of situation:</p>
<p>The manager: “On our new software we are going to use this programming language and that relational database.”</p>
<p>The developer: “I can understand that we need a programming language since we are going to write a software, but we don’t need a relational database for it.”</p>
<p>The manager: “Of course we need a relational database, every software use a relational database.”</p>
<p>The developer: “Well… no.”</p>
<p>The manager: “I’m the one deciding, you are only the mindless developer coding the stuff I ask so shut up.” (OK, maybe not that part)</p>
<p>Well anyway, <a hreflang="en" href="http://nosql-database.org/" onclick="pageTracker._trackPageview('/outgoing/nosql-database.org/?referer=');">NoSQL</a> is a good idea to make sure that people know that we have choices on how we store data and that there are some ways better for some kind of tasks and others ways better for other kind of tasks.</p>
<h5>Mozmill (<a hreflang="en" href="http://www.hskupin.info/" onclick="pageTracker._trackPageview('/outgoing/www.hskupin.info/?referer=');">Henrik Skupin</a>)</h5>
<p>A quick presentation of <a hreflang="en" href="http://quality.mozilla.org/projects/mozmill" onclick="pageTracker._trackPageview('/outgoing/quality.mozilla.org/projects/mozmill?referer=');">Mozmill</a>, a tool used to do automated functional tests on Mozilla products (Firefox, <a hreflang="en" href="http://en.wikipedia.org/wiki/Mozilla_Thunderbird" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mozilla_Thunderbird?referer=');">Thunderbird</a>). Each version of Firefox in fact 225 versions of Firefox (75 languages on 3 platforms) and all of them should/need to be tested. It looks like at Mozilla they are not really in the <a hreflang="en" href="http://en.wikipedia.org/wiki/Test-driven_development" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Test-driven_development?referer=');">test driven</a> mindset (yet), and they are lacking of tests. Wait sorry, when I say tests, I always think “automated tests”, it’s inhuman to make a person run a test suite manually, unfortunately to many people are paid for that. From what I understood they have some manual test suites for Firefox and fortunately they are trying to automate them.</p>
<p>You can see the mozmill generated reports for Firefox here: <a href="http://brasstacks.mozilla.com/couchdb/mozmill/_design/reports/_list/summary/summary" onclick="pageTracker._trackPageview('/outgoing/brasstacks.mozilla.com/couchdb/mozmill/_design/reports/_list/summary/summary?referer=');">http://brasstacks.mozilla.com/couchdb/mozmill/_design/reports/_list/summary/summary</a></p>
<h5>Towards GNUstep GUI 1.0 (Fred Kiefer)</h5>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/GNUstep" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GNUstep?referer=');">GNUstep</a> has been in development for ages and there is still no 1.0 version. So the question was “do we need to do one and if yes, what needs to be in”. Obviously, the answer for the first part is “yes” (so it will attract more developers, <a hreflang="en" href="http://en.wikipedia.org/wiki/*BSD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/_BSD?referer=');">*BSD</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux_distribution" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux_distribution?referer=');">Linux distributions</a> will update their packages…). The second part of the question was not really solved. One proposition was to name the version 10.2 and has complete support of <a hreflang="en" href="http://en.wikipedia.org/wiki/Cocoa_%28API%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Cocoa_28API_29?referer=');">Cocoa</a> 10.2.</p>
<h5>L20n (<a hreflang="en" href="http://blog.mozilla.com/axel/" onclick="pageTracker._trackPageview('/outgoing/blog.mozilla.com/axel/?referer=');">Axel Hecht</a>)</h5>
<p>I’m not a specialist of <a hreflang="en" href="http://en.wikipedia.org/wiki/I18n" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/I18n?referer=');">internationalization (i18n) and localization (l10n)</a>, I know some issues regarding that but quite frankly, I didn’t really understood the presentation. It’s a bit more clear after a look on the <a hreflang="en" href="https://wiki.mozilla.org/L20n" onclick="pageTracker._trackPageview('/outgoing/wiki.mozilla.org/L20n?referer=');">l20n wiki</a>. Sounds interesting to me since I think that the current way of doing (key/value) sucks a lot as soon as you have some non ultra-trivial stuff to do.</p>
<h5><a hreflang="en" href="http://etoileos.com/" onclick="pageTracker._trackPageview('/outgoing/etoileos.com/?referer=');">Étoilé</a>: Where it is, where it’s going, why it isn’t there yet (Quentin Mathé/David Chisnall)</h5>
<p>What have they done since the beginning in 2004? This is a project with few people but lots of ideas. One thing I find interesting is the CoreObject framework. Well in fact not the framework, but the ideas behind. From a user point of view, having to save your documents sucks. Why the default state is “in case of problem you are going to lose all your unsaved work” and not “in case of problem all your work is saved”? So here the idea is everything you change on your document is recorded, so you can do/undo/redo modification, close your document, open it again, ask to undo stuff you have done before the history of your changes on the document have been saved all along.</p>
<p>Such ideas are not new, we have been talking about that for decades (well, not me, I’m talking about it only for years, I’m not that old <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ), but mainstream <a hreflang="en" href="http://en.wikipedia.org/wiki/Operating_system" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Operating_system?referer=');">operating system</a>s are still not implementing it.</p>
<h5>Women and Mozilla (<a href="http://blog.lebedel.net/" onclick="pageTracker._trackPageview('/outgoing/blog.lebedel.net/?referer=');">Delphine Lebédel</a>)</h5>
<p>Quick presentation of <a hreflang="en" href="http://www.womoz.org/blog/" onclick="pageTracker._trackPageview('/outgoing/www.womoz.org/blog/?referer=');">WoMoz</a>.</p>
<h5><a hreflang="en" href="http://en.wikipedia.org/wiki/NEPOMUK_%28framework%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/NEPOMUK_28framework_29?referer=');">Nepomuk</a> (<a hreflang="en" href="http://trueg.wordpress.com/" onclick="pageTracker._trackPageview('/outgoing/trueg.wordpress.com/?referer=');">Sebastian Trüg</a>)</h5>
<p>Recent operating systems are now indexing datas so it’s fast and easy to search for stuff on your computer. <a hreflang="en" href="http://nepomuk.semanticdesktop.org/" onclick="pageTracker._trackPageview('/outgoing/nepomuk.semanticdesktop.org/?referer=');">Nepomuk</a> is a “semantic” way of doing so (using RDF and so on).</p>
<p>Several functionalities are similar between Nepomuk and what I think Étoilé’s CoreObject do. But Nepomuk is based on “standards” like <a hreflang="en" href="http://en.wikipedia.org/wiki/Resource_Description_Framework" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Resource_Description_Framework?referer=');">RDF</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/SPARQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SPARQL?referer=');">SPARQL</a>.</p>
<h5>Mozilla Panel Discussion (Mitchell Baker/Tristan Nitot/<a hreflang="en" href="http://commonspace.wordpress.com/" onclick="pageTracker._trackPageview('/outgoing/commonspace.wordpress.com/?referer=');">Mark Surman</a>)</h5>
<p>A discussion on Mozilla’s mission. Lots of questions about privacy. I confirm, Mozilla’s people have the right mindset (at least the mindset I like) and I’m glad that they are caring about the Internet.</p>
<h5>Write and Submit your first <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux_kernel" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux_kernel?referer=');">Linux kernel</a> Patch (<a hreflang="en" href="http://en.wikipedia.org/wiki/Greg_Kroah-Hartman" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Greg_Kroah-Hartman?referer=');">Greg Kroah-Hartman</a>)</h5>
<p>A live example on what you need to do and how to do a patch for the Linux kernel.</p>
<h5>That’s all</h5>
<p>There are several presentations I would like to went to but we still have not invented a device giving us ubiquity.</p>
<p>I now have a lot more thinks to thing about, I may write down some of my thoughts here soon.</p>
<p>Anyway, a big thank you to the FOSDEM staff for organizing all that, to all the speakers and finally to all the people attending the event.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/02/08/post-fosdem-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FOSDEM 2010</title>
		<link>http://blog.desgrange.net/2010/02/03/fosdem-2010/</link>
		<comments>http://blog.desgrange.net/2010/02/03/fosdem-2010/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 07:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Belgium]]></category>
		<category><![CDATA[Brussels]]></category>
		<category><![CDATA[FOSDEM]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=706</guid>
		<description><![CDATA[FOSDEM (Free and Open Source Software Developers’ European Meeting) 2010 is happening this week-end (6-7 february) in… Brussels! At ULB, about 10 minutes by foot from home. So guess what? I never had the opportunity to assist FOSDEM before, so this time I’m not going to miss it. I haven’t look at the planning seriously [...]]]></description>
			<content:encoded><![CDATA[<p>FOSDEM (Free and Open Source Software Developers’ European Meeting) 2010 is happening this week-end (6-7 february) in… Brussels! At ULB, about 10 minutes by foot from home. So guess what?</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2010/02/fosdem-2010-going-to.png"><img class="aligncenter size-full wp-image-1047" title="fosdem-2010-going-to" src="http://blog.desgrange.net/wp-content/uploads/2010/02/fosdem-2010-going-to.png" alt="" width="150" height="89" /></a></p>
<p>I never had the opportunity to assist FOSDEM before, so this time I’m not going to miss it.</p>
<p>I haven’t look at the planning seriously yet, there is a huge amount of stuff going on there, it’s going hard to make choices. At least I have seen that <a hreflang="en" href="http://en.wikipedia.org/wiki/Mozilla_Foundation" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mozilla_Foundation?referer=');">Mozilla</a> is presenting some stuff, I hope I will be able to see <a href="http://standblog.org/blog/" onclick="pageTracker._trackPageview('/outgoing/standblog.org/blog/?referer=');">Tristan</a> at last (though I’m not sure it’s really fulfilling to listen to someone I always agree with (well, I’ve been reading his blog for several years now and I don’t really remember not agreeing on something)).</p>
<p>This reminds me I should find a way to start sharing with the community. I have been using open source softwares for years, on my day to day work, what frustrates me the most is each time I’m struggling with proprietary softwares (which I tend to avoid) while I know that the same problem with an open source software would have been solved much more easier (because of the help of the community and the availability of the source code).</p>
<p>So, are you coming?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/02/03/fosdem-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenBSD 4.6</title>
		<link>http://blog.desgrange.net/2009/10/19/openbsd-4-6/</link>
		<comments>http://blog.desgrange.net/2009/10/19/openbsd-4-6/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 23:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=690</guid>
		<description><![CDATA[The new version of OpenBSD has been released! Yes, they are more than 10 days ahead schedule, since OpenBSD is usually released May 1st and November 1st. I upgraded my router with this new version and before doing so, you should read the upgrade page (which I didn’t). Of course my firewall configuration was not [...]]]></description>
			<content:encoded><![CDATA[<p>The new version of <a hreflang="en" href="http://openbsd.org/" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/?referer=');">OpenBSD</a> has been released! Yes, they are more than 10 days ahead schedule, since OpenBSD is usually released May 1st and November 1st.</p>
<p>I upgraded my router with this new version and before doing so, you should read the <a hreflang="en" href="http://www.openbsd.org/faq/upgrade46.html" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/faq/upgrade46.html?referer=');">upgrade page</a> (which I didn’t).</p>
<p>Of course my firewall configuration was not working anymore, so I had no internet access because I was using scrub statements which are not there anymore. Rules need to be rewrite a bit.</p>
<p>The installer seems to have changed, some questions were different… and since I was going too fast through the process I installed X related packages (they were selected by default even if I haven’t installed them before).</p>
<p>Anyway, OpenBSD is still working nicely, using nearly no CPU and few MB of RAM. I really like this operating system for my router, I install it and forget it (until the subsequent release).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/10/19/openbsd-4-6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenBSD and PPPoE</title>
		<link>http://blog.desgrange.net/2009/08/03/openbsd-and-pppoe/</link>
		<comments>http://blog.desgrange.net/2009/08/03/openbsd-and-pppoe/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[D-Link]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[PF]]></category>
		<category><![CDATA[PPPoE]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=679</guid>
		<description><![CDATA[I’m using a new ISP (since I moved in a different country) which does not provide a DSL modem as part of the subscription. So I bought the first ADSL2+ modem I found that was not also a router (since I have my own router). I ended up with a D-Link DSL-320T. I was a [...]]]></description>
			<content:encoded><![CDATA[<p>I’m using a new <a hreflang="en" href="http://en.wikipedia.org/wiki/ISP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ISP?referer=');">ISP</a> (since I moved in a different country) which does not provide a <a hreflang="en" href="http://en.wikipedia.org/wiki/DSL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/DSL?referer=');">DSL</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Modem" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Modem?referer=');">modem</a> as part of the subscription. So I bought the first <a hreflang="en" href="http://en.wikipedia.org/wiki/ADSL2%2B" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ADSL2_2B?referer=');">ADSL2+</a> modem I found that was not also a router (<a href="/2008/09/16/fit-pc/">since I have my own router</a>).</p>
<p>I ended up with a <a hreflang="en" href="http://en.wikipedia.org/wiki/D-Link" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/D-Link?referer=');">D-Link</a> DSL-320T. I was a bit disappointed to see that the modem DOES some routing but quite poorly. I tried several configurations and my conclusion is that this modem is severely bugged. It’s based on an old <a hreflang="en" href="http://en.wikipedia.org/wiki/BusyBox" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/BusyBox?referer=');">BusyBox</a> 0.60 (you can <a hreflang="en" href="http://en.wikipedia.org/wiki/Telnet" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Telnet?referer=');">telnet</a> the modem to see that and do some stuff manually (if you manage to)). I went on <a hreflang="en" href="http://www.dlink.com" onclick="pageTracker._trackPageview('/outgoing/www.dlink.com?referer=');">D-Link</a> website to find <a hreflang="en" href="http://en.wikipedia.org/wiki/Firmware" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firmware?referer=');">firmware</a> updates the firmware loaded in the modem is more recent that the ones I found on the website! Anyway, after some research, it looks like D-Link people have no clue about how to manage version numbers (it’s a complete mess), but it’s not a problem since the modem does not want to load any firmware (there is something in the interface to do that but it did nothing when I tried).</p>
<p>At some point I find out that the modem has a “bridged” mode, to it will does mostly nothing and I will have to do the authentication with the ISP on my <a hreflang="en" href="http://en.wikipedia.org/wiki/OpenBSD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/OpenBSD?referer=');">OpenBSD</a> 4.5 router.</p>
<h5>PPPoE</h5>
<p>Configuring <a hreflang="en" href="http://en.wikipedia.org/wiki/PPPoE" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PPPoE?referer=');">PPPoE</a> on <a hreflang="en" href="http://www.openbsd.org/" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/?referer=');">OpenBSD</a> is quite easy. The modem is connected to the <code>rl0</code> interface, first we need to create a configuration file <code>/etc/hostname.pppoe0</code> for the new PPPoE interface <code>pppoe0</code>:</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">/etc/hostname.pppoe0</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">inet 0.0.0.0 255.255.255.255 NONE pppoedev rl0 authproto pap authname LOGIN authkey PASSWORD up
dest 0.0.0.1
!/sbin/route add default 0.0.0.1</pre></div></div>
<p>Replace <code>LOGIN</code> and <code>PASSWORD</code> with the credentials given by your ISP. The <code>rl0</code> interface does not need any configuration except telling that the interface must be started. <code>/etc/hostname.rl0</code> must contain only:</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">/etc/hostname.rl0</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">up</pre></div></div>
<p>Restart network interfaces with the following command:</p>
<pre># sh /etc/netstart</pre>
<p><code>ifconfig</code> should now include <code>pppoe0</code> configuration.</p>
<h5>NAT and PF</h5>
<p>I saw on some forums/mailing lists that since <a hreflang="en" href="http://en.wikipedia.org/wiki/PF_%28firewall%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PF_28firewall_29?referer=');">PF</a> is started before the <code>pppoe0</code> interface, <a hreflang="en" href="http://www.openbsd.org/faq/pf/index.html" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/faq/pf/index.html?referer=');">PF</a> might block the connection. I’m not having the problem right now, maybe for older versions of OpenBSD. Anyway, I had a different one. When PF starts, the <code>pppoe0</code> interface does not have yet retrieve an <a hreflang="en" href="http://en.wikipedia.org/wiki/Internet_Protocol" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Internet_Protocol?referer=');">IP</a>, so PF is using “0.0.0.0”.</p>
<p>For instance in <code>/etc/pf.conf</code>, I had the following lines to create a <a hreflang="en" href="http://en.wikipedia.org/wiki/Network_address_translation" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Network_address_translation?referer=');">NAT</a> between <code>pppoe0</code> and <code>rl1</code> (<code>rl1</code> is the interface on my local network):</p>
<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">ext_if=&quot;pppoe0&quot;
int_if=&quot;rl1&quot;
&nbsp;
nat on $ext_if inet from $int_if:network to any -&gt; $ext_if</pre></div></div>
<p>In order to tell PF to monitor the external interface’s IP, it just needs to be put between brackets, so the NAT command becomes:</p>
<div id="wpshdo_14" class="wp-synhighlighter-outer"><div id="wpshdt_14" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_14"></a><a id="wpshat_14" class="wp-synhighlighter-title" href="#codesyntax_14"  onClick="javascript:wpsh_toggleBlock(14)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_14" onClick="javascript:wpsh_code(14)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_14" onClick="javascript:wpsh_print(14)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_14" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">nat on $ext_if inet from $int_if:network to any -&gt; ($ext_if)</pre></div></div></pre>
<h5>Links</h5>
<ul>
<li><a hreflang="en" href="http://www.openbsd-wiki.org/index.php?title=PPPoE_Router_and_Firewall" onclick="pageTracker._trackPageview('/outgoing/www.openbsd-wiki.org/index.php?title=PPPoE_Router_and_Firewall&amp;referer=');">http://www.openbsd-wiki.org/index.php?title=PPPoE_Router_and_Firewall</a></li>
<li><a hreflang="en" href="http://www.nabble.com/OpenBSD-as-DSL-Router-using-hostname.pppoe0--td14533985.html" onclick="pageTracker._trackPageview('/outgoing/www.nabble.com/OpenBSD-as-DSL-Router-using-hostname.pppoe0--td14533985.html?referer=');">http://www.nabble.com/OpenBSD-as-DSL-Router-using-hostname.pppoe0—td14533985.html</a></li>
<li><a hreflang="en" href="http://www.openbsd.org/faq/pf/nat.html#config" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/faq/pf/nat.html_config?referer=');">http://www.openbsd.org/faq/pf/nat.html#config</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/08/03/openbsd-and-pppoe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving a RAID array</title>
		<link>http://blog.desgrange.net/2009/05/25/moving-a-raid-array/</link>
		<comments>http://blog.desgrange.net/2009/05/25/moving-a-raid-array/#comments</comments>
		<pubDate>Mon, 25 May 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[RAID 5]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=670</guid>
		<description><![CDATA[I blogged about how to create a RAID-5 array with GNU/Linux in a previous entry. So my home server is running a 4 disks array (about 500 GB each, for a total of 1.5 TB available). I used SATA disks plugged in the server. For some silly reasons I wanted to move the disks out [...]]]></description>
			<content:encoded><![CDATA[<p>I blogged about <a href="/2008/10/10/RAID-5-software-sous-GNULinux/">how to create a RAID-5 array with GNU/Linux</a> in a previous entry.</p>
<p>So my <a hreflang="en" href="http://en.wikipedia.org/wiki/Home_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Home_server?referer=');">home server</a> is running a 4 disks array (about 500 GB each, for a total of 1.5 TB available). I used <a hreflang="en" href="http://en.wikipedia.org/wiki/SATA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SATA?referer=');">SATA</a> disks plugged in the server. For some silly reasons I wanted to move the disks out of the server and plug them using a <a hreflang="en" href="http://en.wikipedia.org/wiki/USB" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/USB?referer=');">USB</a> interface (no, not a <a hreflang="en" href="http://en.wikipedia.org/wiki/ESATA#External_SATA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ESATA_External_SATA?referer=');">eSATA</a> one, USB (I told you, it&#8217;s silly, but it could have been worse, like creating a <a hreflang="en" href="http://ohlssonvox.8k.com/fdd_raid.htm" onclick="pageTracker._trackPageview('/outgoing/ohlssonvox.8k.com/fdd_raid.htm?referer=');">floppy RAID array</a>)).</p>
<p>I bought 4 <a hreflang="de" href="http://www.icybox.de/" onclick="pageTracker._trackPageview('/outgoing/www.icybox.de/?referer=');">Icy Box</a> enclosures and a <a hreflang="en" href="http://en.wikipedia.org/wiki/Usb_hub" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Usb_hub?referer=');">USB hub</a>. Shut down the server, move the disks into the external enclosures, plug everything (lots of wires), switch on the server, cry.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/05/icyboxes.jpg"><img class="aligncenter size-full wp-image-949" title="icyboxes" src="http://blog.desgrange.net/wp-content/uploads/2009/05/icyboxes.jpg" alt="" width="512" height="384" /></a></p>
<p>As quite expected, it didn&#8217;t work right away. My <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> server stopped on a maintenance <a hreflang="en" href="http://en.wikipedia.org/wiki/Shell_(computing)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Shell_computing?referer=');">shell</a>, complaining that it was not able to check /dev/md0 (the array).</p>
<p>No problem, I tried a simple command:</p>
<pre>mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1</pre>
<p>Array assembled, exit the shell, Debian finished booting, everything works. But, in doubt, I did a reboot. Again, array not recognized. After a bit of <a hreflang="en" href="http://en.wikipedia.org/wiki/Googling" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Googling?referer=');">googling</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Man_pages" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Man_pages?referer=');">man</a> reading, I tried the same command with a little option added:</p>
<pre>mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 --update=homehost</pre>
<p>Not really sure about what it did, but after rebooting, the array was recognized and assembled automatically.</p>
<p>So YES, you can change the controller interface used to plug your disks in an <a hreflang="en" href="http://en.wikipedia.org/wiki/RAID" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/RAID?referer=');">RAID</a> array.</p>
<p>What about speed? Well high speed is obviously not the purpose of this experiment <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  (but at least it&#8217;s &gt; 30 MB/s in continuous read).</p>
<p>What about reliability? Well it&#8217;s Raid-5 so I might have to rebuild from time to time. So far I only get some USB reset events so transfer stall during ~20 seconds then resume. Of course I get more resets when doing a big transfer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/05/25/moving-a-raid-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenBSD 4.5</title>
		<link>http://blog.desgrange.net/2009/05/01/openbsd-4-5/</link>
		<comments>http://blog.desgrange.net/2009/05/01/openbsd-4-5/#comments</comments>
		<pubDate>Fri, 01 May 2009 12:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=663</guid>
		<description><![CDATA[6 month after my post on OpenBSD 4.4, here is the one on OpenBSD 4.5. Today was released OpenBSD 4.5, adding more hardware support (my D-Link DWA-110 works straight away, no need to recompile the kernel anymore), few new features, lots of software updates. So I updated my fit-PC with this new OpenBSD, as usual [...]]]></description>
			<content:encoded><![CDATA[<p>6 month after my post on <a href="/2008/11/01/OpenBSD-4-4/">OpenBSD 4.4</a>, here is the one on <a hreflang="en" href="http://openbsd.org/" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/?referer=');">OpenBSD</a> 4.5.</p>
<p>Today was released <a hreflang="en" href="http://openbsd.org/45.html" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/45.html?referer=');">OpenBSD 4.5</a>, adding more hardware support (<a hreflang="en" href="/2008/11/17/D-Link-DWA-110-on-OpenBSD-4-4/">my D-Link DWA-110 works straight away, no need to recompile the kernel anymore</a>), few new features, lots of software updates.</p>
<p>So I updated my <a hreflang="fr" href="/2008/09/16/fit-pc/">fit-PC</a> with this new <a hreflang="en" href="http://en.wikipedia.org/wiki/OpenBSD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/OpenBSD?referer=');">OpenBSD</a>, as usual it was quite easy, few questions (and they have good default values), the overall upgrade took me 20 minutes (15 minutes copying files from the CDROM, I have a slow one).</p>
<h5>Theme and Song</h5>
<p>This release theme is inspired by <a hreflang="en" href="http://en.wikipedia.org/wiki/Tron_(film)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Tron_film?referer=');">Tron</a>:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/05/45_PuffTron.jpg"><img class="aligncenter size-full wp-image-902" title="45_PuffTron" src="http://blog.desgrange.net/wp-content/uploads/2009/05/45_PuffTron.jpg" alt="" width="227" height="343" /></a></p>
<p>The accompanying song is called &#8220;Games&#8221;:</p>
<div style="text-align: center;">
<audio controls="true"><br />
<source src="/wp-content/uploads/2009/05/45_song.oga" type="audio/ogg; codecs=vorbis" /><br />
<source src="/wp-content/uploads/2009/05/45_song.mp3" type="audio/mp3" /><br />
<a href="/wp-content/uploads/2009/05/45_song.oga">Download song.</a><br />
</audio>
</div>
<p><a hreflang="en" href="http://openbsd.org/lyrics.html#45" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/lyrics.html_45?referer=');">Lyrics and songs files are available</a> (as usual, there is a <a hreflang="en" href="http://en.wikipedia.org/wiki/Mp3" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mp3?referer=');">MP3</a> file for losers and a <a hreflang="en" href="http://en.wikipedia.org/wiki/Ogg_vorbis" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ogg_vorbis?referer=');">OGG Vorbis</a> file for good people (anyway, only good people uses OpenBSD <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/05/01/openbsd-4-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail Story 3: SPF + Greylisting</title>
		<link>http://blog.desgrange.net/2009/03/30/mail-story-3-spf-greylisting/</link>
		<comments>http://blog.desgrange.net/2009/03/30/mail-story-3-spf-greylisting/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[SPF]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[greylisting]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tumgreyspf]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=661</guid>
		<description><![CDATA[In this third post about configuring your own mail server on Debian (first post, second post), I&#8217;m going to talk a bit about SPAM and show you 2 ways of reducing it. There are a lot of ways of fighting spam with various degrees of effectiveness, simplicity, standards respectful, etc. For instance, there are some [...]]]></description>
			<content:encoded><![CDATA[<p>In this third post about configuring your own <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail_server?referer=');">mail server</a> on <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> (<a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">first post</a>, <a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">second post</a>), I&#8217;m going to talk a bit about <a hreflang="en" href="http://en.wikipedia.org/wiki/E-mail_spam" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/E-mail_spam?referer=');">SPAM</a> and show you 2 ways of reducing it.</p>
<p>There are a lot of ways of fighting spam with various degrees of effectiveness, simplicity, standards respectful, etc.</p>
<p>For instance, there are some stupid systems like <a hreflang="en" href="http://en.wikipedia.org/wiki/SpamCop" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SpamCop?referer=');">SpamCop</a> based on user submissions. If a user tell that he received a spam from a given <a hreflang="en" href="http://en.wikipedia.org/wiki/IP_address" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IP_address?referer=');">IP</a>, then the IP is temporarily marked as a SPAM sender and will be blocked by mail servers using SpamCop black list. So, when your email address is hosted by an <a hreflang="en" href="http://en.wikipedia.org/wiki/ISP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ISP?referer=');">ISP</a> used by a lot of people, of course there are emails reported as junk, and your ISP is black listed. Several mails I sent were blocked by SpamCop. Junk emails are a pain, but being blocked is way much worse. So please, don&#8217;t use system generating to many false positives.</p>
<h5>Greylisting</h5>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Greylisting" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Greylisting?referer=');">Greylisting</a> consist of sending a temporary error when an email is received, store information about this email (server IP, sender, recipient) and wait for a second attempt after a given amount of time. If the email is received again, it&#8217;s allowed.</p>
<p>Usually spam senders send emails to a huge list of addresses, so when they received an error, they just try with the next email address. This is very simple and effective against that kind of spam. The bad news is that emails are often delayed (the sender server may try again 5, 10, 30&#8230; minutes later). By definition emails are not instantaneous, but usually it&#8217;s quite fast, so it can be a bit slower with this solution.</p>
<h5>SPF</h5>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Sender_Policy_Framework" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Sender_Policy_Framework?referer=');">SPF</a> stands for Sender Policy Framework. It&#8217;s a way to check if the sender if allowed to send mails. For instance, a domain owner can specify in its DNS a TXT record containing IPs allowed to send emails from that domain.</p>
<p>I strongly suggest that you add this record if you have a mail server. For example, if you <code>dig</code> my domain name for TXT records you will get:</p>
<div id="wpshdo_15" class="wp-synhighlighter-outer"><div id="wpshdt_15" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_15"></a><a id="wpshat_15" class="wp-synhighlighter-title" href="#codesyntax_15"  onClick="javascript:wpsh_toggleBlock(15)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_15" onClick="javascript:wpsh_code(15)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_15" onClick="javascript:wpsh_print(15)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_15" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ dig desgrange.net TXT
&nbsp;
; &lt;&lt;&gt;&gt; DiG 9.5.0-P2 &lt;&lt;&gt;&gt; desgrange.net TXT
(…)
;; ANSWER SECTION:
desgrange.net.		600	IN	TXT	&quot;v=spf1 a mx ~all&quot;
(…)</pre></div></div>
<p>The value <code>v=spf1 a mx ~all</code> means that <code>A</code> and <code>MX</code> IPs are allowed to send emails and that <code>all</code> other IPs should not.</p>
<h5>tumgreyspf</h5>
<p>In order to add greylisting and SPF to <a hreflang="en" href="http://en.wikipedia.org/wiki/Postfix_(software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Postfix_software?referer=');">postfix</a>, I decided to install <a hreflang="en" href="http://www.tummy.com/Community/software/tumgreyspf/" onclick="pageTracker._trackPageview('/outgoing/www.tummy.com/Community/software/tumgreyspf/?referer=');">tumgreyspf</a>. The name is quite explicit, it does both greylisting and SPF.</p>
<p>Installation:</p>
<pre>$ sudo apt-get install tumgreyspf</pre>
<p>Tell postfix how to start tumgreyspf in <code>/etc/postfix/master.cf</code> by adding:</p>
<div id="wpshdo_16" class="wp-synhighlighter-outer"><div id="wpshdt_16" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_16"></a><a id="wpshat_16" class="wp-synhighlighter-title" href="#codesyntax_16"  onClick="javascript:wpsh_toggleBlock(16)" title="Click to show/hide code block">/etc/postfix/master.cf</a></td><td align="right"><a href="#codesyntax_16" onClick="javascript:wpsh_code(16)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_16" onClick="javascript:wpsh_print(16)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_16" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
tumgreyspf unix -       n       n       -       -       spawn
  user=tumgreyspf argv=/usr/bin/tumgreyspf</pre></div></div>
<p>Tell postfix when to ask tumgreyspf to perform a check, set <code>smtpd_sender_restrictions</code> in <code>/etc/postfix/main.cf</code> to something looking like that:</p>
<div id="wpshdo_17" class="wp-synhighlighter-outer"><div id="wpshdt_17" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_17"></a><a id="wpshat_17" class="wp-synhighlighter-title" href="#codesyntax_17"  onClick="javascript:wpsh_toggleBlock(17)" title="Click to show/hide code block">/etc/postfix/main.cf</a></td><td align="right"><a href="#codesyntax_17" onClick="javascript:wpsh_code(17)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_17" onClick="javascript:wpsh_print(17)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_17" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
smtpd_sender_restrictions =
    permit_sasl_authenticated,
    reject_unauth_destination,
    check_policy_service unix:private/tumgreyspf
(…)</pre></div></div>
<p>And now restart postfix (reload should be enough):</p>
<pre>$ sudo /etc/init.d/postfix restart</pre>
<h5>Misc</h5>
<p>After some tests, I found that tumgreyspf does not reject emails when SPF returns <code>softfail</code> but only <code>fail</code> and <code>permerror</code>.</p>
<p>If you configure your DNS like I did, which seems to be a quite common configuration, you may want to consider <code>softfail</code> has a reason to reject an email.</p>
<p>To change that, change line 122 of <code>/usr/bin/tumgreyspf</code> to the following (it&#8217;s written in <a hreflang="en" href="http://en.wikipedia.org/wiki/Python_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Python_programming_language?referer=');">python</a>, don&#8217;t change indentation):</p>
<div id="wpshdo_18" class="wp-synhighlighter-outer"><div id="wpshdt_18" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_18"></a><a id="wpshat_18" class="wp-synhighlighter-title" href="#codesyntax_18"  onClick="javascript:wpsh_toggleBlock(18)" title="Click to show/hide code block">/usr/bin/tumgreyspf</a></td><td align="right"><a href="#codesyntax_18" onClick="javascript:wpsh_code(18)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_18" onClick="javascript:wpsh_print(18)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_18" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;"><ol start="122"><li class="li1"><div class="de1"><span class="kw1">if</span> spfResult == <span class="st0">'Fail'</span> <span class="kw1">or</span> spfResult == <span class="st0">'Permerror'</span> <span class="kw1">or</span> spfResult == <span class="st0">'Softfail'</span>:</div></li></ol></pre></div></div>
<h5>Mail Stories posts</h5>
<ul>
<li><a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">Installing a mail server</a></li>
<li><a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">Installing a webmail</a></li>
<li><a href="/2009/03/30/Mail-Story-3%3A-SPF-Greylisting/">Spam reduction</a> (this post)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/30/mail-story-3-spf-greylisting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mail Story 2: RoundCube</title>
		<link>http://blog.desgrange.net/2009/03/23/mail-story-2-roundcube/</link>
		<comments>http://blog.desgrange.net/2009/03/23/mail-story-2-roundcube/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Mail.app]]></category>
		<category><![CDATA[RoundCube]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[webmail]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=660</guid>
		<description><![CDATA[In the previous &#8220;Mail Story&#8221; post, I explained how to quickly install a mail server on Debian. Sometimes I want to check my emails but I don&#8217;t have my own computer with me, only an access to an other computer connected to the internet. So I need a webmail. For that purpose I use RoundCube, [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">previous &#8220;Mail Story&#8221; post</a>, I explained how to quickly install a <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail_server?referer=');">mail server</a> on <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a>.</p>
<p>Sometimes I want to check my <a hreflang="en" href="http://en.wikipedia.org/wiki/Email" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Email?referer=');">emails</a> but I don&#8217;t have my own computer with me, only an access to an other computer connected to the internet. So I need a <a hreflang="en" href="http://en.wikipedia.org/wiki/Webmail" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Webmail?referer=');">webmail</a>. For that purpose I use <a hreflang="en" href="http://en.wikipedia.org/wiki/Roundcube" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Roundcube?referer=');">RoundCube</a>, it&#8217;s an <a hreflang="en" href="http://en.wikipedia.org/wiki/Ajax_(programming)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ajax_programming?referer=');">AJAX</a> webmail written in <a hreflang="en" href="http://en.wikipedia.org/wiki/PHP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PHP?referer=');">PHP</a>, using <a hreflang="en" href="http://en.wikipedia.org/wiki/IMAP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IMAP?referer=');">IMAP</a> to retrieve emails and <a hreflang="en" href="http://en.wikipedia.org/wiki/SMTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SMTP?referer=');">SMTP</a> to send them.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/roundcube.png"><img class="aligncenter size-medium wp-image-891" title="roundcube" src="http://blog.desgrange.net/wp-content/uploads/2009/03/roundcube-300x163.png" alt="" width="300" height="163" /></a></p>
<h5>Installation</h5>
<p>In <a hreflang="en" href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a>, <a hreflang="en" href="http://roundcube.net/" onclick="pageTracker._trackPageview('/outgoing/roundcube.net/?referer=');">RoundCube</a> seems not to be a very <a hreflang="en" href="http://qa.debian.org/popcon.php?package=roundcube" onclick="pageTracker._trackPageview('/outgoing/qa.debian.org/popcon.php?package=roundcube&amp;referer=');">popular</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian_package" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian_package?referer=');">package</a>, or maybe Debian people thinks the project is still too young. In fact, there is <a hreflang="en" href="http://packages.debian.org/search?keywords=roundcube&amp;searchon=names&amp;suite=all&amp;section=all" onclick="pageTracker._trackPageview('/outgoing/packages.debian.org/search?keywords=roundcube_amp_searchon=names_amp_suite=all_amp_section=all&amp;referer=');">no RoundCube package for the current stable release of Debian</a>. In &#8220;testing&#8221; there is RoundCube 0.1.1, and 0.2~stable in &#8220;unstable&#8221;. Current official release is 0.2.1.</p>
<p>So lets install the &#8220;unstable&#8221; package (which is quite stable as far as I know <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>First you need to add unstable repositories to <a hreflang="en" href="http://en.wikipedia.org/wiki/Advanced_Packaging_Tool" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Advanced_Packaging_Tool?referer=');">APT</a> if it&#8217;s not done already. Edit <code>/etc/apt/sources.list</code> and add the following lines (replace <code>ftp.fr.debian.org</code> with your closest mirror):</p>
<div id="wpshdo_19" class="wp-synhighlighter-outer"><div id="wpshdt_19" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_19"></a><a id="wpshat_19" class="wp-synhighlighter-title" href="#codesyntax_19"  onClick="javascript:wpsh_toggleBlock(19)" title="Click to show/hide code block">/etc/apt/sources.list</a></td><td align="right"><a href="#codesyntax_19" onClick="javascript:wpsh_code(19)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_19" onClick="javascript:wpsh_print(19)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_19" class="wp-synhighlighter-inner" style="display: block;"><pre class="apt_sources" style="font-family:monospace;"><span class="kw1">deb</span> <span class="re0">http://ftp.fr.debian.org/debian/</span> <span class="kw2">unstable</span> <span class="kw3">main</span> <span class="kw3">contrib</span> <span class="kw3">non-free</span>
<span class="kw1">deb-src</span> <span class="re0">http://ftp.fr.debian.org/debian/</span> <span class="kw2">unstable</span> <span class="kw3">main</span> <span class="kw3">contrib</span> <span class="kw3">non-free</span></pre></div></div>
<p>Then tell APT to keep using stable packages by default (currently the stable release is called <q>lenny</q>, so set the value accordingly with your system), edit <code>/etc/apt/apt.conf.d/70debconf</code> and add:</p>
<div id="wpshdo_20" class="wp-synhighlighter-outer"><div id="wpshdt_20" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_20"></a><a id="wpshat_20" class="wp-synhighlighter-title" href="#codesyntax_20"  onClick="javascript:wpsh_toggleBlock(20)" title="Click to show/hide code block">/etc/apt/apt.conf.d/70debconf</a></td><td align="right"><a href="#codesyntax_20" onClick="javascript:wpsh_code(20)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_20" onClick="javascript:wpsh_print(20)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_20" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
APT::Default-Release &quot;lenny&quot;;</pre></div></div>
<p>It&#8217;s time to retrieve the list of unstable packages:</p>
<pre>$ sudo apt-get update</pre>
<p>Install RoundCube (RoundCube needs a database, it works with <a hreflang="en" href="http://en.wikipedia.org/wiki/MySQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MySQL?referer=');">MySQL</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/PostgreSQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PostgreSQL?referer=');">PostgreSQL</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/SQLite" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SQLite?referer=');">SQLite</a>, select the one you prefer, here I&#8217;m going to use SQLite):</p>
<div id="wpshdo_21" class="wp-synhighlighter-outer"><div id="wpshdt_21" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_21"></a><a id="wpshat_21" class="wp-synhighlighter-title" href="#codesyntax_21"  onClick="javascript:wpsh_toggleBlock(21)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_21" onClick="javascript:wpsh_code(21)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_21" onClick="javascript:wpsh_print(21)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_21" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install roundcube
-&gt; Configure database for roundcube with dbconfig-common? Yes
-&gt; Database type to be used by roundcube: sqlite</pre></div></div>
<h5>Configuration</h5>
<p>RoundCube should be accessible at <code>http://mailserver.example.com/roundcube/</code>. If it&#8217;s not the case, you may need to uncomment the two <code>Alias</code> directives at the beginning of <code>/etc/roundcube/apache.conf</code> (don&#8217;t forget to reload apache configuration before checking if it works).</p>
<p>Now edit <code>/etc/roundcube/main.inc.php</code>. Each parameter has a quite explicit comment, read them. Things you may want to change:</p>
<div id="wpshdo_22" class="wp-synhighlighter-outer"><div id="wpshdt_22" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_22"></a><a id="wpshat_22" class="wp-synhighlighter-title" href="#codesyntax_22"  onClick="javascript:wpsh_toggleBlock(22)" title="Click to show/hide code block">/etc/roundcube/main.inc.php</a></td><td align="right"><a href="#codesyntax_22" onClick="javascript:wpsh_code(22)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_22" onClick="javascript:wpsh_print(22)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_22" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="br0">&#40;</span>…<span class="br0">&#41;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'enable_caching'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw4">FALSE</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'default_host'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'ssl://localhost:993'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'default_port'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">993</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_server'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'localhost'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_port'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">587</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_user'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'%u'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_pass'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'%p'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'create_default_folders'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw4">TRUE</span><span class="sy0">;</span>
<span class="br0">&#40;</span>…<span class="br0">&#41;</span></pre></div></div>
<p>You should now be able to login, read and send emails.</p>
<h5>Misc</h5>
<p>In the parameters I changed, there is <code>create_default_folder</code> set to <code>TRUE</code>. This in order to have the default IMAP folders always here (<code>INBOX</code>, <code>Drafts</code>, <code>Sent</code>, <code>Junk</code> and <code>Trash</code>). By default they are all protected, so they can&#8217;t be removed.</p>
<p>But there is no real convention on those folder names. For instance, by default <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Mail" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Mail?referer=');">Apple Mail</a> use some different directory names. But you can tell Apple Mail to use the ones you want. First you need to select the directory (<q>{Mailbox</q>} in Apple Mail):</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_01.png"><img class="aligncenter size-full wp-image-892" title="mail.app_01" src="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_01.png" alt="" width="180" height="43" /></a></p>
<p>And then associate it with the right meaning:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_02.png"><img class="aligncenter size-full wp-image-893" title="mail.app_02" src="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_02.png" alt="" width="370" height="506" /></a></p>
<p>For other IMAP clients, see the respective documentation. For instance, <a hreflang="en" href="http://kb.mozillazine.org/IMAP_Trash_folder" onclick="pageTracker._trackPageview('/outgoing/kb.mozillazine.org/IMAP_Trash_folder?referer=');">here is how to change the trash folder on Thunderbird</a>.</p>
<p>If you have an iPhone, you only need to synchronize it again, the iPhone uses Mail.app configuration (don&#8217;t forget to check <code>Mail Accounts</code> in <code>Info/Advanced/Replace information on this iPhone:</code> in iTunes before synchronizing).</p>
<p><strong>Note:</strong> since I wrote this post, Debian&#8217;s RoundCube unstable package has been updated to version 0.2.1 but testing package is still version 0.1.1.</p>
<h5>Mail Stories posts</h5>
<ul>
<li><a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">Installing a mail server</a></li>
<li><a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">Installing a webmail</a> (this post)</li>
<li><a href="/2009/03/30/Mail-Story-3%3A-SPF-Greylisting/">Spam reduction</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/23/mail-story-2-roundcube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail Story 1: Debian + Postfix (SMTP) + Courier (IMAP) + SSL</title>
		<link>http://blog.desgrange.net/2009/03/16/mail-story-1-debian-postfix-smtp-courier-imap-ssl/</link>
		<comments>http://blog.desgrange.net/2009/03/16/mail-story-1-debian-postfix-smtp-courier-imap-ssl/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[TLS]]></category>
		<category><![CDATA[courier]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=656</guid>
		<description><![CDATA[Here is a quick tutorial to build your own mail server using a Debian GNU/Linux. Disclaimer Configuring its own mail server can be fun, but remember that there are a lot of bad guys on the internet. I&#8217;m no expert on mail server configuration, don&#8217;t forget that you must not allow relaying mails to domains [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick tutorial to build your own <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail_transfer_agent" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail_transfer_agent?referer=');">mail server</a> using a <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Gnu/linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Gnu/linux?referer=');">GNU/Linux</a>.</p>
<h5>Disclaimer</h5>
<p>Configuring its own mail server can be fun, but remember that there are a lot of bad guys on the internet. I&#8217;m no expert on mail server configuration, don&#8217;t forget that you must not allow relaying mails to domains you don&#8217;t own and from people you haven&#8217;t authenticated in order to avoid spam relay. Of course, keep your softwares (operating system, mail server, etc.) up to date in order to keep your computer safe from being cracked.</p>
<h5>Goal</h5>
<p>I have a <a hreflang="en" href="http://en.wikipedia.org/wiki/Domain_name" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Domain_name?referer=');">domain name</a> (desgrange.net as you can see) and I would like to use it for my <a hreflang="en" href="http://en.wikipedia.org/wiki/Email" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Email?referer=');">mails</a>. It&#8217;s not that I don&#8217;t trust service providers, but I would like to be in charge of the mail server configuration (so I would be able to tune it as I want).</p>
<p>For instance, I want to be able to send mails using <a hreflang="en" href="http://en.wikipedia.org/wiki/SMTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SMTP?referer=');">SMTP</a> over <a hreflang="en" href="http://en.wikipedia.org/wiki/Transport_Layer_Security" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Transport_Layer_Security?referer=');">SSL</a> and retrieve emails using <a hreflang="en" href="http://en.wikipedia.org/wiki/IMAP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IMAP?referer=');">IMAP</a> over SSL.</p>
<p>For those tasks I chose:</p>
<ul>
<li><a hreflang="en" href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a> as operating system (tested on Debian 5.0 and Debian testing)</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Postfix_(software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Postfix_software?referer=');">Postfix</a> (2.5.5) as SMTP server</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Courier_Mail_Server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Courier_Mail_Server?referer=');">Courier-imap</a> (4.4.0) as IMAP server</li>
</ul>
<p>In this tutorial I assume that I&#8217;m installing a mail server for domain <code>example.com</code> on a computer named <code>mailserver</code>. Allowed users are the standard <a hreflang="en" href="http://en.wikipedia.org/wiki/Unix" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Unix?referer=');">unix</a> users created on the mail server.</p>
<h5>DNS</h5>
<p>First make sure that your <a hreflang="en" href="http://en.wikipedia.org/wiki/Domain_Name_System" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Domain_Name_System?referer=');">DNS</a> has your <a hreflang="en" href="http://en.wikipedia.org/wiki/MX_record" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MX_record?referer=');">MX record</a> pointing to your mail server. See with your domain name provider for that part. I&#8217;m using <a href="http://www.ovh.com" onclick="pageTracker._trackPageview('/outgoing/www.ovh.com?referer=');">OVH</a> so I did it on their website (which sucks a bit for that).</p>
<h5>Postfix</h5>
<p><a hreflang="en" href="http://www.postfix.org/" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/?referer=');">Postfix</a> is a well known SMTP server. As a lot of mail servers, it has several hundreds parameters, but here, all of them have good default values, so we just need to change some of them to get it working like we want. Let&#8217;s start with postfix installation:</p>
<div id="wpshdo_23" class="wp-synhighlighter-outer"><div id="wpshdt_23" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_23"></a><a id="wpshat_23" class="wp-synhighlighter-title" href="#codesyntax_23"  onClick="javascript:wpsh_toggleBlock(23)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_23" onClick="javascript:wpsh_code(23)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_23" onClick="javascript:wpsh_print(23)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_23" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install postfix
-&gt; General type of mail configuration: internet with smarthost
-&gt; System mail name: example.com
-&gt; SMTP relay host: &lt;blank&gt;</pre></div></div>
<p>Now we need to install the authentication system <code>saslauthd</code>.</p>
<div id="wpshdo_24" class="wp-synhighlighter-outer"><div id="wpshdt_24" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_24"></a><a id="wpshat_24" class="wp-synhighlighter-title" href="#codesyntax_24"  onClick="javascript:wpsh_toggleBlock(24)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_24" onClick="javascript:wpsh_code(24)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_24" onClick="javascript:wpsh_print(24)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_24" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install sasl2-bin libsasl2-modules</pre></div></div>
<p>As told by the installation process, to enable <code>saslauthd</code>, edit <code>/etc/default/saslauthd</code> and set <code>START=yes</code>.</p>
<p>To tell postfix to use <code>saslauthd</code>, create a file <code>/etc/postfix/sasl/smtpd.conf</code> containing:</p>
<div id="wpshdo_25" class="wp-synhighlighter-outer"><div id="wpshdt_25" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_25"></a><a id="wpshat_25" class="wp-synhighlighter-title" href="#codesyntax_25"  onClick="javascript:wpsh_toggleBlock(25)" title="Click to show/hide code block">/etc/postfix/sasl/smtpd.conf</a></td><td align="right"><a href="#codesyntax_25" onClick="javascript:wpsh_code(25)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_25" onClick="javascript:wpsh_print(25)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_25" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">pwcheck_method: saslauthd
mech_list: PLAIN LOGIN</pre></div></div>
<p>As postfix is running <a hreflang="en" href="http://en.wikipedia.org/wiki/Chroot" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Chroot?referer=');">chrooted</a>, to allow it to talk to <code>saslauthd</code> we need to move some files (or change the directory specified in <code>OPTIONS</code> in <code>/etc/default/saslauthd</code>):</p>
<div id="wpshdo_26" class="wp-synhighlighter-outer"><div id="wpshdt_26" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_26"></a><a id="wpshat_26" class="wp-synhighlighter-title" href="#codesyntax_26"  onClick="javascript:wpsh_toggleBlock(26)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_26" onClick="javascript:wpsh_code(26)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_26" onClick="javascript:wpsh_print(26)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_26" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mkdir -p /var/spool/postfix/var/run/
$ sudo mv /var/run/saslauthd /var/spool/postfix/var/run/
$ sudo ln -s /var/spool/postfix/var/run/saslauthd/ /var/run/saslauthd
$ sudo adduser postfix sasl</pre></div></div>
<p>Postfix is configured to run on the standard <a hreflang="en" href="http://en.wikipedia.org/wiki/TCP_and_UDP_port" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/TCP_and_UDP_port?referer=');">port</a> 25 so other mail servers can transfer mails to you. This postfix <a hreflang="en" href="http://en.wikipedia.org/wiki/Process_(computing)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Process_computing?referer=');">process</a> can&#8217;t use SSL only because other mail servers may not support it. So we need to start an other postfix process running over SSL, so we can use this one when we want to send an email. To allow this process to start, just uncomment the <code>submission</code> lines in <code>/etc/postfix/master.cf</code>.</p>
<p>Check that <code>/etc/mailname</code> contains your domain name. It&#8217;s used by postfix for some parameters (seems to be debian specific).</p>
<p>Most of postfix configuration is done in <code>/etc/postfix/main.cf</code>, you can edit this file directly or use the following commands:</p>
<div id="wpshdo_27" class="wp-synhighlighter-outer"><div id="wpshdt_27" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_27"></a><a id="wpshat_27" class="wp-synhighlighter-title" href="#codesyntax_27"  onClick="javascript:wpsh_toggleBlock(27)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_27" onClick="javascript:wpsh_code(27)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_27" onClick="javascript:wpsh_print(27)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_27" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_security_level = may'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_mandatory_ciphers = high'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_mandatory_exclude_ciphers = aNULL'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_mandatory_protocols = TLSv1'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'mydestination = $myhostname localhost.$mydomain localhost $mydomain'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,reject_unauth_destination'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'relay_domains ='</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'home_mailbox = Maildir/'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'mailbox_command ='</div></li></ol></pre></div></div>
<p>Line 1 tells postfix to use TLS on standard SMTP port (25) if remote server support it.<br />
Line 2 restricts TLS ciphers to only &#8220;HIGH&#8221; ciphers.<br />
Line 3 excludes aNULL cipher (no encryption).<br />
Line 4 tells to use TLSv1 as protocol for the postfix over SSL process.<br />
Line 5 list domain names for which the server will accept mails.<br />
Line 6 tells postfix to send mails only from authenticated users or to domains postfix is in charge of.<br />
Line 7 postfix must not relay mails to other domains.<br />
Line 8 and 9 are for Courier which use a specific type of mailboxes.</p>
<p>You can have a look at the <a hreflang="en" href="http://www.postfix.org/postconf.5.html" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/postconf.5.html?referer=');">postfix configuration parameters documentation</a>.</p>
<h5>Courier-IMAP</h5>
<p><a hreflang="en" href="http://www.courier-mta.org/" onclick="pageTracker._trackPageview('/outgoing/www.courier-mta.org/?referer=');">Courier</a> is a full mail server but here I&#8217;m going to use only <a hreflang="en" href="http://www.courier-mta.org/imap/" onclick="pageTracker._trackPageview('/outgoing/www.courier-mta.org/imap/?referer=');">Courier&#8217;s IMAP server component</a>. Installation:</p>
<div id="wpshdo_28" class="wp-synhighlighter-outer"><div id="wpshdt_28" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_28"></a><a id="wpshat_28" class="wp-synhighlighter-title" href="#codesyntax_28"  onClick="javascript:wpsh_toggleBlock(28)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_28" onClick="javascript:wpsh_code(28)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_28" onClick="javascript:wpsh_print(28)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_28" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install courier-imap-ssl
-&gt; Create directories for web-based administration?: no</pre></div></div>
<p>By default IMAP and IMAP over SSL processes are started but I don&#8217;t want the first one. To disable the standard IMAP process, set <code>IMAPDSTART</code> to <code>NO</code> in <code>/etc/courier/imapd</code>.</p>
<p>Some parameters have to be changed for the IMAP over SSL process, edit the file <code>/etc/courier/imapd-ssl</code> and set the following values:</p>
<div id="wpshdo_29" class="wp-synhighlighter-outer"><div id="wpshdt_29" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_29"></a><a id="wpshat_29" class="wp-synhighlighter-title" href="#codesyntax_29"  onClick="javascript:wpsh_toggleBlock(29)" title="Click to show/hide code block">/etc/courier/imapd-ssl</a></td><td align="right"><a href="#codesyntax_29" onClick="javascript:wpsh_code(29)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_29" onClick="javascript:wpsh_print(29)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_29" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
IMAP_TLS_REQUIRED=1
TLS_PROTOCOL=SSL23
TLS_STARTTLS_PROTOCOL=SSL23
TLS_CIPHER_LIST=HIGH
(…)</pre></div></div>
<p>For <code>TLS_PROTOCOL</code> and <code>TLS_STARTTLS_PROTOCOL</code> I use <code>SSL23</code> because I&#8217;m using <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail.app" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail.app?referer=');">Apple Mail</a> and it does not handle TLS very well. If you use a mail client supporting TLS, replace <code>SSL23</code> with <code>TLS1</code>.</p>
<h5>Finishing the installation</h5>
<p>First we need to restart everything:</p>
<div id="wpshdo_30" class="wp-synhighlighter-outer"><div id="wpshdt_30" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_30"></a><a id="wpshat_30" class="wp-synhighlighter-title" href="#codesyntax_30"  onClick="javascript:wpsh_toggleBlock(30)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_30" onClick="javascript:wpsh_code(30)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_30" onClick="javascript:wpsh_print(30)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_30" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo /etc/init.d/saslauthd restart
$ sudo /etc/init.d/postfix restart
$ sudo /etc/init.d/courier-authdaemon restart
$ sudo /etc/init.d/courier-imap restart
$ sudo /etc/init.d/courier-imap-ssl restart</pre></div></div>
<p>If you type <code>sudo netstat -lntp</code> you should see something like that:</p>
<div id="wpshdo_31" class="wp-synhighlighter-outer"><div id="wpshdt_31" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_31"></a><a id="wpshat_31" class="wp-synhighlighter-title" href="#codesyntax_31"  onClick="javascript:wpsh_toggleBlock(31)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_31" onClick="javascript:wpsh_code(31)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_31" onClick="javascript:wpsh_print(31)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_31" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      12718/master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      12718/master
tcp6       0      0 :::993                  :::*                    LISTEN      12440/couriertcpd</pre></div></div>
<p>There are two processes for postfix (<code>master</code> on ports 25 and 587 (SSL)) and one for courier on port 993.</p>
<p>Create your mailbox. You may want to initialize your own mailbox directory on the server:</p>
<div id="wpshdo_32" class="wp-synhighlighter-outer"><div id="wpshdt_32" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_32"></a><a id="wpshat_32" class="wp-synhighlighter-title" href="#codesyntax_32"  onClick="javascript:wpsh_toggleBlock(32)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_32" onClick="javascript:wpsh_code(32)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_32" onClick="javascript:wpsh_print(32)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_32" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ maildirmake ~/Maildir</pre></div></div>
<h5>Certificates</h5>
<p>I didn&#8217;t say anything about SSL <a hreflang="en" href="http://en.wikipedia.org/wiki/Public_key_certificate" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Public_key_certificate?referer=');">certificates</a>, you need certificates for all your SSL connections, here some default ones are created, but when you connect with your mail client, it may complain about the certificate not being trustworthy.</p>
<p>It may prevent you to read/send mails (for instance I had to tell <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a> <a hreflang="en" href="http://www.apple.com/macosx/features/mail" onclick="pageTracker._trackPageview('/outgoing/www.apple.com/macosx/features/mail?referer=');">Mail</a> to trust the certificate in order to be able to send emails).</p>
<h5>Trouble shooting</h5>
<p>While configuring my mail server I ran in several problems, mainly due to Apple Mail, TLS and certificates. So, if you have any trouble, don&#8217;t forget to have a look at log files in <code>/var/log/</code>, use <code>netstat</code> and <code>ps</code> to be sure that your servers are running and listening on the right ports.</p>
<p>You may even try to manually connect to the IMAP server with a command like this one:</p>
<div id="wpshdo_33" class="wp-synhighlighter-outer"><div id="wpshdt_33" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_33"></a><a id="wpshat_33" class="wp-synhighlighter-title" href="#codesyntax_33"  onClick="javascript:wpsh_toggleBlock(33)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_33" onClick="javascript:wpsh_code(33)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_33" onClick="javascript:wpsh_print(33)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_33" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ openssl s_client -tls1 -connect mailserver:993 -state -debug</pre></div></div>
<p>Have a look to the <a hreflang="en" href="http://bobpeers.com/technical/telnet_imap.php" onclick="pageTracker._trackPageview('/outgoing/bobpeers.com/technical/telnet_imap.php?referer=');">IMAP commands</a> to check if it works.</p>
<p>Some of the errors I had:</p>
<ul>
<li><code>SASL authentication failure: cannot connect to saslauthd server: No such file or directory</code> because I didn&#8217;t had moved <code>saslauthd</code> files to <code>/var/spool/postfix/var/run</code>.</li>
<li><code>imapd-ssl: Unexpected SSL connection shutdown</code> because Apple Mail was not trusting the certificate.</li>
<li><code>imapd-ssl: couriertls: connect: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number</code> because Apple Mail does not support SSL3/TLS1 on IMAP.</li>
</ul>
<h5>Update (2010-05-09):</h5>
<p>My father&#8217;s mail client was displaying the following error message:</p>
<div id="wpshdo_34" class="wp-synhighlighter-outer"><div id="wpshdt_34" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_34"></a><a id="wpshat_34" class="wp-synhighlighter-title" href="#codesyntax_34"  onClick="javascript:wpsh_toggleBlock(34)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_34" onClick="javascript:wpsh_code(34)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_34" onClick="javascript:wpsh_print(34)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_34" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library)</pre></div></div>
<p>A quick solution to solve that is to replace <a href="http://oss.sgi.com/projects/fam/" onclick="pageTracker._trackPageview('/outgoing/oss.sgi.com/projects/fam/?referer=');">FAM</a> with <a href="http://people.gnome.org/~veillard/gamin/" onclick="pageTracker._trackPageview('/outgoing/people.gnome.org/_veillard/gamin/?referer=');">Gamin</a>:</p>
<div id="wpshdo_35" class="wp-synhighlighter-outer"><div id="wpshdt_35" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_35"></a><a id="wpshat_35" class="wp-synhighlighter-title" href="#codesyntax_35"  onClick="javascript:wpsh_toggleBlock(35)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_35" onClick="javascript:wpsh_code(35)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_35" onClick="javascript:wpsh_print(35)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_35" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install gamin</pre></div></div>
<p>And to restart <code>courier</code>.</p>
<h5>Links</h5>
<p>Some useful resources:</p>
<ul>
<li><a hreflang="en" href="http://www.postfix.org/docs.html" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/docs.html?referer=');">Postfix Howtos and FAQs</a></li>
<li><a hreflang="en" href="http://www.postfix.org/documentation.html" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/documentation.html?referer=');">Postfix Documentation</a></li>
<li><a hreflang="en" href="http://www.howtoforge.com/postfix-smtp-authentication-on-the-secure-port-only" onclick="pageTracker._trackPageview('/outgoing/www.howtoforge.com/postfix-smtp-authentication-on-the-secure-port-only?referer=');">A tutorial on SMTP authentication over SSL</a></li>
<li><a hreflang="en" href="http://www.howtoforge.com/perfect_setup_debian_sarge_p4" onclick="pageTracker._trackPageview('/outgoing/www.howtoforge.com/perfect_setup_debian_sarge_p4?referer=');">A tutotial including a postfix/courier-imap installation</a></li>
</ul>
<h5>Mail Stories posts</h5>
<ul>
<li><a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">Installing a mail server</a> (this post)</li>
<li><a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">Installing a webmail</a></li>
<li><a href="/2009/03/30/Mail-Story-3%3A-SPF-Greylisting/">Spam reduction</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/16/mail-story-1-debian-postfix-smtp-courier-imap-ssl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Stop IE6</title>
		<link>http://blog.desgrange.net/2009/03/12/stop-ie6/</link>
		<comments>http://blog.desgrange.net/2009/03/12/stop-ie6/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 23:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=658</guid>
		<description><![CDATA[As you know, the web is based on standards, those standards give us the ability to access all the data on the web whatever our browser and/or operating system are. But Microsoft didn&#8217;t care much about web standards when they were building their own web browser: internet explorer. IE had more than 90 % market [...]]]></description>
			<content:encoded><![CDATA[<p>As you know, the <a hreflang="en" href="http://en.wikipedia.org/wiki/World_Wide_Web" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/World_Wide_Web?referer=');">web</a> is based on standards, those standards give us the ability to access all the data on the web whatever our <a hreflang="en" href="http://en.wikipedia.org/wiki/Web_browser" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Web_browser?referer=');">browser</a> and/or <a hreflang="en" href="http://en.wikipedia.org/wiki/Operating_system" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Operating_system?referer=');">operating system</a> are.</p>
<p>But <a hreflang="en" href="http://en.wikipedia.org/wiki/Microsoft" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Microsoft?referer=');">Microsoft</a> didn&#8217;t care much about web standards when they were building their own web browser: <a hreflang="en" href="http://en.wikipedia.org/wiki/Internet_Explorer" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Internet_Explorer?referer=');">internet explorer</a>. IE had more than 90 % market shares for a long time but nowadays it&#8217;s less than 70 %, because of new browsers (more secure, faster, more standard compliant, etc.).</p>
<p>So Microsoft updated it&#8217;s web browser with IE 7, which is a bit more standard compliant but far away compared to other browsers like <a hreflang="en" href="http://en.wikipedia.org/wiki/Google_Chrome" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Google_Chrome?referer=');">Chrome</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Konqueror" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Konqueror?referer=');">Konqueror</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Firefox" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firefox?referer=');">Firefox</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Opera_(web_browser)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Opera_web_browser?referer=');">Opera</a> or <a hreflang="en" href="http://en.wikipedia.org/wiki/Safari_(web_browser)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Safari_web_browser?referer=');">Safari</a>.</p>
<p>Unfortunately, lots of web sites were developed to be usable with IE 6 (which still have nearly 18 % market share), and IE 6 is so buggy that&#8217;s a real pain to have a good website being usable with IE 6.</p>
<p>Web standards give us the power to create wonderful websites, web applications, but we usually can&#8217;t because we have to take IE 6 users in account.</p>
<p>The content of my blog should not attract IE users <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  but here are the usage:</p>
<ul>
<li>Firefox: 52 %</li>
<li>IE: 21 % (IE 6: 45 %, IE 7: 50 %)</li>
<li>Safari: 10%</li>
</ul>
<p>Somebody had the great idea to start a campaign against IE 6 (I hope, if the goal is met, he is going to create a new campaign for IE 7 which is not a lot better):</p>
<p><a href="http://www.stopie6.org/" onclick="pageTracker._trackPageview('/outgoing/www.stopie6.org/?referer=');"><img class="aligncenter size-full wp-image-884" title="stopie6" src="http://blog.desgrange.net/wp-content/uploads/2009/03/stopie6.jpg" alt="" width="552" height="117" /></a></p>
<p>The goal is obviously to wipe out IE 6 by telling people still using IE 6 (or older!) to switch to a newer browser (you can add a little script on your website warning IE 6 users that they should update their browser).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/12/stop-ie6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Iconfu</title>
		<link>http://blog.desgrange.net/2009/03/06/iconfu/</link>
		<comments>http://blog.desgrange.net/2009/03/06/iconfu/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 00:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[iconfu]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=654</guid>
		<description><![CDATA[I used to work with Conan in a &#8220;big company&#8221; and in those kind of places, you are mostly never allowed to install the softwares you want on your computer. For most of the people in the company, it was understandable, but when you are a software developer it&#8217;s a bit ridiculous. Quite often we [...]]]></description>
			<content:encoded><![CDATA[<p>I used to work with <a hreflang="en" href="http://www.conandalton.net/" onclick="pageTracker._trackPageview('/outgoing/www.conandalton.net/?referer=');">Conan</a> in a &#8220;big company&#8221; and in those kind of places, you are mostly never allowed to install the softwares you want on your computer.</p>
<p>For most of the people in the company, it was understandable, but when you are a software developer it&#8217;s a bit ridiculous.</p>
<p>Quite often we need to edit or create some icons, and when you can&#8217;t install a software for doing that, it&#8217;s a bit annoying. So, the quick solution is to have a website providing those kind of tools online (or you can fill 3 documents, ask the authorization to your supervisor and wait 1 week to get the software installed on your computer, and of course it&#8217;s a 5 years old version).</p>
<p>Since there was no website for creating icons, Conan decided to create one : <a hreflang="en" href="http://www.iconfu.com/" onclick="pageTracker._trackPageview('/outgoing/www.iconfu.com/?referer=');">iconfu.com</a>.</p>
<p>I was a bit skeptical about doing that kind of tools online, but in fact it seems to work. Conan has done a great job with javascript here to get all that stuff working.</p>
<p>Of course, the website is preloaded with thousand of <a hreflang="en" href="http://en.wikipedia.org/wiki/Creative_Commons" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Creative_Commons?referer=');">creative commons</a> licensed icons, and they are tagged. That mean you can look for icons tagged &#8220;folder&#8221; and &#8220;search&#8221; and you will end up with some icons like this one (by Siddharth Maheshwari):</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/folder_search.png"><img class="aligncenter size-full wp-image-877" title="folder_search" src="http://blog.desgrange.net/wp-content/uploads/2009/03/folder_search.png" alt="" width="64" height="64" /></a></p>
<p>Anyway, have a look at <a hreflang="en" href="http://www.iconfu.com/" onclick="pageTracker._trackPageview('/outgoing/www.iconfu.com/?referer=');">iconfu.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/06/iconfu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Linux server for your Mac</title>
		<link>http://blog.desgrange.net/2009/03/01/using-a-linux-server-for-your-mac/</link>
		<comments>http://blog.desgrange.net/2009/03/01/using-a-linux-server-for-your-mac/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FLAC]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Time Machine]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[firefly]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=650</guid>
		<description><![CDATA[Time Machine Server One great feature introduced in Mac OS X 10.5 (Leopard) is Time Machine. Time Machine is a backup/restore system. As a lot of backup systems it creates an incremental backup. You can create your backup to an attached hard drive, a Time Capsule or an Xserve. If, like me, you would like [...]]]></description>
			<content:encoded><![CDATA[<h5>Time Machine Server</h5>
<p>One great feature introduced in <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_OS_X" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_OS_X?referer=');">Mac OS X 10.5 (Leopard)</a> is <a hreflang="en" href="http://en.wikipedia.org/wiki/Time_Machine_(Apple_software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Time_Machine_Apple_software?referer=');">Time Machine</a>.</p>
<p><a hreflang="en" href="http://www.apple.com/macosx/features/timemachine.html" onclick="pageTracker._trackPageview('/outgoing/www.apple.com/macosx/features/timemachine.html?referer=');">Time Machine</a> is a backup/restore system. As a lot of backup systems it creates an incremental backup. You can create your backup to an attached hard drive, a <a hreflang="en" href="http://en.wikipedia.org/wiki/Time_Capsule_(Apple)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Time_Capsule_Apple?referer=');">Time Capsule</a> or an <a hreflang="en" href="http://en.wikipedia.org/wiki/Xserve" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Xserve?referer=');">Xserve</a>.</p>
<p>If, like me, you would like to backup your Mac on a Linux server, there is a solution. It&#8217;s not perfect yet, but so far (I&#8217;m using it for a week now) it&#8217;s working quite well.</p>
<p>I followed the instruction written on <a hreflang="fr" href="http://blog.delacelle.com/post/2009/01/19/tuto-comment-creer-votre-serveur-timecapsule-sous-debian-ou-ubuntu/" onclick="pageTracker._trackPageview('/outgoing/blog.delacelle.com/post/2009/01/19/tuto-comment-creer-votre-serveur-timecapsule-sous-debian-ou-ubuntu/?referer=');">how to create a Time Machine Server on Debian</a> (it&#8217;s in french), which is mostly a translation of this article on <a hreflang="en" href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/" onclick="pageTracker._trackPageview('/outgoing/www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/?referer=');">how to create a Time Machine Server on Ubuntu</a> (in english).</p>
<p>It&#8217;s quite easy, you just have to follow instructions. Some tips:</p>
<ul>
<li>On my <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> installation there&#8217;s a problem with <code>cracklib2-dev</code> package, I just had to install <code>libcrack2-dev</code> instead.</li>
<li>Don&#8217;t copy/paste the XML file from the tutorial&#8217;s french version (the blog&#8217;s style sheet messed up the quotes).</li>
<li>If you have to manually create a sparse bundle disk image, it seems that the size is the size of your &#8220;virtual&#8221; backup drive. For instance, I have 300 GB available on my server, I selected 200 GB as image size, so Time Machine should not use all the space available on my server but restrict itself to 200 GB (I hope so, it&#8217;s not clear as Time Machine is still telling me that my hard drive is about 1.3 TB with 300 GB available, but the sparse bundle disk image is telling me that there is 200 GB with 100 GB available (I already have 100 GB of backup)).</li>
<li>On <a hreflang="en" href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a>, doing an update will erase your home made <code>netatalk</code> package. In order to prevent that you can use the following command (see <a hreflang="en" href="http://www.debian-administration.org/articles/67" onclick="pageTracker._trackPageview('/outgoing/www.debian-administration.org/articles/67?referer=');">Preventing Debian package upgrades</a>):</li>
</ul>
<pre># echo "netatalk hold" | dpkg --set-selections</pre>
<p>I said it was not perfect because from time to time Time Machine failed while backuping, so I have to launch a new backup (ok, it&#8217;s just 2 clicks). The other problem is that my home folder is encrypted with <a hreflang="en" href="http://en.wikipedia.org/wiki/FileVault" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FileVault?referer=');">FileVault</a>. In that case Time Machine does not backup my home folder when I&#8217;m connected. When I logoff, FileVault do some stuff then my home folder is backuped. But now with a remote backup, the backup part is not done anymore. I have to connect with an other account and launch a backup.</p>
<h5>iTunes Server</h5>
<p>Like a lot of <a hreflang="en" href="http://en.wikipedia.org/wiki/Macintosh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Macintosh?referer=');">Mac</a> users, I&#8217;m using <a hreflang="en" href="http://en.wikipedia.org/wiki/ITunes" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ITunes?referer=');">iTunes</a> to listen to my music. The overall software is quite good but there are several things that are just wrong. By default <a hreflang="en" href="http://www.apple.com/itunes/" onclick="pageTracker._trackPageview('/outgoing/www.apple.com/itunes/?referer=');">iTunes</a> is only able to read <a hreflang="en" href="http://en.wikipedia.org/wiki/MP3" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MP3?referer=');">mp3</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a>&#8216;s own audio <a hreflang="en" href="http://en.wikipedia.org/wiki/Codec" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Codec?referer=');">codecs</a>. I convert all my <a hreflang="en" href="http://en.wikipedia.org/wiki/CD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/CD?referer=');">CD</a>s to <a hreflang="en" href="http://en.wikipedia.org/wiki/Free_Lossless_Audio_Codec" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Free_Lossless_Audio_Codec?referer=');">FLAC</a> because it&#8217;s a <a hreflang="en" href="http://en.wikipedia.org/wiki/Lossless_data_compression" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Lossless_data_compression?referer=');">lossless</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source?referer=');">open source</a> codec.</p>
<p>The other problem I have is that my <a hreflang="en" href="http://en.wikipedia.org/wiki/MacBook" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MacBook?referer=');">MacBook</a> has a small hard drive so I can&#8217;t keep all my music on it (especially if encoded in <a hreflang="en" href="http://flac.sourceforge.net/index.html" onclick="pageTracker._trackPageview('/outgoing/flac.sourceforge.net/index.html?referer=');">FLAC</a>).</p>
<p>The solution is to use <a hreflang="en" href="http://en.wikipedia.org/wiki/Firefly_Media_Server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firefly_Media_Server?referer=');">Firefly</a> and have it sharing my music on my local network. The music is decoded by <a hreflang="en" href="http://www.fireflymediaserver.org/" onclick="pageTracker._trackPageview('/outgoing/www.fireflymediaserver.org/?referer=');">Firefly</a> then sent over the network, so iTunes doesn&#8217;t have to know how to decode the original file.</p>
<p>Installing Firefly on Debian is quite easy:</p>
<pre>$ sudo apt-get install mt-daapd</pre>
<p>Then edit <code>/etc/mt-daapd.conf</code> in order to configure it a bit. There is also a web interface to configure Firefly, connect on your server on port 3689 with your web browser (the main thing you have to set is the directory where your music is).</p>
<p>Now open iTunes, you should see a Firefly share in the left panel:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/firefly.png"><img class="aligncenter size-full wp-image-875" title="firefly" src="http://blog.desgrange.net/wp-content/uploads/2009/03/firefly.png" alt="" width="242" height="44" /></a></p>
<p>Some drawbacks with this method. On iTunes you only see remote playlists, so some functionalities are not working anymore (changing songs <a hreflang="en" href="http://en.wikipedia.org/wiki/Metadata" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Metadata?referer=');">metadata</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Genius_(iTunes)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Genius_iTunes?referer=');">genius</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/ITunes#Sound_processing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ITunes_Sound_processing?referer=');">sound check</a>, creating your own local playlist from the remote one, copying a song to your <a hreflang="en" href="http://en.wikipedia.org/wiki/IPod" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IPod?referer=');">iPod</a>/<a hreflang="en" href="http://en.wikipedia.org/wiki/IPhone" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IPhone?referer=');">iPhone</a> (retrieving a song in local)).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/01/using-a-linux-server-for-your-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Keep usability instead of fanciness</title>
		<link>http://blog.desgrange.net/2009/02/25/keep-usability-instead-of-fanciness/</link>
		<comments>http://blog.desgrange.net/2009/02/25/keep-usability-instead-of-fanciness/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=648</guid>
		<description><![CDATA[Login/Password I spend quite a lot of time on the internet, I have a lot of accounts on a lot of websites. I have a different password on each website, because having only one password for everything is not secure at all and some websites have strange password policies (so sometimes it&#8217;s not possible to [...]]]></description>
			<content:encoded><![CDATA[<h5>Login/Password</h5>
<p>I spend quite a lot of time on the internet, I have a lot of accounts on a lot of websites. I have a different password on each website, because having only one password for everything is not secure at all and some websites have strange password policies (so sometimes it&#8217;s not possible to use the &#8220;usual&#8221; password).</p>
<p>But I have a quite bad memory, so I can&#8217;t remember all of my passwords. Hopefully most operating systems or web browsers include a <a hreflang="en" href="http://en.wikipedia.org/wiki/Password_manager" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Password_manager?referer=');">password management system</a> (like <a hreflang="en" href="http://en.wikipedia.org/wiki/Keychain_(Mac_OS)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Keychain_Mac_OS?referer=');">Keychain</a> on <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_OS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_OS?referer=');">Mac OS</a> or <a hreflang="en" href="http://en.wikipedia.org/wiki/KWallet" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/KWallet?referer=');">KWallet</a> on <a hreflang="en" href="http://en.wikipedia.org/wiki/KDE" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/KDE?referer=');">KDE</a>). Those managers keep all the logins and passwords you have for every websites. That&#8217;s very useful for websites you don&#8217;t visit very often. Once I went on a website I thought I never went before but my browser filled the credentials for me, I already had an account created a long time ago (I told you, my memory is not that good).</p>
<p>One good thing is that all your passwords are stored in a place that is much more secure than a sheet of paper, the keyboard&#8217;s back or a text file on your computer.</p>
<p>Usually, when you go on a website and enter your credentials for the first time, the browser recognize the login and password fields and then ask you if you want your browser to store your credentials. That&#8217;s quite simple and effective. I love this functionality.</p>
<p>But more and more often, due to the <a hreflang="en" href="http://en.wikipedia.org/wiki/AJAX" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/AJAX?referer=');">AJAX</a>/<a hreflang="en" href="http://en.wikipedia.org/wiki/Web_2.0" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Web_2.0?referer=');">Web 2.0</a> fashion, some websites, mostly owned by wannabe companies, put a fancy login/password dialog box which is not recognize by some (all?) web browsers. So they don&#8217;t ask to store your credentials and you have to enter them each time you connect.</p>
<p>Interestingly, those websites often add a option to remember your login and your password which I don&#8217;t use because I don&#8217;t know how they are going to store it (and in fact I tried once but it was not working) and I want to store all my credentials in the same place so I easily retrieve them when I need to.</p>
<p>Some examples of websites not friendly for storing login/password:</p>
<ul>
<li><a hreflang="en" href="http://www.hotmail.com" onclick="pageTracker._trackPageview('/outgoing/www.hotmail.com?referer=');">hotmail</a></li>
<li><a hreflang="en" href="http://www.monster.com/" onclick="pageTracker._trackPageview('/outgoing/www.monster.com/?referer=');">monster</a></li>
<li><a hreflang="fr" href="http://www.cashstore.fr/" onclick="pageTracker._trackPageview('/outgoing/www.cashstore.fr/?referer=');">cashstore</a></li>
</ul>
<p>Please, give me a simple login/password form!</p>
<h5>Other (not related with fanciness this time, just plain usability (and browser compatibility?))</h5>
<p>Today I had to go on microsoft website. I have to admit that their website is a mess and I didn&#8217;t find what I was looking for. While browsing into it, at some point I got a popup asking me to answer a survey about using their website. Since I was starting being angry against the website, I took the survey.</p>
<p>It was quite interesting, most questions had valid possible answers like this one (guess which answer I selected):</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/02/survey_01.png"><img class="aligncenter size-medium wp-image-867" title="survey_01" src="http://blog.desgrange.net/wp-content/uploads/2009/02/survey_01-300x39.png" alt="" width="300" height="39" /></a></p>
<p>And then I got this question:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/02/survey_02.png"><img class="aligncenter size-medium wp-image-868" title="survey_02" src="http://blog.desgrange.net/wp-content/uploads/2009/02/survey_02-300x29.png" alt="" width="300" height="29" /></a></p>
<p>Usually, when somebody ask me &#8220;Do you like me?&#8221;, I don&#8217;t answer with a number.</p>
<p>But the worst was at the end of the survey, well I think it was the end. The last page I had was a page with some questions, but there was no more &#8220;next&#8221; button. So I&#8217;m pretty sure that my answers on the last page were not taken into account, but I don&#8217;t know about my previous answers. Usually there is a page at the end saying something like &#8220;thank you for taking the time to answer this survey&#8221; so you know it&#8217;s finished.</p>
<p><strong>Note:</strong> Yes I know, my blog does not look great with old web browsers and some parts of the theme are not finished <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/02/25/keep-usability-instead-of-fanciness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do developers need to work on fast or slow computers?</title>
		<link>http://blog.desgrange.net/2009/01/19/do-developers-need-to-work-on-fast-or-slow-computers/</link>
		<comments>http://blog.desgrange.net/2009/01/19/do-developers-need-to-work-on-fast-or-slow-computers/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=639</guid>
		<description><![CDATA[From time to time I see this question happening. When a developer is writing a software, does he need a fast or a slow computer? Why working on a slow computer? If a developer works on a slow computer, he tends to be careful about how fast is running the code he is writing. So [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I see this question happening. When a developer is writing a software, does he need a fast or a slow computer?</p>
<p>Why working on a slow computer?</p>
<ul>
<li>If a developer works on a slow computer, he tends to be careful about how fast is running the code he is writing. So the produced software is fast and is more testable on the developers computer.</li>
</ul>
<p>Why working on a fast computer?</p>
<ul>
<li>The developer can open all resources he needs without having to care about closing some softwares because the computer does not handle the load (I remember a colleague having 2 internet explorer opened, 3 firefox with 15 tabs opened in each of them, 3 intellij, a webserver and a database running all together on his computer).</li>
<li>A slow computer may not be the same as having the product working under heavy load.</li>
<li>The tools the developer is using may not be &#8220;optimized&#8221; and are running slowly on slow computer or computer without much memory. In general, everything is slow and increase the waiting time of the developer.</li>
<li>In case of failure/delay the developer can&#8217;t use the argument of having a slow computer <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</li>
</ul>
<p>When writing a software, what&#8217;s important for a lot of developers is the time for compile/run/test cycle. Shorter is it, faster the developer can see the result of its work and have feedback on it. On a slow computer, this cycle is longer, the developer tends to write more code before seeing if it works, in case of test failure, the modifications may be too important to easily find out what&#8217;s wrong, leading to a big loss of time.</p>
<p>Depending on the technologies you are working on, tools may exist to distribute some computation like compiling on computers available on your network (hoping that other developers are not compiling at the same time too). But compiling may not be the longest task. I work on a project where compile time was mostly nonexistent (everything was compiled on the fly), running 700 unit tests took around 5 seconds, running 200 functional tests took around 5 minutes. We didn&#8217;t have the fastest computers but they where fast enough. Here the functional tests were taking most of the time, I think writing them so they could be distributed on other available computers would have been a bit more complicated and may have taken too much effort (the environment was not designed to be distributed). And distributing the functional tests would have completely remove the point of seeing how well worked the system under load.</p>
<p>So to me, giving a powerful computer to developers is not a big cost and may make their job easier. If you need to check how your software behave under load or in restricted environment (slow CPU, small memory), make appropriate tests (if this is a requirement, tests must have been written to check it).</p>
<p>I think the real problem about writing a fat and slow software is because having a small fast one is quite often not a requirement (you are still doing the same things with the last version of Microsoft Word on Windows Vista than what you were doing with your old Word on Windows 95, you just need a far more powerful computer now). Most of us works for companies where the goal is selling products/licensees and they need more and more features to be sold. Selling a new version having only &#8220;faster and smaller footprint&#8221; is not enough for the marketing guys, even more, it&#8217;s recognizing that the previous version were fat and slow (I know it&#8217;s dumb, but that&#8217;s what I have seen sometimes (depending in what kind of industries you are working in)).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/01/19/do-developers-need-to-work-on-fast-or-slow-computers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exceptions in Erlang</title>
		<link>http://blog.desgrange.net/2009/01/05/exceptions-in-erlang/</link>
		<comments>http://blog.desgrange.net/2009/01/05/exceptions-in-erlang/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=640</guid>
		<description><![CDATA[Exception In a programming language, an exception is something that could be generated when the system is behaving outside the normal execution path. An exception is mostly an error. In lots of programming languages, developers use exceptions as a meaningful information to do something or not. For example, while reading a file, an exception can [...]]]></description>
			<content:encoded><![CDATA[<h4>Exception</h4>
<p>In a <a hreflang="en" href="http://en.wikipedia.org/wiki/Programming_language" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Programming_language?referer=');">programming language</a>, an <a hreflang="en" href="http://en.wikipedia.org/wiki/Exception_handling" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Exception_handling?referer=');">exception</a> is something that could be generated when the system is behaving outside the normal execution path. An exception is mostly an error. In lots of programming languages, developers use exceptions as a meaningful information to do something or not.</p>
<p>For example, while reading a file, an exception can be generated because the file does not exists. The developer may choose to catch the exception and display a popup to ask the user to choose an other file, or the developer may not catch the exception because the file must have been there and if it&#8217;s not there it&#8217;s because something wrong is happening but the developer has no clue about what to do, so the best solution is to let the system crash (as opposed to try to do something and maybe enter in an inconsistent state).</p>
<h4>Exceptions in Erlang</h4>
<p>In <a hreflang="en" href="http://en.wikipedia.org/wiki/Erlang_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Erlang_programming_language?referer=');">Erlang</a> there are exceptions too.</p>
<div id="wpshdo_36" class="wp-synhighlighter-outer"><div id="wpshdt_36" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_36"></a><a id="wpshat_36" class="wp-synhighlighter-title" href="#codesyntax_36"  onClick="javascript:wpsh_toggleBlock(36)" title="Click to show/hide code block">exceptions.erl</a></td><td align="right"><a href="#codesyntax_36" onClick="javascript:wpsh_code(36)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_36" onClick="javascript:wpsh_print(36)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_36" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="sy3">-</span><span class="re2">module</span><span class="br0">&#40;</span>exceptions<span class="br0">&#41;</span><span class="sy1">.</span>
<span class="sy3">-</span><span class="re2">compile</span><span class="br0">&#40;</span><span class="br0">&#91;</span>export_all<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span>
&nbsp;
<span class="re3">run</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Test exception 1 starting...~n&quot;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">exception1</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Test exception 1 finished.~n&quot;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    ok<span class="sy1">.</span>
&nbsp;
<span class="re3">exception1</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
  <a href="http://erlang.org/doc/man/erlang.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/erlang.html?referer=');"><span class="kw5">erlang</span></a>:<span class="re3">foo</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy1">.</span></pre></div></div>
<p>Running the <a hreflang="en" href="http://en.wikipedia.org/wiki/Function_(computer_science)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Function_computer_science?referer=');">function</a> <code>run</code> will run <code>exception1</code> which throws an exception (the function <code>foo</code> does not exist in module <code>erlang</code>) and is not catched by <code>run</code> (so the second <code>fwrite</code> is not displayed):</p>
<div id="wpshdo_37" class="wp-synhighlighter-outer"><div id="wpshdt_37" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_37"></a><a id="wpshat_37" class="wp-synhighlighter-title" href="#codesyntax_37"  onClick="javascript:wpsh_toggleBlock(37)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_37" onClick="javascript:wpsh_code(37)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_37" onClick="javascript:wpsh_print(37)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_37" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ erl -s exceptions run
Erlang (BEAM) emulator version 5.6.2 [source] [smp:2] [async-threads:0] [kernel-poll:false]
&nbsp;
Test exception 1 starting...
{&quot;init terminating in do_boot&quot;,{undef,[{erlang,foo,[]},{exceptions,run,0},{init,start_it,1},{init,start_em,1}]}}
&nbsp;
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()</pre></div></div>
<h5>Types of exceptions</h5>
<p>In <a hreflang="en" href="http://www.erlang.org/" onclick="pageTracker._trackPageview('/outgoing/www.erlang.org/?referer=');">Erlang</a> there are 3 kinds of exceptions that can be generated:</p>
<ul>
<li>normal exceptions, user generated (<code>throw(Reason)</code>)</li>
<li>errors, something is going really wrong, should not be catched (<code>erlang:error(Reason)</code>)</li>
<li>exit, used to terminate current process (<code>exit(Reason)</code>)</li>
</ul>
<h5>Catching an exception</h5>
<ul>
<li>Catching an exception with <code>catch</code>:</li>
</ul>
<div id="wpshdo_38" class="wp-synhighlighter-outer"><div id="wpshdt_38" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_38"></a><a id="wpshat_38" class="wp-synhighlighter-title" href="#codesyntax_38"  onClick="javascript:wpsh_toggleBlock(38)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_38" onClick="javascript:wpsh_code(38)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_38" onClick="javascript:wpsh_print(38)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_38" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="re3">run</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Test exception 1 starting...~n&quot;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re5">Result</span> <span class="sy3">=</span> <span class="br0">&#40;</span><span class="kw1">catch</span> <a href="http://erlang.org/doc/man/erlang.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/erlang.html?referer=');"><span class="kw5">erlang</span></a>:<span class="re3">foo</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Test exception 1 finished: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Result</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    ok<span class="sy1">.</span></pre></div></div>
<p>Calling <code>run</code> displays:</p>
<div id="wpshdo_39" class="wp-synhighlighter-outer"><div id="wpshdt_39" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_39"></a><a id="wpshat_39" class="wp-synhighlighter-title" href="#codesyntax_39"  onClick="javascript:wpsh_toggleBlock(39)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_39" onClick="javascript:wpsh_code(39)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_39" onClick="javascript:wpsh_print(39)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_39" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Erlang (BEAM) emulator version 5.6.2 [source] [smp:2] [async-threads:0] [kernel-poll:false]
&nbsp;
Test exception 1 starting...
Test exception 1 finished: {'EXIT',
                               {undef,
                                   [{erlang,foo,[]},
                                    {exceptions,run,0},
                                    {init,start_it,1},
                                    {init,start_em,1}]}}</pre></div></div>
<p>and the process is still alive.</p>
<ul>
<li>Catching an exception with <code>try  catch</code>. The full syntax is something like this:</li>
</ul>
<div id="wpshdo_40" class="wp-synhighlighter-outer"><div id="wpshdt_40" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_40"></a><a id="wpshat_40" class="wp-synhighlighter-title" href="#codesyntax_40"  onClick="javascript:wpsh_toggleBlock(40)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_40" onClick="javascript:wpsh_code(40)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_40" onClick="javascript:wpsh_print(40)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_40" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="kw1">try</span> <a href="http://erlang.org/doc/man/erlang.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/erlang.html?referer=');"><span class="kw5">erlang</span></a>:<span class="re3">foo</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw1">of</span>
	<span class="re5">Any</span> <span class="sy1">-&gt;</span>
	    <span class="re5">Any</span>
    <span class="kw1">catch</span>
	error:<span class="me2">Reason</span> <span class="sy1">-&gt;</span>
	    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Error reason: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Reason</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">;</span>
	throw:<span class="me2">Reason</span> <span class="sy1">-&gt;</span>
	    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Throw reason: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Reason</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">;</span>
	exit:<span class="me2">Reason</span> <span class="sy1">-&gt;</span>
	    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Exit reason: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Reason</span><span class="br0">&#93;</span><span class="br0">&#41;</span>
    <span class="kw1">after</span>
	<a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Doing some stuff no matter what happened.~n&quot;</span><span class="br0">&#41;</span>
    <span class="kw1">end</span><span class="sy1">.</span></pre></div></div>
<p><code>try</code> executes the given function and return it&#8217;s value (which can be pattern matched) if everything&#8217;s OK, if an exception is generated it goes in the the matching <code>catch</code> clause. In any case, it then goes inside the <code>after</code> block (similar to <code>finally</code> in <a hreflang="en" href="http://en.wikipedia.org/wiki/Java_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Java_programming_language?referer=');">Java</a>).</p>
<p>Running the previous code output:</p>
<div id="wpshdo_41" class="wp-synhighlighter-outer"><div id="wpshdt_41" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_41"></a><a id="wpshat_41" class="wp-synhighlighter-title" href="#codesyntax_41"  onClick="javascript:wpsh_toggleBlock(41)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_41" onClick="javascript:wpsh_code(41)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_41" onClick="javascript:wpsh_print(41)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_41" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Error reason: undef
Doing some stuff no matter what happened.</pre></div></div>
<p>(Calling a function that does not exists throws an <code>error</code>)</p>
<p>As everything in Erlang, <code>try  catch</code> returns a value (the executed function, the return the matching clause or the return of the matching exception clause).</p>
<h5>Examples</h5>
<p>Let see more examples.</p>
<div id="wpshdo_42" class="wp-synhighlighter-outer"><div id="wpshdt_42" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_42"></a><a id="wpshat_42" class="wp-synhighlighter-title" href="#codesyntax_42"  onClick="javascript:wpsh_toggleBlock(42)" title="Click to show/hide code block">exceptions.erl</a></td><td align="right"><a href="#codesyntax_42" onClick="javascript:wpsh_code(42)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_42" onClick="javascript:wpsh_print(42)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_42" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="sy3">-</span><span class="re2">module</span><span class="br0">&#40;</span>exceptions<span class="br0">&#41;</span><span class="sy1">.</span>
<span class="sy3">-</span><span class="re2">compile</span><span class="br0">&#40;</span><span class="br0">&#91;</span>export_all<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span>
&nbsp;
<span class="re3">run</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="sy1">,</span> no_exception<span class="sy1">,</span> <span class="st_h">'catch'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">2</span><span class="sy1">,</span> no_exception<span class="sy1">,</span> <span class="st_h">'try'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">3</span><span class="sy1">,</span> <span class="st_h">'throw'</span><span class="sy1">,</span> <span class="st_h">'catch'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">4</span><span class="sy1">,</span> <span class="st_h">'throw'</span><span class="sy1">,</span> <span class="st_h">'try'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">5</span><span class="sy1">,</span> <span class="st_h">'exit'</span><span class="sy1">,</span> <span class="st_h">'catch'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">6</span><span class="sy1">,</span> <span class="st_h">'exit'</span><span class="sy1">,</span> <span class="st_h">'try'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">7</span><span class="sy1">,</span> <span class="st_h">'error'</span><span class="sy1">,</span> <span class="st_h">'catch'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run</span><span class="br0">&#40;</span><span class="nu0">8</span><span class="sy1">,</span> <span class="st_h">'error'</span><span class="sy1">,</span> <span class="st_h">'try'</span><span class="br0">&#41;</span><span class="sy1">,</span>
    ok<span class="sy1">.</span>
&nbsp;
<span class="re3">run</span><span class="br0">&#40;</span><span class="re5">ID</span><span class="sy1">,</span> <span class="re5">Exception_type</span><span class="sy1">,</span> <span class="re5">Handling_type</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;~p) Generating ~p, handled with ~p.~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">ID</span><span class="sy1">,</span> <span class="re5">Exception_type</span><span class="sy1">,</span> <span class="re5">Handling_type</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re5">Fun</span> <span class="sy3">=</span> <span class="kw1">fun</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="re3">exception</span><span class="br0">&#40;</span><span class="re5">Exception_type</span><span class="br0">&#41;</span> <span class="kw1">end</span><span class="sy1">,</span>
    <span class="re5">Result</span> <span class="sy3">=</span> <span class="re3">execute</span><span class="br0">&#40;</span><span class="re5">Handling_type</span><span class="sy1">,</span> <span class="re5">Fun</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;~p) Result: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">ID</span><span class="sy1">,</span> <span class="re5">Result</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span>
&nbsp;
<span class="re3">exception</span><span class="br0">&#40;</span>no_exception<span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="me1">ok</span><span class="sy1">;</span>
<span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'throw'</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw3">throw</span><span class="br0">&#40;</span><span class="st0">&quot;Throwed exception&quot;</span><span class="br0">&#41;</span><span class="sy1">;</span>
<span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'exit'</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw3">exit</span><span class="br0">&#40;</span><span class="st0">&quot;Exited&quot;</span><span class="br0">&#41;</span><span class="sy1">;</span>
<span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'error'</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <a href="http://erlang.org/doc/man/erlang.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/erlang.html?referer=');"><span class="kw5">erlang</span></a>:<span class="re3">error</span><span class="br0">&#40;</span><span class="st0">&quot;Error generated&quot;</span><span class="br0">&#41;</span><span class="sy1">.</span>
&nbsp;
<span class="re3">execute</span><span class="br0">&#40;</span><span class="st_h">'catch'</span><span class="sy1">,</span> <span class="re5">Fun</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="br0">&#40;</span><span class="kw1">catch</span> <span class="re5">F</span><span class="re3">un</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy1">;</span>
<span class="re3">execute</span><span class="br0">&#40;</span><span class="st_h">'try'</span><span class="sy1">,</span> <span class="re5">Fun</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw1">try</span> <span class="re5">F</span><span class="re3">un</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    <span class="kw1">catch</span>
	<span class="re5">Error</span>:<span class="me2">Reason</span> <span class="sy1">-&gt;</span>
	    <span class="br0">&#123;</span><span class="re5">Error</span><span class="sy1">,</span> <span class="re5">Reason</span><span class="br0">&#125;</span>
    <span class="kw1">end</span><span class="sy1">.</span></pre></div></div>
<p>Output:</p>
<div id="wpshdo_43" class="wp-synhighlighter-outer"><div id="wpshdt_43" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_43"></a><a id="wpshat_43" class="wp-synhighlighter-title" href="#codesyntax_43"  onClick="javascript:wpsh_toggleBlock(43)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_43" onClick="javascript:wpsh_code(43)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_43" onClick="javascript:wpsh_print(43)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_43" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">1) Generating no_exception, handled with 'catch'.
1) Result: ok
2) Generating no_exception, handled with 'try'.
2) Result: ok
3) Generating throw, handled with 'catch'.
3) Result: &quot;Throwed exception&quot;
4) Generating throw, handled with 'try'.
4) Result: {throw,&quot;Throwed exception&quot;}
5) Generating exit, handled with 'catch'.
5) Result: {'EXIT',&quot;Exited&quot;}
6) Generating exit, handled with 'try'.
6) Result: {exit,&quot;Exited&quot;}
7) Generating error, handled with 'catch'.
7) Result: {'EXIT',{&quot;Error generated&quot;,
                    [{exceptions,exception,1},
                     {exceptions,execute,2},
                     {exceptions,run,3},
                     {exceptions,run,0},
                     {init,start_it,1},
                     {init,start_em,1}]}}
8​) Generating error, handled with 'try'.
8​) Result: {error,&quot;Error generated&quot;}</pre></div></div>
<p>An interesting thing we can see here is that, in case of an <code>error</code>, <code>catch</code> get a stack trace which can be very useful for debugging but <code>try  catch</code> does not get it.</p>
<p>I prefer <code>try  catch</code> syntax (and it&#8217;s the recommended way to catch exceptions because you can choose what kind of exceptions you want to catch, <code>catch</code> catches everything) but it&#8217;s regrettable that it does not return the stack trace.</p>
<p>You can use <code>erlang:get_stacktrace</code> but it returns the stack trace from where you are calling it. If the exception is generated deep inside the function you are calling, <code>get_stacktrace</code> does not gives the root cause of the exception.</p>
<p>Having a stack trace is very useful but it make things a bit slower. I made a simple benchmark:</p>
<div id="wpshdo_44" class="wp-synhighlighter-outer"><div id="wpshdt_44" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_44"></a><a id="wpshat_44" class="wp-synhighlighter-title" href="#codesyntax_44"  onClick="javascript:wpsh_toggleBlock(44)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_44" onClick="javascript:wpsh_code(44)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_44" onClick="javascript:wpsh_print(44)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_44" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="re3">bench</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="re5">Throw_fun1</span> <span class="sy3">=</span> <span class="kw1">fun</span><span class="br0">&#40;</span><span class="re5">_</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="br0">&#40;</span><span class="kw1">catch</span> <span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'throw'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="kw1">end</span><span class="sy1">,</span>
    <span class="re5">Error_fun1</span> <span class="sy3">=</span> <span class="kw1">fun</span><span class="br0">&#40;</span><span class="re5">_</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="br0">&#40;</span><span class="kw1">catch</span> <span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'error'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="kw1">end</span><span class="sy1">,</span>
    <span class="re5">Throw_fun2</span> <span class="sy3">=</span> <span class="kw1">fun</span><span class="br0">&#40;</span><span class="re5">_</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="kw1">try</span> <span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'throw'</span><span class="br0">&#41;</span> <span class="kw1">catch</span> <span class="re5">Error</span>:<span class="me2">Reason</span> <span class="sy1">-&gt;</span> <span class="br0">&#123;</span><span class="re5">Error</span><span class="sy1">,</span> <span class="re5">Reason</span><span class="br0">&#125;</span> <span class="kw1">end</span> <span class="kw1">end</span><span class="sy1">,</span>
    <span class="re5">Error_fun2</span> <span class="sy3">=</span> <span class="kw1">fun</span><span class="br0">&#40;</span><span class="re5">_</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="kw1">try</span> <span class="re3">exception</span><span class="br0">&#40;</span><span class="st_h">'error'</span><span class="br0">&#41;</span> <span class="kw1">catch</span> <span class="re5">Error</span>:<span class="me2">Reason</span> <span class="sy1">-&gt;</span> <span class="br0">&#123;</span><span class="re5">Error</span><span class="sy1">,</span> <span class="re5">Reason</span><span class="br0">&#125;</span> <span class="kw1">end</span> <span class="kw1">end</span><span class="sy1">,</span>
    <span class="re5">Seq</span> <span class="sy3">=</span> <a href="http://erlang.org/doc/man/lists.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/lists.html?referer=');"><span class="kw5">lists</span></a>:<span class="re3">seq</span><span class="br0">&#40;</span>1<span class="sy1">,</span> 100000<span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/timer.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/timer.html?referer=');"><span class="kw5">timer</span></a>:<span class="re3">sleep</span><span class="br0">&#40;</span>1000<span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="br0">&#123;</span><span class="re5">Time_throw1</span><span class="sy1">,</span> <span class="re5">_</span><span class="br0">&#125;</span> <span class="sy3">=</span> <a href="http://erlang.org/doc/man/timer.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/timer.html?referer=');"><span class="kw5">timer</span></a>:<span class="re3">tc</span><span class="br0">&#40;</span>lists<span class="sy1">,</span> foreach<span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Throw_fun1</span><span class="sy1">,</span> <span class="re5">Seq</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="br0">&#123;</span><span class="re5">Time_error1</span><span class="sy1">,</span> <span class="re5">_</span><span class="br0">&#125;</span> <span class="sy3">=</span> <a href="http://erlang.org/doc/man/timer.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/timer.html?referer=');"><span class="kw5">timer</span></a>:<span class="re3">tc</span><span class="br0">&#40;</span>lists<span class="sy1">,</span> foreach<span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Error_fun1</span><span class="sy1">,</span> <span class="re5">Seq</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="br0">&#123;</span><span class="re5">Time_throw2</span><span class="sy1">,</span> <span class="re5">_</span><span class="br0">&#125;</span> <span class="sy3">=</span> <a href="http://erlang.org/doc/man/timer.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/timer.html?referer=');"><span class="kw5">timer</span></a>:<span class="re3">tc</span><span class="br0">&#40;</span>lists<span class="sy1">,</span> foreach<span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Throw_fun2</span><span class="sy1">,</span> <span class="re5">Seq</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="br0">&#123;</span><span class="re5">Time_error2</span><span class="sy1">,</span> <span class="re5">_</span><span class="br0">&#125;</span> <span class="sy3">=</span> <a href="http://erlang.org/doc/man/timer.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/timer.html?referer=');"><span class="kw5">timer</span></a>:<span class="re3">tc</span><span class="br0">&#40;</span>lists<span class="sy1">,</span> foreach<span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Error_fun2</span><span class="sy1">,</span> <span class="re5">Seq</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Throw (catch): ~p micro seconds~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Time_throw1</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Error (catch): ~p micro seconds~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Time_error1</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Throw (try): ~p micro seconds~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Time_throw2</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Error (try): ~p micro seconds~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Time_error2</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
    ok<span class="sy1">.</span></pre></div></div>
<p>Results (for 100 000 calls):</p>
<div id="wpshdo_45" class="wp-synhighlighter-outer"><div id="wpshdt_45" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_45"></a><a id="wpshat_45" class="wp-synhighlighter-title" href="#codesyntax_45"  onClick="javascript:wpsh_toggleBlock(45)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_45" onClick="javascript:wpsh_code(45)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_45" onClick="javascript:wpsh_print(45)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_45" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Throw (catch): 73920 micro seconds
Error (catch): 169576 micro seconds
Throw (try): 64118 micro seconds
Error (try): 63125 micro seconds</pre></div></div>
<p>Throwing an error or an exception take the same amount of time but using <code>catch</code> on an error is 2.5 times slower than using <code>try  catch</code> (my quick conclusion on that is because <code>catch</code> generates a stack trace).</p>
<p>I would like having only one way of catching exceptions (no <code>catch</code>, only <code>try  catch</code>) and a way to specify if I want a stack trace or not in case of error. Maybe something like this:</p>
<div id="wpshdo_46" class="wp-synhighlighter-outer"><div id="wpshdt_46" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_46"></a><a id="wpshat_46" class="wp-synhighlighter-title" href="#codesyntax_46"  onClick="javascript:wpsh_toggleBlock(46)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_46" onClick="javascript:wpsh_code(46)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_46" onClick="javascript:wpsh_print(46)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_46" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="kw1">try</span> <span class="re5">F</span><span class="re3">un</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
<span class="kw1">catch</span>
    <span class="re5">Error</span>:<span class="me2">Reason</span>:<span class="me2">Stack</span> <span class="sy1">-&gt;</span>
        <span class="br0">&#123;</span><span class="re5">Error</span>:<span class="me2">Reason</span>:<span class="me2">Stack</span><span class="br0">&#125;</span>
<span class="kw1">end</span><span class="sy1">.</span></pre></div></div>
<p>If a catch clause is waiting for 3 elements (<code>Error</code>, <code>Reason</code>, <code>Stack</code>), the compiler add the necessary stuff to call the <code>Fun</code> with a stack trace. If there are only 2 elements (<code>Error</code>, <code>Reason</code>), keep the actual behavior.</p>
<h5>Do we really need exceptions in Erlang?</h5>
<p>Exceptions may be useful but we can achieve the same goal in Erlang in other ways. Lots of functions have a signature like: <code>{ok, Value} | {error, Reason}</code>.</p>
<p>Those functions have different outputs between the normal case and the exceptional case. Combined with <code>case</code> we get the same behavior as catching an exception. If we don&#8217;t use <code>case</code>, we get a <code>badmatch</code> error.</p>
<div id="wpshdo_47" class="wp-synhighlighter-outer"><div id="wpshdt_47" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_47"></a><a id="wpshat_47" class="wp-synhighlighter-title" href="#codesyntax_47"  onClick="javascript:wpsh_toggleBlock(47)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_47" onClick="javascript:wpsh_code(47)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_47" onClick="javascript:wpsh_print(47)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_47" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="re3">case_way</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="re5">Fun</span> <span class="sy3">=</span> <span class="kw1">fun</span><span class="br0">&#40;</span>ok<span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="br0">&#123;</span>ok<span class="sy1">,</span> <span class="st0">&quot;It works&quot;</span><span class="br0">&#125;</span><span class="sy1">;</span>
	     <span class="br0">&#40;</span>nok<span class="br0">&#41;</span> <span class="sy1">-&gt;</span> <span class="br0">&#123;</span>error<span class="sy1">,</span> <span class="st0">&quot;It does not work&quot;</span><span class="br0">&#125;</span>
	  <span class="kw1">end</span><span class="sy1">,</span>
    <span class="re3">run_case</span><span class="br0">&#40;</span>1<span class="sy1">,</span> <span class="re5">Fun</span><span class="sy1">,</span> ok<span class="br0">&#41;</span><span class="sy1">,</span>
    <span class="re3">run_case</span><span class="br0">&#40;</span>2<span class="sy1">,</span> <span class="re5">Fun</span><span class="sy1">,</span> nok<span class="br0">&#41;</span><span class="sy1">,</span>
    ok<span class="sy1">.</span>
&nbsp;
<span class="re3">run_case</span><span class="br0">&#40;</span><span class="re5">ID</span><span class="sy1">,</span> <span class="re5">Fun</span><span class="sy1">,</span> <span class="re5">Arg</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw1">case</span> <span class="re5">F</span><span class="re3">un</span><span class="br0">&#40;</span><span class="re5">Arg</span><span class="br0">&#41;</span> <span class="kw1">of</span>
	<span class="br0">&#123;</span>error<span class="sy1">,</span> <span class="re5">Reason</span><span class="br0">&#125;</span> <span class="sy1">-&gt;</span>
	    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;~p) Error: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">ID</span><span class="sy1">,</span> <span class="re5">Reason</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">;</span>
	<span class="br0">&#123;</span>ok<span class="sy1">,</span> <span class="re5">Value</span><span class="br0">&#125;</span> <span class="sy1">-&gt;</span>
	    <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;~p) Value: ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">ID</span><span class="sy1">,</span> <span class="re5">Value</span><span class="br0">&#93;</span><span class="br0">&#41;</span>
    <span class="kw1">end</span><span class="sy1">.</span></pre></div></div>
<p>Running <code>case_way</code>:</p>
<div id="wpshdo_48" class="wp-synhighlighter-outer"><div id="wpshdt_48" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_48"></a><a id="wpshat_48" class="wp-synhighlighter-title" href="#codesyntax_48"  onClick="javascript:wpsh_toggleBlock(48)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_48" onClick="javascript:wpsh_code(48)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_48" onClick="javascript:wpsh_print(48)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_48" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">1) Value: &quot;It works&quot;
2) Error: &quot;It does not work&quot;</pre></div></div>
<p>Boons:</p>
<ul>
<li>Way much faster than exceptions (around 4 times faster according to my quick bench)</li>
<li>No specific syntax</li>
</ul>
<p>Banes:</p>
<ul>
<li>Normal case needs some encapsulation like <code>{ok, Value}</code> instead or returning <code>Value</code> directly (not doing so may lead to unknown states if the return is not pattern matched for errors)</li>
<li>No convention (you can return {exit, Type, Reason} if you want, or anything you want, developer needs to read carefully documentation of each function before using it)</li>
</ul>
<p>In <a hreflang="en" href="http://www.amazon.com/exec/obidos/ASIN/193435600X" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/exec/obidos/ASIN/193435600X?referer=');">Joe Armstrong&#8217;s book</a>, he says that usually people use <code>{error, Reason}</code> when an error occurs quite often and exceptions for less frequent errors. It makes sense, but I do not completely agree with <a hreflang="en" href="http://armstrongonsoftware.blogspot.com/" onclick="pageTracker._trackPageview('/outgoing/armstrongonsoftware.blogspot.com/?referer=');">Joe</a> on that matter. When you are developing a software for yourself (or you firm), you may know how your code is used so you know if an error occurs often or not. But when you are developing software for other developers, you don&#8217;t know how they are going to use it, it&#8217;s more difficult to &#8220;predict&#8221; if the error is going to be thrown often or not.</p>
<p>So I tend to prefer throwing exceptions (maybe I have used Java for too long). I think the added syntax is necessary in order to keep thing clear, homogeneous and easy to use. I would love seeing a version of Erlang without functions having a <code>{error, Reason}</code> thing in their return signature (but something like <code>throw(Reason)</code>).</p>
<p>Complete source code associated with this post (you can do whatever you want with it): <a href="http://blog.desgrange.net/wp-content/uploads/2009/01/exceptions.erl">exceptions.erl</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/01/05/exceptions-in-erlang/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TomTom</title>
		<link>http://blog.desgrange.net/2008/12/29/tomtom/</link>
		<comments>http://blog.desgrange.net/2008/12/29/tomtom/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[TomTom]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=638</guid>
		<description><![CDATA[I bought a TomTom XL 30-series as a Christmas gift for one of my relatives. TomTom XL specifications GPS receiver, navigation (no kidding ) TMC (traffic information) MapShare Speed cameras alerts TeleAtlas European maps 4.3 inches screen, which is 10.9 cm (why are we using a non-standard unit system for screen sizes?) Battery life: 3 [...]]]></description>
			<content:encoded><![CDATA[<p>I bought a <a hreflang="en" href="http://en.wikipedia.org/wiki/TomTom" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/TomTom?referer=');">TomTom</a> XL 30-series as a Christmas gift for one of my relatives.</p>
<h4>TomTom XL specifications</h4>
<ul>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/GPS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GPS?referer=');">GPS</a> receiver, navigation (no kidding <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Traffic_Message_Channel" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Traffic_Message_Channel?referer=');">TMC</a> (traffic information)</li>
<li><a href="http://www.tomtom.com/page/mapshare" onclick="pageTracker._trackPageview('/outgoing/www.tomtom.com/page/mapshare?referer=');">MapShare</a></li>
<li>Speed cameras alerts</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Tele_Atlas" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Tele_Atlas?referer=');">TeleAtlas</a> European maps</li>
<li>4.3 inches screen, which is 10.9 cm (why are we using a non-standard unit system for screen sizes?)</li>
<li>Battery life: 3 hours</li>
<li>Update maps with <a hreflang="en" href="http://en.wikipedia.org/wiki/TomTom_Home#TomTom_HOME" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/TomTom_Home_TomTom_HOME?referer=');">TomTom HOME</a> (computer software, TomTom XL can connect to it with an USB cable)</li>
<li>Documentation in French, Italian, Spanish and Portuguese (an other version of TomTom XL is sold in UK)</li>
</ul>
<h4>SatNav</h4>
<p>As everybody knows, this is the main feature of <a href="http://www.tomtom.com" onclick="pageTracker._trackPageview('/outgoing/www.tomtom.com?referer=');">TomTom</a>. Last time I used TomTom was at least 4 years ago and with this recent product I&#8217;m surprised to see that the user interface is still the same.</p>
<p>Even if it&#8217;s not useful when you are driving, there are several little things that could be done to polish the <a hreflang="en" href="http://en.wikipedia.org/wiki/User_interface" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/User_interface?referer=');">UI</a> a bit.</p>
<h4>TomTom HOME</h4>
<p>In the documentation (yes, sometimes I read it (well, only one or two pages)) it&#8217;s written to connect TomTom to the computer and follow the instructions. Of course this works only on <a hreflang="en" href="http://en.wikipedia.org/wiki/Windows" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Windows?referer=');">Windows</a> computers with <a hreflang="en" href="http://en.wikipedia.org/wiki/Autorun" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Autorun?referer=');">autorun</a> activated.</p>
<p>The nice feature is that you see TomTom like an USB key (called &#8220;NO NAME&#8221;, they should change that), and TomTom HOME installation software is in it (no need of a CD (well, it&#8217;s what I thought first)).</p>
<p>The content of the &#8220;USB key&#8221; is a bit messy, but you there are installation softwares right at the root. There is <code>InstallTomTomHOME.exe</code> for Windows, <code>TomTom HOME Install.app</code> for <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_OS_X" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_OS_X?referer=');">Mac OS X</a> and nothing for <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux?referer=');">Linux</a>, of course.</p>
<p>Let&#8217;s be clear about some things. TomTom devices run <a hreflang="en" href="http://kernel.org/" onclick="pageTracker._trackPageview('/outgoing/kernel.org/?referer=');">Linux</a> as their <a hreflang="en" href="http://en.wikipedia.org/wiki/Operating_system" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Operating_system?referer=');">operating system</a>, so there are Linux aware engineers at TomTom. TomTom HOME 2 mostly uses <a hreflang="en" href="http://en.wikipedia.org/wiki/Xulrunner" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Xulrunner?referer=');">XULRunner</a> (like <a hreflang="en" href="http://en.wikipedia.org/wiki/Firefox" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firefox?referer=');">Firefox</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Mozilla_Thunderbird" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mozilla_Thunderbird?referer=');">Thunderbird</a>) and <a hreflang="en" href="http://en.wikipedia.org/wiki/Java_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Java_programming_language?referer=');">Java</a> which are already <a hreflang="en" href="http://en.wikipedia.org/wiki/Cross-platform" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Cross-platform?referer=');">crossplatforms</a> (including Linux). So, having TomTom HOME running on Linux does not seem to be a hard task.</p>
<p>Anyway, let&#8217;s try the Mac OS X version.</p>
<h5>TomTom HOME installation</h5>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_01.png"><img class="aligncenter size-medium wp-image-812" title="tomtom_01" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_01-300x174.png" alt="" width="300" height="174" /></a></p>
<p>The installation software ask you to download the software from the internet or to install it from a CD or DVD. This is the first thing you see when launching the installation software. Let&#8217;s download it.</p>
<p>TomTom HOME is downloaded then installed and launched. TomTom XL is regnized as a TomTom GO. The installed version is 1.5. So a few seconds after it asks to install the new version.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_03.png"><img class="aligncenter size-medium wp-image-813" title="tomtom_03" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_03-300x222.png" alt="" width="300" height="222" /></a></p>
<p>Let&#8217;s upgrade to TomTom HOME 2.2 as written. I click on it, it opens a small window, which is obviously TomTom&#8217;s website, click on TomTom HOME, and download TomTom HOME 2.5 (!) for Mac OS X. Of course I got a error message.</p>
<p>Let&#8217;s close TomTom HOME, open Safari and goes to TomTom HOME website by myself. 42.4 MB to download. Standard installation process. Launched it, it works.</p>
<p>During the installation process, a word popped to my mind several times, this word is &#8220;morons&#8221;. Lot&#8217;s of stupid things that can make the task difficult for a standard computer user.</p>
<ul>
<li>First, the CD/DVD or download question. The software should be included in the TomTom device, so no CD/DVD (in fact they are not provided) or internet connection needed. If the software is not up to date, it will check that itself like lots of softwares do nowadays.</li>
<li>The installation software installs TomTom HOME 1.5! TomTom 1.5 supports devices that are not supported in TomTom 2.x, but only a few. The last version (at build time) should be embedded in the device, except for not supported ones (which should have TomTom HOME 1.5).</li>
</ul>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_04.png"><img class="aligncenter size-full wp-image-814" title="tomtom_04" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_04.png" alt="" width="400" height="200" /></a></p>
<ul>
<li>The installation software download TomTom HOME 1.5 in the user&#8217;s home directory, install it but forgot to delete the temporary file.</li>
<li>TomTom HOME 1.5 is crappy in many ways. First it asks silly questions like this one:</li>
</ul>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_02.png"><img class="aligncenter size-full wp-image-816" title="tomtom_02" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_02.png" alt="" width="474" height="146" /></a></p>
<p>If you are not fluent in English (well I&#8217;m not and in France it&#8217;s mandatory that computer softwares are translated to French) you may think: why asking me if I live in USA or Canada, I&#8217;m in Europe, and how can I answer this question with &#8220;Yes&#8221; or &#8220;No&#8221; (OK, maybe all users are not that dumb <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>Then the upgrade does not work.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_05.png"><img class="aligncenter size-full wp-image-817" title="tomtom_05" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_05.png" alt="" width="400" height="300" /></a></p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_06.png"><img class="aligncenter size-full wp-image-815" title="tomtom_06" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_06.png" alt="" width="400" height="200" /></a></p>
<p>So why giving to much difficulties to the users when TomTom HOME 2.5 seems to work way much better (with a standard installation process)?</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_07.png"><img class="aligncenter size-full wp-image-818" title="tomtom_07" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_07.png" alt="" width="460" height="302" /></a></p>
<p>TomTom XL has 2 GB of memory, 500 MB available. TomTom HOME 1 is about 15 MB, TomTom HOME 2 about 42 MB. So there is enough place to put version 1 and 2 of Windows and Mac OS X versions in the device.</p>
<h5>Quick look at the software</h5>
<p>When you launch it, TomTom HOME 2.5 first try to find updates for your device, if any it will ask you if you want to update your device.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_08.png"><img class="aligncenter size-medium wp-image-819" title="tomtom_08" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_08-300x215.png" alt="" width="300" height="215" /></a></p>
<p>The interface use the same kind of user interface as the device. I understand the idea, but I&#8217;m not sure interacting with a touch device and a computer should be done the same way, but here there are no difficult tasks, so it does not hurt. The main drawback of this choice is that you get an application that have a different behavior than the other applications on your computer.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_09.png"><img class="aligncenter size-medium wp-image-820" title="tomtom_09" src="http://blog.desgrange.net/wp-content/uploads/2008/12/tomtom_09-300x215.png" alt="" width="300" height="215" /></a></p>
<p>The software is easy to use, some tasks requires to create an account on TomTom website.</p>
<p>Backuping the device is incredibly slow.</p>
<p>Each time I launch TomTom HOME there are stuff to update. Why not doing all of them at once?</p>
<p>Well, in fact, after using it a bit, it seems that the update process is a bit buggy (or at least not crystal clear).</p>
<h5>Linux</h5>
<p>So, how to have it working on Linux?</p>
<p>I don&#8217;t know <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . Here are some hints on how to achieve it:</p>
<ul>
<li>Some versions of TomTom HOME 1 works with Wine.</li>
<li>Install a virtual machine (<a hreflang="en" href="http://en.wikipedia.org/wiki/Xen" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Xen?referer=');">xen</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Virtualbox" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Virtualbox?referer=');">VirtualBox</a>) and install Windows on it.</li>
<li>Send emails to TomTom to ask them to provide a Linux version.</li>
</ul>
<p>I sent an email to TomTom&#8217;s support, their answer was: &#8220;We don&#8217;t get any information about future Linux compatibility before the information is officially released on TomTom&#8217;s website.&#8221;.</p>
<p>Sorry to not being helpful here. I&#8217;m stuck too.</p>
<h4>Anything good?</h4>
<p>I can&#8217;t say that I&#8217;m amazed by the quality of TomTom&#8217;s products (XL, HOME). The hardware looks great, robust, not the software. TomTom HOME is quite crappy (even version 2.5), the embedded navigation software is quite OK, does not have a very sexy UI, but at least it seems to work correctly enough.</p>
<p>On the plus side, TomTom respect <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source_software" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source_software?referer=');">Open Source</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Free_software" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Free_software?referer=');">Free Software</a> licenses. <a href="http://www.tomtom.com/page.php?Page=gpl" onclick="pageTracker._trackPageview('/outgoing/www.tomtom.com/page.php?Page=gpl&amp;referer=');">You can find sources of the free softwares they use on there web site with the patches they made to them</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/12/29/tomtom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Object Oriented Programming</title>
		<link>http://blog.desgrange.net/2008/12/22/object-oriented-programming/</link>
		<comments>http://blog.desgrange.net/2008/12/22/object-oriented-programming/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=637</guid>
		<description><![CDATA[Programming languages use different paradigms, nowadays the most used is the Object Oriented paradigm. Object Oriented Programming was an attempt to simplify the creation of softwares because they were more and more complex. The idea was to model the software with objects (a car for example) with some attributes (it has wheels, a motor, etc.) [...]]]></description>
			<content:encoded><![CDATA[<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Programming_language" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Programming_language?referer=');">Programming languages</a> use different <a hreflang="en" href="http://en.wikipedia.org/wiki/Programming_paradigm" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Programming_paradigm?referer=');">paradigms</a>, nowadays the most used is the <a hreflang="en" href="http://en.wikipedia.org/wiki/Object-oriented_programming" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Object-oriented_programming?referer=');">Object Oriented paradigm</a>. Object Oriented Programming was an attempt to simplify the creation of <a hreflang="en" href="http://en.wikipedia.org/wiki/Software" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Software?referer=');">softwares</a> because they were more and more complex.</p>
<p>The idea was to model the software with objects (a car for example) with some attributes (it has wheels, a motor, etc.) and some methods (start, move forward, etc.). Objects alone are not enough, they need to be able to communicate with each other by sending messages.</p>
<p>I have worked for several years with <a hreflang="en" href="http://en.wikipedia.org/wiki/Java_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Java_programming_language?referer=');">Java</a>, a well known OOP language, and I&#8217;m now working with <a hreflang="en" href="http://en.wikipedia.org/wiki/Erlang_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Erlang_programming_language?referer=');">Erlang</a>, a <a hreflang="en" href="http://en.wikipedia.org/wiki/Functional_programming" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Functional_programming?referer=');">functional language</a>.</p>
<p>A functional language has functions as first class citizens. Functions should be stateless, they get some parameters and return a deterministic result. Seems not enough to design complex softwares.</p>
<p>An other feature of Erlang is the <a hreflang="en" href="http://en.wikipedia.org/wiki/Concurrent_computing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Concurrent_computing?referer=');">concurrent paradigm</a>. It allows the language to do a lot of tasks in parallel. At first, most people think about this feature has a great tool to distribute calculation and/or use all the <a hreflang="en" href="http://en.wikipedia.org/wiki/Multi-core" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Multi-core?referer=');">cores</a> of a modern <a hreflang="en" href="http://en.wikipedia.org/wiki/CPU" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/CPU?referer=');">CPU</a> with no burden. I thought the same thing. But this is not the aim of Erlang. Concurrent processes are used for software design. A process is a system, mostly representing a real life system, sending and receiving messages from other processes.</p>
<p>After using Erlang for a while (I&#8217;m not a very fast thinker, or maybe I just don&#8217;t think too often <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ), I realized that Erlang is the most Object Oriented Language I have ever seen.</p>
<p>It matches the definition of OOP more than any other language. Objects are processes (with an internal state) talking to each others by sending messages.</p>
<p>Why? Because Erlang allows you to have several thousands threads (objects) running simultaneously, where other languages allows you to have several thousand objects running in few concurrent threads (so if you have X threads, only X objects are running simultaneously). In Erlang objects are really independent from each others, while in languages like C++, C# or Java, objects are executed sequentially.</p>
<p>Interestingly, if they share the same base idea, those languages need a completely different approach. One of the big differences is that talking between objects in Erlang is done by passing messages while it&#8217;s done by methods calls in traditional OOP languages.</p>
<p>In those languages we do not deal very often with multiple threads and we tend to not have threads talking with each others because it needs locks and synchronization. Erlang deals with that very easily.</p>
<p>So in an OOP language like Java, when a thread dies, a lot of objects dies, maybe the whole software, that&#8217;s may be not so bad (kind of <a hreflang="en" href="http://en.wikipedia.org/wiki/Fail_Fast" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Fail_Fast?referer=');">fail fast</a> approach). In Erlang, when a process dies, it&#8217;s just an object, everything else is still running (when a car crash, the neighborhood does not disappear), but this can lead to some unknown state (imagine a firm where the boss dies and nobodies notice it (and are glad to not receive orders anymore <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )). Erlang provides some tools to manage that. Processes can be linked together, when a process dies, it sends a death note (sorry <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) to processes it was linked to. When a process receives such a message, if it does not know how to handle it, it dies too (my wife is dead, I&#8217;m lost, I must commit suicide), but of course it may know what to do with the message, like restarting a process like the dead one (let&#8217;s find a new wife). In Erlang&#8217;s libraries there are such modules, called supervisors, specialized in re-spawning a process when it dies. It may looks like overhead, but I think it&#8217;s very useful to create robust and fault-tolerant applications.</p>
<p>Anyway, I have the feeling that in the Erlang&#8217;s community, there is a strong opinion against OOP. I think I will have understood how to design softwares in Erlang faster if people told me first that Erlang is true OOP and why and how. Moreover, it may bring more people to Erlang to develop the language and reduce the number of people asking for such and such OOP feature that are already in Erlang but not the way they are thinking about it.</p>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Ralph_Johnson" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ralph_Johnson?referer=');">Ralph Johnson</a> has an interesting (and short enough) article about <a hreflang="en" href="http://www.cincomsmalltalk.com/userblogs/ralph/blogView?entry=3364027251" onclick="pageTracker._trackPageview('/outgoing/www.cincomsmalltalk.com/userblogs/ralph/blogView?entry=3364027251&amp;referer=');">Erlang being the next Java</a>.</p>
<p><a hreflang="en" href="http://www.planeterlang.org/story.php?title=Thinking_About_Concurrency_Oriented_Programming" onclick="pageTracker._trackPageview('/outgoing/www.planeterlang.org/story.php?title=Thinking_About_Concurrency_Oriented_Programming&amp;referer=');">Same thing was discussed on PlanetErlang</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/12/22/object-oriented-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erlang hot swapping</title>
		<link>http://blog.desgrange.net/2008/12/01/erlang-hot-swapping/</link>
		<comments>http://blog.desgrange.net/2008/12/01/erlang-hot-swapping/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=634</guid>
		<description><![CDATA[I started using the erlang programming language few months ago. Erlang is a wonderful language if you want to do reliable, distributed, highly concurrent, fault-tolerant, soft-real-time, highly available, hot swapping applications . So, today I will give you a glimpse on one cool functionality of Erlang: the ability to update your code without stopping your [...]]]></description>
			<content:encoded><![CDATA[<p>I started using the <a hreflang="en" href="http://en.wikipedia.org/wiki/Erlang_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Erlang_programming_language?referer=');">erlang</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Programming_language" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Programming_language?referer=');">programming language</a> few months ago. <a hreflang="en" href="http://www.erlang.org/" onclick="pageTracker._trackPageview('/outgoing/www.erlang.org/?referer=');">Erlang</a> is a wonderful language if you want to do reliable, <a hreflang="en" href="http://en.wikipedia.org/wiki/Distributed_computing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Distributed_computing?referer=');">distributed</a>, highly <a hreflang="en" href="http://en.wikipedia.org/wiki/Concurrent_computing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Concurrent_computing?referer=');">concurrent</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Fault_tolerance" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Fault_tolerance?referer=');">fault-tolerant</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Soft_real-time" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Soft_real-time?referer=');">soft-real-time</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/High_availability" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/High_availability?referer=');">highly available</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Hot_swapping" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Hot_swapping?referer=');">hot swapping</a> applications <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>So, today I will give you a glimpse on one cool functionality of Erlang: the ability to update your code without stopping your application. Here it&#8217;s just about how it works for a process (the principle is the same for an application except that you have much more things to take into account when you have several thousands process talking to each other).</p>
<h5>THE CODE</h5>
<p>We are going to use a simple piece of code. We want a server thread listening for messages (each message is printed on the console with a sequence number), and a client thread, sending a message to the server every second. Here is the code (I usually don&#8217;t use comments but I put some here because you may not understand erlang code):</p>
<div id="wpshdo_49" class="wp-synhighlighter-outer"><div id="wpshdt_49" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_49"></a><a id="wpshat_49" class="wp-synhighlighter-title" href="#codesyntax_49"  onClick="javascript:wpsh_toggleBlock(49)" title="Click to show/hide code block">code_reload.erl</a></td><td align="right"><a href="#codesyntax_49" onClick="javascript:wpsh_code(49)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_49" onClick="javascript:wpsh_print(49)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_49" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;"><span class="sy3">-</span><span class="re2">module</span><span class="br0">&#40;</span>code_reload<span class="br0">&#41;</span><span class="sy1">.</span> <span class="co1">% This is the module declaration.</span>
<span class="sy3">-</span><span class="re2">export</span><span class="br0">&#40;</span><span class="br0">&#91;</span>start_server<span class="sy3">/</span><span class="nu0">0</span><span class="sy1">,</span> start_client<span class="sy3">/</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span> <span class="co1">% Exporting functions allow them to be called from outside the module.</span>
<span class="sy3">-</span><span class="re2">export</span><span class="br0">&#40;</span><span class="br0">&#91;</span>server_loop<span class="sy3">/</span>1<span class="sy1">,</span> client_loop<span class="sy3">/</span>1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span>
&nbsp;
<span class="re3">start_server</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw3">spawn</span><span class="br0">&#40;</span>?<span class="re4">MODULE</span><span class="sy1">,</span> server_loop<span class="sy1">,</span> <span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span> <span class="co1">% This function calls the server_loop function in a new thread.</span>
&nbsp;
<span class="re3">server_loop</span><span class="br0">&#40;</span><span class="re5">Count</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw1">receive</span> <span class="co1">% Wait for messages</span>
        <span class="br0">&#123;</span><span class="re5">From</span><span class="sy1">,</span> quit<span class="br0">&#125;</span> <span class="sy1">-&gt;</span>
            <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Received quit command from ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">From</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
            ok<span class="sy1">;</span>
        <span class="br0">&#123;</span><span class="re5">From</span><span class="sy1">,</span> <span class="re5">Message</span><span class="br0">&#125;</span> <span class="sy1">-&gt;</span>
            <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;~p: Server received message ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">Count</span><span class="sy1">,</span> <span class="kw3">self</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy1">,</span> <span class="re5">Message</span><span class="sy1">,</span> <span class="re5">From</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span> <span class="co1">% Display the message we received.</span>
            ?<span class="re4">MODULE</span>:<span class="re3">server_loop</span><span class="br0">&#40;</span><span class="re5">Count</span><span class="br0">&#41;</span><span class="sy1">;</span> <span class="co1">% Call the same function again to wait for an other message.</span>
    	<span class="re5">_</span> <span class="sy1">-&gt;</span>
            <span class="kw3">throw</span><span class="br0">&#40;</span>unexpected_message<span class="br0">&#41;</span>
    <span class="kw1">end</span><span class="sy1">.</span>
&nbsp;
<span class="re3">start_client</span><span class="br0">&#40;</span><span class="re5">ServerPid</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw3">spawn</span><span class="br0">&#40;</span>?<span class="re4">MODULE</span><span class="sy1">,</span> client_loop<span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">ServerPid</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">.</span>
&nbsp;
<span class="re3">client_loop</span><span class="br0">&#40;</span><span class="re5">ServerPid</span><span class="br0">&#41;</span> <span class="sy1">-&gt;</span>
    <span class="kw1">receive</span>
        <span class="br0">&#123;</span><span class="re5">From</span><span class="sy1">,</span> quit<span class="br0">&#125;</span> <span class="sy1">-&gt;</span>
            <a href="http://erlang.org/doc/man/io.html" onclick="pageTracker._trackPageview('/outgoing/erlang.org/doc/man/io.html?referer=');"><span class="kw5">io</span></a>:<span class="re3">fwrite</span><span class="br0">&#40;</span><span class="st0">&quot;Received quit command from ~p~n&quot;</span><span class="sy1">,</span> <span class="br0">&#91;</span><span class="re5">From</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy1">,</span>
            ok
    <span class="kw1">after</span> <span class="nu0">1000</span> <span class="sy1">-&gt;</span> <span class="co1">% If no messages were received after 1 second, send a message to the server.</span>
            <span class="re5">ServerPid</span> <span class="sy3">!</span> <span class="br0">&#123;</span><span class="kw3">self</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy1">,</span> <span class="kw3">now</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#125;</span><span class="sy1">,</span>
            ?<span class="re4">MODULE</span>:<span class="re3">client_loop</span><span class="br0">&#40;</span><span class="re5">ServerPid</span><span class="br0">&#41;</span>
    <span class="kw1">end</span><span class="sy1">.</span></pre></div></div>
<p>Let&#8217;s start an erlang shell:</p>
<div id="wpshdo_50" class="wp-synhighlighter-outer"><div id="wpshdt_50" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_50"></a><a id="wpshat_50" class="wp-synhighlighter-title" href="#codesyntax_50"  onClick="javascript:wpsh_toggleBlock(50)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_50" onClick="javascript:wpsh_code(50)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_50" onClick="javascript:wpsh_print(50)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_50" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ erl
Erlang (BEAM) emulator version 5.6.2 [source] [smp:2] [async-threads:0] [kernel-poll:false]
&nbsp;
Eshell V5.6.2  (abort with ^G)
1&gt; c(code_reload). % This compile the module code_reload.
{ok,code_reload}
2&gt; ServerPid = code_reload:start_server(). % Start the server and assign the server process id to the variable ServerPid.
&lt;0.37.0&gt;
3&gt; ClientPid = code_reload:start_client(ServerPid).
&lt;0.39.0&gt;
0: Server &lt;0.65.0&gt; received message {1211,11183,231032} from &lt;0.67.0&gt;
0: Server &lt;0.65.0&gt; received message {1211,11184,232031} from &lt;0.67.0&gt;
0: Server &lt;0.65.0&gt; received message {1211,11185,233029} from &lt;0.67.0&gt;
0: Server &lt;0.65.0&gt; received message {1211,11186,234031} from &lt;0.67.0&gt;
0: Server &lt;0.65.0&gt; received message {1211,11187,235030} from &lt;0.67.0&gt;</pre></div></div>
<p>We can see the server printing the messages. But oups, there is a bug! I forgot to increment the counter so each line start with &#8220;0&#8243; instead of an incrementing number.</p>
<p>Let&#8217;s change the following line in the code:</p>
<div id="wpshdo_51" class="wp-synhighlighter-outer"><div id="wpshdt_51" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_51"></a><a id="wpshat_51" class="wp-synhighlighter-title" href="#codesyntax_51"  onClick="javascript:wpsh_toggleBlock(51)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_51" onClick="javascript:wpsh_code(51)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_51" onClick="javascript:wpsh_print(51)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_51" class="wp-synhighlighter-inner" style="display: block;"><pre class="erlang" style="font-family:monospace;">?<span class="re4">MODULE</span>:<span class="re3">server_loop</span><span class="br0">&#40;</span><span class="re5">Count</span> <span class="sy3">+</span> 1<span class="br0">&#41;</span><span class="sy1">;</span></pre></div></div>
<p>We need to go back to the shell and compile the new code:</p>
<div id="wpshdo_52" class="wp-synhighlighter-outer"><div id="wpshdt_52" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_52"></a><a id="wpshat_52" class="wp-synhighlighter-title" href="#codesyntax_52"  onClick="javascript:wpsh_toggleBlock(52)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_52" onClick="javascript:wpsh_code(52)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_52" onClick="javascript:wpsh_print(52)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_52" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">4&gt; c(code_reload).
{ok,code_reload}
0: Server &lt;0.65.0&gt; received message {1211,11188,236023} from &lt;0.67.0&gt;
0: Server &lt;0.65.0&gt; received message {1211,11189,237031} from &lt;0.67.0&gt;
1: Server &lt;0.65.0&gt; received message {1211,11190,238021} from &lt;0.67.0&gt;
2: Server &lt;0.65.0&gt; received message {1211,11191,239031} from &lt;0.67.0&gt;
3: Server &lt;0.65.0&gt; received message {1211,11192,240018} from &lt;0.67.0&gt;
4: Server &lt;0.65.0&gt; received message {1211,11193,241022} from &lt;0.67.0&gt;
5: Server &lt;0.65.0&gt; received message {1211,11194,242021} from &lt;0.67.0&gt;
6: Server &lt;0.65.0&gt; received message {1211,11195,243031} from &lt;0.67.0&gt;</pre></div></div>
<p>Ah! It&#8217;s better, the message number is growing as expected. Notice that the threads are still the same (<code>&lt;0.65.0&gt;</code> for the server and <code>&lt;0.67.0&gt;</code> for the client).</p>
<p>There is no black magic here. The main part of the code is a loop. The server function is <code>server_loop</code> and it calls itself with <code>?MODULE:server_loop(…)</code>. The process is running inside the old version of the code, and when we call <code>server_loop</code> again, the new call is send to the new version of the code.</p>
<p>Be careful, this happens only because we call the function that way <code>?MODULE:server_loop</code> (<code>code_reload:server_loop</code> also works). Hot upgrade does not work if we call <code>server_loop</code> directly with going through the module again. This allows you to control where and when code reloading is done.</p>
<p>Now we can send a quit message to the client and the server:</p>
<div id="wpshdo_53" class="wp-synhighlighter-outer"><div id="wpshdt_53" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_53"></a><a id="wpshat_53" class="wp-synhighlighter-title" href="#codesyntax_53"  onClick="javascript:wpsh_toggleBlock(53)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_53" onClick="javascript:wpsh_code(53)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_53" onClick="javascript:wpsh_print(53)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_53" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">5&gt; ClientPid ! {self(), quit}.
Received quit command from &lt;0.30.0&gt;
{&lt;0.30.0&gt;,quit}
6&gt; ServerPid ! {self(), quit}.
Received quit command from &lt;0.76.0&gt;
{&lt;0.76.0&gt;,quit}</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/12/01/erlang-hot-swapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kubuntu 8.10</title>
		<link>http://blog.desgrange.net/2008/11/03/kubuntu-8-10/</link>
		<comments>http://blog.desgrange.net/2008/11/03/kubuntu-8-10/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=631</guid>
		<description><![CDATA[Last week Kubuntu 8.10 was released. Like OpenBSD, there is a new release every 6 months. Kubuntu is a Linux distribution based on Ubuntu (which is based on Debian). Kubuntu is Ubuntu but the default desktop environment is KDE instead of Gnome. The big improvement compared to Kubuntu 8.04 is the new version of KDE [...]]]></description>
			<content:encoded><![CDATA[<p>Last week <a hreflang="en" href="http://en.wikipedia.org/wiki/Kubuntu" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Kubuntu?referer=');">Kubuntu</a> 8.10 was released. Like <a hreflang="en" href="http://en.wikipedia.org/wiki/Openbsd" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Openbsd?referer=');">OpenBSD</a>, there is a new release every 6 months.</p>
<p><a hreflang="en" href="http://www.kubuntu.org/" onclick="pageTracker._trackPageview('/outgoing/www.kubuntu.org/?referer=');">Kubuntu</a> is a <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux?referer=');">Linux</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux_distribution" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux_distribution?referer=');">distribution</a> based on <a hreflang="en" href="http://en.wikipedia.org/wiki/Ubuntu" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ubuntu?referer=');">Ubuntu</a> (which is based on <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a>). Kubuntu is <a hreflang="en" href="http://www.ubuntu.com/" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/?referer=');">Ubuntu</a> but the default <a hreflang="en" href="http://en.wikipedia.org/wiki/Desktop_environment" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Desktop_environment?referer=');">desktop environment</a> is <a hreflang="en" href="http://en.wikipedia.org/wiki/Kde" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Kde?referer=');">KDE</a> instead of <a hreflang="en" href="http://en.wikipedia.org/wiki/GNOME" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GNOME?referer=');">Gnome</a>.</p>
<p>The big improvement compared to Kubuntu 8.04 is the new version of <a hreflang="en" href="http://www.kde.org/" onclick="pageTracker._trackPageview('/outgoing/www.kde.org/?referer=');">KDE</a> (4.1 instead of 3.x). KDE 4 is a major rewrite of KDE with a lot of improvements. Version 4.0 was mostly aiming at developers but version 4.1 is now suitable for regular users.</p>
<h5>Installation</h5>
<p>I downloaded the CD on <a hreflang="en" href="http://en.wikipedia.org/wiki/BitTorrent_(protocol)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/BitTorrent_protocol?referer=');">BitTorrent</a> and installed it on a <a hreflang="en" href="http://en.wikipedia.org/wiki/Virtual_machine" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Virtual_machine?referer=');">virtual machine</a> (with <a hreflang="en" href="http://en.wikipedia.org/wiki/Sun_Microsystems" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Sun_Microsystems?referer=');">Sun</a>&#8216;s <a hreflang="en" href="http://en.wikipedia.org/wiki/Virtualbox" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Virtualbox?referer=');">VirtualBox</a>).</p>
<p>The CD allows you to boot on the <a hreflang="en" href="http://en.wikipedia.org/wiki/Live_CD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Live_CD?referer=');">live CD</a>, and install Kubuntu from the live CD, or to directly start the installation process.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_01.png"><img class="aligncenter size-medium wp-image-764" title="k810_01" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_01-300x225.png" alt="" width="300" height="225" /></a></p>
<p>Only few questions are asked :</p>
<ul>
<li>Your language (Kubuntu is translated in a lot of different languages).</li>
<li>Your <a hreflang="en" href="http://en.wikipedia.org/wiki/Time_zone" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Time_zone?referer=');">time zone</a>.</li>
<li>Your <a hreflang="en" href="http://en.wikipedia.org/wiki/Keyboard_layout" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Keyboard_layout?referer=');">keyboard layout</a>.</li>
<li>How to set up your hard drive (since I wanted to use the full disk, I just had to click on <code>next</code>, this is the only tricky part of the installation)</li>
<li>Your name, login and the name you want to give to your computer.</li>
</ul>
<p>Then the installation start. <a hreflang="en" href="http://en.wikipedia.org/wiki/Disk_partitioning" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Disk_partitioning?referer=');">Disk partitioning</a>, formatting, packages installation. You just have to wait.</p>
<p>At the end, reboot, that&#8217;s done.</p>
<h5>First boot</h5>
<p>The boot screen is still the same, with the same progress bar as in previous versions.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_02.png"><img class="aligncenter size-medium wp-image-765" title="k810_02" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_02-300x225.png" alt="" width="300" height="225" /></a></p>
<p>The new login screen is very nice (well, I like it) except the list of the users on the left (providing a default picture for each user should fill that blank part and make it better looking).</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_03.png"><img class="aligncenter size-medium wp-image-766" title="k810_03" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_03-300x225.png" alt="" width="300" height="225" /></a></p>
<p>Then you have to wait a bit more while KDE is loading your session (nice loading animation).</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_04.png"><img class="aligncenter size-medium wp-image-767" title="k810_04" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_04-300x225.png" alt="" width="300" height="225" /></a></p>
<p>At least, the desktop.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_05.png"><img class="aligncenter size-medium wp-image-768" title="k810_05" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_05-300x225.png" alt="" width="300" height="225" /></a></p>
<p>No more icons on the desktop. All the files that were on it are now displayed on the &#8220;Desktop&#8221; plasmoid. <a hreflang="en" href="http://en.wikipedia.org/wiki/Plasma_(KDE)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Plasma_KDE?referer=');">Plasmoids</a> are KDE&#8217;s <a hreflang="en" href="http://en.wikipedia.org/wiki/Applet" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Applet?referer=');">applets</a>, equivalent of Mac OS&#8217;s widgets or Windows Vista&#8217;s gadgets.</p>
<p>Not long after you logged in, a notification tells that updates are already available. So let&#8217;s have a look.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_07.png"><img class="aligncenter size-medium wp-image-769" title="k810_07" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_07-300x225.png" alt="" width="300" height="225" /></a></p>
<p>Adept is launched. It&#8217;s the graphical software you will use to install or remove softwares and upgrade installed softwares.</p>
<p>The interface is way much better than the one provided in the previous version of Kubuntu.</p>
<p>Let&#8217;s have a look at the K menu.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_11.png"><img class="aligncenter size-medium wp-image-770" title="k810_11" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_11-300x227.png" alt="" width="300" height="227" /></a></p>
<p><a href="/public/kubuntu/k810_12.png"><br />
</a><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_12.png"><img class="aligncenter size-medium wp-image-771" title="k810_12" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_12-300x227.png" alt="" width="300" height="227" /></a></p>
<p>Interesting, everything is displayed in the same window, there are no sub-menus opening on the side. It&#8217;s cleaner, not sure if it&#8217;s very useful. They have done a lot of usability tests on it, but the gain is not obvious. Anyway, I usually don&#8217;t use the K menu (maybe that&#8217;s why I don&#8217;t see all the improvements in it <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>I have tried a beta version few month ago and there was a thing a bit better, I didn&#8217;t had to click to move between the panels. After a quick look (right click on the K menu), there are some options : use the classic menu (for those who don&#8217;t like the new one), and change panels without clicking. KDE was known to have a lot of options everywhere, this version kept that spirit.</p>
<p>Right next to the K menu is an &#8220;home&#8221; folder icon. A click on it will allow you to quickly navigate inside your home folder.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_10.png"><img class="aligncenter size-medium wp-image-772" title="k810_10" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_10-300x227.png" alt="" width="300" height="227" /></a></p>
<p>In KDE, a piece a software was central for the user: <a hreflang="en" href="http://en.wikipedia.org/wiki/Konqueror" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Konqueror?referer=');">Konqueror</a>. Konqueror was used as a web browser but it was also used as a file manager. Konqueror is very versatile, with a huge amount of options. You can browse web pages, your local hard drive, any disks, <a hreflang="en" href="http://en.wikipedia.org/wiki/FTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FTP?referer=');">FTP</a>, remote <a hreflang="en" href="http://en.wikipedia.org/wiki/Ssh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ssh?referer=');">SSH</a>/<a hreflang="en" href="http://en.wikipedia.org/wiki/SSH_file_transfer_protocol" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SSH_file_transfer_protocol?referer=');">SFTP</a>, audio CD (even extract music from audio CD in the simplest way I have ever seen), all that the same way.</p>
<p>In the late version of KDE 3, a new file manager called <a hreflang="en" href="http://en.wikipedia.org/wiki/Dolphin_(software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Dolphin_software?referer=');">Dolphin</a>. At first I didn&#8217;t understand why. There was no lawsuit against KDE forcing them to separate the file manager from the web browser <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , and Konqueror was just fine.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_13.png"><img class="aligncenter size-medium wp-image-773" title="k810_13" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_13-300x228.png" alt="" width="300" height="228" /></a></p>
<p>After using <a hreflang="en" href="http://dolphin.kde.org/" onclick="pageTracker._trackPageview('/outgoing/dolphin.kde.org/?referer=');">Dolphin</a> a bit, I have to admit that it&#8217;s great. Focusing on mostly one task: browse files, Dolphin is a simpler tool, pleasant to use. However, Konqueror is still used as the web browser.</p>
<p>I said that I do not use the K menu a lot. At least, I don&#8217;t use it to launch applications. I know the name of the applications I want to use, and using the keyboard can be faster than the mouse. On KDE 3, I used an application call <a hreflang="en" href="http://en.wikipedia.org/wiki/Katapult" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Katapult?referer=');">Katapult</a>. Hit a keyboard shortcut, a window appear, start typing the name of the application. Katapult list applications whose name is starting with the same letters. Hit enter and the application is launched. Very fast and convenient way to launch applications.</p>
<p>In KDE 4, no need for Katapult anymore. KRunner has been given the same functionality (hit Alt+F2 to launch it).</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_14.png"><img class="aligncenter size-medium wp-image-774" title="k810_14" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_14-300x227.png" alt="" width="300" height="227" /></a></p>
<p>A lot more can be told about KDE 4, the amount of changes is impressive. I installed it on a virtual machine, now I want to install it on a real computer, to see the full potential of it, to be able to play with all the new stuff using graphic acceleration (not available on my VM <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> ).</p>
<p>Let&#8217;s switch it off for now.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_15.png"><img class="aligncenter size-medium wp-image-775" title="k810_15" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_15-300x225.png" alt="" width="300" height="225" /></a></p>
<p><a href="/public/kubuntu/k810_16.png"><br />
</a><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_16.png"><img class="aligncenter size-medium wp-image-776" title="k810_16" src="http://blog.desgrange.net/wp-content/uploads/2008/11/k810_16-300x227.png" alt="" width="300" height="227" /></a></p>
<p>I used KDE 4.1 just for few hours but I think it&#8217;s a very cool desktop environment. There are still some glitches, some improvements can be done, but it&#8217;s already very nice.</p>
<p>KDE 4.2 is already under heavy development, more improvements are coming.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/11/03/kubuntu-8-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenBSD 4.4</title>
		<link>http://blog.desgrange.net/2008/11/01/openbsd-4-4/</link>
		<comments>http://blog.desgrange.net/2008/11/01/openbsd-4-4/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 12:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=630</guid>
		<description><![CDATA[Every 6 months, the new version of OpenBSD is released (on May 1 and November 1). OpenBSD is known to be the most secure operating system, and that&#8217;s why I use it as a router/firewall (on my fit-PC). OpenBSD 4.4 Today&#8217;s version is 4.4. New stuff in this release: More platforms supported, better support for [...]]]></description>
			<content:encoded><![CDATA[<p>Every 6 months, the new version of <a hreflang="en" href="http://openbsd.org/" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/?referer=');">OpenBSD</a> is released (on May 1 and November 1).</p>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Openbsd" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Openbsd?referer=');">OpenBSD</a> is known to be the most secure <a hreflang="en" href="http://en.wikipedia.org/wiki/Operating_system" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Operating_system?referer=');">operating system</a>, and that&#8217;s why I use it as a <a hreflang="en" href="http://en.wikipedia.org/wiki/Router" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Router?referer=');">router</a>/<a hreflang="en" href="http://en.wikipedia.org/wiki/Firewall" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firewall?referer=');">firewall</a> (on my <a href="/2008/09/16/fit-pc/">fit-PC</a>).</p>
<h4>OpenBSD 4.4</h4>
<p>Today&#8217;s version is 4.4. New stuff in this release:</p>
<ul>
<li>More platforms supported, better support for some existing ones.</li>
<li>Lots of drivers updates.</li>
<li>Updated shipped softwares (like <a hreflang="en" href="http://en.wikipedia.org/wiki/Openssh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Openssh?referer=');">OpenSSH</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Openssl" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Openssl?referer=');">OpenSSL</a>).</li>
<li>Lots of improvements.</li>
</ul>
<p>You can also have a look to the <a hreflang="en" href="http://openbsd.org/plus44.html" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/plus44.html?referer=');">full list of changes</a>.</p>
<h4>Upgrade</h4>
<p>Upgrading OpenBSD is very easy. In my case I downloaded the installation ISO, burned it on a CD and booted on it.</p>
<p>After some questions (for most of them I just had to press <code>enter</code>), a check disk, 10 minutes to copy the files and reboot, the system was up again, working fine.</p>
<p>Upgrading took 20 minutes in total (from the moment I powered down the router and the moment it was operational with the new version). Most of the time was used to copy and install files, boot and disk check (the fit-PC is not a very fast computer). The upgrade software asked me around 15 questions, most of them the default value was the right one, for some other I had to enter either <code>yes</code> or <code>done</code>, that&#8217;s all.</p>
<h4>Theme and Song</h4>
<p>Each version of OpenBSD has a theme. For 4.4 it&#8217;s inspired by <a hreflang="en" href="http://en.wikipedia.org/wiki/Star_wars" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Star_wars?referer=');">Star Wars</a>:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/11/44_SourceWars.jpg"><img class="aligncenter size-full wp-image-756" title="BSD41_Sleeve.indd" src="http://blog.desgrange.net/wp-content/uploads/2008/11/44_SourceWars.jpg" alt="" width="227" height="343" /></a></p>
<p>And with every release, there is a song: &#8220;Trial of the BSD Knights&#8221; (sounds a bit like <a href="http://www.last.fm/music/John+Williams/_/Cantina+Band" onclick="pageTracker._trackPageview('/outgoing/www.last.fm/music/John+Williams/_/Cantina+Band?referer=');">Cantina Band</a>).</p>
<div style="text-align: center;">
<audio controls="true"><br />
<source src="/wp-content/uploads/2008/11/44_Song.oga" type="audio/ogg; codecs=vorbis" /><br />
<source src="/wp-content/uploads/2008/11/44_Song.mp3" type="audio/mp3" /><br />
<a href="/wp-content/uploads/2008/11/44_Song.oga">Download song.</a><br />
</audio>
</div>
<p><a hreflang="en" href="http://openbsd.org/lyrics.html#44" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/lyrics.html_44?referer=');">Lyrics are available</a> as well as the songs files (as <a hreflang="en" href="http://en.wikipedia.org/wiki/Mp3" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mp3?referer=');">MP3</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Ogg_vorbis" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ogg_vorbis?referer=');">OGG Vorbis</a>).</p>
<h4>Donations</h4>
<p>OpenBSD is a very good operating system, <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source?referer=');">open source</a>, all that for free.</p>
<p>You can help them by coding, filling bug reports, translating documentation, giving hardware to developers, buying <a hreflang="en" href="http://openbsd.org/items.html#44" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/items.html_44?referer=');">OpenBSD CDROM</a>, <a hreflang="en" href="http://openbsd.org/items.html#audio" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/items.html_audio?referer=');">audio CD</a>, or simply by <a hreflang="en" href="http://openbsd.org/donations.html" onclick="pageTracker._trackPageview('/outgoing/openbsd.org/donations.html?referer=');">giving money</a>.</p>
<p>I had my first OpenBSD by buying the <a hreflang="en" href="http://www.openbsd.org/34.html" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/34.html?referer=');">OpenBSD 3.4</a> CDROM 5 years ago (I also bought a <a hreflang="en" href="http://www.openbsd.org/tshirts.html#17" onclick="pageTracker._trackPageview('/outgoing/www.openbsd.org/tshirts.html_17?referer=');">T-shirt</a>).</p>
<p>This year I gave a small amount of money via <a hreflang="en" href="http://en.wikipedia.org/wiki/Paypal" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Paypal?referer=');">PayPal</a>.</p>
<p>Helping them will help the overall security of the internet. Several tools from OpenBSD are now widely used on other operating system (like <a hreflang="en" href="http://www.openssh.com/" onclick="pageTracker._trackPageview('/outgoing/www.openssh.com/?referer=');">OpenSSH</a> which his now shipped with nearly all <a hreflang="en" href="http://en.wikipedia.org/wiki/Unix-like" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Unix-like?referer=');">*nix</a> systems (including <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a>&#8216;s <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_os_x" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_os_x?referer=');">Mac OS X</a>)).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/11/01/openbsd-4-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.desgrange.net/wp-content/uploads/2008/11/44_Song.ogg" length="4628329" type="audio/ogg" />
<enclosure url="http://blog.desgrange.net/wp-content/uploads/2008/11/44_Song.oga" length="4628329" type="audio/ogg" />
		</item>
		<item>
		<title>Keyboards and layouts</title>
		<link>http://blog.desgrange.net/2008/10/20/keyboards-and-layouts/</link>
		<comments>http://blog.desgrange.net/2008/10/20/keyboards-and-layouts/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=626</guid>
		<description><![CDATA[When using eXtreme Programming (XP) as software methodology, you often get a lot of problems to put it in place (management does not agree, some developers are reluctant). But what you might not expect is having tiny annoying problems with keyboards. One of the techniques pushed by XP is pair programming. This implies having two [...]]]></description>
			<content:encoded><![CDATA[<p>When using <a hreflang="en" href="http://en.wikipedia.org/wiki/Extreme_Programming" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Extreme_Programming?referer=');">eXtreme Programming</a> (XP) as software methodology, you often get a lot of problems to put it in place (management does not agree, some developers are reluctant). But what you might not expect is having tiny annoying problems with <a hreflang="en" href="http://en.wikipedia.org/wiki/Keyboard_(computing)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Keyboard_computing?referer=');">keyboards</a>.</p>
<p>One of the techniques pushed by XP is <a hreflang="en" href="http://en.wikipedia.org/wiki/Pair_programming" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Pair_programming?referer=');">pair programming</a>. This implies having two <a hreflang="en" href="http://en.wikipedia.org/wiki/Software_developer" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Software_developer?referer=');">developers</a> working together in front of the same computer.</p>
<p>At any moment only one developer is writing code (this is the driver) and the other one is reviewing the code, giving advices, making sure that the code written by the driver is following the design rules of the project, etc. (this is the navigator).</p>
<p>But the roles between the two developers switch frequently, or the navigator needs to write a little piece of code to show to the driver, so the keyboard is moving a lot between both of them.</p>
<p>Sometimes we end up having two keyboards plugged in the computer, one for each of them, like this:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/10/pair_programming.jpg"><img class="aligncenter size-full wp-image-747" title="pair_programming" src="http://blog.desgrange.net/wp-content/uploads/2008/10/pair_programming.jpg" alt="" width="480" height="360" /></a></p>
<p>Teams are frequently composed with people coming from different countries and having different habits and so many different <a hreflang="en" href="http://en.wikipedia.org/wiki/Keyboard_layout" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Keyboard_layout?referer=');">keyboards layouts</a>. I worked with an Irish guy using an American qwerty keyboard with an English layout (or vice versa), in France we usually use French azerty keyboards with French layout but I’m using an Apple international English qwerty keyboard with international English qwerty layout.</p>
<p>So each time you start pair programming you have to look at what kind of keyboard you are going to use (if it’s not yours) and what layout is used (and maybe change the layout each time one the developer start writing).</p>
<p>What I find annoying here is that even with two keyboards, you have to switch the layout because the <a hreflang="en" href="http://en.wikipedia.org/wiki/Operating_system" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Operating_system?referer=');">operating system</a> uses only one layout at a time. I have seen the same behavior on <a hreflang="en" href="http://en.wikipedia.org/wiki/Microsoft_Windows" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Microsoft_Windows?referer=');">Microsoft Windows</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux?referer=');">GNU/Linux</a> and even <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_OS_X" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_OS_X?referer=');">Mac OS X</a>.</p>
<p>I’m wondering why layouts are not bound with keyboards. Maybe not a strict binding like keyboard A use only layout A and keyboard B use only layout B, but a list of layouts and the keyboards are bound with the last layout they where used with.</p>
<p>Maybe pair programmers are not very common, but I think that we are not the only ones with that problem. <a hreflang="en" href="http://news.cnet.com/PC-milestone--notebooks-outsell-desktops/2100-1047_3-5731417.html" onclick="pageTracker._trackPageview('/outgoing/news.cnet.com/PC-milestone--notebooks-outsell-desktops/2100-1047_3-5731417.html?referer=');">More and more laptops are sold</a>, and quite often people use a desktop keyboard while using the laptop at home. They have to change the layout only once, but I’m sure we should avoid that (and on some operating system the task is really not easy the first time).</p>
<p>There are also programmable keyboards. On such keyboards you can change the code sent by each key when typing and create your own layouts. Maybe those kind of keyboards will solve the problem but they are expensive and hard to find.</p>
<p><a hreflang="en" href="http://www.artlebedev.com" onclick="pageTracker._trackPageview('/outgoing/www.artlebedev.com?referer=');">Art Lebedev</a> created the <a hreflang="en" href="http://www.artlebedev.com/everything/optimus/" onclick="pageTracker._trackPageview('/outgoing/www.artlebedev.com/everything/optimus/?referer=');">Optimus Maximus programmable keyboard</a> where each key is an <a hreflang="en" href="http://en.wikipedia.org/wiki/Oled" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Oled?referer=');">oled</a> display. Here they solved an other problem: having one unique <q>universal</q> keyboard. It can be used with azerty layout, qwerty layout or anything you can imagine and each key display the characters which is going to be written.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2008/10/optimus_maximus.jpg"><img class="aligncenter size-full wp-image-748" title="optimus_maximus" src="http://blog.desgrange.net/wp-content/uploads/2008/10/optimus_maximus.jpg" alt="" width="640" height="240" /></a></p>
<p>Among others, a thing I find very interesting in the <a hreflang="en" href="http://en.wikipedia.org/wiki/Optimus_Maximus_keyboard" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Optimus_Maximus_keyboard?referer=');">Optimus Maximus</a> is the software to configure the keyboard :</p>
<p><a style="text-decoration: none;" href="http://blog.desgrange.net/wp-content/uploads/2008/10/optimus_configurator.jpg"><img class="aligncenter size-full wp-image-749" title="optimus_configurator" src="http://blog.desgrange.net/wp-content/uploads/2008/10/optimus_configurator.jpg" alt="" width="620" height="406" /></a></p>
<p>It provides a nice interface to configure layouts. I would like that kind of interface to configure my keyboards, since they are seldom recognized correctly, some keys are always wrong, or the behavior is not exactly what I want and finding the right layout in a big list is painful.</p>
<p>Here is the scenario I would like to have:</p>
<ul>
<li>I have a computer with an azerty keyboard plugged in and configured.</li>
<li>I plug a <em>new</em> keyboard on my computer.</li>
<li>A configuration window should open asking to type some keys in order to detect which kind of layout is configured (like Mac OS X does).</li>
<li>If it’s recognized as a qwerty keyboard, each time I type something on the keyboard the layout switch to qwerty.</li>
<li>If I type on the azerty keyboard, the azerty layout is used.</li>
<li>When using the qwerty keyboard I should be able to switch to an other layout, azerty for example. The last layout used for a given keyboard is bound to it until I change it.</li>
<li>A nice interface like <a hreflang="en" href="http://www.artlebedev.com/everything/optimus/downloads/" onclick="pageTracker._trackPageview('/outgoing/www.artlebedev.com/everything/optimus/downloads/?referer=');">Optimus Configurator</a> should allow me to fine tune my layouts.</li>
</ul>
<p>As far as I have seen until now, mainstream operating systems assume that a lot of things are unique. This situation started to change few years ago, now we can plug several keyboards, mice, screens on the same computer, but the software doing the configuration has not evolved a lot. The most common thing is having several screens. If you already tried to configure multiple screens, you may have found that it’s quite easy on Mac OS X, it’s hard on Windows and it’s really painful on Linux. The worst thing I have seen is some software considering that multiple screens equals 2 screens, with 3 screens it’s just not working and clearly not designed for. But most of the time, you can have only one keyboard/mouse configuration (you can’t have several mice with different speed configurations).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/10/20/keyboards-and-layouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>En vrac</title>
		<link>http://blog.desgrange.net/2008/10/17/en-vrac/</link>
		<comments>http://blog.desgrange.net/2008/10/17/en-vrac/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=625</guid>
		<description><![CDATA[Je reprends un peu le principe de Tristan Nitot pour les billets &#8220;En vrac&#8221;. Linus Torvalds s&#8217;essaye au blog. S&#8217;il décide de continuer, ce sera certainement un blog à suivre, surtout pour son côté très direct à donner son opinion. Manque plus que Theo de Raadt se fasse un blog lui aussi. Apple vient de [...]]]></description>
			<content:encoded><![CDATA[<p>Je reprends un peu le principe de <a hreflang="fr" href="http://standblog.org/blog/" onclick="pageTracker._trackPageview('/outgoing/standblog.org/blog/?referer=');">Tristan Nitot</a> pour les billets <em>&#8220;En vrac&#8221;</em>.</p>
<ul>
<li><a hreflang="fr" href="http://fr.wikipedia.org/wiki/Linus_Torvalds" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Linus_Torvalds?referer=');">Linus Torvalds</a> s&#8217;essaye au <a hreflang="en" href="http://torvalds-family.blogspot.com" onclick="pageTracker._trackPageview('/outgoing/torvalds-family.blogspot.com?referer=');">blog</a>. S&#8217;il décide de continuer, ce sera certainement un blog à suivre, surtout pour son côté <em>très direct</em> à donner son opinion. Manque plus que <a hreflang="fr" href="http://fr.wikipedia.org/wiki/Theo_de_Raadt" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Theo_de_Raadt?referer=');">Theo de Raadt</a> se fasse un blog lui aussi.</li>
<li><a hreflang="fr" href="http://fr.wikipedia.org/wiki/Apple" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Apple?referer=');">Apple</a> vient de sortir ses nouveaux <a hreflang="fr" href="http://fr.wikipedia.org/wiki/MacBook" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/MacBook?referer=');">MacBook</a> et <a hreflang="fr" href="http://fr.wikipedia.org/wiki/MacBook_Pro" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/MacBook_Pro?referer=');">MacBook Pro</a> taillé dans l&#8217;alu. Intéressant de voir que pendant la présentation ils ont passé beaucoup de temps à montrer comment les ordinateurs étaient fabriqués, ce qui n&#8217;est pas dans leurs habitudes ni dans ce qui intéressait leurs cibles jusqu&#8217;à présent. Un signe de plus de la migration d&#8217;un plus large panel de personnes vers les machines d&#8217;Apple ?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/10/17/en-vrac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RAID-5 software sous GNU/Linux</title>
		<link>http://blog.desgrange.net/2008/10/10/raid-5-software-sous-gnulinux/</link>
		<comments>http://blog.desgrange.net/2008/10/10/raid-5-software-sous-gnulinux/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[RAID 5]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=622</guid>
		<description><![CDATA[Petit tutorial pour monter rapidement un système en RAID-5 sous linux. Rappel sur le RAID-5 RAID signifie &#8220;Redundant Array of Inexpensive/Independent Disks&#8221;. Le but de cette technologie est d&#8217;améliorer la tolérance aux pannes d&#8217;un système de stockage en utilisant plusieurs disques durs vus comme un seul. Dans le cas du RAID-5, il est possible de [...]]]></description>
			<content:encoded><![CDATA[<p>Petit tutorial pour monter rapidement un système en RAID-5 sous <a hreflang="fr" href="http://fr.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Linux?referer=');">linux</a>.</p>
<h2>Rappel sur le RAID-5</h2>
<p><a hreflang="fr" href="http://fr.wikipedia.org/wiki/RAID_(informatique)" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/RAID_informatique?referer=');">RAID</a> signifie &#8220;Redundant Array of Inexpensive/Independent Disks&#8221;. Le but de cette technologie est d&#8217;améliorer la tolérance aux pannes d&#8217;un système de stockage en utilisant plusieurs disques durs vus comme un seul.</p>
<p>Dans le cas du <a hreflang="fr" href="http://fr.wikipedia.org/wiki/RAID_(informatique)#RAID_5_:_volume_agr.C3.A9g.C3.A9_par_bandes_.C3.A0_parit.C3.A9_r.C3.A9partie" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/RAID_informatique_RAID_5_volume_agr.C3.A9g.C3.A9_par_bandes_.C3.A0_parit.C3.A9_r.C3.A9partie?referer=');">RAID-5</a>, il est possible de perdre un disque sans pour autant perdre des données. La perte d&#8217;un deuxième disque entraînerait, par contre, la perte de l&#8217;intégralité des données.</p>
<p>Le RAID-5 nécessite un minimum de 3 partitions de tailles identiques (réparties sur 3 disques différents). La taille utile du disque résultant (l&#8217;espace disque vu par l&#8217;utilisateur) est la somme des tailles des partitions moins une (soit : <code>(nombre de paritions - 1) * taille d'une partition</code>).</p>
<h2>Préliminaires</h2>
<p>La <a hreflang="fr" href="http://fr.wikipedia.org/wiki/Distribution_Linux" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Distribution_Linux?referer=');">distribution linux</a> utilisée est <a hreflang="fr" href="http://fr.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/fr.wikipedia.org/wiki/Debian?referer=');">Debian</a>, il vous sera donc nécessaire d&#8217;adapter ceci en fonction de celle que vous utilisez.</p>
<p>Le disque RAID créé n&#8217;est pas utilisé comme disque système.</p>
<p>Pour commencer, munissez-vous de plusieurs disques de taille identique (ici 4 disques de 500 Go) et montez les un par un dans votre ordinateur. Surtout pensez bien à identifier vos disques au fur et à mesure que vous les installez. Vous devez notez leur nom logique vu par <a hreflang="en" href="http://www.kernel.org/" onclick="pageTracker._trackPageview('/outgoing/www.kernel.org/?referer=');">linux</a> et leur correspondance avec le disque physique. Ces informations vous seront utiles en cas de panne, linux vous indiquera le nom logique du disque en panne et vous devrez être capable de le repérer pour le changer.</p>
<p>Vous pouvez par exemple noter l&#8217;&#8221;id&#8221; ou le &#8220;path&#8221; de chaque disque lorsque vous les installez (d&#8217;où l&#8217;intérêt de les installer un par un) :</p>
<div id="wpshdo_54" class="wp-synhighlighter-outer"><div id="wpshdt_54" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_54"></a><a id="wpshat_54" class="wp-synhighlighter-title" href="#codesyntax_54"  onClick="javascript:wpsh_toggleBlock(54)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_54" onClick="javascript:wpsh_code(54)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_54" onClick="javascript:wpsh_print(54)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_54" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ ls -l /dev/disk/by-id/↵
total 0
lrwxrwxrwx 1 root root  9 2008-01-20 12:45 ata-SAMSUNG_HD501LJ-S0MUJ1MPC01769 -&gt; ../../sdc
lrwxrwxrwx 1 root root  9 2008-01-20 12:45 ata-SAMSUNG_HD501LJ-S0MUJ1MPC01770 -&gt; ../../sde
lrwxrwxrwx 1 root root  9 2008-01-20 12:45 ata-SAMSUNG_HD501LJ-S0MUJ1MPC01771 -&gt; ../../sdb
(…)
&nbsp;
$ ls -l /dev/disk/by-path/↵
total 0
lrwxrwxrwx 1 root root  9 2008-01-20 12:45 pci-0000:00:12.0-scsi-0:0:0:0 -&gt; ../../sdd
lrwxrwxrwx 1 root root  9 2008-01-20 12:45 pci-0000:00:12.0-scsi-1:0:0:0 -&gt; ../../sde
lrwxrwxrwx 1 root root  9 2008-01-20 12:45 pci-0000:01:00.0-scsi-0:0:0:0 -&gt; ../../sdb
(…)</pre></div></div>
<p><strong>Note :</strong> Le &#8220;path&#8221; dépend du branchement du disque. Si vous débranchez un disque pour le brancher sur une autre prise, son &#8220;path&#8221; changera.</p>
<p>Une fois tous les disques installés, il faut créer une partition de type &#8220;Linux raid autodetect&#8221; :</p>
<div id="wpshdo_55" class="wp-synhighlighter-outer"><div id="wpshdt_55" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_55"></a><a id="wpshat_55" class="wp-synhighlighter-title" href="#codesyntax_55"  onClick="javascript:wpsh_toggleBlock(55)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_55" onClick="javascript:wpsh_code(55)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_55" onClick="javascript:wpsh_print(55)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_55" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo fdisk /dev/sde↵
n↵ (crée une nouvelle partition)
p↵ (partition primaire)
1↵ (partition primaire numéro 1, accepter ensuite les tailles par défaut pour utiliser la totalité du disque)
t↵ (changer le type de partition)
Hex code (type L to list codes): fd↵ (change le type de partition pour &quot;Linux raid autodetect&quot;)
w↵ (écrit la table de partition sur le disque et quitte fdisk)</pre></div></div>
<p>Cette manipulation est donc à répéter sur chacun des disques (les miens étant <code>/dev/sdb</code> à <code>/dev/sde</code>).</p>
<h2>Action</h2>
<p>Entrons maintenant dans le vif du sujet, la création du disque en RAID-5.</p>
<p>Pour ce faire vous devez avoir l&#8217;utilitaire <code>mdadm</code>, à installer avec la commande suivante si vous ne l&#8217;avez pas :</p>
<div id="wpshdo_56" class="wp-synhighlighter-outer"><div id="wpshdt_56" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_56"></a><a id="wpshat_56" class="wp-synhighlighter-title" href="#codesyntax_56"  onClick="javascript:wpsh_toggleBlock(56)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_56" onClick="javascript:wpsh_code(56)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_56" onClick="javascript:wpsh_print(56)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_56" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install mdadm↵</pre></div></div>
<p>Création du d&#8217;un disque en RAID-5 logiciel à partir de mes 4 disques sdb, sdc, sdd et sde :</p>
<div id="wpshdo_57" class="wp-synhighlighter-outer"><div id="wpshdt_57" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_57"></a><a id="wpshat_57" class="wp-synhighlighter-title" href="#codesyntax_57"  onClick="javascript:wpsh_toggleBlock(57)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_57" onClick="javascript:wpsh_code(57)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_57" onClick="javascript:wpsh_print(57)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_57" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1↵</pre></div></div>
<p>Voilà, c&#8217;est fini.</p>
<h2>Conclusion</h2>
<p>Les préliminaires sont toujours plus long.</p>
<p>Plus sérieusement, un disque &#8220;virtuel&#8221; a été créé (ici c&#8217;est /dev/md0). C&#8217;est ce disque qu&#8217;il faut monter (et formater) pour profiter de votre tout nouveau disque RAID.</p>
<p>Pour vérifier son état :</p>
<div id="wpshdo_58" class="wp-synhighlighter-outer"><div id="wpshdt_58" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_58"></a><a id="wpshat_58" class="wp-synhighlighter-title" href="#codesyntax_58"  onClick="javascript:wpsh_toggleBlock(58)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_58" onClick="javascript:wpsh_code(58)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_58" onClick="javascript:wpsh_print(58)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_58" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mdadm --detail /dev/md0↵
/dev/md0:
        Version : 00.90.03
  Creation Time : Sat Jan 19 17:03:46 2008
     Raid Level : raid5
     Array Size : 1465151808 (1397.28 GiB 1500.32 GB)
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent
&nbsp;
    Update Time : Sun Jan 20 15:49:00 2008
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
&nbsp;
         Layout : left-symmetric
     Chunk Size : 64K
&nbsp;
           UUID : 02918692:35547ed8:6ec71e01:ff96950c
         Events : 0.34
&nbsp;
    Number   Major   Minor   RaidDevice State
       0       8       49        0      active sync   /dev/sdd1
       1       8       65        1      active sync   /dev/sde1
       2       8        1        2      active sync   /dev/sdc1
       3       8       17        3      active sync   /dev/sdb1</pre></div></div>
<p>Il est important que la ligne &#8220;State&#8221; affiche &#8220;clean&#8221; et que la colonne &#8220;State&#8221; affiche &#8220;active sync&#8221; pour chaque disque. Juste après la création du volume RAID, l&#8217;état doit ressembler à &#8220;clean, degraded, recovering&#8221;, c&#8217;est normal, le système est en train de synchroniser les disques entre eux (cette étape peut être assez longue, quelques heures avant d&#8217;arriver à &#8220;clean&#8221;). Pour voir l&#8217;avancement de la synchronisation :</p>
<div id="wpshdo_59" class="wp-synhighlighter-outer"><div id="wpshdt_59" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_59"></a><a id="wpshat_59" class="wp-synhighlighter-title" href="#codesyntax_59"  onClick="javascript:wpsh_toggleBlock(59)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_59" onClick="javascript:wpsh_code(59)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_59" onClick="javascript:wpsh_print(59)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_59" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ cat /proc/mdstat↵</pre></div></div>
<p>Maintenant il fait surveiller l&#8217;état du disque régulièrement, il ne faut pas attendre qu&#8217;il ne marche plus pour s&#8217;inquiéter, il sera déjà trop tard (2 disques seront déjà tombés).</p>
<p>Par défaut (voir le fichier <code>/etc/mdadm/mdadm.conf</code>) mdadm envoi un mail à l&#8217;utilisateur &#8220;root&#8221; en cas de problème, je vous conseille de configurer cette propriété pour que le mail soit envoyé à une adresse email que vous lisez régulièrement.</p>
<p>Lorsque le système est &#8220;clean&#8221;, vous pouvez stopper un des disques pour simuler une panne, vérifier que vous recevez bien une alerte par email. Redémarrez ensuite le disque (et attendez plusieurs heures le temps que le système redevienne &#8220;clean&#8221;) :</p>
<div id="wpshdo_60" class="wp-synhighlighter-outer"><div id="wpshdt_60" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_60"></a><a id="wpshat_60" class="wp-synhighlighter-title" href="#codesyntax_60"  onClick="javascript:wpsh_toggleBlock(60)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_60" onClick="javascript:wpsh_code(60)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_60" onClick="javascript:wpsh_print(60)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_60" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mdadm /dev/md0 --fail /dev/sdb1↵ (déclare le disque sdb1 &quot;en panne&quot;)
$ sudo mdadm /dev/md0 --add /dev/sdb1↵ (ajoute le disque sdb1 au système RAID, la synchronisation reprend immédiatement)</pre></div></div>
<p>Je vous conseille fortement de lire la documentation pour bien comprendre comment tout fonctionne.</p>
<p>Si vous avez déjà un volume RAID en place et que vous voulez l&#8217;étendre en rajoutant un disque, apparemment c&#8217;est possible : <a hreflang="en" href="http://scotgate.org/?p=107" onclick="pageTracker._trackPageview('/outgoing/scotgate.org/?p=107&amp;referer=');">http://scotgate.org/?p=107</a>.</p>
<p>Bon courage.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2008/10/10/raid-5-software-sous-gnulinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

