<?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>Punch Card</title>
	<atom:link href="http://punchcard.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://punchcard.wordpress.com</link>
	<description>A blog about software development</description>
	<lastBuildDate>Tue, 20 Dec 2011 17:22:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='punchcard.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/3a8b4668582287a8e6e7eb4e5e08b599?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Punch Card</title>
		<link>http://punchcard.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://punchcard.wordpress.com/osd.xml" title="Punch Card" />
	<atom:link rel='hub' href='http://punchcard.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Your Style ? Stylish presentations without Powerpoint or Keynote</title>
		<link>http://punchcard.wordpress.com/2011/11/11/your-style-stylish-presentations-without-powerpoint-or-keynote/</link>
		<comments>http://punchcard.wordpress.com/2011/11/11/your-style-stylish-presentations-without-powerpoint-or-keynote/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 16:45:40 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=201</guid>
		<description><![CDATA[For the last few days I&#8217;ve been investigating possibilities to create presentations that will output a mixture of HTML / CSS / JS and are created by either using plain HTML or some kind of markup language. The general idea behind this approach is that for 90% of the presentation you create you will follow [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=201&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For the last few days I&#8217;ve been investigating possibilities to create presentations that will output a mixture of HTML / CSS / JS and are created by either using plain HTML or some kind of markup language. The general idea behind this approach is that for 90% of the presentation you create you will follow a simple set of styles and you will not need some special visualizations.</p>
<p>What is most interesting for me is to use my standard work environment, like my editor of choice and leave the styling to a predefined set of markups, probably following some corporate identity guidelines.</p>
<p>Long story short, I&#8217;m disappointed with what I&#8217;ve seen. Basically there are two reasons why everything I looked at falls short of my requirements:</p>
<ul>
<li>PDF generation &#8211; I want to generate a PDF of my slides that I can easily distribute (static HTML does not do the trick, publishing slides to Heruko or Github neither)</li>
<li>Templates &#8211; I have no idea why non of the tools I looked at provides simple support for templates. Is CI something that was lost in the whirlwinds of Web 2.0? And by templates I mean more than putting a logo at the bottom right.</li>
</ul>
<p>And here are the tools I observed with their shortcomings:</p>
<ul>
<li><a href="https://github.com/schacon/showoff">Showoff</a> &#8211; Markdown for the slides is perfect, templating impossible and PDF generation fails for images defined by CSS backgrounds ( I might have a patch for that)</li>
<li><a href="http://imakewebthings.github.com/deck.js/">Deck.js</a> &#8211; HTML is just to noisy to work on slides, print markup does not look like the original slide</li>
<li><a href="http://seld.be/notes/introducing-slippy-html-presentations">Slippy</a> &#8211; HTML is to noisy</li>
<li><a href="http://en.wikipedia.org/wiki/Beamer_(LaTeX)">LaTeX Beamer</a> &#8211; LaTeX as markup is fine for me, PDF output is perfect, templating is a pain in the &#8230;</li>
</ul>
<p>In general the markup based solutions are very easy to setup and use, but typically fall short to allow fine-grained customization of the layout. The simplest example is that there is typically no way to place the slide title and the slide body separately.</p>
<p>As a result it looks like I&#8217;m back to Powerpoint.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=201&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2011/11/11/your-style-stylish-presentations-without-powerpoint-or-keynote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>C++11 / C++0x Documentation</title>
		<link>http://punchcard.wordpress.com/2011/11/01/c11-c0x-documentation/</link>
		<comments>http://punchcard.wordpress.com/2011/11/01/c11-c0x-documentation/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 05:39:38 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[c++0x]]></category>
		<category><![CDATA[c++11]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=192</guid>
		<description><![CDATA[You want to improve your &#8220;old&#8221; C++ code base by allowing new features or bug fixes to be enhanced with C++11? The questions you will face on the way are manifold. First, what exactly allows me C++11 to do? Where is some documentation? What is the purpose of those features. Compared to languages like Ruby [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=192&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You want to improve your &#8220;old&#8221; C++ code base by allowing new features or bug fixes to be enhanced with C++11? The questions you will face on the way are manifold. First, what exactly allows me C++11 to do? Where is some documentation? What is the purpose of those features. Compared to languages like Ruby or Python the C++ standard library and language itself is not too well documented online.</p>
<p>As a preparation for a lecture I&#8217;m holding in the next semester I was compiling a list of links to C++11 / C++0x documentation sites and as some kind of personal archive I will post them here:</p>
<p><strong>General C++11 / C++0x FAQ</strong></p>
<ul>
<li>General C++0x FAQ, explains all the features -<br />
<a href="http://www2.research.att.com/~bs/C++0xFAQ.html">http://www2.research.att.com/~bs/C++0xFAQ.html</a></li>
<li>C++ Annotations (lot&#8217;s of coverage for C++11)<br />
<a href="http://cppannotations.sourceforge.net/cppannotations/html/">http://cppannotations.sourceforge.net/cppannotations/html/</a></li>
</ul>
<p><strong>New Features (Overview)</strong></p>
<ul>
<li>Modern C++ -<br />
<a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-835T">http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-835T</a></li>
<li>Changes with C++11 / C++0x -<br />
<a href="http://www.softwarequalityconnection.com/2011/06/the-biggest-changes-in-c11-and-why-you-should-care/">http://www.softwarequalityconnection.com/2011/06/the-biggest-changes-in-c11-and-why-you-should-care/</a></li>
<li>Modern C++<br />
<a href="http://herbsutter.com/elements-of-modern-c-style/">http://herbsutter.com/elements-of-modern-c-style/</a></li>
<li>Overview of the most important C++11 features with examples<a href="http://www.georgeflanagin.com/c++11/">
<p>http://www.georgeflanagin.com/c++11/</a></li>
<li>Simpler Multithreading in C++11 -<br />
<a href="http://www.devx.com/SpecialReports/Article/38883/0/page/1">http://www.devx.com/SpecialReports/Article/38883/0/page/1</a></li>
</ul>
<p><strong>Compiler Support</strong></p>
<ul>
<li>GCC &#8211; <a href="http://gcc.gnu.org/projects/cxx0x.html">http://gcc.gnu.org/projects/cxx0x.html</a></li>
<li>Clang &#8211; <a href="http://clang.llvm.org/cxx_status.html">http://clang.llvm.org/cxx_status.html</a></li>
</ul>
<p><strong>Standard Library Documentation</strong></p>
<ul>
<li><a href="http://en.cppreference.com/w/cpp">http://en.cppreference.com/w/cpp</a></li>
</ul>
<div>I will update this list as I find new sources. If you have any more links you think that are missing, please mention them in the comments and I will add them.</div>
<div>-Martin</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=192&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2011/11/01/c11-c0x-documentation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>Easy parsing of sysfs to get CPU topology data using libsystopo</title>
		<link>http://punchcard.wordpress.com/2011/01/20/easy-parsing-of-sysfs-to-get-cpu-topology-data-using-libsystopo/</link>
		<comments>http://punchcard.wordpress.com/2011/01/20/easy-parsing-of-sysfs-to-get-cpu-topology-data-using-libsystopo/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 13:25:02 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysfs]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=153</guid>
		<description><![CDATA[When you are working with main memory it is crucial to make sure that all the data structures are correctly sized and aligned. A typical approach is to create blocks of data that are processed independently. For the developer, the question is how large such blocks should be? The answer is that those blocks should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=153&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When you are working with main memory it is crucial to make sure that all the data structures are correctly sized and aligned. A typical approach is to create blocks of data that are processed independently. For the developer, the question is how large such blocks should be? The answer is that those blocks should always be either cache sized. </p>
<p>Now, how large is the cache on the system you are using? Either you can go for experiments detecting the different cache levels and the cache line sizes, or if you are happy to have a Intel Linux system at hand, to simply explore the information as it is stored in the <em>sysfs</em> filesystem exported by the Kernel.</p>
<p>However, parsing this information at development time might be ok, at run-time the best way  is to adjust the system settings based on the actual configuration. At the moment, <em>libudev</em> does not support to read the information, so your off to yourself. </p>
<p>To avoid that everybody writes the same code I took some time to write a small <a href="https://github.com/grundprinzip/systopo">library</a> that reads the information about the CPU caches and the CPU topology and allows to easily process this information in your program. You can find the most current version of the code as usual at <a href="https://github.com/grundprinzip/systopo">Github</a>.</p>
<p><pre class="brush: cpp;">
#include &lt;systopo.h&gt;
using namespace systopo;

int main(void)
{
    System s = getSystemTopology();
    return 0;
}
</pre></p>
<p>The <em>System</em> definition parses all data from <em>sysfs</em> and can be reviewed here:</p>
<p><pre class="brush: cpp;">
    struct Cache
    {
        size_t coherency_line_size;
        size_t level;
        size_t number_of_sets;
        size_t physical_line_partition;
        size_t size;
        size_t ways_of_associativity;
    
        std::string type;
    
    };

    struct Topology
    {
        size_t core_id;
        size_t physical_package_id;
        std::vector&lt;size_t&gt; core_siblings;
        std::vector&lt;size_t&gt; thread_siblings;
    };
    
    struct CPU
    {
        std::vector&lt;Cache&gt; caches;
        Topology topology;
    };


    struct System
    {
        std::vector&lt;CPU&gt; cpus;
        std::vector&lt;size_t&gt; online_cpus;
        std::vector&lt;size_t&gt; offline_cpus;
    };
</pre></p>
<p>For more information about the meaning of the <em>Topology</em> please refer to the Kernel <a href="http://www.mjmwired.net/kernel/Documentation/cputopology.txt">documentation</a>. The meaning for the CPU cache fields should be clear or refer to <a href="http://lwn.net/Articles/252125/">&#8220;What every programmer should know about memory&#8221;</a>.</p>
<p>If you have feedback, comments or ideas, I&#8217;m glad to respond!</p>
<p>- Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=153&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2011/01/20/easy-parsing-of-sysfs-to-get-cpu-topology-data-using-libsystopo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>Emacs DBLP Mode for better Papers in LaTeX</title>
		<link>http://punchcard.wordpress.com/2010/10/25/emacs-dblp-mode-for-better-papers-in-latex/</link>
		<comments>http://punchcard.wordpress.com/2010/10/25/emacs-dblp-mode-for-better-papers-in-latex/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 16:50:32 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[dblp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[mode]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=143</guid>
		<description><![CDATA[Do you remember the last time you were writing a paper and you knew that you reached the perfect point for a citation. You knew the author or the paper but you did not want to lookup the BibTeX entry or even create it? So you started to use rDBLP, but now you have to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=143&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you remember the last time you were writing a paper and you knew that you reached the perfect point for a citation. You knew the author or the paper but you did not want to lookup the BibTeX entry or even create it? So you started to use <a href="http://punchcard.wordpress.com/2010/08/31/rdblp-easy-bibtex-management-for-your-research-paper/">rDBLP</a>, but now you have to lookup the citation key every time again and again. Since your BibTeX file is now build after the paper was compiled the first time, there is no chance to use common BibTeX management tools. </p>
<p>As a consequence from this problem I wrote a small minor mode for Emacs that allows to search the DBLP database directly from Emacs and insert the correct citation key. </p>
<p>To install this minor mode follow these steps:</p>
<ol>
<li>Go to your local site lisp directory &#8211; e.g. <strong>~/.emacs.d/elisp</strong></li>
<li><strong>git clone git@github.com:grundprinzip/dblp.el.git</strong></li>
<li>and now add the following lines to your Emacs configuration to activate the minor mode as soon as you enter LaTeX mode</li>
</ol>
<p><pre class="brush: plain;">;; DBLP mode
(add-to-list 'load-path &quot;~/.emacs.d/elisp/dblp.el&quot;)
(require 'dblp)
(add-hook 'LaTeX-mode-hook 'dblp-mode)
</pre></p>
<p>If you want to use the querying hit &#8220;C-M-c&#8221; if the DBLP mode is activated and this will start an interactive mode to query DBLP.</p>
<p>Currently the minor mode requires Ruby to be available on the platform. I plan to port the parser and querying to Lisp but currently it&#8217;s easier for me to write it in Ruby. Do you have any comments or questions, please leave me a message in the comments.</p>
<p>-Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=143&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/10/25/emacs-dblp-mode-for-better-papers-in-latex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>rDBLP version 0.4.5 released</title>
		<link>http://punchcard.wordpress.com/2010/10/11/rdblp-version-0-4-5-released/</link>
		<comments>http://punchcard.wordpress.com/2010/10/11/rdblp-version-0-4-5-released/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 05:03:57 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[bibtex]]></category>
		<category><![CDATA[dblp]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=140</guid>
		<description><![CDATA[DBLP version 0.4.5 is more or less a maintenance release. It fixes several connection problems and as an improvement removes the cross-reference from the BibTeX entry. The book title in the main entry is now replaced by the title of the cross-reference. This should be more convenient with regards to the limited space in a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=140&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/grundprinzip/dblp">DBLP</a> version 0.4.5 is more or less a maintenance release. It fixes several connection problems and as an improvement removes the cross-reference from the BibTeX entry. The book title in the main entry is now replaced by the title of the cross-reference. This should be more convenient with regards to the limited space in a research paper.</p>
<p>To update your gem execute</p>
<p><code>sudo gem install dblp</code></p>
<p>For more detail see my <a href="http://punchcard.wordpress.com/2010/08/31/rdblp-easy-bibtex-management-for-your-research-paper/">original post</a>.</p>
<p>-Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=140&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/10/11/rdblp-version-0-4-5-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>Emacs Movement Shortcuts Wallpaper</title>
		<link>http://punchcard.wordpress.com/2010/10/09/emacs-movement-shortcuts-wallpaper/</link>
		<comments>http://punchcard.wordpress.com/2010/10/09/emacs-movement-shortcuts-wallpaper/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 20:27:22 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=125</guid>
		<description><![CDATA[Stumbling across the Vim Movements Shortcuts Wallpaper, I decided to make one for Emacs. Basically I really like the idea of having a real quick reference to the most important shortcuts on your desktop. If you have any additional shortcuts that you would love to have, please leave a comment. If you want to modify [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=125&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Stumbling <a href="http://naleid.com/blog/2010/10/04/vim-movement-shortcuts-wallpaper/">across</a> the Vim Movements Shortcuts Wallpaper, I decided to make one for Emacs. Basically I really like the idea of having a real quick reference to the most important shortcuts on your desktop.</p>
<p><a href="http://punchcard.files.wordpress.com/2010/10/emacs2.png"><img src="http://punchcard.files.wordpress.com/2010/10/emacs2.png?w=510&#038;h=321" alt="Emacs Wallpaper" title="Emacs Movement Shortcuts Wallpaper" width="510" height="321" class="aligncenter size-full wp-image-126" /></a></p>
<p>If you have any additional shortcuts that you would love to have, please leave a comment. If you want to modify the wallpaper, I uploaded the original <a href='http://punchcard.files.wordpress.com/2010/10/emacs_source1.pdf'>PDF version</a> of the wallpaper that you can easily modify with any tool of your choice.</p>
<p>-Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=125&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/10/09/emacs-movement-shortcuts-wallpaper/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>

		<media:content url="http://punchcard.files.wordpress.com/2010/10/emacs2.png" medium="image">
			<media:title type="html">Emacs Movement Shortcuts Wallpaper</media:title>
		</media:content>
	</item>
		<item>
		<title>Switch, case, typelists and type_switch</title>
		<link>http://punchcard.wordpress.com/2010/08/31/switch-case-typelists-and-type_switch/</link>
		<comments>http://punchcard.wordpress.com/2010/08/31/switch-case-typelists-and-type_switch/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 14:35:45 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[stl]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=117</guid>
		<description><![CDATA[Whenever you are building a system that has it&#8217;s own type system you will come to a point where you perform type dependent operations. If your types seamlessly map to standard integral types most of the mapping code and extraction can be handled by simple template methods, but from time to time you will find [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=117&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Whenever you are building a system that has it&#8217;s own type system you will come to a point where you perform type dependent operations. If your types seamlessly map to standard integral types most of the mapping code and extraction can be handled by simple template methods, but from time to time you will find the following code fragments:</p>
<p><pre class="brush: cpp;">
switch(type)
{
case IntegerType: /**/
do_something_important&lt;int&gt;(value);
break;
case DoubleType: /**/
do_something_important&lt;double&gt;(value);
break;
}
</pre></p>
<p>Interestingly the only difference in the above code line is only the requested type. A concrete example is e.g. hashing of a certain value. The type of the value is stored in a variable and depending on the actual type different hash functions have to be called. When you find something like this the first time, you will feel ok, the second time a little more nervous and the third time&#8230; </p>
<p>The question is now: How can I rewrite my code so that it will be less explicit and most important easier to extend. The biggest problem with the above solution is that once you extend your type system the whole code will be changed and there must be an easier way to solve this. </p>
<p>One of my first approaches was macro magic to iterate over a sequence and than generate the right code by text expansion. However this will not work out due to the fact that macros in C++ are not recursive and will not be called a second time.  Reading in  &#8220;Modern C++ Design&#8221; by Alexandrescu &#8212; a must read &#8212; I stumbled upon typelists (well I had some support by <a href="http://twitter.com/bastih01">@bastih01</a>). After one evening screwing my had around them finally I made some progress.</p>
<p>The solution I found is based on static recursive template generation plus dynamic type switching at runtime. The reason for this rather complicated approach is the following: while the general type information is available at compile-time, the explicit instance related type information can only be mapped using an enum at run-time.</p>
<p>Enough words lost, whats the solution?</p>
<p>Consider the following setup: First we define the type list and the enum for storing the type information.<br />
<pre class="brush: cpp;">

#include &lt;boost/mpl/vector.hpp&gt;

typedef enum
{
IntegerType,
FloatType,
StringType
} DataType

typedef boost::mpl::vector&lt;int, float, std::string&gt; basic_types;
</pre></p>
<p>Now we need to implement our type_switch operator, basically it is based on <a href="http://tinytl.sourceforge.net/">TinyTL</a> but used in a Boost environment, because I did not find anything alike in Boost directly. </p>
<p><pre class="brush: cpp;">
template &lt;typename L, int N=0, bool Stop=(N==boost::mpl::size&lt;hyrise_basic_types&gt;::value)&gt; struct type_switch;
        
template &lt;typename L, int N, bool Stop&gt;
struct type_switch
{
    template&lt;class F&gt;
    typename F::value_type operator()(size_t i, F&amp; f)
    {
        if (i == N)
        {
            return f.operator()&lt;typename boost::mpl::at_c&lt; hyrise_basic_types, N&gt;::type&gt;();
        } else {
            type_switch&lt;L, N+1&gt; next;
            return next(i,f);
       }
    }
};

template &lt;typename L, int N&gt;
struct type_switch&lt;L, N, true&gt;
{
    template&lt;class F&gt;
    typename F::value_type operator()(size_t i, F&amp; f)
    {
         throw std::runtime_error(&quot;Type does not exist&quot;);
     }
};
</pre></p>
<p>If you look at the above code for the first time it is kind of weird to understand what is going on. But once you understand template recursion it&#8217;s totally clear. But easy things first: boost::mpl::size defines a template that contains the size of the typelist hyrise_basic_types. The boost::mpl::at_c template defines an random accessor to the typlist based on a  constant index.</p>
<p>The template type_switch is a special construct with 3 parameters, the first is the type list, the second is the current position in this list defaulting to 0, and the third is a boolean parameter determining if the recursion should stop. The default implementation of this struct with the operator() method checks if the current value i is equal to N and if this is the case calls the operator() method on the function object submitted as a parameter. If this is not the case it instantiates a new template and increases N by 1. This is possible because all int values for the complete list are known in advance at compile time and so they can be used as template parameters. To avoid infinite recursion a dedicated template specialization with Stop=true provides an implementation that should never be called and does not further invoke any template recursion.</p>
<p>But back to the functor used in this setting. We have one requirement on the functor and this is that we have to specify the value_type of the operator() method directly in the functor. A sample implementation based on boost hash could look like the following.</p>
<p><pre class="brush: cpp;">
template&lt;typename T&gt;
struct hash_functor
{
    typedef T value_type;
    AbstractTable* table;
    size_t f;
    ValueId vid;

     hash_functor(): table(0) {}

     hash_functor(AbstractTable * t, size_t f, ValueId v): table(t), f(f), vid(v) {}
            
     template&lt;typename R&gt;
     T operator()()
     {
         return boost::hash&lt;R&gt;()(table-&gt;getValueForValueId&lt;R&gt;(f, vid));
     }
};
</pre></p>
<p>For this functor, T defines the return type of the functor with an valye_type typedef and R is the type of the actual type used for the type_swtich. Instead of the clustered switch case statement the code for my type depended hash value method looks a lot better.</p>
<p><pre class="brush: cpp;">
size_t hash_value(AbstractTable * source, size_t f, ValueId vid)
{
    hash_functor&lt;size_t&gt; fun(source, f, vid);
    type_switch&lt;hyrise_basic_types&gt; ts;
    return ts(source-&gt;typeOfColumn(f), fun);
}
</pre></p>
<p>The last sentence goes to the cost of this access: Each level of hierarchy generates at least one method call plus an evaluation of an if statement. The generic switch/case only generates the comparison, but I think this overhead is neglectable compared to the huge amount of time saved when it comes to extending the usable data types.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=117&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/08/31/switch-case-typelists-and-type_switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>rDBLP &#8212; Easy BibTeX Management for your Research Paper</title>
		<link>http://punchcard.wordpress.com/2010/08/31/rdblp-easy-bibtex-management-for-your-research-paper/</link>
		<comments>http://punchcard.wordpress.com/2010/08/31/rdblp-easy-bibtex-management-for-your-research-paper/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:53:29 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bibtex]]></category>
		<category><![CDATA[dblp]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=112</guid>
		<description><![CDATA[Maintain your LaTex bibliography files using DBLP It&#8217;s always the same, you write a paper / thesis and you are searching for source, than you modify them until they fit into the format you are currently using. But this should not be. A better way is to extract the right key from DBLP and automagically [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=112&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Maintain your LaTex bibliography files using <a href="http://dblp.uni-trier.de/">DBLP</a></p>
<p>It&#8217;s always the same, you write a paper / thesis and you are searching for source, than you modify them until they fit into the format you are currently using. But this should not be. A better way is to extract the right key from DBLP and automagically create the correct bib file. You think this is magic? No it&#8217;s not, it&#8217;s so easy.</p>
<p>There are only two prerequisites for using rDBLP on your computer: </p>
<ol>
<li>Make sure Ruby and RubyGems are installed</li>
<li>Make sure you have a working internet connection</li>
</ol>
<p>To install the gem execute this from you command line:</p>
<pre class="bash">
sudo gem install dblp
</pre>
<p>Once this is done you can use it directly for any LaTex file. Imagine you have LaTex file containing somewhere the following citation.</p>
<pre class="bash">
The entity shaping used in web services as discussed in \cite{DBLP:conf/IEEEscc/GrundKZ08}...

\bibliographystyle{abbrv}
\bibliography{dblp}
</pre>
<p>When you run now the dblp command in your terminal, the program will read the auxiliary files from the compilation and extract the requested DBLP citation sources. Than it will download them and store them directly in a file called &#8220;dblp.bib&#8221; which you can use in your LaTex document.</p>
<pre class="bash">
dblp my_file
</pre>
<p>To make it really easy, here is a screencast I did for my small little tool:</p>
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/1087606' width='400' height='300' frameborder='0'></iframe></div>
<p>If you have any questions, feel free to ask via mail or contact me using <a href="http://twitter.com/grundprinzip">Twitter</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=112&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/08/31/rdblp-easy-bibtex-management-for-your-research-paper/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>Relational DBMS vs Document Oriented Key-Value Stores?!?!</title>
		<link>http://punchcard.wordpress.com/2010/06/05/relational-dbms-vs-document-oriented-key-value-stores/</link>
		<comments>http://punchcard.wordpress.com/2010/06/05/relational-dbms-vs-document-oriented-key-value-stores/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 09:44:57 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Rebuttal]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[key-value store]]></category>
		<category><![CDATA[q&a]]></category>
		<category><![CDATA[rebuttal]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=106</guid>
		<description><![CDATA[In the recent days document databases get big buzz from all different areas: programmers who search for freedom or VCs who search for the next big buck. But there is a big disadvantage: the bigger the noise is the less the people using buzzwords like cloud or key-value store, understand whats behind. So let me start with a short [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=106&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the recent days document databases get big buzz from all different areas: programmers who search for freedom or VCs who search for the next big buck. But there is a big disadvantage: the bigger the noise is the less the people using buzzwords like cloud or key-value store, understand whats behind. So let me start with a short disclaimer: I am not against key-value stores or any other document oriented database!</p>
<p>But nonetheless I think it is required to clarify what a standard relational database can do, especially how powerful a <em>language</em> like SQL is. So lets clarify this by some examples and let me give you my take on the buzz. To make it more entertaining consider this a small Q&amp;A session with a key-value store guy and me as the defender of relational DBMS.</p>
<p><strong>&#8220;When I&#8217;m working with documents I just dump everything into the object and can map-reduce everything! SQL cant do this.&#8221;</strong><br />
Sure you can dump anything in an object, but SQL has a different heritage: SQL is a declarative language that is designed to express the What instead of the How. If you want to express algorithms directly on the database use stored procedures!</p>
<p><strong>&#8220;But stored procedures are bad, because they are not portable!&#8221;</strong><br />
Ah get that, but how about your custom map-reduce code? Writing custom code for querying data is nothing more than using the data store API directly and is a stored procedure.</p>
<p><strong>&#8220;In SQL I can&#8217;t create my own functions, I&#8217;m limited to MIN,MAX,AVG. That&#8217;s so bad!&#8221;</strong><br />
Whew, I hope that you did not stop reading about SQL in &#8217;89 or &#8217;92. The SQL standard provides everything you need to define user-defined functions and custom functions. Any major DBMS allows you to even write them in any programming language you can program.</p>
<p><strong>&#8220;You know, I want to be flexible, stream content of different types. SQL cant do this!&#8221;</strong><br />
Maybe you are missing a point here that is called normalization. Yes, SQL is restricted to flat tables but you can use normalization and queries to create any list of your content.</p>
<p><strong>&#8220;But SQL is so slow, every time I create a join I&#8217;m lost. Look, XXX-DB is so fast using static indices once I created a map function!&#8221;</strong><br />
Dude, using and index to increase query performance is as old as I am. You want indices, go create them! If you don&#8217;t know what queries you use, you wrote a bad application. For any other case you might go for index optimization techniques well researched in the last decades.</p>
<p><strong>&#8220;But it runs in the cloud! This makes it even more faster and scalable.&#8221;</strong><br />
Gnargh, I&#8217;m pretty sure you know about all this parallel database research going on since &#8212; decades. Just because it is a key-value store does not make it scalable and faster. Please dig deeper.</p>
<p>To conclude, please understand me I&#8217;m not against key-value stores or document databases, they have their very specific terrain &#8212; as do standard relational databases. So what might be a good example for a key-value store document oriented application? When looking at the characteristics of such databases one thing that comes to my mind immediately is the following: Since every object is stored by a unique key all those applications benefit where the workload is almost only single object lookup and no aggregations take place. Since hash functions that are used to build the indices for the keys are ideal for partitioning scale-out can be implemented easier. Another important fact is the ability for semi-structured data, here document oriented storage system clearly win over relational systems.</p>
<p>The only thing I wish from people propagating document oriented storage is that they do not only talk about it because its cool but because they can sketch a valid use case. If you feel like you don&#8217;t know enough about the possibilities of standard relational databases talk to people who do or read something about it.</p>
<p>Did I offend you? Challenge me, let&#8217;s discuss!<br />
- Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=106&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/06/05/relational-dbms-vs-document-oriented-key-value-stores/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
		<item>
		<title>[slimtimercli] Version 0.1.8 published</title>
		<link>http://punchcard.wordpress.com/2010/02/05/slimtimercli-version-0-1-8-published/</link>
		<comments>http://punchcard.wordpress.com/2010/02/05/slimtimercli-version-0-1-8-published/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 14:46:08 +0000</pubDate>
		<dc:creator>grundprinzip</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[slimtimercli]]></category>

		<guid isPermaLink="false">http://punchcard.wordpress.com/?p=103</guid>
		<description><![CDATA[It&#8217;s been while since I worked on slimtimercli but today I received a pull request via Github telling me that evaryont polished the gem and updated it and fixed some bugs. I took a few minutes to make slimtimercli use gemcutter and published it again &#8212; with version 0.1.8. I love open source software! - [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=103&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been  while since I worked on <a href="http://blog.grundprinzip.de/articles/2008/04/06/slimtimer-command-line-api/">slimtimercli</a> but today I received a pull request via <a href="http://github.com/grundprinzip/slimtimercli">Github</a> telling me that <a href="http://github.com/evaryont">evaryont</a> polished the gem and updated it and fixed some bugs. I took a few minutes to make slimtimercli use <a href="http://gemcutter.org/">gemcutter</a> and published it again &#8212; with version 0.1.8.</p>
<p>I love open source software!</p>
<p>- Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/punchcard.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/punchcard.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/punchcard.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/punchcard.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/punchcard.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/punchcard.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/punchcard.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/punchcard.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=punchcard.wordpress.com&amp;blog=10563664&amp;post=103&amp;subd=punchcard&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://punchcard.wordpress.com/2010/02/05/slimtimercli-version-0-1-8-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9036fdd3def5eae9979c02b3c99665df?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grundprinzip</media:title>
		</media:content>
	</item>
	</channel>
</rss>
