<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>steve's blog</title>
	<link>http://blog.steve.ch</link>
	<description></description>
	<pubDate>Wed, 05 Aug 2009 12:14:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>kde 4.3</title>
		<link>http://blog.steve.ch/2009/08/05/kde-43/</link>
		<comments>http://blog.steve.ch/2009/08/05/kde-43/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 11:57:35 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<category><![CDATA[kde]]></category>

		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2009/08/05/kde-43/</guid>
		<description><![CDATA[I&#8217;ve been using KDE 4.2 as daily desktop environment since beginning of February and for me it has been a huge improvement over the initial KDE releases. There were some small issues between minor-updates but overall everything was quite stable and ok.
Today Arch Linux updated the KDE desktop packages to 4.3 and I&#8217;m really really [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using KDE 4.2 as daily desktop environment since beginning of February and for me it has been a huge improvement over the initial KDE releases. There were some small issues between minor-updates but overall everything was quite stable and ok.</p>
<p>Today Arch Linux updated the KDE desktop packages to 4.3 and I&#8217;m really really impressed.</p>
<p>Everything feels snappier, loads and renders faster. Konqueror displays sites WAY faster. Kwin also leaves a better impression. Here and there some eye candy got added, but always in non distracting ways. Generally, the desktop elements feel more mature and are kept out of my way (e.g the notification messages).</p>
<p>The few rendering issues I had in the past (the <em>&#8220;ExaOptimizeMigration&#8221;</em> stuff) disappeared as well.</p>
<p>Great release!</p>
<p>Adding emacs 23 released last week, I&#8217;m really pleased with my current desktop.</p>
<p><strike>2005</strike>,<strike>2006</strike>,<strike>2007</strike>,<strike>2008</strike>,<strike>2009</strike>,2010: The year of the linux desktop ;)</p>
<p><a href='http://blog.steve.ch/wp-content/snapshot.png' title='KDE 4.3 Screenshot'><img src='http://blog.steve.ch/wp-content/snapshot.png' alt='KDE 4.3 Screenshot' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2009/08/05/kde-43/feed/</wfw:commentRss>
		</item>
		<item>
		<title>trac 2 tex</title>
		<link>http://blog.steve.ch/2009/06/03/trac-2-tex/</link>
		<comments>http://blog.steve.ch/2009/06/03/trac-2-tex/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 12:18:41 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2009/06/03/trac-2-tex/</guid>
		<description><![CDATA[During our Thesis my team mate and I use a Trac setup as management tool. Needless to say we use LaTeX to write our documentation. Recently we wanted to import some  Wiki pages into existing tex documents. But it turned out the two formats can not be easily converted.
I couldn&#8217;t find a conversion script [...]]]></description>
			<content:encoded><![CDATA[<p>During our Thesis my <a href="http://giu.me" title="Giusi">team mate</a> and I use a <a href="http://trac.edgewall.org" title="Trac">Trac</a> setup as management tool. Needless to say we use LaTeX to write our documentation. Recently we wanted to import some  Wiki pages into existing tex documents. But it turned out the two formats can not be easily converted.</p>
<p>I couldn&#8217;t find a conversion script so here is my own. The days when I was still writing Trac plugins in python are long gone (3 years) so the script became unnecessarily verbose, has no error handling  and a bit awkward but it works so far.</p>
<p><code>Usage:  $&gt; python trac2tex.py content.txt</code></p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #808080; font-style: italic;"># -*- coding:iso-8859-15 -*-</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Converts trac content into tex.</span>
<span style="color: #808080; font-style: italic;"># Supports headings and enumerations</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">re</span>,<span style="color: #dc143c;">sys</span>
curInd = <span style="color: #ff4500;">0</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> sectionize<span style="color: black;">&#40;</span>name, ind<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> + <span style="color: black;">&#123;</span><span style="color: #ff4500;">1</span>: <span style="color: #483d8b;">'section'</span>,
                  <span style="color: #ff4500;">2</span>: <span style="color: #483d8b;">'subsection'</span>,
                  <span style="color: #ff4500;">3</span>: <span style="color: #483d8b;">'subsubsection'</span>,
                  <span style="color: #ff4500;">4</span>: <span style="color: #483d8b;">'paragraph'</span>
                  <span style="color: black;">&#125;</span><span style="color: black;">&#91;</span>ind<span style="color: black;">&#93;</span> + <span style="color: #483d8b;">'{'</span> + name + <span style="color: #483d8b;">'}'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> itemize<span style="color: black;">&#40;</span>item, ind<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">global</span> curInd
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> ind &lt; curInd:
        enditemize<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">elif</span> ind &gt; curInd:
        out<span style="color: black;">&#40;</span>ind, <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>begin{itemize}'</span><span style="color: black;">&#41;</span>
        curInd = ind
&nbsp;
    out<span style="color: black;">&#40;</span>ind,<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>item '</span> + item<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> enditemize<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">global</span> curInd
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> curInd:
        <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
    curInd -= <span style="color: #ff4500;">1</span>
    out<span style="color: black;">&#40;</span>curInd,<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>end{itemize}'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> texify<span style="color: black;">&#40;</span>text<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">for</span> i,j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#123;</span><span style="color: #483d8b;">'ü'</span>:<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>&quot;{u}'</span>,
                <span style="color: #483d8b;">'ä'</span>:<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>&quot;{a}'</span>,
                <span style="color: #483d8b;">'ö'</span>:<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>&quot;{o}'</span>,
                <span style="color: #483d8b;">'!'</span>:<span style="color: #483d8b;">''</span>,
                <span style="color: #483d8b;">'&amp;'</span>:<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>&amp;'</span>,
                <span style="color: #483d8b;">'_'</span>:<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\\</span>_'</span><span style="color: black;">&#125;</span>.<span style="color: black;">iteritems</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        text = text.<span style="color: black;">replace</span><span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">return</span> text
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> out<span style="color: black;">&#40;</span>ind,text<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\t</span>'</span> * curInd + text
&nbsp;
f = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span> <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>,<span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> f:
    line = texify<span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span> 
&nbsp;
    <span style="color: #808080; font-style: italic;">#trac * items</span>
    item = <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">'(<span style="color: #000099; font-weight: bold;">\s</span>+)(<span style="color: #000099; font-weight: bold;">\*</span><span style="color: #000099; font-weight: bold;">\s</span>?)(.+)'</span>, line<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> item:
        itemize<span style="color: black;">&#40;</span>item.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span> item.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">continue</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        enditemize<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">#trac titles</span>
    title = <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">'(=+)<span style="color: #000099; font-weight: bold;">\s</span>([^=]+)<span style="color: #000099; font-weight: bold;">\s</span>'</span>, line <span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> title:
        sectionize<span style="color: black;">&#40;</span>title.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>,<span style="color: #008000;">len</span><span style="color: black;">&#40;</span>title.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">continue</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">print</span> line
&nbsp;
<span style="color: #ff7700;font-weight:bold;">while</span><span style="color: black;">&#40;</span>curInd<span style="color: black;">&#41;</span>:
    enditemize<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2009/06/03/trac-2-tex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>glibc &#038; ipv6</title>
		<link>http://blog.steve.ch/2009/05/28/glibc-ipv4/</link>
		<comments>http://blog.steve.ch/2009/05/28/glibc-ipv4/#comments</comments>
		<pubDate>Thu, 28 May 2009 20:26:06 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2009/05/28/glibc-ipv4/</guid>
		<description><![CDATA[I&#8217;ve been using Arch Linux for almost a year now and so far upgrades caused no issues or just required minor fine-tuning.
Until now.
Yesterday glibc got updated to 2.10.1-2 and since then DNS does not work for me anymore. I can ping hosts but whenever an application tries to resolve a host name a timeout error [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.archlinux.org/">Arch Linux</a> for almost a year now and so far upgrades caused no issues or just required minor fine-tuning.</p>
<p>Until now.</p>
<p>Yesterday glibc got updated to 2.10.1-2 and since then DNS does not work for me anymore. I can ping hosts but whenever an application tries to resolve a host name a timeout error occurs. I read somewhere this is likely due to some IPv6 problem of my router&#8217;s DNS server. Forced usage of IPv4 as in <code>wget -4 nzz.ch</code> still works but obviously this is no solution.</p>
<p>I normally like to fix those things on my own, (Firmware Update?, OpenDNS?) but my Bachelor Thesis&#8217; deadline approaches so I just downgraded again with a simple<br />
<code><br />
pacman -U /var/cache/pacman/pkg/glibc-2.9-7-i686.pkg.tar.gz<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2009/05/28/glibc-ipv4/feed/</wfw:commentRss>
		</item>
		<item>
		<title>das keyboard</title>
		<link>http://blog.steve.ch/2009/05/12/das-keyboard/</link>
		<comments>http://blog.steve.ch/2009/05/12/das-keyboard/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:29:33 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2009/05/12/das-keyboard/</guid>
		<description><![CDATA[If you hang out on tech forums you will certainly have heard of the legendary IBM Model M keyboard. Unlike most keyboards out there it uses mechanical key switches instead of cheap membrane ones.
However, the IBM model is not the only one which uses those switches. daskeyboard also sells those kind of keyboards.
I&#8217;ve been using [...]]]></description>
			<content:encoded><![CDATA[<p>If you hang out on tech forums you will certainly have heard of the legendary IBM Model M keyboard. Unlike most keyboards out there it uses mechanical key switches instead of cheap membrane ones.</p>
<p>However, the IBM model is not the only one which uses those switches. daskeyboard also sells those kind of keyboards.</p>
<p>I&#8217;ve been using one for almost half a year now and if you are thinking about buying one: It is definitely worth it. Those clicky mechanical sounds make you feel happy when writing. Its  solid pressure point and tactile feedback makes you go on typing forever. Because the fingers can rest on the keys and there is no tension required to keep them from falling and pressing <strong><em>wasd</em></strong>, you can type for hours without getting that fatigue finger-feeling usually caused by membrane-based ones.</p>
<p>And there is even a version with blank keys. How cool is that!</p>
<p><img src="http://blog.steve.ch/wp-content/daskeyboard.png" alt="das keyboard" /><br />
<font size="1">(at least I thought so until I wanted to take a print screen)</font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2009/05/12/das-keyboard/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Haskell Logo Voting</title>
		<link>http://blog.steve.ch/2009/03/08/haskell-logo-voting/</link>
		<comments>http://blog.steve.ch/2009/03/08/haskell-logo-voting/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 10:32:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2009/03/08/haskell-logo-voting/</guid>
		<description><![CDATA[Ideas about a new Haskell Logo have been flowing through the haskell-cafe mailing list for quite a while now. Which are the logo candidates? Who organizes it? How people can vote? Which people can vote? Where to send in logos? etc.
The last time I checked there were still many open questions and issues so I [...]]]></description>
			<content:encoded><![CDATA[<p>Ideas about a new Haskell Logo have been flowing through the haskell-cafe mailing list for quite a while now. Which are the logo candidates? Who organizes it? How people can vote? Which people can vote? Where to send in logos? etc.</p>
<p>The last time I checked there were still many open questions and issues so I quickly forgot about it. However, yesterday I realized that suddenly everything is ready: The vote is scheduled for March 16.</p>
<p>A list of candidates is available here <a href="http://community.haskell.org/~eelco/poll.html" target="_blank">http://community.haskell.org/~<wbr></wbr>eelco/poll.html</a></p>
<p>I&#8217;m going for #83</p>
<p>Heh, seriously, there are some really great ones (#92) but in my opinion it should be simple and not over-emphasize the lambda.</p>
<p>At the moment I tend to #15, #35 and #64.</p>
<p>I&#8217;ll let you know when the results are here.</p>
<p><em>mhh.. or maybe #100!!!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2009/03/08/haskell-logo-voting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Machine Check Exception</title>
		<link>http://blog.steve.ch/2008/10/01/machine-check-exception/</link>
		<comments>http://blog.steve.ch/2008/10/01/machine-check-exception/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 18:35:04 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<category><![CDATA[intel]]></category>

		<category><![CDATA[mainboard]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2008/10/01/machine-check-exception/</guid>
		<description><![CDATA[If you installed the P5E-V mainboard from Asus, use a 45nm Intel Core2 Quad CPU and you are getting kernel panics like
CPU 0: Machine Check Exception: 0000000000000004
Bank 4: b200000000430a0a
Kernel panic - not syncing: CPU context corruption
when the processor is under heavy load, it&#8217;s not a wrong kernel option you&#8217;ve chosen.
You might want to update the [...]]]></description>
			<content:encoded><![CDATA[<p>If you installed the P5E-V mainboard from Asus, use a 45nm Intel Core2 Quad CPU and you are getting kernel panics like</p>
<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 440px; height: 66px; text-align: left">CPU 0: Machine Check Exception: 0000000000000004
Bank 4: b200000000430a0a
Kernel panic - not syncing: CPU context corruption</pre>
<p>when the processor is under heavy load, it&#8217;s not a wrong kernel option you&#8217;ve chosen.</p>
<p>You might want to update the firmware from 0504 to 0604. (don&#8217;t search for your old and dusty floppy drive, the BIOS can read from a FAT formatted USB stick) and those problems go away.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2008/10/01/machine-check-exception/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chrome</title>
		<link>http://blog.steve.ch/2008/09/02/chrome/</link>
		<comments>http://blog.steve.ch/2008/09/02/chrome/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 21:43:55 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[apps]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2008/09/02/chrome/</guid>
		<description><![CDATA[ http://www.google.com/chrome
It&#8217;s soooo fast!
Really impressing. Browsing feels fun again, especially with heavy javascript pages.
What evil things Google plans to do with this browser remains to be seen&#8230;
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com/chrome"> http://www.google.com/chrome</a></p>
<p>It&#8217;s soooo fast!</p>
<p>Really impressing. Browsing feels fun again, especially with heavy javascript pages.</p>
<p>What evil things Google plans to do with this browser remains to be seen&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2008/09/02/chrome/feed/</wfw:commentRss>
		</item>
		<item>
		<title>euro</title>
		<link>http://blog.steve.ch/2008/06/08/euro/</link>
		<comments>http://blog.steve.ch/2008/06/08/euro/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 11:07:32 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2008/06/08/euro/</guid>
		<description><![CDATA[For those guys who still come to see if there are any new posts: Sorry
The long awaited euro 2008 has started. Flags are decorating my window, beer and grill is ready and we will watch the matches the whole month. No time for blogging.
But it&#8217;s better like this anyway, to not stay at the computer [...]]]></description>
			<content:encoded><![CDATA[<p>For those guys who still come to see if there are any new posts: Sorry</p>
<p>The long awaited euro 2008 has started. Flags are decorating my window, beer and grill is ready and we will watch the matches the whole month. No time for blogging.</p>
<p>But it&#8217;s better like this anyway, to not stay at the computer and doing those nerdy things all the time. You know.. now we have time for things like <a href="http://youtube.com/watch?v=g7_2qI-VQYM" target="_blank">this </a></p>
<p>My friend giusi and I will blog a bit about the tournament <a href="http://soccer.giustyle.com/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2008/06/08/euro/feed/</wfw:commentRss>
		</item>
		<item>
		<title>UT!</title>
		<link>http://blog.steve.ch/2008/06/05/ut/</link>
		<comments>http://blog.steve.ch/2008/06/05/ut/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 17:11:04 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2008/06/05/ut/</guid>
		<description><![CDATA[:)
]]></description>
			<content:encoded><![CDATA[<p>:)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2008/06/05/ut/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ping</title>
		<link>http://blog.steve.ch/2008/05/12/ping/</link>
		<comments>http://blog.steve.ch/2008/05/12/ping/#comments</comments>
		<pubDate>Mon, 12 May 2008 07:30:05 +0000</pubDate>
		<dc:creator>steve</dc:creator>
		
		<category><![CDATA[geopolitics]]></category>

		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://blog.steve.ch/2008/05/12/ping/</guid>
		<description><![CDATA[Yes I&#8217;m still here.
As I wrote last time my new laptop arrived, I still think it&#8217;s a great laptop but not as great as it would explain blogging inactivity for more than a month.
Many thing happened in the meantime, firefox is becoming emacs so emacs should better get the next firefox first, jeff the obvious [...]]]></description>
			<content:encoded><![CDATA[<p>Yes I&#8217;m still here.</p>
<p>As I wrote last time my new laptop arrived, I still think it&#8217;s a great laptop but not as great as it would explain blogging inactivity for more than a month.</p>
<p>Many thing happened in the meantime, firefox is becoming emacs so emacs should better get the next firefox first, jeff the obvious has something new going on, subversion is considered a dead patient (at least where I hang around when I&#8217;m online).<br />
Of course not everybody shares my observations. I heard others are more worried about missing potatoes for the next month than JVM&#8217;s balls of steal. Ah yeah, there was also a guy who asked me why I use emacs as its not installed anywhere. He got used writing in vi and it&#8217;s on all boxes and wherever he sshs into he finds a familiar environment. Heh, I demonstrated tramp and laughed is his face.</p>
<p>However, that doesn&#8217;t explain what I&#8217;ve been doing.</p>
<p>Well&#8230; I&#8217;ve been busy. Not just busy as usual, really busy. I guess the underlying problem is my new strategy how tasks should be handled. You know, I adopted the maybe greatest philosophy ever and converted myself into a lazy evaluation person.<br />
That means, I&#8217;m doing nothing for a long time until something should be actually delivered and then, and just then I start focusing on the tasks.<br />
The huge advantage is that you just spend time doing what is really necessary and have more time for other things.<br />
The downside however is the work-explosion you cannot predict before no matter how hard you try. Nobody can. Thus when you finally started you just pray you don&#8217;t run out of resources.</p>
<p>One thing I was doing was dealing with was the .NET XmlSerializer.<br />
And I tell you, that&#8217;s a piece of crap. Normal people like you and me tend to introduce interfaces, abstract base classes and many other things to keep things somehow modular so they can be kept in the context in our heads.<br />
But exactly those abstractions cannot be serialized. As soon as the serializer discovers that the type of your property is an interface it will throw an exception back to you and tells you to change your design because it&#8217;s too complicated to serialize.<br />
One way to solve the serialization problems is to duplicate all problem-properties and map them all to object properties but that&#8217;s exactly what you wanted to avoid in the first place.<br />
The second approach is to tag the base class (if there is any) with <code>XmlInclude</code> tags for all existing inherited classes. But as you normally don&#8217;t have the control over your base class or just can’t update it whenever you add new extended implementation you cannot make use of it anyway.<br />
The third approach is to use the <code>IXmlSerializable</code> interface. By implementing it, you can override the way how your class is converted into an Xml document and deal with interfaces and base classes on your own. Wohooo!<br />
However, after five classes I noticed that it is a pretty tedious job to implement the same similar logic all over the place. So I implemented a somehow generic solution which scans with reflection over the properties of a type and if it finds something with an interface or inherited class it stores further type hints as attributes so it can convert it back later.<br />
Of course I chose the latest option and in my base classes I can now write</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> Car
<span style="color: #000000;">&#123;</span>
 IEnginge Engine<span style="color: #000000;">&#123;</span>get;set;<span style="color: #000000;">&#125;</span>
 IList&lt;IFoo&gt; Foo<span style="color: #000000;">&#123;</span> get;<span style="color: #000000;">&#125;</span>
 BaseDescriptor Desc<span style="color: #000000;">&#123;</span> get<span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> <span style="color: #008000;">new</span> ExtendendDescriptor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>
 WriteXml<span style="color: #000000;">&#40;</span> XmlWriter writer <span style="color: #000000;">&#41;</span>
 <span style="color: #000000;">&#123;</span>
  Serializer.<span style="color: #0000FF;">WriteXml</span><span style="color: #000000;">&#40;</span> <span style="color: #0600FF;">this</span>, writer <span style="color: #000000;">&#41;</span>;
 <span style="color: #000000;">&#125;</span>
  ReadXml<span style="color: #000000;">&#40;</span> XmlReader reader <span style="color: #000000;">&#41;</span>
 <span style="color: #000000;">&#123;</span>
  Serializer.<span style="color: #0000FF;">ReadXml</span><span style="color: #000000;">&#40;</span> <span style="color: #0600FF;">this</span>, reader <span style="color: #000000;">&#41;</span>;
 <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>And all kinds of interfaces, generics, lists and dictionaries can be serialized with the implementation in Serializer. Mishto!</p>
<p>Though it’s not a very elegant solution neither those 2xml conversions. Actually I still don’t get the hype around that text format. Obviously it’s great (and even the first time) that your application achieves standard compliance and interoperability by just choosing the right library and not everybody is busy implementing their own buggy text parser but still… for logical representations it’s not the right thing in my opinion. The only really cool thing I found are XPath queries but that’s already it.</p>
<p>However, the main part of the time I spent with all my vapor projects and I somehow doubt that any of them will be finished until summer. Obviously that’s very normal with vapor projects just I made the mistake to actually talk about them and mentioned release dates.</p>
<p>But seriously guys, you actually think I have time for that? I mean, do I look like?<br />
And it is not just the actual coding itself, using immature languages will bring you enough trouble anyway and when you don&#8217;t have time to fix the main libraries of that language, don&#8217;t want to monkey patch everything or don&#8217;t have the time to write new bindings every second hour then you just have yet another unfinished project in your repository.</p>
<p>Yes obviously I should have used something more proven but limitations get just discovered above a certain project-size anyway. When the developed program suddenly gets incredible slow or shows (at least in the eyes of the naive programmers like I am) strange behavior. Though at least you start getting a feeling which things might be problematic when faced with a new language and may explore their limits right in the beginning and don&#8217;t run into huge problems because of some half-baked implementations you are depending on at a later stage.</p>
<p>Ah where was I… right, problems with static languages. Did you notice that everybody started to ditch their old fat static language and went over to the dynamic camp? Oh and I&#8217;m not just talking about far away from here somewhere in the interwebs. It seems to be happening right down the street at the next corner. Who knows where this will lead us to?<br />
It ends up into a maintenance hell with many different languages and their incompatible flavors as a result of constant forking and a too dynamic development path? Where it’s faster to rewrite the program for every new feature and where the non technical java-is-great managers won and don&#8217;t want to hear about the introduction of yet another language and framework?<br />
Or we get a truly great environment with easy interoperability and robustness which attracts even more dynamic kids to jump in.</p>
<p>Today&#8217;s situation with the current languages seem do match the first option more thus the ongoing adoption of dynamic idea let us hope for a shift to the second one in near future. As soon as it would get widely accepted there would be yet another division in our industry. It will be way harder to hide missing knowledge or unwillingness to contribute behind strategyBridgeAdapter patterns or endless abstractions over abstractions. What the blubs will do is another question but there will be enough things left to do anyway.<br />
Moreover, there would be finally a supporting type system which wouldn&#8217;t just put obstacles in our ways.</p>
<p>Time will show. Anyway, I wish our application would have been written in a dynamic language like lisp. Instead of converting some parts of the program into an xml file and then parse it back, the saved data could be lisp code on its own which could be loaded straight into the application without tedious parsing.</p>
<p>What a great world that would be.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steve.ch/2008/05/12/ping/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.326 seconds -->
<!-- Cached page served by WP-Cache -->
