<?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>Aleks&#039; Domain &#187; python</title>
	<atom:link href="http://metaleks.net/tag/python/feed" rel="self" type="application/rss+xml" />
	<link>http://metaleks.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Apr 2010 20:33:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Evolution of a Python Programmer</title>
		<link>http://metaleks.net/programming/the-evolution-of-a-python-programmer</link>
		<comments>http://metaleks.net/programming/the-evolution-of-a-python-programmer#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:42:09 +0000</pubDate>
		<dc:creator>Aleksandar Micovic</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://metaleks.net/?p=742</guid>
		<description><![CDATA[A while back, clever snippets of code portraying how different people programming in Python went about solving the same problem, appeared on the internet. Needless to say, it was pretty funny and despite its popularity, not many people seem to know of it when I bring it up. Being as lazy as I am when [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, clever snippets of code portraying how different people programming in Python went about solving the same problem, appeared on the internet. Needless to say, it was pretty funny and despite its popularity, not many people seem to know of it when I bring it up. Being as lazy as I am when it comes to these sorts of things, I am blogging about it now. Almost three years later. It has been posted and reposted dozens of times, but full of geek pride, I can proudly say that I helped create it by correcting some of the mistakes in the original. How&#8217;s that for major geek cred? </p>
<p>The original is right <a href="http://dis.4chan.org/read/prog/1180084983/">here</a>, if you&#8217;re interested.</p>
<h3>Newbie Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> factorial<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> x == <span style="color: #ff4500;">0</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">1</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> x <span style="color: #66cc66;">*</span> factorial<span style="color: black;">&#40;</span>x - <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> factorial<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>First Year Programmer (Studied Pascal)</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> factorial<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>:
    result = <span style="color: #ff4500;">1</span>
    i = <span style="color: #ff4500;">2</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> i <span style="color: #66cc66;">&lt;</span>= x:
        result = result <span style="color: #66cc66;">*</span> i
        i = i + <span style="color: #ff4500;">1</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> result
<span style="color: #ff7700;font-weight:bold;">print</span> factorial<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>First Year Programmer (Studied C)</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> fact<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>: <span style="color: #808080; font-style: italic;">#{</span>
    result = i = <span style="color: #ff4500;">1</span><span style="color: #66cc66;">;</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: black;">&#40;</span>i <span style="color: #66cc66;">&lt;</span>= x<span style="color: black;">&#41;</span>: <span style="color: #808080; font-style: italic;">#{</span>
        result <span style="color: #66cc66;">*</span>= i<span style="color: #66cc66;">;</span>
        i += <span style="color: #ff4500;">1</span><span style="color: #66cc66;">;</span>
    <span style="color: #808080; font-style: italic;">#}</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> result<span style="color: #66cc66;">;</span>
<span style="color: #808080; font-style: italic;">#}</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>First Year Programmer (Read <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">SICP</a>)</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">@tailcall
<span style="color: #ff7700;font-weight:bold;">def</span> fact<span style="color: black;">&#40;</span>x, acc=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>x <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span>fact<span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>x - <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span>acc <span style="color: #66cc66;">*</span> x<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:       <span style="color: #ff7700;font-weight:bold;">return</span> acc
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>First Year Programmer (Python)</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> Factorial<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>:
    res = <span style="color: #ff4500;">1</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span>, x + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>:
        res <span style="color: #66cc66;">*</span>= i
    <span style="color: #ff7700;font-weight:bold;">return</span> res
<span style="color: #ff7700;font-weight:bold;">print</span> Factorial<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Lazy Python Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> fact<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> x <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">1</span> <span style="color: #ff7700;font-weight:bold;">and</span> x <span style="color: #66cc66;">*</span> fact<span style="color: black;">&#40;</span>x - <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #ff4500;">1</span>
<span style="color: #ff7700;font-weight:bold;">print</span> fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Lazier Python Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">f = <span style="color: #ff7700;font-weight:bold;">lambda</span> x: x <span style="color: #ff7700;font-weight:bold;">and</span> x <span style="color: #66cc66;">*</span> f<span style="color: black;">&#40;</span>x - <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #ff4500;">1</span>
<span style="color: #ff7700;font-weight:bold;">print</span> f<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Python Expert Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">fact = <span style="color: #ff7700;font-weight:bold;">lambda</span> x: <span style="color: #008000;">reduce</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span>.<span style="color: #0000cd;">__mul__</span>, <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span>, x + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Python Hacker</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
@tailcall
<span style="color: #ff7700;font-weight:bold;">def</span> fact<span style="color: black;">&#40;</span>x, acc=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> x: <span style="color: #ff7700;font-weight:bold;">return</span> fact<span style="color: black;">&#40;</span>x.<span style="color: #0000cd;">__sub__</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>, acc.<span style="color: #0000cd;">__mul__</span><span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> acc
<span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span>fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>EXPERT PROGRAMMER</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> c_math <span style="color: #ff7700;font-weight:bold;">import</span> fact
<span style="color: #ff7700;font-weight:bold;">print</span> fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>BRITISH EXPERT PROGRAMMER</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> c_maths <span style="color: #ff7700;font-weight:bold;">import</span> fact
<span style="color: #ff7700;font-weight:bold;">print</span> fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Web Designer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> factorial<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>:
    <span style="color: #808080; font-style: italic;">#-------------------------------------------------</span>
    <span style="color: #808080; font-style: italic;">#--- Code snippet from The Math Vault          ---</span>
    <span style="color: #808080; font-style: italic;">#--- Calculate factorial (C) Arthur Smith 1999 ---</span>
    <span style="color: #808080; font-style: italic;">#-------------------------------------------------</span>
    result = <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
    i = <span style="color: #ff4500;">1</span> <span style="color: #808080; font-style: italic;">#Thanks Adam</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> i <span style="color: #66cc66;">&lt;</span>= x:
        <span style="color: #808080; font-style: italic;">#result = result * i  #It's faster to use *=</span>
        <span style="color: #808080; font-style: italic;">#result = str(result * result + i)</span>
           <span style="color: #808080; font-style: italic;">#result = int(result *= i) #??????</span>
        result = <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>result<span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> i<span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;">#result = int(str(result) * i)</span>
        i = i + <span style="color: #ff4500;">1</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> result
<span style="color: #ff7700;font-weight:bold;">print</span> factorial<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Unix Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">def</span> fact<span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>:
    <span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'factorial '</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
fact<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Windows Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">NULL = <span style="color: #008000;">None</span>
<span style="color: #ff7700;font-weight:bold;">def</span> CalculateAndPrintFactorialEx<span style="color: black;">&#40;</span>dwNumber,
                                 hOutputDevice,
                                 lpLparam,
                                 lpWparam,
                                 lpsscSecurity,
                                 <span style="color: #66cc66;">*</span>dwReserved<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> lpsscSecurity <span style="color: #66cc66;">!</span>= NULL:
        <span style="color: #ff7700;font-weight:bold;">return</span> NULL <span style="color: #808080; font-style: italic;">#Not implemented</span>
    dwResult = dwCounter = <span style="color: #ff4500;">1</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> dwCounter <span style="color: #66cc66;">&lt;</span>= dwNumber:
        dwResult <span style="color: #66cc66;">*</span>= dwCounter
        dwCounter += <span style="color: #ff4500;">1</span>
    hOutputDevice.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span>dwResult<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    hOutputDevice.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">1</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
CalculateAndPrintFactorialEx<span style="color: black;">&#40;</span><span style="color: #ff4500;">6</span>, <span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>Enterprise Programmer</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #dc143c;">new</span><span style="color: black;">&#40;</span>cls, <span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> cls<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args, <span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Number<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">pass</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> IntegralNumber<span style="color: black;">&#40;</span><span style="color: #008000;">int</span>, Number<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> toInt<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span><span style="color: #008000;">int</span>, <span style="color: #008000;">self</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> InternalBase<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, base<span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">base</span> = base.<span style="color: black;">toInt</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> getBase<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #008000;">self</span>.<span style="color: black;">base</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> MathematicsSystem<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, ibase<span style="color: black;">&#41;</span>:
        Abstract
&nbsp;
    @<span style="color: #008000;">classmethod</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> getInstance<span style="color: black;">&#40;</span>cls, ibase<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
            cls.__instance
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">AttributeError</span>:
            cls.__instance = <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>cls, ibase<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> cls.__instance
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> StandardMathematicsSystem<span style="color: black;">&#40;</span>MathematicsSystem<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, ibase<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> ibase.<span style="color: black;">getBase</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">NotImplementedError</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">base</span> = ibase.<span style="color: black;">getBase</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> calculateFactorial<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, target<span style="color: black;">&#41;</span>:
        result = <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
        i = <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">while</span> i <span style="color: #66cc66;">&lt;</span>= target:
            result = result <span style="color: #66cc66;">*</span> i
            i = i + <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> result
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> StandardMathematicsSystem.<span style="color: black;">getInstance</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>InternalBase, <span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">calculateFactorial</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">new</span> <span style="color: black;">&#40;</span>IntegralNumber, <span style="color: #ff4500;">6</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://metaleks.net/programming/the-evolution-of-a-python-programmer/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I Love Pixel2Life</title>
		<link>http://metaleks.net/no-category/i-love-pixel2life</link>
		<comments>http://metaleks.net/no-category/i-love-pixel2life#comments</comments>
		<pubDate>Sat, 29 Dec 2007 00:18:44 +0000</pubDate>
		<dc:creator>Aleksandar Micovic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pixel2life]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://metaleks.net/blog/website-updates/i-love-pixel2life/</guid>
		<description><![CDATA[I&#8217;m the kind of guy where if you&#8217;re nice to me, I&#8217;m nice to you.  Actually, I guess that&#8217;s not entirely true.  I am nice to everyone.  In fact, some say that I&#8217;m too friendly.  Aleks stop smiling, Aleks why are you looking at me that way?  Aleks get your hand off of me.
But the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m the kind of guy where if you&#8217;re nice to me, I&#8217;m nice to you.  Actually, I guess that&#8217;s not entirely true.  I am nice to everyone.  In fact, some say that I&#8217;m too friendly.  <em>Aleks stop smiling, Aleks why are you looking at me that way?  Aleks get your hand off of me</em>.</p>
<p>But the reason I am making this post is because my day has been made.  It&#8217;s not every day that my day get&#8217;s made, but today is different!  I am sure you are all aware of the website <a target="_blank" href="http://www.pixel2life.com" title="Pixel2Life">Pixel2Life</a>.  If not, then you have been living under a rock.  Pixel2Life is the largest tutorial archive on the net.  You won&#8217;t find anything bigger.  It hosts tutorials for everything.  And when I say everything, I mean <em>everything</em>!  Anyways, a while back I submitted one of my tutorials for review, and hopefully the chance that it would get put up on the main Pixel2Life site.  Lo&#8217; behold, I open up my inbox today to read:</p>
<blockquote><p>Congratulations, your tutorial titled &#8220;Variables and Data Types&#8221; has been approved and is now in the queue to be posted to the main page. There are 1 tutorials ahead of you in the queue (new tutorials are posted from the queue every 30 minutes).</p></blockquote>
<p>The grammar nazis will notice that the automated email I received has a few errors, but I don&#8217;t care! My tutorial will be on Pixel2Life! Bahaha. Today is a happy day.  You don&#8217;t need to tell me that I&#8217;m overreacting.  I know that I am.  I sound like a school girl who just&#8230;I&#8217;ll stop myself there.  It would have been a rather inappropriate anology ;) But yes, I even took a screenshot!  It&#8217;s too bad I couldn&#8217;t have taken it earlier, so I can see my tutorial in the #1 spot.</p>
<p> <img border="0" align="middle" width="456" src="http://metaleks.net/images/random/Pixel2LifeFirstEntry.PNG" alt="^_^" height="259" /></p>
<p>I&#8217;m #10 :p  And already 32 views!  That&#8217;s 32 lost souls who have just seen the light. </p>
<p>I couldn&#8217;t be happier sandwiched between my fellow bretheren jQuery tablesorter and Display xml data.  I shortened their names, I hope they don&#8217;t mind.  Oh, and I promise I won&#8217;t make a post about this every time my tutorials make it <img src='http://metaleks.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://metaleks.net/no-category/i-love-pixel2life/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
