<?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>Raphaël Slinckx &#187; fun</title>
	<atom:link href="http://raphael.slinckx.net/blog/tag/fun/feed" rel="self" type="application/rss+xml" />
	<link>http://raphael.slinckx.net/blog</link>
	<description>a.k.a kikidonk — Scabreusement Hype</description>
	<lastBuildDate>Tue, 22 Apr 2008 12:35:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bug Fixing Attitude</title>
		<link>http://raphael.slinckx.net/blog/2006-04-09/bug-fixing-attitude</link>
		<comments>http://raphael.slinckx.net/blog/2006-04-09/bug-fixing-attitude#comments</comments>
		<pubDate>Sun, 09 Apr 2006 18:54:25 +0000</pubDate>
		<dc:creator>Raphaël Slinckx</dc:creator>
				<category><![CDATA[Planet Gnome]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[meme]]></category>

		<guid isPermaLink="false">http://raphael.slinckx.net/blog/2006-04-09/bug-fixing-attitude</guid>
		<description><![CDATA[As Mikkel &#8220;Kamstrup&#8221; noted on his blog, bug hunting is all about attitude. Here is mine: Note how the photographer interrupted the bug-fixer, forcing him to simulate a smile. Also note the reference manual in case the man pages are missing. What&#8217;s your bug hunting attitude ?]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://kamstrup.livejournal.com/33430.html">Mikkel &#8220;Kamstrup&#8221; noted on his blog</a>, bug hunting is all about attitude.</p>
<p>Here is mine:<br />
<img alt="Bug hunting attitude" src="http://raphael.slinckx.net/images/kikidonk-dork.jpg" /></p>
<p>Note how the photographer interrupted the bug-fixer, forcing him to simulate a smile.</p>
<p>Also note the reference manual in case the man pages are missing.</p>
<p>What&#8217;s your bug hunting attitude ?</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.slinckx.net/blog/2006-04-09/bug-fixing-attitude/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Fun with python</title>
		<link>http://raphael.slinckx.net/blog/2006-01-20/fun-with-python</link>
		<comments>http://raphael.slinckx.net/blog/2006-01-20/fun-with-python#comments</comments>
		<pubDate>Fri, 20 Jan 2006 17:17:15 +0000</pubDate>
		<dc:creator>Raphaël Slinckx</dc:creator>
				<category><![CDATA[Planet Gnome]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://raphael.slinckx.net/blog/index.php/2006-01-20/fun-with-python</guid>
		<description><![CDATA[Fun python snippets Here is a short list of python WTF&#8217;s i often come across in my own code, debugging those is quite hard.. Tuples are immutable ? a = ([],[]) try: # Modifying a tuple ? a[0] += [1] except: pass print a Weird list references: a = [[None]*4]*3 a[0][0] = 1 print a [...]]]></description>
			<content:encoded><![CDATA[<p>Fun python snippets</p>
<p>Here is a short list of python WTF&#8217;s i often come across in my own code, debugging<br />
those is quite hard..</p>
<p>Tuples are immutable ?</p>
<pre>a = ([],[])

try:
# Modifying a tuple ?
a[0] += [1]
except:
pass

print a</pre>
<p>Weird list references:</p>
<pre>a = [[None]*4]*3
a[0][0] = 1

print a</pre>
<p>Import madness:</p>
<pre>* in mod1.py:
FOO=1

* in mod2.py:
import mod1
def set_foo(i):
mod1.FOO = i

* in mod3.py:
from mod1 import *
import mod2
mod2.set_foo(2)
print FOO

Run "python mod3.py"</pre>
<p>Weird variable scoping:</p>
<pre>* in mod1.py:
a = 3
def foo():
return a

if __name__ == "__main__":
for a in range(3):
print foo()

* in mod2.py
from mod1 import *
a = 6
print foo()

Compare "python mod1.py" and "python mod2.py"</pre>
<p>Of course these snippets are a bit convoluted, but I often find these patterns appearing randomly..</p>
<p>How much of them have you got right without looking at the answer before?</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.slinckx.net/blog/2006-01-20/fun-with-python/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>To Flush Or Not To Flush</title>
		<link>http://raphael.slinckx.net/blog/2005-12-02/to-flush-or-not-to-flush</link>
		<comments>http://raphael.slinckx.net/blog/2005-12-02/to-flush-or-not-to-flush#comments</comments>
		<pubDate>Fri, 02 Dec 2005 02:00:11 +0000</pubDate>
		<dc:creator>Raphaël Slinckx</dc:creator>
				<category><![CDATA[Planet Gnome]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://raphael.slinckx.net/blog/?p=27</guid>
		<description><![CDATA[Ok, I swear this is not me. &#8230; Moreover, I wasn&#8217;t hacking on epiphany, but reading Slashdot !]]></description>
			<content:encoded><![CDATA[<p>Ok, I swear <a href="http://ploum.frimouvy.org/?2005/12/02/82-les-trolls-religieux-c-est-chiant">this is not me</a>.</p>
<p>&#8230;</p>
<p>Moreover, I wasn&#8217;t hacking on epiphany, but reading <a href="http://science.slashdot.org/article.pl?sid=05/11/25/2051212&#038;tid=14">Slashdot</a> !</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.slinckx.net/blog/2005-12-02/to-flush-or-not-to-flush/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

