<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>dtobi - tobias heer</title>
	<atom:link href="http://dtobi.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dtobi.wordpress.com</link>
	<description>photography - science - tech</description>
	<lastBuildDate>Wed, 12 Oct 2011 07:34:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dtobi.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/20594c9dda1e24fe3a50e10931a8a7df?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>dtobi - tobias heer</title>
		<link>http://dtobi.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dtobi.wordpress.com/osd.xml" title="dtobi - tobias heer" />
	<atom:link rel='hub' href='http://dtobi.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A quickie: watching 3D movies on a Philips TV (7000 line)</title>
		<link>http://dtobi.wordpress.com/2011/10/11/a-quickie-watching-3d-movies-on-a-philips-tv-7000-line/</link>
		<comments>http://dtobi.wordpress.com/2011/10/11/a-quickie-watching-3d-movies-on-a-philips-tv-7000-line/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 07:58:28 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D TV]]></category>
		<category><![CDATA[Philips]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=133</guid>
		<description><![CDATA[Recently, I was struggling a bit with our new Philips TV. It can do 3D and it can play *.avi and *.mkv movies but it seemed not to be able to play these in 3D even though they had the &#8230; <a href="http://dtobi.wordpress.com/2011/10/11/a-quickie-watching-3d-movies-on-a-philips-tv-7000-line/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=133&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I was struggling a bit with our new Philips TV. It can do 3D and it can play *.avi and *.mkv movies but it seemed not to be able to play these in 3D even though they had the 3D information encoded (side by side).</p>
<p>After some fiddling, I found out: <strong>it works perfectly</strong>. The only thing that&#8217;s blocking the 3D feature is that the samples I tried were not in HD. Apparently the TV requires the source file to have a <strong><em>1920&#215;1080 resolution</em></strong>. Once you got the file in the right format, it works like a charm and you can enable the 3D feature via the on-screen menu.</p>
<p>Here is a quick command to re-encode a clip in the right resolution and in a format that the TV can definitely read:</p>
<pre>$&gt; mencoder 3d-sample-in.avi -vf scale=1920:1080 -o 3d-sampe-out.avi \\
   -oac mp3lame -ovc lavc -lavcopts vbitrate=2200</pre>
<p>Mencoder is part of the mplayer software package. I have not optimized the above line for performance or size&#8230; using different encoder options may result in a much better result.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=133&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2011/10/11/a-quickie-watching-3d-movies-on-a-philips-tv-7000-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>
	</item>
		<item>
		<title>Color your shell &#8211; 1: colorful ls</title>
		<link>http://dtobi.wordpress.com/2011/03/19/color-your-shell-1-colorful-ls/</link>
		<comments>http://dtobi.wordpress.com/2011/03/19/color-your-shell-1-colorful-ls/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 23:17:48 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=124</guid>
		<description><![CDATA[Preface: This is a series of posts that explain how to get to a nicely colored shell by tweaking your .bahsrc. I am aware that each of these hints has been discussed on the Internet forever. However, it took me &#8230; <a href="http://dtobi.wordpress.com/2011/03/19/color-your-shell-1-colorful-ls/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=124&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><strong><a href="http://dtobi.files.wordpress.com/2011/03/lscolors.jpg"><img class="size-full wp-image-125 alignright" title="lscolors" src="http://dtobi.files.wordpress.com/2011/03/lscolors.jpg?w=295&#038;h=156" alt="colors for ls" width="295" height="156" /></a>Preface:</strong></h2>
<p>This is a series of posts that explain how to get to a nicely colored shell by tweaking your <strong>.bahsrc</strong>.</p>
<p>I am aware that each of these hints has been discussed on the Internet forever. However, it took me a little while to get all into my .bashrc, so I hope this will be useful for someone.</p>
<h2>Colorful directory listings (ls)</h2>
<p>Getting color to ls is fairly easy. You basically just turn it on. However, depending on your OS, you may have to push different buttons to get it working.</p>
<p><span id="more-124"></span>For OS X, adding</p>
<pre>CLICOLOR=1</pre>
<p>to your .bashrc is already enough. I tested it for iTerm and the OS X Terminal and both worked like a charm.</p>
<p>For Linux, things are slightly more tricky because you need to tell ls that it should use colors.</p>
<p>Therefore, adding</p>
<pre>CLICOLOR=1</pre>
<p>to your .bashrc will only produce colorful directory listings if you do</p>
<pre>ls --color=auto</pre>
<p>This is somewhat inconvenient but luckily, there are aliases. Just add:</p>
<pre>export CLICOLOR=1
alias ls='ls --color=auto'</pre>
<p>to your .bashrc and you&#8217;re done.</p>
<h2>Making the colors more colorful</h2>
<p>If you find the colors too dark or too bright for your terminal settings, you may want to adjust the colors of the different file types.</p>
<p>For OS X you can simply do this by overwrituing the variable LSCOLORS with your own settings:</p>
<pre>export LSCOLORS=dxfxcxdxbxegedabagacad</pre>
<p>The ugly string indicates your color preferences. It is well explained in the manpages for ls (man ls). Just search for LSCOLORS.<br />
I&#8217;ll add a brief explanation anyway:</p>
<p>The string is composed of pairs of color indexes (e.g., dx, fx, cx, dc, &#8230; in the example). Each letter is a color index. The first letter indicates the foreground color (d=brown) the latter the background color (x=default foreground or background = invisible). The position also matters. The first pair defines colors for directories, the second defines symlinks, etc. All this is explained quite neatly in the man pages so I hope you forgive me if I don&#8217;t repeat it all.</p>
<p>For Linux things work a bit different again (sigh!)</p>
<p>Here the variable is not LSCOLORS but LS_COLORS (great job, OS X and Linux guys!)</p>
<p>So you could set the following in your .bashrc</p>
<pre>LS_COLORS='di=33:fi=0:ln=95:pi=5:so=5:bd=5:cd=5:or=37:mi=0:ex=31:*.rpm=90'</pre>
<p>In contrast to OS X, the pairs are named here. di stands for directory, fi for file, ln for a symlink&#8230;<br />
The numbers stand for colors and you can even add multiple numbers for one thing if you like to have underlined, flashing or otherwise fancy-looking colors.</p>
<p>If you want to delve deeper into the topic I suggest to follow this <a title="LINK" href="http://linux-sxs.org/housekeeping/lscolors.html">LINK</a>. It explains the whole color concept quite well.</p>
<h2>Making it work cross platform</h2>
<p>If you intend to use the same .bashrc across Linux and Mac systems you might want to add some smartness to this.</p>
<p>Here is some example code. I think it is simple enough to go without further explanation:</p>
<pre># don't do this for dumb terminals
if [ "$TERM" != "dumb" ]; then
 if [ $(uname) == "Linux"  ]; then
   # Linux
   alias ls='ls --color=auto'
   LS_COLORS='di=33:fi=0:ln=95:pi=5:so=5:bd=5:cd=5:or=37:mi=0:ex=31:*.rpm=90'
 else
   # OS X   
   alias ls='ls -G'
   export LSCOLORS=dxfxcxdxbxegedabagacad
 fi
 #This is for everyone       
 export CLICOLOR=1
fi</pre>
<p>I may have stolen parts of the above example code from here and there. I tried to figure out where it all came from but it is so basic that determinung the exact origin is impossible. If you feel that you deserve credit for it, please tell me and provide a link to your blog/post/whatever.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=124&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2011/03/19/color-your-shell-1-colorful-ls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2011/03/lscolors.jpg" medium="image">
			<media:title type="html">lscolors</media:title>
		</media:content>
	</item>
		<item>
		<title>Some words on malloc and memset</title>
		<link>http://dtobi.wordpress.com/2011/02/05/some-words-on-malloc-and-memset/</link>
		<comments>http://dtobi.wordpress.com/2011/02/05/some-words-on-malloc-and-memset/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 11:46:48 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=96</guid>
		<description><![CDATA[Some people seem to have a particular strategy when it comes to using malloc and memset. The strategy is simple: Use malloc often, then memset everything. [don't do this at home] The bad thing about that strategy is that it &#8230; <a href="http://dtobi.wordpress.com/2011/02/05/some-words-on-malloc-and-memset/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=96&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some people seem to have a particular strategy when it comes to using malloc and memset. The strategy is simple:</p>
<p><span style="color:#ff0000;">Use malloc often, then memset everything. [don't do this at home]</span></p>
<p>The bad thing about that strategy is that it leads to complex code and non-obvious bugs. The following mini-tutorial is based on some slides I prepared for a small tutorial for our students at RWTH Aachen University.</p>
<p><span id="more-96"></span></p>
<p>I&#8217;d like to state that for the sake of simplicity I did not go into const correctness for variables and functions. Adding const correctness is left to the interested reader (just as we did the const correctness on the fly during the tutorial).</p>
<h3><strong>Memory is not just memory:</strong></h3>
<p>When writing basic C code, you have to distinguish between two types of memory. I&#8217;ll not go into details here but I&#8217;d like to point out the most obvious differences. If you&#8217;d like to know more about memory in C, I am confident that your google skills will get you to the right documents.</p>
<h4>• Stack  - the simple kind of memory.</h4>
<div>
<ul>
<li>Parameters:<br />
Void foo(int bar){&#8230;}</li>
<li>Auto variables:<br />
unsigned int foo</li>
<li>char bar[20];</li>
</ul>
</div>
<h4>• Heap &#8211; the &#8220;shoot yourself in the knee&#8221;-kind of memory.</h4>
<div>
<ul>
<li>Manually assigned<br />
foo = malloc(&#8230;);</li>
</ul>
</div>
<p>Try to use stack memory whenever possible. The reason? It&#8217;s simple, its bound to the current program context and if the program leaves the context its automatically freed. That means: the memory is automatically freed when you don&#8217;t need it any more.</p>
<p>Well, there are some reasons to still use heap memory:</p>
<div>
<ol>
<li>If you <strong>ABSOLUTELY</strong> don‘t know the size of the memory block you need  at compile time: use malloc.</li>
<li>You‘re in a function and you MUST  provide <strong>b &gt; sizeof(long) </strong>bytes to the caller- That means, you can&#8217;t return a built-in variable type.<br />
But first: try allocating memory at the caller<br />
Second: Try harder<br />
If it‘s absolutely impossible: use malloc</li>
<li>Other reasons:<br />
<span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">10 You think it is convenient<br />
</span><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">20 Think again<br />
30 You still think its convenient<br />
</span><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">40 Goto 20</span></li>
</ol>
</div>
<p>Especially the third reason is tricky. I&#8217;ve seen [beginners/programmers] who used malloc just because they thought it would be the [only/most convenient] way to have a pointer to a piece of memory. The bottom line is: try to avoid malloc and heap memory whenever possible.</p>
<h3>Avoid magic numbers in combination with malloc</h3>
<p>Okay, now that we know that malloc is evil, it&#8217;s time to talk about using it right. Unfortunately, malloc seems to attract, so called, <strong>magic numbers</strong>. Let me give an example:</p>
<p>Bad:</p>
<pre>malloc(20);
malloc(BUFF_SIZE+12);</pre>
<p>This code is almost guaranteed to break as soon as anyone changes anything related to the memory. Moreover, you will drive your poor fellow students and colleagues crazy because they have no clue why 20 or 12 is the <em>right</em> magic number. Maybe 21 or 11 would be much better? Simply do&#8217;t do it but try to use sensible names or even better: <strong>sizeof</strong>.</p>
<p>Better:</p>
<pre>malloc(sizeof(struct foo));</pre>
<p>Here you can easily figure out why malloc allocates the amount of memory it does. We&#8217;re going to put at struct foo to that piece of memory. Great.</p>
<h3>Avoid malloc completely</h3>
<p>In many cases, malloc can be avoided completely. This will simplify the code and will add to its maintaiability. Let me give you a code example:</p>
<p><span style="text-decoration:underline;"><strong>EXAMPLE 1</strong></span></p>
<pre><span style="color:#666699;">// the return value has to be freed. Don‘t forget it!
</span>struct foo* bar(void){

    struct foo *baz;
    baz = malloc(sizeof(struct foo));
<span style="color:#666699;">
    // do something with baz
</span>    ...

    return baz;
}
struct foo* baz;
baz = bar();

<span style="color:#666699;">// do something fancy with baz for 80 lines
</span>...

free(baz); <span style="color:#666699;">// Phew, I am so proud that I remembered it!</span></pre>
<p>Okay,  this code isn&#8217;t really bad by itself. It works and it will do whatever it was meant to do. However, it blocks programmer brain cycles. You as a programmer have to make sure that you remember to <strong>free</strong> baz in the end (and never remove it from there unless you remove baz). Otherwise the code will still do what it was supposed to do but as a little bonus, it will start eating up your memory if it is executed repeatedly.</p>
<p>It&#8217;s rather simple to avoid malloc and free here completely:</p>
<pre>void bar(struct foo* baz){
    <span style="color:#666699;">// do something with baz

</span>    return baz;
}

...

struct foo baz;
bar(&amp;baz);

<span style="color:#666699;">// do something fancy with baz for 80 lines</span></pre>
<p>The code still does the very same thing but there is no malloc and no free any more. We avoided the use of these two functions by creating an auto variable at the caller and by passing it to the callee. Oh, yes: Here you should definitely start thinking about <strong>const correctness</strong> in your code because the function bar will modify its parameter <strong>baz</strong>. This might not be obvious unless you a) put some <span style="color:#666699;">comment</span> there (yes, a bad option) or b) add <strong>const</strong> to all function parameters that are not modified by the function. However, that&#8217;s another story for another day.</p>
<p><span style="text-decoration:underline;"><strong>EXAMPLE 2</strong></span></p>
<pre>unsigned int len;
len = string_oracle();

char* baz;
baz = malloc(len);

...

//do something with baz

foo(baz, len);

...

free(baz);</pre>
<p>The reason why we used malloc in the above code is that we don&#8217;t know how long the length of the string <strong>baz</strong> will be. The len parameter comes from the mysterious <strong>string_oracle()</strong> function and there is no defined length since the nasty oracle may return anything. However, if the string oracle is not that mysterious but has an <strong>upper bound</strong> (e.g., <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:21px;font-size:14px;white-space:pre;">LONGEST_STRING_LEN) </span>for the length of the string, we can do the following:</p>
<pre>unsigned int len;
len = string_oracle();

char baz[LONGEST_STRING_LEN];

...

//do something with baz

foo(baz, len);

...</pre>
<p>The worst-case assumption that the string oracle will return a length smaller than <strong>LONGEST_STRING_LEN</strong> allows us to get rid of <em>malloc</em> and <em>free</em>. In many cases you can make such worst case assumptions.</p>
<p>If you read the above example carefully you will notice that the code is still a bit shaky. Of course, <span style="text-decoration:underline;">the contents of <strong>len</strong> must never be larger than <strong>LONGEST_STRING_LEN</strong></span>. Otherwise, the program [might/will] crash with a segmentation fault. Hence, you should check for the length of len and do some nice error handling.</p>
<h3>Memset</h3>
<p>For all I know, memset seems to be the best friend of malloc. You can be quite sure to see a memset wherever you see malloc. There is even a shorthand for the combination of memset and malloc: calloc. In some cases using memset and malloc is not a bad thing. However, in some cases it is a) unnecessary or b) may mask errors. I&#8217;ll give you two examples:</p>
<p><span style="text-decoration:underline;"><strong>EXAMPLE 1</strong></span></p>
<pre>char* foo = "Hey, my code works!";
unsigned int len = 20; // len is the length of foo

char* bar;
<span style="color:#800000;">bar= malloc(len);

</span><span style="color:#666699;">// my advisor told me I should ALWAYS use memset 0!
</span><span style="color:#800000;">memset(bar, 0, len);
</span><span style="color:#800000;">memcpy(bar, foo, len);

</span>printf("%s ... and it is totally braindead.\n", bar);</pre>
<p>Here the memset is absolutely unnecessary because the code is first set to 0 and then completely overwritten. Of course, the code will work but it a) will do to much, and b) is too complicated. Complicated code attracts bugs , so why make it more complicated than it needs to be. just remove the memset.</p>
<p>Okay, now what is memset good for then? Initializing memory to 0 (zero) or any other value &#8212; memory that should be set to <em>something</em> for a <strong>reason</strong>. Okay, but memset can be tricky in that case, too. It might set too much memory to <em>something</em> &#8211; memory that is not supposed to be <em>something</em>. Let me give an example:</p>
<p><span style="text-decoration:underline;"><strong>EXAMPLE 2</strong></span></p>
<p>Compilers are pretty good in helping programmers to do the right thing. One very useful thing is that <em>gcc</em> can tell you when you forgot to initialize a variable. Just try:</p>
<pre>$&gt; gcc foobar.c <strong>-Wuninitialized</strong> –O1</pre>
<p>on any c file foobar.c that tries to read an unitialized variable <strong>bar.foo3</strong>. The compiler will complain like this:</p>
<pre>warning: ‘<strong>bar.foo3</strong>’ is used uninitialized in this function</pre>
<p>Okay, now consider the following example code:</p>
<pre>struct foo {
    unsigned int foo1;  // initialize to 1!
    unsigned int foo2;  // initialize to 2!
    unsigned int foo3;  // initialize to 3!
};

...

struct foo bar;

<span style="color:#666699;">// my advisor told me I should ALWAYS use memset 0!
</span><span style="color:#800000;">foo = memset(&amp;bar, 0, sizeof(struct foo));

</span><span style="color:#666699;">// when initialized, foo1 must always be 1, foo2 always be 2 and foo3 always 3
</span>bar.foo1 = 1;
bar.foo2 = 2;
<span style="color:#666699;">// oops. I am in a hurry. I'll do the rest tof the initialization later. 
</span>...
if (bar.foo1 == bar.foo3) {...}</pre>
<p>Now consider our hasty programmer did not do the rest of the initialization later (maybe he even forgot to put that comment there). As he diligently set the memory of <strong>bar</strong> to zero, <strong>bar.foo3</strong> is initialized and the compiler can&#8217;t tell us something is wrong. Here memset masks a bug that would have been trivial to find (even the compiler will tell you) otherwise:</p>
<pre>$&gt; gcc foobar.c -Wuninitialized –O1
... (NOTHING!)</pre>
<p>For more  evil examples of memset read <a title="Memset is evil" href="http://www.augias.org/paercebal/tech_doc/doc.en/cp.memset_is_evil.html" target="_blank">this article</a>. It explains what happens when you apply memset with non zero values (it doesn&#8217;t do what people expect for multi-byte types) and for more complext types (structs, objects, double pointers, etc.).</p>
<p>Well, this concludes my little tutorial. Thanks for reading and happy coding.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=96&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2011/02/05/some-words-on-malloc-and-memset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>
	</item>
		<item>
		<title>pbcopy and pbpaste</title>
		<link>http://dtobi.wordpress.com/2010/11/02/pbcopy-and-pbpaste/</link>
		<comments>http://dtobi.wordpress.com/2010/11/02/pbcopy-and-pbpaste/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 19:42:08 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=87</guid>
		<description><![CDATA[pbcopy and pbpaste are two very simple shell commands that help you to streamline your copy &#38; paste operations. pbcopy copies stdin to the OSX clipboard. pbpaste copies the clipboard content to stdout. Combining both allows you to perform complex &#8230; <a href="http://dtobi.wordpress.com/2010/11/02/pbcopy-and-pbpaste/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=87&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em><strong>pbcopy</strong></em> and <em><strong>pbpaste</strong></em> are two very simple shell commands that help you to streamline your copy &amp; paste operations.</p>
<p>pbcopy copies <em>stdin</em> to the OSX clipboard. <em>pbpaste</em> copies the clipboard content to stdout. Combining both allows you to perform complex operations on your clipboard contents. Need an example:</p>
<blockquote>
<pre>pbpaste | fmt -s -w 80 | pbcopy</pre>
</blockquote>
<p>will format the text in your clipboard so that it breaks at a text width of 80 characters. very good if you need to write technical documents with fixed character width. I guess you can easily imagine any text-based workflow. Just think of what stream processing you can do with html tidy, aspell, etc.</p>
<p>Of course, putting your pbpaste/pbcopy chain to a script that you can conveniently run from any shell or binding it to a key combination will make the whole thing even more useful.</p>
<p>I found this works for OSX. Maybe there is an equivalent for Linux as well. Any hints?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=87&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/11/02/pbcopy-and-pbpaste/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>
	</item>
		<item>
		<title>RFC2828: A very useful document for network security terms</title>
		<link>http://dtobi.wordpress.com/2010/08/19/rfc2828-a-very-useful-document-for-network-security-terms/</link>
		<comments>http://dtobi.wordpress.com/2010/08/19/rfc2828-a-very-useful-document-for-network-security-terms/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 19:53:31 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=77</guid>
		<description><![CDATA[I have been searching for such a thing for a very long time. I have no clue why it took me so long to find it but the more I am happy that I can now be certain to use &#8230; <a href="http://dtobi.wordpress.com/2010/08/19/rfc2828-a-very-useful-document-for-network-security-terms/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=77&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been searching for such a thing for a very long time. I have no clue why it took me so long to find it but the more I am happy that I can now be certain to use the right words.</p>
<p>RFC2828 is a must for everyone writing about network security:</p>
<p><a title="RFC2828" href="http://www.ietf.org/rfc/rfc2828.txt" target="_blank">http://www.ietf.org/rfc/rfc2828.txt</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=77&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/08/19/rfc2828-a-very-useful-document-for-network-security-terms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>
	</item>
		<item>
		<title>Filemerge / opendiff confuses me</title>
		<link>http://dtobi.wordpress.com/2010/06/22/filemerge-opendiff-confuses-me/</link>
		<comments>http://dtobi.wordpress.com/2010/06/22/filemerge-opendiff-confuses-me/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 08:59:29 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=78</guid>
		<description><![CDATA[This post is an attempt to remove my confusion when using opendiff AKA filemerge. Opendiff is a very handy and quick tool for visually comparing files. However, the way it visualizes the portions of two files that are to be &#8230; <a href="http://dtobi.wordpress.com/2010/06/22/filemerge-opendiff-confuses-me/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=78&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-79" title="opendiff" src="http://dtobi.files.wordpress.com/2010/06/opendiff.png?w=150&#038;h=92" alt="" width="150" height="92" /></p>
<p>This post is an attempt to remove my confusion when using opendiff AKA filemerge. Opendiff is a very handy and quick tool for visually comparing files. However, the way it visualizes the portions of two files that are to be merged into one keeps confusing me. The symbol is an arrow, However, I always wonder whether the direction of the arrow symbolizes the direction of the changes (text at the blunt edge of the arrow will survive) or if the pointed part of the arrow points at the text that will survive.</p>
<p>The message to me is:</p>
<p><span style="text-decoration:underline;"><strong>&#8220;THE TEXT AT THE ARROWHEAD WILL SURVIVE&#8221;.</strong></span></p>
<p>Keep this in mind, Tobias!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=78&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/06/22/filemerge-opendiff-confuses-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2010/06/opendiff.png?w=150" medium="image">
			<media:title type="html">opendiff</media:title>
		</media:content>
	</item>
		<item>
		<title>Change svn commit message after commit</title>
		<link>http://dtobi.wordpress.com/2010/05/31/change-svn-commit-message-after-commit/</link>
		<comments>http://dtobi.wordpress.com/2010/05/31/change-svn-commit-message-after-commit/#comments</comments>
		<pubDate>Mon, 31 May 2010 09:54:59 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=71</guid>
		<description><![CDATA[D&#8217;oh! A mistake in a svn commit message. And now it&#8217;s there forever&#8230;. or at least until you fix it with: svn propedit svn:log --revprop -r N --editor-cmd vim of course, you have to replace N with the proper version &#8230; <a href="http://dtobi.wordpress.com/2010/05/31/change-svn-commit-message-after-commit/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=71&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>D&#8217;oh! A mistake in a svn commit message. And now it&#8217;s there forever&#8230;. or at least until you fix it with:</p>
<pre>svn propedit svn:log --revprop -r N --editor-cmd vim</pre>
<p>of course, you have to replace N with the proper version number. Pick another &#8211;editor-cmd if you don&#8217;t fancy vim.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=71&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/05/31/change-svn-commit-message-after-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>
	</item>
		<item>
		<title>Use filemerge with svn diff</title>
		<link>http://dtobi.wordpress.com/2010/05/27/use-filemerge-with-svn-diff/</link>
		<comments>http://dtobi.wordpress.com/2010/05/27/use-filemerge-with-svn-diff/#comments</comments>
		<pubDate>Thu, 27 May 2010 16:39:31 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=62</guid>
		<description><![CDATA[Looking at diffs is essential when working with svn. However it can be quite cumbersome because the default behavior is not very user friendly. The output is ugly and hard to read and it is a pain to the eye. &#8230; <a href="http://dtobi.wordpress.com/2010/05/27/use-filemerge-with-svn-diff/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=62&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://dtobi.files.wordpress.com/2010/05/svndiff-teaser.jpg"><img class="size-full wp-image-63 alignright" style="margin:5px;" title="svndiff-teaser" src="http://dtobi.files.wordpress.com/2010/05/svndiff-teaser.jpg?w=232&#038;h=150" alt="" width="232" height="150" /></a>Looking at diffs is essential when working with svn. However it can be quite cumbersome because the default behavior is not very user friendly. The output is ugly and hard to read and it is a pain to the eye. Fortunately you can easily substitute the default diff function of svn with something more fancy &#8211; <strong>filemerge</strong> on Mac (it comes with the xcode tools) or <strong>vimdiff</strong>.</p>
<p>First create a wrapper file that will handle the calling of filemerge or vimdiff. I put it into <em>~/bin/svndiffwrap.sh</em></p>
<blockquote>
<pre>#!/bin/sh
DIFF="$(which opendiff)"
DIFF $6 $7</pre>
</blockquote>
<p><em>opendiff</em> is the command line tool for <em>filemerge</em>. Put <em>vimdiff</em> there if you like vim better.<span id="more-62"></span></p>
<p><a href="http://dtobi.files.wordpress.com/2010/05/svndiff.png"><img class="size-medium wp-image-64 alignleft" title="svndiff" src="http://dtobi.files.wordpress.com/2010/05/svndiff.png?w=300&#038;h=288" alt="Make vimdiff more useful" width="300" height="288" /></a></p>
<p>Next tell svn to use your beautiful shiny new script. Edit ~/.subversion/config search for diff-cmd and replace it with:</p>
<blockquote>
<pre>diff-cmd = /Users/heer/bin/svndiffwrap.sh</pre>
</blockquote>
<p>Of course <em>/Users/heer/bin/</em> should be the path to your newly created script.  Next try svn diff and love it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=62&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/05/27/use-filemerge-with-svn-diff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2010/05/svndiff-teaser.jpg" medium="image">
			<media:title type="html">svndiff-teaser</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2010/05/svndiff.png?w=300" medium="image">
			<media:title type="html">svndiff</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile Collaboration Systems Workshop</title>
		<link>http://dtobi.wordpress.com/2010/05/15/mobile-collaboration-systems-workshop/</link>
		<comments>http://dtobi.wordpress.com/2010/05/15/mobile-collaboration-systems-workshop/#comments</comments>
		<pubDate>Sat, 15 May 2010 11:23:15 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=54</guid>
		<description><![CDATA[I am co-organizing the &#8220;Mobile Collaboration Systems&#8221; workshop in Aix-en-provence next week. The workshop will be a platform to share and discuss theories, understandings, experiences and lessons learned in the field of mobile collaboration systems. The workshop is held in &#8230; <a href="http://dtobi.wordpress.com/2010/05/15/mobile-collaboration-systems-workshop/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=54&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img title="mcs-banner-small" src="http://dtobi.files.wordpress.com/2010/05/mcs-banner-small.jpg?w=600&#038;h=84" alt="" width="600" height="84" /></p>
<p>I am co-organizing the <a href="http://fit-bscw.fit.fraunhofer.de/pub/bscw.cgi/d38460880/index.html" target="_blank">&#8220;Mobile Collaboration Systems&#8221;</a> workshop in Aix-en-provence next week. The workshop will be a platform to share and discuss theories, understandings, experiences and lessons learned in the field of mobile collaboration systems. The workshop is held in conjunction with the<a href="http://www.coopsys.org/" target="_blank"> COOP&#8217;10</a> conference.</p>
<p><a href="http://dtobi.files.wordpress.com/2010/05/mcs.jpg"><img class="alignright size-medium wp-image-55" title="MCS challenges" src="http://dtobi.files.wordpress.com/2010/05/mcs.jpg?w=300&#038;h=171" alt="" width="300" height="171" /></a>From the call for papers:<em> Mobile devices are expected to soon become the “primary computer” and tool for sharingand connecting with others. In our thriving world of mobile communication, technologicaladvances have brought a number of novel and improved ways of collaboration; in business, commerce, healthcare, education, and society in general. Collaboration can help to overcome the limitations of a single user, device, and network. However, creating mobile collaborative applications and systems requires careful consideration and design. This workshop aims to bring together designers, practitioners and researchers who share an interest in the study and design of mobile collaborative systems.</em></p>
<p><em><span style="font-style:normal;">UPDATE: The workshop was very interesting and productive. We benefitted from a very diverse set of people, research areas and opinions. A perfect combination for a topic that spans social and technical aspects.</span></em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=54&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/05/15/mobile-collaboration-systems-workshop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2010/05/mcs-banner-small.jpg" medium="image">
			<media:title type="html">mcs-banner-small</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2010/05/mcs.jpg?w=300" medium="image">
			<media:title type="html">MCS challenges</media:title>
		</media:content>
	</item>
		<item>
		<title>New paper: PiSA-SA: Municipal Wi-Fi Based on Wi-Fi Sharing</title>
		<link>http://dtobi.wordpress.com/2010/05/15/new-paper-pisa-sa-municipal-wi-fi-based-on-wi-fi-sharing/</link>
		<comments>http://dtobi.wordpress.com/2010/05/15/new-paper-pisa-sa-municipal-wi-fi-based-on-wi-fi-sharing/#comments</comments>
		<pubDate>Sat, 15 May 2010 10:29:00 +0000</pubDate>
		<dc:creator>dtobi</dc:creator>
				<category><![CDATA[My papers]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://dtobi.wordpress.com/?p=42</guid>
		<description><![CDATA[A new paper related to Wi-Fi sharing and municipal Wi-Fi will be published this summer at ICCCN (IC3N) in Zurich. The paper is eight pages long and can be downloaded HERE. The paper covers the service architecture that we developed &#8230; <a href="http://dtobi.wordpress.com/2010/05/15/new-paper-pisa-sa-municipal-wi-fi-based-on-wi-fi-sharing/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=42&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://dtobi.files.wordpress.com/2010/05/paper-pisa-sa.png"><img class="alignleft size-full wp-image-43" title="paper-pisa-sa" src="http://dtobi.files.wordpress.com/2010/05/paper-pisa-sa.png?w=233&#038;h=284" alt="" width="233" height="284" /></a>A new paper related to Wi-Fi sharing and municipal Wi-Fi will be published this summer at ICCCN (IC3N) in Zurich. The paper is eight pages long and can be downloaded <a title="PiSA-SA" href="http://www.ds-group.info/members/heer/publications-tobias-heer/pisa-sa-municipal-wi-fi-based-on-wi-fi-sharing" target="_blank">HERE</a>. The paper covers the service architecture that we developed for the <a href="http://mobile-access.org/" target="_blank">Mobile ACcess</a> project. Here comes the paper abstract:</p>
<p><em>Large-scale municipal wireless networks are currently being established all around the world. These networks provide a rich set of local services, such as tourist guides, environmental information, pedestrian navigation, and local shopping guides. As recent financial failures of prominent municipal wireless networks show, it is economically challenging to achieve the bandwidth and coverage that is necessary for such a network. At the same time, Wi-Fi-sharing communities achieve high bandwidth and good coverage at a very low cost by capitalizing on the dense deployment of private access points in urban areas. However, from a technical, conceptual, and security perspective, Wi-Fi sharing community networks resemble a patchwork of heterogeneous networks instead of one well-planned, uniform and secure network as required for the economic success of a municipal Wi-Fi project. In this paper, we show how to realize municipal wireless services on top of a Wi-Fi-sharing infrastructure in a technically sound and economically attractive fashion while taking into account legacy devices and mobile clients. Our solution cleanly separates the roles of controlling and administering the network from providing bandwidth and wireless access. This allows municipalities to focus their resources on municipal wireless services instead of providing Wi-Fi access.</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dtobi.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dtobi.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dtobi.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dtobi.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dtobi.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dtobi.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dtobi.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dtobi.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dtobi.wordpress.com&amp;blog=13532682&amp;post=42&amp;subd=dtobi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dtobi.wordpress.com/2010/05/15/new-paper-pisa-sa-municipal-wi-fi-based-on-wi-fi-sharing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eed0e4429687c2a3aae42e664d4b8c1f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dtobi</media:title>
		</media:content>

		<media:content url="http://dtobi.files.wordpress.com/2010/05/paper-pisa-sa.png" medium="image">
			<media:title type="html">paper-pisa-sa</media:title>
		</media:content>
	</item>
	</channel>
</rss>
