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

<channel>
	<title>Erik-Jan van Baaren &#187; Programming</title>
	<atom:link href="http://www.eriky.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.eriky.com</link>
	<description>Just another geek with a blog</description>
	<lastBuildDate>Fri, 07 May 2010 19:13:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Note to self: randomly drop lines in a text file</title>
		<link>http://www.eriky.com/2009/02/note-to-self-randomly-drop-lines-in-a-text-file</link>
		<comments>http://www.eriky.com/2009/02/note-to-self-randomly-drop-lines-in-a-text-file#comments</comments>
		<pubDate>Wed, 25 Feb 2009 14:40:37 +0000</pubDate>
		<dc:creator>Erik-Jan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[awk]]></category>

		<guid isPermaLink="false">http://www.eriky.com/?p=81</guid>
		<description><![CDATA[If you ever need to drop lines from a stream of text randomly, you can use this simple and short awk command: Example: cat file &#124; awk '{if (int(rand()*100) &#60; 10) print $0;}' This example keeps only 10%. You can change the 10 to any other percentage to drop more or less. As an example, [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to drop lines from a stream of text randomly, you can use this simple and short awk command:</p>
<pre>Example: cat file | awk '{if (int(rand()*100) &lt; 10) print $0;}'</pre>
<p>This example keeps only 10%. You can change the 10 to any other percentage to drop more or less.</p>
<p>As an example, I use this to warmup my MediaWiki installation before doing a real WikiBench benchmark:</p>
<pre>cat benchmarks/1pct.trace | head -n 100000 | grep "\-$" | \
awk '{if (int(rand()*100) &lt; 10) print $0;}' | ./start_controller.sh -verbose</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eriky.com/2009/02/note-to-self-randomly-drop-lines-in-a-text-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Return home early</title>
		<link>http://www.eriky.com/2009/02/return-home-early</link>
		<comments>http://www.eriky.com/2009/02/return-home-early#comments</comments>
		<pubDate>Sun, 15 Feb 2009 11:48:28 +0000</pubDate>
		<dc:creator>Erik-Jan</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.eriky.com/?p=46</guid>
		<description><![CDATA[OK this is a bit old but I wanted to link to it anyway, just in case you haven&#8217;t heart about this programming style yet. It is called &#8220;return home early&#8221; and it basically means that you can change the logic of your code in such a way that you get less nesting. I tend [...]]]></description>
			<content:encoded><![CDATA[<p>OK this is a bit old but I wanted to link to it anyway, just in case you haven&#8217;t heart about this programming style yet. It is called &#8220;return home early&#8221; and it basically means that you can change the logic of your code in such a way that you get less nesting. I tend to think about this when I see lots of curly braces and it often helps me reduce code size and complexity. If it sounds interesting enough for you, read about it <a title="Return home early" href="http://debuggable.com/posts/programming-psychology-return-home-early:4811de9f-ae28-49c2-a7dc-2f154834cda3">here</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eriky.com/2009/02/return-home-early/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 25 Most Dangerous Programming Errors</title>
		<link>http://www.eriky.com/2009/01/top-25-most-dangerous-programming-errors</link>
		<comments>http://www.eriky.com/2009/01/top-25-most-dangerous-programming-errors#comments</comments>
		<pubDate>Wed, 14 Jan 2009 10:27:37 +0000</pubDate>
		<dc:creator>Erik-Jan</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.eriky.com/?p=33</guid>
		<description><![CDATA[Top 25 Most Dangerous Programming Errors is a list of the most significant programming errors that can lead to serious software vulnerabilities. They occur frequently, are often easy to find, and easy to exploit. They are dangerous because they will frequently allow attackers to completely take over the software, steal data, or prevent the software [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><a title="Top 25 programming errors" href="http://cwe.mitre.org/top25/">Top 25 Most Dangerous Programming Errors</a> is a list of the most significant programming errors that can lead to serious software vulnerabilities.  They occur frequently, are often easy to find, and easy to exploit.  They are dangerous because they will frequently allow attackers to completely take over the software, steal data, or prevent the software from working at all.  The list is the result of collaboration between the SANS Institute,  MITRE, and many top software security experts in the US and Europe.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.eriky.com/2009/01/top-25-most-dangerous-programming-errors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
