<?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>Draakwired &#187; Programming</title>
	<atom:link href="http://drakonen.com/category/tech/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://drakonen.com</link>
	<description>Here be Dragons  -  Drakonen&#039;s Blog</description>
	<lastBuildDate>Tue, 13 Apr 2010 14:04:33 +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>HAR inspired Python Pygame fun</title>
		<link>http://drakonen.com/2008/har-inspired-python-pygame-fun/</link>
		<comments>http://drakonen.com/2008/har-inspired-python-pygame-fun/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 14:38:43 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[HAR]]></category>
		<category><![CDATA[Pygame]]></category>

		<guid isPermaLink="false">http://drakonen.com/blog/?p=67</guid>
		<description><![CDATA[I have always wanted to do some stuff with Pygame. When i saw the logo on the HAR2009 wiki I whipped up a little python program that draws squares and fades between colors. It looks pretty cool! Needed: Python, Pygame Downloads: har_squares [edit]Seems i have uploaded the wrong file&#8230; My apologies to the original writer. [...]]]></description>
			<content:encoded><![CDATA[<p>I have always wanted to do some stuff with <a title="pygame website" href="http://www.pygame.org" onclick="pageTracker._trackPageview('/outgoing/www.pygame.org?referer=');">Pygame</a>. When i saw the logo on the <a title="HAR2009 Wiki" href="http://wiki.har2009.org" onclick="pageTracker._trackPageview('/outgoing/wiki.har2009.org?referer=');">HAR2009 wiki</a> I whipped up a little python program that draws squares and fades between colors. It looks pretty cool!</p>
<p>Needed: <a href="http://www.python.org/" onclick="pageTracker._trackPageview('/outgoing/www.python.org/?referer=');">Python</a>, <a href="http://www.pygame.org/download.shtml" onclick="pageTracker._trackPageview('/outgoing/www.pygame.org/download.shtml?referer=');">Pygame</a></p>
<p>Downloads: <a href="http://drakonen.com/wp-content/uploads/2008/09/har_squares.py">har_squares</a></p>
<p><a href="http://drakonen.com/wp-content/uploads/2008/09/harlogo.py"></a></p>
<p>[edit]Seems i have uploaded the wrong file&#8230; My apologies to the original writer. The right file is up now.[/edit]</p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2008/har-inspired-python-pygame-fun/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nginx userdir list</title>
		<link>http://drakonen.com/2008/nginx-userdir-list/</link>
		<comments>http://drakonen.com/2008/nginx-userdir-list/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 22:09:14 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[autoindex]]></category>
		<category><![CDATA[dirlist]]></category>
		<category><![CDATA[mod_userdir]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://drakonen.digigen.nl/blog/2008/nginx-userdir-list/</guid>
		<description><![CDATA[Our Nginx server was without a proper ~user listing. While this is default in most apache configs, its not in Nginx. My friend Dominiek made a hack with a ruby script. This would have worked fine if had some more work but memory usage was pretty bad (especially for big files). So, I started on [...]]]></description>
			<content:encoded><![CDATA[<p>Our <a href="http://wiki.codemongers.com/Main" onclick="pageTracker._trackPageview('/outgoing/wiki.codemongers.com/Main?referer=');">Nginx </a>server was without a proper ~user listing. While this is default in most apache configs, its not in Nginx. My friend <a href="http://dominiek.com/" onclick="pageTracker._trackPageview('/outgoing/dominiek.com/?referer=');">Dominiek</a> made a <a href="http://dominiek.com/articles/2007/5/18/bye-redskin-zdravstvujte-redstar-nginx-tips" onclick="pageTracker._trackPageview('/outgoing/dominiek.com/articles/2007/5/18/bye-redskin-zdravstvujte-redstar-nginx-tips?referer=');">hack with a ruby script</a>. This would have worked fine if had some more work but memory usage was pretty bad (especially for big files).</p>
<p>So, I started on a proper Nginx way to solve this and harness it&#8217;s power. By diving into the config I figured it out:<br />
<code><br />
# the [a-zA-Z0-9] is for the greedy .<br />
location ~ /~([a-zA-Z0-9]*)/(.*) {<br />
root /home/;<br />
autoindex on;<br />
index index.html;</code><code><br />
rewrite  ^/~(</code><code>[a-zA-Z0-9]</code><code>*)/(.*)$  /$1/www/$2 break;<br />
}<br />
</code></p>
<p>Put this small snippet into the <code>server</code> config where you want userdirs enabled and enjoy your apache like mod_userdir.</p>
<p><em>Edit: made it work with subdirs</em><br />
<em>Edit: took advice of beate (see comments)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2008/nginx-userdir-list/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Vim tags not sorted error</title>
		<link>http://drakonen.com/2008/vim-tags-not-sorted-error/</link>
		<comments>http://drakonen.com/2008/vim-tags-not-sorted-error/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 12:24:42 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://drakonen.digigen.nl/blog/2008/vim-tags-not-sorted-error/</guid>
		<description><![CDATA[Vim has a pretty nice (although not that smart) completion command, Ctrl+n. Lately I&#8217;ve been getting this error: E432: Tags file not sorted This error is pretty annoying as it interrupts your work with an error. Googeling for this gave me no solution. Then I searched for files named tags (which are a lot), and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Vim_%28text_editor%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Vim_28text_editor_29?referer=');">Vim</a> has a pretty nice (although not that <a href="http://vimdoc.sourceforge.net/htmldoc/insert.html#complete-functions" onclick="pageTracker._trackPageview('/outgoing/vimdoc.sourceforge.net/htmldoc/insert.html_complete-functions?referer=');">smart</a>) completion command, Ctrl+n.</p>
<p>Lately I&#8217;ve been getting this error:</p>
<pre> E432: Tags file not sorted</pre>
<p>This error is pretty annoying as it interrupts your work with an error. <a href="http://www.google.com/search?q=E432" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?q=E432&amp;referer=');">Googeling</a> for this gave me no solution. Then I <a href="http://www.research.att.com/~gsf/man/man1/locate.html" onclick="pageTracker._trackPageview('/outgoing/www.research.att.com/_gsf/man/man1/locate.html?referer=');">searched</a> for files named tags (which are a lot), and I found a file in my home dir ~. I deleted that file and the error was gone.</p>
<p>The lesson was:<br />
<em>NEVER put a tags file in your home dir!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2008/vim-tags-not-sorted-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The curse called PHP</title>
		<link>http://drakonen.com/2006/the-curse-called-php/</link>
		<comments>http://drakonen.com/2006/the-curse-called-php/#comments</comments>
		<pubDate>Mon, 27 Nov 2006 15:56:44 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://drakonen.digigen.nl/blog/?p=39</guid>
		<description><![CDATA[PHP is a bad piece of software. It has too many bugs, some which cause great security risks in production software. My last weird bug with php was with GD. I use Gallery2 for my pictures, and with my new camera it failed misserably. The tumbnails were generted perfectly, but when trying to view a [...]]]></description>
			<content:encoded><![CDATA[<p>PHP is a <em>bad piece of software</em>. It has too many bugs, some which cause great <a href="http://secunia.com/search/?search=php" onclick="pageTracker._trackPageview('/outgoing/secunia.com/search/?search=php&amp;referer=');"> security</a> risks in production software.<br />
My last weird bug with php was with <a href="http://nl3.php.net/gd" onclick="pageTracker._trackPageview('/outgoing/nl3.php.net/gd?referer=');">GD</a>. I use <a href="http://www.gallery2.org/" onclick="pageTracker._trackPageview('/outgoing/www.gallery2.org/?referer=');">Gallery2</a> for my pictures, and with my new camera it failed misserably. The tumbnails were generted perfectly, but when trying to view a photo, gallery2 served me a perfectly blank page. Switching galery2 to use <a href="http://www.imagemagick.org/script/index.php" onclick="pageTracker._trackPageview('/outgoing/www.imagemagick.org/script/index.php?referer=');">imagemagick</a> instead of GD fixed it.</p>
<p>PHP is <em>not developer friendly</em> and does not encourage a good design of your software. That said, PHP is a very newbie friendly language, but eventually you will run into some weirdness of php.</p>
<p>PHP is <em>legacy software</em>. it is full of backwards compatability, that does not even work for some things.</p>
<p>PHP is <em>designed badly</em> and the language is <em>full of hacks</em> to add functionality it should have had ages ago. Take exceptions for example, they were added in php5, but they have very little use for the built-in php functions. Just a few use them.<br />
An other good example of bad design; PHP does <em>not know libaries</em> in its main distribution. Every function is availlable at any time in PHP. This may seem like a thing that&#8217;s very handy, you&#8217;ll never have to import a specific library to do your things, but actually it is a curse. An example, you made your own scandir function a long time ago. As PHP &#8220;progressed&#8221;, the function scandir was added to the builtin functions. Great, but your script just broke. PHP does not allow you to redefine a built-in function. If this function was added to a library, there would not have been a problem.<br />
The lack of namespaces is a big problem, new functions need <em>weird names</em> to avoid conflicts with older ones. The default (and only?) namespace is <em>too huge</em>.<br />
PHP <em>lacks modules</em>. You have to <em>recompile php</em> entirely to add a feature. Besides the time it takes to compile, sysadmins wont be all to happy about maintaining own packages. Every tiny update requires a complete rebuild of PHP. Why do you even want all available function available to you all the time?</p>
<p>PHP had its best time. Avoid PHP if you can, learn <a href="http://www.python.org/" onclick="pageTracker._trackPageview('/outgoing/www.python.org/?referer=');">Python</a>, <a href="http://www.ruby-lang.org/" onclick="pageTracker._trackPageview('/outgoing/www.ruby-lang.org/?referer=');">Ruby</a> or even <font size="1"> <a href="http://www.mono-project.com/Main_Page" onclick="pageTracker._trackPageview('/outgoing/www.mono-project.com/Main_Page?referer=');">c#</a></font>.</p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2006/the-curse-called-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I hate JavaScript</title>
		<link>http://drakonen.com/2006/i-hate-javascript/</link>
		<comments>http://drakonen.com/2006/i-hate-javascript/#comments</comments>
		<pubDate>Tue, 03 Jan 2006 13:18:47 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://drakonen.digigen.nl/blog/?p=16</guid>
		<description><![CDATA[Last 2 days I&#8217;ve been stuck on a small JavaScript issue and i can&#8217;t find the damn solution for it. I need an element from an iframe which itself is in an iframe. I&#8217;m going nuts, I can&#8217;t get it. I need it. AAAAAAAAAARGH! I hate javascript.]]></description>
			<content:encoded><![CDATA[<p>Last 2 days I&#8217;ve been stuck on a small JavaScript issue and i can&#8217;t find the damn solution for it. I need an element from an iframe which itself is in an iframe. I&#8217;m going nuts, I can&#8217;t get it. I need it. AAAAAAAAAARGH! I hate javascript.</p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2006/i-hate-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GTA:SA soundtrack playlist creator</title>
		<link>http://drakonen.com/2005/gtasa-soundtrack-playlist-creator/</link>
		<comments>http://drakonen.com/2005/gtasa-soundtrack-playlist-creator/#comments</comments>
		<pubDate>Sun, 27 Nov 2005 13:18:03 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[Media]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://drakonen.digigen.nl/blog/?p=13</guid>
		<description><![CDATA[I found some time again to work on this little project. It&#8217;s not finished, but it does the most important stuff: generate a playlist with random intro&#8217;s and outro&#8217;s (with or without dj chatter or both). Here it is. You need to install this first: http://www.lysator.liu.se/~creideiki/ra &#8230; n-andreas/]]></description>
			<content:encoded><![CDATA[<p>I found some time again to work on this little project. It&#8217;s not finished, but it does the most important stuff: generate a playlist with random intro&#8217;s and outro&#8217;s (with or without dj chatter or both). <a target="_blank" href="http://www.darkwired.org/%7Edrakonen/python/gtasaplaylist/" onclick="pageTracker._trackPageview('/outgoing/www.darkwired.org/_7Edrakonen/python/gtasaplaylist/?referer=');">Here</a>  it is.</p>
<p>You need to install this first:<br />
<a target="_blank" href="http://www.lysator.liu.se/%7Ecreideiki/radio-free-san-andreas/" onclick="pageTracker._trackPageview('/outgoing/www.lysator.liu.se/_7Ecreideiki/radio-free-san-andreas/?referer=');">http://www.lysator.liu.se/~creideiki/ra &#8230; n-andreas/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2005/gtasa-soundtrack-playlist-creator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim case insensitive search</title>
		<link>http://drakonen.com/2005/vim-case-insensitive-search/</link>
		<comments>http://drakonen.com/2005/vim-case-insensitive-search/#comments</comments>
		<pubDate>Wed, 09 Nov 2005 13:13:36 +0000</pubDate>
		<dc:creator>Drakonen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://drakonen.digigen.nl/blog/?p=8</guid>
		<description><![CDATA[Not much of news, but I ran into this problem today, do a case insensitive search in vim. this can be done with: :set ci or :set caseinsensitive This makes future searches case insensitive. A per search way is this: /pattern\c Notice the \c. It does not really matter where you put that \c as [...]]]></description>
			<content:encoded><![CDATA[<p>Not much of news, but I ran into this problem today, do a case insensitive search in vim.</p>
<p>this can be done with:<br />
<code>:set ci</code>  or  <code>:set caseinsensitive</code><br />
This makes future searches case insensitive.</p>
<p>A per search way is this:<br />
<code>/pattern\c</code><br />
Notice the <code>\c</code>. It does not really matter where you put that <code>\c</code> as <code>/foo\cbar</code> also works.</p>
]]></content:encoded>
			<wfw:commentRss>http://drakonen.com/2005/vim-case-insensitive-search/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
