<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <atom:link rel="self" type="application/rss+xml" href="http://www.oui.com.br/blog/nando-en/rss"/>
    <title>in English</title>
    <description></description>
    <link>http://www.oui.com.br/blog/nando-en</link>
    <language>en-us</language>
    <pubDate>Fri, 16 Apr 2010 17:47:13 GMT</pubDate>
      <item>
        <title>My music compositions</title>
        <link>http://www.oui.com.br/blog/nando-en/post/my-music-compositions</link>
        <description>
&lt;p&gt;My music compositions can be heard at &lt;a href="http://nandoflorestan.bandcamp.com"&gt;nandoflorestan.bandcamp.com&lt;/a&gt;. Also, this blog is much less active now that I am &lt;a href="http://twitter.com/nandoflorestan"&gt;twitting&lt;/a&gt;...
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/my-music-compositions</guid>
      </item>
      <item>
        <title>What Oracle should do to MySQL</title>
        <link>http://www.oui.com.br/blog/nando-en/post/what-oracle-should-do-to-mysql</link>
        <description>
&lt;p&gt;What is probably going to happen now that Sun and MySQL belong to Oracle is:
&lt;/p&gt;
&lt;p&gt;1) They are going to get a world-class boring buzzword-compliant website.
&lt;/p&gt;
&lt;p&gt;2) &lt;a href="http://www.theregister.co.uk/2009/04/27/dziuba_sunacle/"&gt;All this.&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/what-oracle-should-do-to-mysql</guid>
      </item>
      <item>
        <title>Java's opinion of Python</title>
        <link>http://www.oui.com.br/blog/nando-en/post/javas-opinion-of-python</link>
        <description>
&lt;p&gt;I read some guy talking about Java, &amp;quot;the greatest language in the world&amp;quot;, just like an ugly American might say &amp;quot;the greatest country in the world&amp;quot;. He has motivated me to become an ugly Pythonista.
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Javer and a Cee-Sharper meet a Pythonista and consider Python for a brief moment.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oracle Certified Java Programmer:&lt;/em&gt; ― I guess writing code in Python is quicker, but it might create maintenance nightmares later. Python is optimized for productivity and Java for maintainability.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Microsoft Certified Professional:&lt;/em&gt; ― Actually, the absence of great IDEs for Python, such as Visual Studio, might slow down the production of code.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oracle Certified Java Programmer:&lt;/em&gt; ― &amp;quot;Rigid&amp;quot; languages such as Java make you write more code, but that code stays legible till the end of the project lifecycle.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy:&lt;/em&gt; ― You are wrong. I chose Python exactly because it is the most readable language available...
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Microsoft Certified Professional:&lt;/em&gt; ― Nah, creating properties is very hard without an IDE. Another problem in Python is the lack of Generics. I am proud of writing in a language that has LINQ. Python is also missing a nice Reflection library such as the ones in C# and Java! That shows how much more powerful these languages are.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oracle Certified Java Programmer:&lt;/em&gt; ― Yeah, I like Java because I get to program in XML. Hey, in Python you never know the type of a variable or parameter. Java is more explicit, therefore Java code is more readable.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy realizes the hopelessness of it:&lt;/em&gt; ― You are right, of course, but you can always use Hungarian Notation: s_name = 'Nando'; i_age = 33;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Microsoft Certified Professional:&lt;/em&gt; ― I don't like Python &lt;strong&gt;or&lt;/strong&gt; Java. I prefer the C family of languages, invented by Microsoft, that includes C, C++ and C#.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy:&lt;/em&gt; ― Wait, in Python you can continue to type a semicolon at the end of every line.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oracle Certified Java Programmer:&lt;/em&gt; ― Hmm, it must have copied Groovy. But that makes Python better than I figured...
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy tries to ignore him:&lt;/em&gt; ― You can have strongly typed variables too. And braces. See this example:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# MyClass.py
# Proud author: nosklo (Clovis Fabricio)
class MyClass(object):#{
    def __init__(self, s_name, i_age):#{
        assert isinstance(s_name, str);
        assert isinstance(i_age, int);
        if (i_age &amp;gt; 20):#{
            print s_name;
        #}
    #}
#}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;Microsoft Certified Professional:&lt;/em&gt; ― Hmm, the eye sees the #{ combination easily. OK, this code is readable. But I like .net because it is extremely multi-language.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy:&lt;/em&gt; ― Don't worry, &lt;a href="http://entrian.com/goto/"&gt;you can even have goto if you wish&lt;/a&gt;. Here is a VB-like alternative:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# MyClass.py. Proud author: nosklo (Clovis Fabricio)
class MyClass(object):
    def __init__(self, s_name, i_age):
        assert isinstance(s_name, str)
        assert isinstance(i_age, int)
        if (i_age &amp;gt; 20):
            print s_name
        #end if
    #end function
#end class
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;Microsoft Certified Professional:&lt;/em&gt; ― You can't convince me because Python is an interpreted language, and I only like compiled languages, like C#. Furthermore, I like when &lt;a href="http://msdn.microsoft.com/en-us/library/aa480453.aspx"&gt;application blocks&lt;/a&gt; are ready so I don't have to write them myself. ― &lt;em&gt;Goes away.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;OCJP waits until MCP is far enough.&lt;/em&gt; ― Never mind him, he never even understood the importance of Checked Exceptions. Hey, I see there are 2 classes in this file. This must be a maintenance nightmare! The only true way is one class per file.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy:&lt;/em&gt; ― Yeah, namespaces are one honking great idea ― let's do more of those!
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Oracle Certified Java Programmer:&lt;/em&gt; ― As much as I might like your language, I could never give up world-class enterprise-ready buzzword compliance and a BIG company backing us up.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy:&lt;/em&gt; ― Good for you!
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ruby developer:&lt;/em&gt; ― Excuse me, I couldn't help but hear your conversation. I just wanted to say that if you ever need a dynamic language, consider Ruby ― it is more powerful.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Python apologist guy turns his back to OCJP and attacks Ruby developer:&lt;/em&gt; ― &lt;a href="http://www.djangoproject.com/weblog/2006/dec/"&gt;Die, heretic scum!&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/javas-opinion-of-python</guid>
      </item>
      <item>
        <title>Schemaless Python databases</title>
        <link>http://www.oui.com.br/blog/nando-en/post/schemaless-python-databases</link>
        <description>
&lt;p&gt;3 new persistence options for Python
&lt;/p&gt;
&lt;p&gt;As I struggle to create an object-oriented database for Python on top of Tokyo Cabinet -- &lt;a href="http://code.google.com/p/pykesto"&gt;Pykesto&lt;/a&gt; -- I have found two other nice persistence mechanisms:
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.google.com/p/kineta/"&gt;Kineta&lt;/a&gt; is a dynamic, schemaless, relational database written in Python on top of Berkeley DB. It is almost done, I have tested it a bit and was impressed. It is full of different ideas, sometimes I felt it was too different from what I am used to, but if you really think about them and try to be fair, you realize these are all good ideas. Really, take a look at Kineta.
&lt;/p&gt;
&lt;p&gt;The last one -- &lt;a href="http://bitbucket.org/loogica/pryvilege/"&gt;Pryvilege&lt;/a&gt; -- is a Prevayler for Python. For those unfamiliar with the &lt;a href="http://www.prevayler.org/"&gt;Prevayler&lt;/a&gt; concept, this is an extremely fast, transparent, ACID persistence mechanism for small databases that fit in memory. In such a case you can be free of all the overhead of traditional databases and just use your objects in the most natural way. Behind the scenes, the framework writes a log of all the operations you do. Every night or so a checkpoint is created, too (allowing the log to be reset). When the system is turned off and on again, the checkpoint is loaded and the log is applied so your objects come back to the state they were before. This might take a lot of RAM, but RAM can be much cheaper than developing with traditional databases.
&lt;/p&gt;
&lt;p&gt;Pryvilege is in an alpha state, but is already functional.
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; One more! &lt;a href="http://buzhug.sourceforge.net/"&gt;buzhug&lt;/a&gt; is a pure-Python database engine.
&lt;/p&gt;
&lt;p&gt;And there exists &lt;a href="http://bplusdotnet.sourceforge.net/"&gt;a B-plus Tree implemented in Python&lt;/a&gt;.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/schemaless-python-databases</guid>
      </item>
      <item>
        <title>Installing Tokyo Cabinet and its Python driver</title>
        <link>http://www.oui.com.br/blog/nando-en/post/installing-tokyo-cabinet</link>
        <description>
&lt;p&gt;Tokyo Cabinet is the fastest database available, and it comes in several flavors. Here is how to install it in Ubuntu and use it with Python.
&lt;/p&gt;
&lt;p&gt;After realizing that CouchDB is not appropriate when you know you will need &lt;em&gt;ad hoc&lt;/em&gt; queries (which doesn't mean CouchDB isn't very cool), I am trying out &lt;a href="http://tokyocabinet.sourceforge.net"&gt;Tokyo Cabinet&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Here is a post about it, &lt;a href="http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/"&gt;using Ruby&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Tokyo Cabinet offers several types of database, but the version that comes in Ubuntu 8.10 is &lt;strong&gt;missing the fixed-length and the table database&lt;/strong&gt;, so I had to compile it:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install checkinstall build-essential libbz2-dev
# Dependencies installed; now compile:
./configure --prefix=/usr
make clean
make
# checkinstall -R    # would create an RPM package
sudo checkinstall -D # creates and installs a Debian package
# Now you have a package that you can install AND uninstall, instead of
# sudo make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now the library, programs and headers are available, so we can install the Python driver. The most well-known is the old &lt;strong&gt;pytc&lt;/strong&gt; which also doesn't offer all kinds of databases. &lt;a href="http://github.com/rsms/tc/tree/master"&gt;tc&lt;/a&gt; is the Python driver we need. Here is the &lt;a href="http://blog.hunch.se/"&gt;author's blog&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;I download the latest code from github, uncompress it, enter its directory, then:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./setup.py install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That will succeed in Ubuntu 8.10 as long as the header files are found.
&lt;/p&gt;
&lt;p&gt;Unfortunately this driver is only nearly complete. As of 2008-04-03, the table database lacks a close() method, and the query API is being finished (you cannot execute queries yet).
&lt;/p&gt;
&lt;p&gt;Anyway, what software are we going to write using Tokyo Cabinet? How about an ambitious object-oriented database for Python apps? Something to replace ZODB? I am talking about &lt;a href="http://code.google.com/p/pykesto/"&gt;pykesto&lt;/a&gt; and I wish &lt;strong&gt;you&lt;/strong&gt; would help me write it.
&lt;/p&gt;
&lt;p&gt;However, it will take time to get there, and we might have to start by creating a higher-level interface to Tokyo Cabinet, because right now instantiating, for instance, the table database involves passing ugly flags like this:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import tc
t = tc.TDB('test.tdb', tc.TDBOWRITER | tc.TDBOCREAT)
# The above means open the file 'test.tdb' for writing and
# create it if it does not exist.
t.put('row id', {'col id':'value'})
t.get('row id')
# Out: {'col id': 'value'}
t.close()
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Another reason to create a higher-level API is that the query API for the table database also involves lots of flags. I am sure this can easily be made Pythonic. I will put the code at &lt;a href="http://code.google.com/p/pykesto/"&gt;pykesto&lt;/a&gt; as soon as I have it.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/installing-tokyo-cabinet</guid>
      </item>
      <item>
        <title>Running Kurso de Esperanto on Ubuntu 8.10</title>
        <link>http://www.oui.com.br/blog/nando-en/post/running-kurso-de-esperanto</link>
        <description>
&lt;p&gt;Today I decided to learn Esperanto. Best way to start seems to be Kurso, a gratis program. So...
&lt;/p&gt;
&lt;p&gt;...I downloaded &lt;a href="http://www.kurso.com.br"&gt;Kurso3.0.deb&lt;/a&gt; and installed it. You might have 3 issues running this program in Ubuntu:
&lt;/p&gt;
&lt;p&gt;1) No way to start the program
&lt;/p&gt;
&lt;p&gt;Installing the program does not add a menu entry for it. So click the Gnome Panel, pick &amp;quot;Add to panel...&amp;quot;, then &amp;quot;Custom Application Launcher&amp;quot;, then type:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Name: Kurso
Command: kurso
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You may also click the button at the left to choose a nice icon. That's it, now you can easily launch the program.
&lt;/p&gt;
&lt;p&gt;2) /usr/share/kurso/tradukoj
&lt;/p&gt;
&lt;p&gt;The second problem that might happen is a message about lacking write access to the directory /usr/share/kurso/tradukoj. Another symptom is, clicking on the Settings button does not display the configuration screen.
&lt;/p&gt;
&lt;p&gt;A solution would be to type the following in a console:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /usr/share/kurso/
ls -l # prints out the contents of the kurso directory
sudo chmod 666 tradukoj
ls -l
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This sets write permissions on that directory. Now you can restart the program, the message is gone and you can open the Settings screen.
&lt;/p&gt;
&lt;p&gt;3) Sounds problem
&lt;/p&gt;
&lt;p&gt;You might get no sound for playback or recording. The solution is:
&lt;/p&gt;
&lt;p&gt;a) Install mpg321:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install mpg321
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;b) Open the Settings screen, switch to the Sound/Internet tab, and leave it like this:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MP3 player:    mpg321
WAV recorder:  aplay
WAV player:    arecord --duration=3 --rate=44100
Browser:       firefox
e-mail client: thunderbird
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you are really paying attention, you might notice that it doesn't make sense to pick &amp;quot;aplay&amp;quot; to record and &amp;quot;arecord&amp;quot; to play. This is not my mistake; in this version (3.0) of Kurso, they messed up the 2 labels.
&lt;/p&gt;
&lt;p&gt;There you go, fully functional Kurso.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/running-kurso-de-esperanto</guid>
      </item>
      <item>
        <title>Web dev in Python: must read</title>
        <link>http://www.oui.com.br/blog/nando-en/post/web-dev-in-python-must-read</link>
        <description>
&lt;p&gt;If you are a Python web developer, here is some stuff you absolutely cannot miss.
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     &lt;a href="http://dirtsimple.org/2007/02/wsgi-middleware-considered-harmful.html"&gt;WSGI middleware considered harmful&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://www.groovie.org/2007/08/18/wsgi-middleware-isnt-middleware-time-for-better-language"&gt;WSGI Framework Components&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://ish.io/embedded/restish/introduction.html"&gt;Restish&lt;/a&gt;, a new web framework
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://pypi.python.org/pypi/Spawning"&gt;Spawning&lt;/a&gt;, a WSGI server which supports multiple processes, multiple threads, non-blocking HTTP IO, and automatic graceful upgrading of code
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://www.cherrypy.org/"&gt;CherryPy&lt;/a&gt;, an easy HTTP framework
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://code.google.com/p/webpyte/"&gt;Webpyte&lt;/a&gt;, a reimplementation of TurboGears
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://genshi.edgewall.org/"&gt;Genshi&lt;/a&gt;, a great templating system
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://genshi.edgewall.org/wiki/GenshiTutorial"&gt;Tutorial: CherryPy + Genshi&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://code.google.com/p/couchdb-python/"&gt;CouchDB with Python&lt;/a&gt;. Couchdb is a document-oriented database
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://twistedmatrix.com/projects/core/documentation/howto/tutorial/index.html"&gt;Introduction to Twisted, an asynchronous network framework&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://code.google.com/p/webpyte/source/browse/trunk/webpyte/email_validator.py"&gt;The best e-mail address validation module you are going to find&lt;/a&gt;
 &lt;/li&gt;
&lt;/ul&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/web-dev-in-python-must-read</guid>
      </item>
      <item>
        <title>Easily start the screensaver in Ubuntu Linux</title>
        <link>http://www.oui.com.br/blog/nando-en/post/easily-start-the-screensaver</link>
        <description>
&lt;p&gt;How to start the Gnome screen saver immediately
&lt;/p&gt;
&lt;p&gt;The command to start the Gnome screensaver is:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gnome-screensaver-command -a
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I tried to make this happen using keyboard shortcuts first, but couldn't find a way. So I went with the next best thing: a launcher in the Gnome panel.
&lt;/p&gt;
&lt;p&gt;Right click the Gnome panel and click &amp;quot;Add to panel...&amp;quot;. Pick &amp;quot;Custom Application Launcher&amp;quot;. Another window appears. Fill it like this:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Type: Application
Name: Screensaver
Command: gnome-screensaver-command -a
Icon: &amp;lt;pick any icon...&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Hit OK and now you can start the screensaver by clicking the new icon.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/easily-start-the-screensaver</guid>
      </item>
      <item>
        <title>Tuples, lists, dicts and objects: how fast?</title>
        <link>http://www.oui.com.br/blog/nando-en/post/tuples-lists-dicts-and-objects</link>
        <description>
&lt;p&gt;Comparison of tuple, list, dict and object instantiation performance in Python.
&lt;/p&gt;
&lt;p&gt;It is well-known that in Python tuples are faster than lists, and dicts are faster than objects. I wondered how much so. After some tests, the conclusions are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Use a tuple when you need a tuple and a list when you need a list.&lt;/strong&gt; A list can have items appended or removed, while a tuple is immutable. If you won't be adding or removing items, use a tuple and your code will run a little faster.&lt;/p&gt;

&lt;p&gt;On the other hand, if you make a tuple with the intention of being fast, and then some code has to create another tuple out of your tuple, when it could have added or removed an item from a list instead, then you are actually being slower.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Dicts can be twice as fast as objects (but they do much less).&lt;/strong&gt; Object oriented programming is based on the fact that uniting data and behaviour in a single place leads to better factored, more reusable code. So go on and make classes and objects, it is the only civilized thing to do! However, note that dicts are quite faster than objects (to instantiate).&lt;/p&gt;

&lt;p&gt;Needless to say, premature optimization is the root of all evil, so keep these facts in mind only when you are optimizing some code, not when you are writing something new.&lt;/p&gt;

&lt;p&gt;Here is a little module, and the tests are in its docstring if you want to reproduce them:&lt;/p&gt;

&lt;pre&gt;#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''speed_test.py

Comparison of tuple, list, dict and object instantiation performance.

Usage: (results are from Python 2.5.2 in Ubuntu)


python -m timeit -s 'from speed_test import *' 'a = {}'
10000000 loops, best of 3: 0.0792 usec per loop

python -m timeit -s 'from speed_test import *' 'a = []'
10000000 loops, best of 3: 0.081 usec per loop

python -m timeit -s 'from speed_test import *' 'a = object()'
1000000 loops, best of 3: 0.231 usec per loop

This object() instantiation is almost useless, done only to get a rough idea.

Conclusion:
For empty containers, lists and dicts are equivalent.


python -m timeit -s 'from speed_test import *' 'a = (x, x)'
10000000 loops, best of 3: 0.184 usec per loop

python -m timeit -s 'from speed_test import *' 'a = [x, x]'
1000000 loops, best of 3: 0.271 usec per loop

python -m timeit -s 'from speed_test import *' 'a = {x:x, y:x}'
1000000 loops, best of 3: 0.474 usec per loop

python -m timeit -s 'from speed_test import *' 'a = TestObj(x, x)'
1000000 loops, best of 3: 1.17 usec per loop

Conclusion:
For storing 2 values, tuples are 50% faster than lists.
Lists are twice as fast as dicts, but not fair: dicts also store keys.
Dicts are 250% faster than objects.


python -m timeit -s 'from speed_test import *' 'a = (x, x, x, x)'
1000000 loops, best of 3: 0.268 usec per loop

python -m timeit -s 'from speed_test import *' 'a = [x, x, x, x]'
1000000 loops, best of 3: 0.357 usec per loop

python -m timeit -s 'from speed_test import *' 'a = {x:x, y:x, z:x, v:x}'
1000000 loops, best of 3: 0.79 usec per loop

python -m timeit -s 'from speed_test import *' 'a = TestFour(x, x, x, x)'
1000000 loops, best of 3: 1.81 usec per loop

Conclusion:
When storing 4 values, tuples are 33% faster than lists.
And dicts are 2 times faster than objects.

The difference diminishes as you store more and more values.
'''

__author__ = 'Nando Florestan'

x = 42 # we use variables because constants would be much faster.
y = 43 # you don't use so many constants in the real world.
z = 44
v = 45


class TestObj(object):
    def __init__(self, a, b):
        self.a = a
        self.b = b


class TestFour(object):
    def __init__(self, a, b, c, d):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
&lt;/pre&gt;</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/tuples-lists-dicts-and-objects</guid>
      </item>
      <item>
        <title>I dream of a db4o for Python</title>
        <link>http://www.oui.com.br/blog/nando-en/post/i-dream-of-a-db4o-for-python</link>
        <description>
&lt;p&gt;I wish Python would have an object database that wouldn't eat up all the RAM.
&lt;/p&gt;
&lt;p&gt;Such a project could also be defined as &amp;quot;Durus with queries that don't have to first instantiate objects&amp;quot;.
&lt;/p&gt;
&lt;p&gt;It would need a custom file format, without using Python's pickles, to be able to query without instantiating. And I wouldn't mind losing some dynamic-language-like flexibility if I could have this.
&lt;/p&gt;
&lt;p&gt;I have been using the SQLAlchemy ORM because it uses very little memory, it is very powerful and very fast. It does everything you need and more. However...
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For some projects&lt;/strong&gt;, I feel the difficulties in defining SQLALchemy models (and dealing with the relational database behind it). I want to use Python types, not relational database types. I would switch to an object database, if only it would query and use little RAM.
&lt;/p&gt;
&lt;p&gt;(In Python, making a tuple is faster than making a list is faster than making a dict is MUCH faster than instantiating an object.)
&lt;/p&gt;
&lt;p&gt;If I were to start such a db4o-like project (maybe 2010?) I would have to wrap my head around pointers to objects and their activation. So &lt;strong&gt;at first&lt;/strong&gt; I might use SQLAlchemy as a backend. A table of properties... belongs to a table of objects... which know their Python type. This would probably enable one to make those queries without first instantiating.
&lt;/p&gt;
&lt;p&gt;About this scheme, ronny tells me to take a look at &lt;a href="http://en.wikipedia.org/wiki/Resource_Description_Framework"&gt;RDF&lt;/a&gt; -- neat for dealing with not clearly defined object graphs.
&lt;/p&gt;
&lt;p&gt;(This is not my area of expertise...)
&lt;/p&gt;
&lt;p&gt;If you are a real good, but real good Python developer, go ahead and do it! But heads up, you're gonna face DAMN tricky stuff about reference cycles and efficient collections.
&lt;/p&gt;
&lt;p&gt;This project is for the future. Python 3.0 on it!
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/i-dream-of-a-db4o-for-python</guid>
      </item>
      <item>
        <title>Backalaika, an easy backup solution</title>
        <link>http://www.oui.com.br/blog/nando-en/post/backalaika</link>
        <description>
&lt;p&gt;A Python utility that I have written lets you define backup profiles, filter filenames, compress to zip, tar.gzip or tar.bz2, perform differential, incremental or full backups etc.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sourceforge.net/projects/backalaika/"&gt;Backalaika&lt;/a&gt; is not a Russian musical instrument. It is a backup solution for small offices, available at SourceForge.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://oui.com.br/n/content.php?article.15"&gt;The original idea&lt;/a&gt; was to be implemented in C# a few years ago and indeed a crummy prototype was even uploaded to the CVS repository in SourceForge.
&lt;/p&gt;
&lt;p&gt;That architecture was unnecessarily complex. The current program is written in a smarter language (Python) with fewer features, but is much more useable. You can &lt;a href="http://backalaika.svn.sourceforge.net/viewvc/backalaika/trunk/"&gt;download it here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://backalaika.svn.sourceforge.net/viewvc/backalaika/trunk/backalaika.py?view=markup"&gt;Read the documentation&lt;/a&gt; (on the program itself).
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/backalaika</guid>
      </item>
      <item>
        <title>Python 2.6.1 on Ubuntu</title>
        <link>http://www.oui.com.br/blog/nando-en/post/python-26-on-ubuntu</link>
        <description>
&lt;p&gt;Python 2.6.1 is the new stable Python version, but Ubuntu 8.10 Intrepid Ibex does not come with it. Here is how to install it though.
&lt;/p&gt;
&lt;p&gt;First of all, you must &lt;a href="http://docs.python.org/whatsnew/2.6.html"&gt;learn about Python 2.6&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Excited about the new features? Then now realize that while Python 2.6 prepares you for 3.0, it also makes your code &lt;strong&gt;incompatible with 2.5&lt;/strong&gt; if you use any of the new features! You must keep this in mind when you decide what to use!
&lt;/p&gt;
&lt;p&gt;Most library authors won't bother updating their code with Python 2.6 features, as this would mean incompatibility with Python 2.4 and 2.5 (as well as 3.0). &lt;strong&gt;Python 2.6 is a version that is only compatible with itself.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;In other words, there are two antagonic forces here: On the one hand, you want to use the latest features of the language and write modern code that won't have to be heavily rewritten/updated soon (and using Python 2.6 is the best option for that right now, because nobody is using Python 3.0 yet); on the other hand, the lack of libraries and batteries that you can use, as well as other people using your code, may dictate that you must stay in previous versions for a long time.
&lt;/p&gt;
&lt;p&gt;We would be talking about using Python 3.0 here if only there were any libraries for it already...
&lt;/p&gt;
&lt;p&gt;Latest Zope/Plone still use Python 2.4!
&lt;/p&gt;
&lt;p&gt;In these times, simple libraries that are more likely to be ported sooner to 3.0 make a good choice.
&lt;/p&gt;
&lt;p&gt;If you have to stay in Python 2.5... you still can import these:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from __future__ import with_statement
from __future__ import absolute_import
# http://docs.python.org/whatsnew/pep-328.html
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On the other hand, if you are targeting Python 2.6, why would you not use all its features? Therefore, add this to the top of your files:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# http://docs.python.org/whatsnew/pep-328.html
from __future__ import print_function   # deletes the print statement
from __future__ import unicode_literals # unicode by default
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To sum up, Python 2.6 is for people who can get away with using Python 2.6. These will benefit from having fewer changes to make when the time to upgrade to 3.0 comes, and from using new language features right now. But there is a small price to pay in library installation complexity, as we shall see soon. (Keep reading.)
&lt;/p&gt;
&lt;h1&gt;Installing Python 2.6.1 on Ubuntu Intrepid Ibex&lt;/h1&gt;
&lt;p&gt;Download the sources:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget http://python.org/ftp/python/2.6.1/Python-2.6.1.tar.bz2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Decompress them:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tar -xjf Python-2.6.1.tar.bz2
cd Python-2.6.1/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Install dependencies:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install checkinstall build-essential libc6-dev tk8.4-dev libgdbm-dev
sudo apt-get install libdb-dev libreadline-dev libsqlite3-dev libncurses5-dev
sudo apt-get install libbz2-dev libssl-dev # and possibly a few others
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Configure, make, test:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# I install it at /progs because I am afraid of messing up other directories
mkdir /progs
./configure --prefix=/progs --enable-ipv6  # --enable-shared
make
# It finishes with this complaint:
# Failed to find the necessary bits to build these modules:
# bsddb185           sunaudiodev
# These seem not to be a problem. I continue anyway.
make test # (optional, takes 15 minutes or so)
# 327 tests OK.
# 33 tests skipped: (...)
# Those skips are all expected on linux2.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now you can do one of two things. Either create a .deb package:
&lt;/p&gt;
&lt;p&gt;checkinstall -D --pkgname=python2.6.1 --pkgversion=2.6.1 --maintainer=nandoflorestan@gmail.com--inspect --backup=yes --install=no make altinstall
&lt;/p&gt;
&lt;p&gt;And make sure you answer YES when asked to create a default set of docs!
&lt;/p&gt;
&lt;p&gt;...or install directly:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The final step of the installation is to make your new &lt;strong&gt;python&lt;/strong&gt; and &lt;strong&gt;python2.6&lt;/strong&gt; binaries available in the path, such that they will be found before python2.5. However, you had better do this for your user only, lest your whole Ubuntu operating system suffer (since all Linux distros depend heavily on Python). Being cautious this way, I create symbolic links to &lt;strong&gt;python&lt;/strong&gt; and &lt;strong&gt;python2.6&lt;/strong&gt; from the &lt;strong&gt;bin&lt;/strong&gt; directory of my user:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /home/nando/python/bin
ln -s /progs/bin/python2.6
ln -s /progs/bin/python
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now you can test the interpreter:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This tutorial is &lt;a href="http://blog.pythonaro.com/2008/10/horrible-hack-to-get-python-26-on.html"&gt;based&lt;/a&gt; &lt;a href="http://www.saltycrane.com/blog/2008/10/installing-python-26-source-ubuntu-hardy/"&gt;on&lt;/a&gt; &lt;a href="http://www.lysium.de/blog/index.php?/archives/229-Installing-Python-2.6-on-Ubuntu-8.04.html"&gt;these&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Now let us install a couple libraries so that our new Python 2.6 may be minimally useful:
&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;Library hell&lt;/h1&gt;
&lt;p&gt;Now if you decide to go ahead and use 2.6, you are in library hell -- at least when the library you need is not pure Python. For instance, to be able to manipulate images, you must install PIL yourself, and it may not be trivial:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install libjpeg62 libjpeg62-dev libfreetype6 libfreetype6-dev tk-dev tcl-dev
wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
tar xvzf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
sudo /progs/bin/python2.6 setup.py build_ext -i
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The last command fails in Ubuntu Intrepid Ibex, saying: &amp;quot;_imagingtk.c:20:16: error: tk.h: No such file or directory&amp;quot;
&lt;/p&gt;
&lt;p&gt;If you run &amp;quot;locate tk.h&amp;quot;, you discover the missing file is really at: /usr/include/tcl8.4/tk.h
&lt;/p&gt;
&lt;p&gt;Because this is a gcc problem and I am just a Python guy, I don't know how to solve it. I wonder if I really need this _imagingtk stuff... I don't use TK... So I just uninstall the python-tk and tk packages. This way it succeeds and just says:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;*** TKINTER support not available
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;An alternative solution to the above problem might be to just turn TKINTER support off by commenting out these lines in setup.py (starting at 328):
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    '''
    elif feature.tcl and feature.tk:
        exts.append(Extension(
            &amp;quot;_imagingtk&amp;quot;, [&amp;quot;_imagingtk.c&amp;quot;, &amp;quot;Tk/tkImaging.c&amp;quot;],
            libraries=[feature.tcl, feature.tk]
            ))
    '''
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So now I test PIL:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/progs/bin/python2.6 selftest.py # runs the tests
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately one important test fails, showing a new problem for me to solve:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  File &amp;quot;PIL/Image.py&amp;quot;, line 375, in _getdecoder
    raise IOError(&amp;quot;decoder %s not available&amp;quot; % decoder_name)
IOError: decoder jpeg not available
1 items had failures:
   1 of  57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Since all required libraries are installed, I don't know what is going on. Googling the problem, I see people have solved this by repeating the whole process after everything is in place. Yeah I know, this is stupid. Anyway, I go ahead and delete the whole directory and repeat the steps and this time it works:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd ..
rm -r Imaging-1.1.6
tar xvzf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6/
/progs/bin/python2.6 setup.py build_ext -i
/progs/bin/python2.6 selftest.py # runs the tests
/progs/bin/python2.6 setup.py install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Library hell indeed. If it took one working day to install each library. Fortunately, pure Python libraries written for 2.5 seem to work just as well with 2.6:
&lt;/p&gt;
&lt;h1&gt;Setuptools&lt;/h1&gt;
&lt;p&gt;Installing setuptools is quite easy:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg
sh setuptools-0.6c9-py2.6.egg
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After this, I find that I can run both &lt;strong&gt;bpython&lt;/strong&gt; and &lt;strong&gt;ipython&lt;/strong&gt; interactive interpreters, just reusing their old eggs that were already installed in my system for Python 2.5. I just change the shebang at the top of the commands to this:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/usr/bin/env python
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This way, our Python 2.6 can be picked automatically (depending on $PATH).
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;cherrypy&lt;/strong&gt;, &lt;strong&gt;genshi&lt;/strong&gt; and most other packages just work too.
&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;ul&gt;
 &lt;li&gt;
     If you are writing an application: make an effort to use Python 2.6 right now.
 &lt;/li&gt;
 &lt;li&gt;
     If you are writing a library: (very hard) try to support both Python 2.5 and Python 3.0.
 &lt;/li&gt;
&lt;/ul&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/python-26-on-ubuntu</guid>
      </item>
      <item>
        <title>Don LaFontaine is dead, who is gonna do movie trailers now?</title>
        <link>http://www.oui.com.br/blog/nando-en/post/don-lafontaine</link>
        <description>
&lt;p&gt;I vote Pablo Francisco. View these youtubed videos in order:
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=7QPMvj_xejg"&gt;Who was Don LaFontaine&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=awlqbcJZd38"&gt;The 3 tenors do a movie trailer&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=7QPMvj_xejg"&gt;Pablo Francisco made a carreer out of this...&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/don-lafontaine</guid>
      </item>
      <item>
        <title>Music links</title>
        <link>http://www.oui.com.br/blog/nando-en/post/music-links</link>
        <description>
&lt;p&gt;&lt;a href="http://jakemandell.com"&gt;Online ear tests for anyone, not just musicians&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://home.vicnet.net.au/~colmusic/welcome.htm"&gt;Color and music&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/music-links</guid>
      </item>
      <item>
        <title>Wireless network is down on Ubuntu startup/boot</title>
        <link>http://www.oui.com.br/blog/nando-en/post/wireless-network-is-down</link>
        <description>
&lt;p&gt;A quick tip for Hardy users.
&lt;/p&gt;
&lt;p&gt;After finally finding and buying a PCI wireless card that has a little penguin logo on the package, I found out that it worked, but I had to do &amp;quot;sudo ifdown wlan0; ifup wlan0&amp;quot; on every boot.
&lt;/p&gt;
&lt;p&gt;The solution for this is:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo nano /etc/network/interfaces
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;...and add a line to your interface definition that reads:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pre-up sleep 7
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;...this way the network will start 7 seconds later, but with success. (Some systems might need more than 7 seconds, just increase the value.)
&lt;/p&gt;
&lt;p&gt;Linux on Frankenstein PC hardware still has too many of these annoyances and I don't see them going away at all. Using free software instead of a Mac that just works does have a cost, we have to admit it.
&lt;/p&gt;
&lt;p&gt;For more information on the &lt;em&gt;interfaces&lt;/em&gt; file:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;man interfaces
&lt;/code&gt;&lt;/pre&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/wireless-network-is-down</guid>
      </item>
      <item>
        <title>"Exposé" in Ubuntu Hardy</title>
        <link>http://www.oui.com.br/blog/nando-en/post/expose-in-ubuntu-hardy</link>
        <description>
&lt;p&gt;Easily switch between applications in Ubuntu Hardy
&lt;/p&gt;
&lt;p&gt;First you have to turn on Visual Effects:
&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;
     Gnome menu System / Preferences / Appearance
 &lt;/li&gt;
 &lt;li&gt;
     Visual Effects tab
 &lt;/li&gt;
 &lt;li&gt;
     Turn on Compiz by selecting &amp;quot;Normal&amp;quot; (or even &amp;quot;Extra&amp;quot;).
 &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There is an additional application that can be installed for you to configure Compiz:
&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;
     Open a terminal
 &lt;/li&gt;
 &lt;li&gt;
     sudo apt-get install compizconfig-settings-manager
 &lt;/li&gt;
 &lt;li&gt;
     Gnome menu System, Preferences, Advanced Desktop Effects Settings
 &lt;/li&gt;
 &lt;li&gt;
     Scroll down to Window Management
 &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By default, the alt-tab combination is assigned to &amp;quot;Application Switcher&amp;quot;, which is cool, shows the reduced windows linearly... but you may prefer to disable it and enable the &lt;strong&gt;Ring Switcher&lt;/strong&gt; instead. I have done so and assigned alt-tab and shift-alt-tab to it. The advantage in my opinion is a clearer view of the applications while switching.
&lt;/p&gt;
&lt;p&gt;I also tweak the Ring Switcher so it becomes fast and displays larger thumbnails.
&lt;/p&gt;
&lt;p&gt;In addition, I enable the Compiz equivalent of Exposé: &lt;strong&gt;Scale / Window Picker&lt;/strong&gt;. This one deserves to be accessible by keyboard and by screen corner. I also increment its speed.
&lt;/p&gt;
&lt;p&gt;If you use multiple desktops, note that Super-E activates &lt;strong&gt;Expo&lt;/strong&gt; which allows you to choose one of the desktops and move apps among them.
&lt;/p&gt;
&lt;p&gt;Sadly, beyond these I think there is little that really would improve your productivity as opposed to being just eye candy.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/expose-in-ubuntu-hardy</guid>
      </item>
      <item>
        <title>MuseScore</title>
        <link>http://www.oui.com.br/blog/nando-en/post/musescore</link>
        <description>
&lt;p&gt;Maybe it is not quite there yet, but &lt;a href="http://mscore.sourceforge.net/"&gt;MuseScore&lt;/a&gt; is the most promising free-software music score editor I have ever seen. &lt;a href="http://davidbolton.info/articles/musescore_review.html"&gt;Here is a review.&lt;/a&gt; There is a Ubuntu package for it.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/musescore</guid>
      </item>
      <item>
        <title>Web development reading</title>
        <link>http://www.oui.com.br/blog/nando-en/post/web-development-reading</link>
        <description>
&lt;p&gt;A collection of the most interesting things I have been reading about web development.
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     A free ebook about &lt;a href="http://diveintogreasemonkey.org/"&gt;Greasemonkey&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://www.wymeditor.org/en/"&gt;WYMeditor&lt;/a&gt;: finally a javascript wysiwyg editor that shouldn't generate buggy XHTML.
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://gears.google.com"&gt;Google Gears&lt;/a&gt; makes the web browser a richer client.
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://code.google.com/appengine"&gt;Google App Engine&lt;/a&gt; is Python HTTP hosting focused on scalability.
 &lt;/li&gt;
&lt;/ul&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/web-development-reading</guid>
      </item>
      <item>
        <title>Our daily nazism — parents beware</title>
        <link>http://www.oui.com.br/blog/nando-en/post/deathnote</link>
        <description>
&lt;p&gt;What are our children being prepared for? &amp;quot;&lt;em&gt;Death Note&lt;/em&gt;&amp;quot;, seen by millions, is &lt;strong&gt;nazi&lt;/strong&gt;. The story was a huge opportunity for moral thought, but only nazi ethos has a chance to appear.
&lt;/p&gt;
&lt;p&gt;&lt;img class="FloatRight" alt="Death Note" src="http://www.animeshade.kit.net/AS-Death-Note.jpg" /&gt;
   I am talking about &lt;a href="http://en.wikipedia.org/wiki/Death_note"&gt;Death Note&lt;/a&gt;, anime series. The manga series has been read by millions in Japan alone. There is also a Japanese film and a few other franchises.
&lt;/p&gt;
&lt;p&gt;I wouldn't normally lose any of my time with nonsense such as anime series, but my 14-year-old daughter likes it and I decided to accompany her, plus in the first few episodes &lt;strong&gt;I was curious myself. Why?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Light&lt;/strong&gt; is a popular, good-looking student who only gets A grades. A genius, really. One day he finds a weapon, thrown unto this world by a Shinigami (a God of Death) for his amusement. The weapon basically lets Light kill anyone he wants, without even meeting the victim. Light decides that he will use this weapon to kill every criminal that appears on the news. This way, he thinks, he will be the unknown creator of a new world, without crime.
&lt;/p&gt;
&lt;p&gt;Crime rates drop quickly and crowds thank the mysteryous Kira (&amp;quot;killer&amp;quot;) for it.
&lt;/p&gt;
&lt;p&gt;Is it nazi enough for you? But there is more.
&lt;/p&gt;
&lt;p&gt;The premise of the story seems a golden opportunity to talk about ethics. It would have been easy to discuss (and, in the process, teach children) about:
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     how wrong it is to take justice in one's own hands;
 &lt;/li&gt;
 &lt;li&gt;
     how wrong it is to be accuser and judge at the same time;
 &lt;/li&gt;
 &lt;li&gt;
     why we need the due process of law;
 &lt;/li&gt;
 &lt;li&gt;
     how deceiving the news (and the rest of the culture industry) can be;
 &lt;/li&gt;
 &lt;li&gt;
     how anybody can end up committing a crime (nobody is immune);
 &lt;/li&gt;
 &lt;li&gt;
     how the law is not always right and may define crimes that shouldn't be;
 &lt;/li&gt;
 &lt;li&gt;
     how the law may &lt;em&gt;not&lt;/em&gt; define some actions as crimes when they should be;
 &lt;/li&gt;
 &lt;li&gt;
     the principle that punishment should be proportional to the crime;
 &lt;/li&gt;
 &lt;li&gt;
     etc. etc.
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead what happens?
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     The mass murderer, who thinks of himself as a god, is indeed called Light;
 &lt;/li&gt;
 &lt;li&gt;
     He just kills everybody, he is not interested in finding out whether the news are even true;
 &lt;/li&gt;
 &lt;li&gt;
     He is Japan's best student (!!!) but somehow has no idea that his concept of justice is barbaric, absolutely uncivilized;
 &lt;/li&gt;
 &lt;li&gt;
     The series carefully avoids any moral evaluation, except Kira's own reasoning to do as he does;
 &lt;/li&gt;
 &lt;li&gt;
     Nobody else has high dreams;
 &lt;/li&gt;
 &lt;li&gt;
     Kira is the main character, no other character comes close;
 &lt;/li&gt;
 &lt;li&gt;
     Eventually other people find a way to follow the mass murderer's example;
 &lt;/li&gt;
 &lt;li&gt;
     The Gods of Death don't ever interfere for moral reasons. They interfere either for fun or because they are in love with a female character. They don't really think there is an enormous mess going on. In the end the plot just forgets about the Shinigami, they almost disappear.
 &lt;/li&gt;
 &lt;li&gt;
     The whole series becomes just a thriller alla Sherlock Holmes versus Moryarty. Except that the killer is more competent than the cops.
 &lt;/li&gt;
 &lt;li&gt;
     When the blockbusterish thriller ends, the series ends. There was nothing else to say.
 &lt;/li&gt;
 &lt;li&gt;
     Due process of law is never mentioned.
 &lt;/li&gt;
 &lt;li&gt;
     What is a crime? This is never questioned.
 &lt;/li&gt;
 &lt;li&gt;
     How &lt;em&gt;should&lt;/em&gt; punishment be done? This is never asked.
 &lt;/li&gt;
 &lt;li&gt;
     etc. etc.
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do you think I am exaggerating? Do you think nobody would really identify with Kira? Think again.
&lt;/p&gt;
&lt;p&gt;Many people already think like Kira and would do the same. I have witnessed bad taste television shows in Brazil in which the angry host talked about a criminal (not a convicted criminal, but one that had just been arrested by the police), showing sensationalist disgust to what the criminal had done, saying things like &amp;quot;when he was doing it, he didn't think about human rights, so why should he have human rights now?&amp;quot;
&lt;/p&gt;
&lt;p&gt;This is how many people think. We are surrounded, outnumbered by the stupid.
&lt;/p&gt;
&lt;p&gt;I was curious enough to go to IMDb. I know most of the posts there are noise; there is no place to find idiots as the IMDb forums. But I have also found extremely intelligent comments there before. Maybe it depends on the film.
&lt;/p&gt;
&lt;p&gt;In this case, I could find next to nobody interested in any moral issues raised by &lt;em&gt;Death Note&lt;/em&gt;. Most people just talked about the cat/mouse game. When they did talk about ethics, they were always &lt;strong&gt;examples of what I am saying&lt;/strong&gt;:
&lt;/p&gt;
&lt;h2&gt;Example 1&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;I have a hunch as to why Light may not have ultimately succeeded in wiping out criminals. Rather why he ended up getting caught. It's because he never got creative with his killings. He killed solely by heart attacks.&lt;/em&gt;
&lt;/p&gt;
&lt;h2&gt;Example 2&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;The real problem started when Light decided to kill an innocent. IE Lind &amp;quot;L&amp;quot;. For starters, he's no longer got moral authority. Before that you could make a philosophical argument that although he wasn't legally supposed to kill criminals with the Death Note, from a moral standpoint he was the only one with the power to protect the world and humanity from it's own evil elements, and therefore he had to act. But the moment he kills &amp;quot;Lind&amp;quot; (who as far as Light knew was only doing his job), he's just another killer who takes pleasure in the act.&amp;quot;&lt;/em&gt;
&lt;/p&gt;
&lt;h2&gt;Example 3&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;YEah you shouldn't feel sorry for Misa b/c she even states that she doesn't care if Light only uses her and she's happy w/ just that.&lt;/em&gt;
&lt;/p&gt;
&lt;h2&gt;Example 4&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;death note is not about good vs. evil L died because Light is better than him and Light died because the death note is bad luck.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;in my opinion Light is a good person that happened to pick up the death note and use it to make the world a better place (he can be seen as a supper hero who’s only power is to kill people just by knowing their face and name, some evil guy who wants to take over the world, or a victim). I didn’t really see treat misa bad he just got mad at her when she did something stupid (it was her fault why they got cot by L besides she wanted to help light. Also I thank he fell in love with her when they lost their memory. If he didn’t like her would have killed her or break up with her near the end of the series in stead of going to marry her.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;L might seem like the good guy but he’s not really a good person. he’s just a detective for fun, he doesn’t care if what he’s doing is bad or good, he will do any thing just to solve a case like lie, stalling, killing, letting good people die, takes advantage of people, breaks the law, forces people to do bad thing (forcing light to take advantage of misa) siding with criminals. He also hinted he is/was a pervert. You see his evil side and love of sweets in mello and his thinking, logic, loner side in near.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If it was about good vs. evil it would have been more black and white about it.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If any thing the most good person is light dad and the most bad person is the mob boss&lt;/em&gt;
&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;See what I mean? People can watch this obscenity and not even be aware that they are becoming nazis.
&lt;/p&gt;
&lt;p&gt;In the last (bloody) episode, the good cops prevail. OK. But notice &lt;em&gt;how&lt;/em&gt; this is done. Kira, surrounded, wounded, once again explains at length what he thinks (more nazi propaganda). Now the good cops are going to respond. I expect some education, finally, would anyone pleeease explain to Kira his mistake? Nobody does. The cop just says &amp;quot;you are wrong, you are just another serial killer and that is all&amp;quot;.
&lt;/p&gt;
&lt;p&gt;But I have already shown that the moral question is not understood by the target audience. I don't feel it is understood by the author either.
&lt;/p&gt;
&lt;p&gt;Artistically, this shit isn't. It is just another anime. Economically animated (this means many, many stills), silly story, unidimensional characters (who never change), everything you can expect from the culture industry. No investigator appears smoking — but most of them are children (because children is the target audience of this crap and they like to see children), so they have children's vices such as eating too much chocolate. When a female character finally appears, of course she is a model, blonde, subservient, dumb, and her voice sounds like a woodpecker with a toothache. Intelligent characters are always socially inept, even Light (who starts out popular) becomes lonesome; the detective who finally defeats Kira is a 10-year-old genius who only plays alone with his toys. In other words, all significant people must always be alone. If there ever was a serial killer generator, this is it.
&lt;/p&gt;
&lt;p&gt;Trash that only children would take; however it is rated TV-14. Much of the music (which always sounds stupid and is repeated in every episode) is stolen from &amp;quot;Carmina Burana&amp;quot; by &lt;a href="http://en.wikipedia.org/wiki/Carl_orff"&gt;Carl Orff&lt;/a&gt;, himself possibly a Nazi and in any case a favourite composer of the original Nazis. (&amp;quot;Carmina Burana&amp;quot; is a very simple score by 20th century standards; nazis don't take complexity well, as &amp;quot;Death Note&amp;quot; helps to show.) Some of the credits music is heavy metal, which is known to always be Nazi anyway.
&lt;/p&gt;
&lt;p&gt;Some cultural references are thrown in without any real significance or effect:
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     Plainchant in the music is in the wrong places and leads to nothing.
 &lt;/li&gt;
 &lt;li&gt;
     The main Shinigami character likes to eat apples and Kira provides apples to him. Everybody knows what apples mean, but like I said, this has no significance or effect. It is like an afterthought: &amp;quot;wow, I finally finished writing this damn script — oh wait, I forgot to drop a couple of biblical references in it&amp;quot;.
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Anyhow, now that &lt;em&gt;Death Note&lt;/em&gt; contains apples, people are saying it is &lt;em&gt;cult&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Desu nôto&lt;/em&gt; is one of the most irresponsible things I have ever seen. My advice is: take care of &lt;strong&gt;your&lt;/strong&gt; children and never be afraid to say &amp;quot;no TV&amp;quot;!
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/deathnote</guid>
      </item>
      <item>
        <title>A FUD campaign against XHTML</title>
        <link>http://www.oui.com.br/blog/nando-en/post/a-fud-campaign-against-xhtml</link>
        <description>
&lt;p&gt;HTML was a total mess and XHTML fixed that. But now some people want to unfix it.
&lt;/p&gt;
&lt;p&gt;This was the first time I ever saw stupid people in the Python community. They don't use XHTML because it is not perfect.
&lt;/p&gt;
&lt;p&gt;Well, as any web designer or web programmer in the world knows, &lt;a href="http://en.wikipedia.org/wiki/XHTML#Adoption"&gt;Internet Explorer has always tried and will always try to destroy any standard&lt;/a&gt;. And yes, XHTML has its own shortcomings. It is still infinitely better than the pure mess that HTML 4 was.
&lt;/p&gt;
&lt;p&gt;This FUD is going to increase from now on, because now some people want to sell us that &amp;quot;XHTML has failed&amp;quot; and &amp;quot;HTML 5 will be great&amp;quot;.
&lt;/p&gt;
&lt;p&gt;I did not know there were so many morons who in 2008 still haven't understood this:
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Transcribed from #Pylons, 2008-03-15&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; but as browsers don't implement it currently i have to keep a page compatible to xhtml and html browsers
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; which is so problematic from so many point of views
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; starting with different css semantics, different cdata semantics, different javascript behavior etc.
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; steg: i want to understand why so many people are blindly promoting xhtml without understanding it
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; defending common HTML in 2008 sucks
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; defending xhtml in 2008 sucks, as its more of a 2015 language
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; NandoFlorestan: show me a page of you where you're doing xhtml
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; mitsuhiko, anywhere in oui.com.br
&lt;/p&gt;
&lt;p&gt;&amp;lt;dpn`&amp;gt; what i know about xhtml i like
&lt;/p&gt;
&lt;p&gt;&amp;lt;devinus&amp;gt; every modern browser supports XHTML sent as text/html
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; devinus: nope
&lt;/p&gt;
&lt;p&gt;&amp;lt;dpn`&amp;gt; mostly that because it is xml you can do all sorts of dandy thing with it
&lt;/p&gt;
&lt;p&gt;&amp;lt;devinus&amp;gt; so can it everyone, this argument is soooo 1999
&lt;/p&gt;
&lt;p&gt;&amp;lt;frostschutz&amp;gt; it's amazingly difficult to do some table layouts with just divs
&lt;/p&gt;
&lt;p&gt;&amp;lt;steg&amp;gt; let's tally NandoFlorestan's fantastic argument so far: &amp;quot;Defending HTML sucks&amp;quot;, &amp;quot;People who don't use XHTML are lazy&amp;quot; oh and here's the absolute killer, the one that convinces me most of all... apparently we &amp;quot;drool over table lay outs and are ultraconservative Microsoft-worshiping Bush-adoring XHTML-bashing bastards&amp;quot;
&lt;/p&gt;
&lt;p&gt;&amp;lt;steg&amp;gt; NandoFlorestan: can you add to this impressive repertoire?
&lt;/p&gt;
&lt;p&gt;&amp;lt;frostschutz&amp;gt; oui.com.br does not look like xhtml
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; NandoFlorestan: you're neither having any problematic cdata sections there nor javascript that plays with the dom
&lt;/p&gt;
&lt;p&gt;&amp;lt;steg&amp;gt; actually wait you sound foreign
&lt;/p&gt;
&lt;p&gt;&amp;lt;steg&amp;gt; no self-respecting american would be called &amp;quot;Nando&amp;quot;
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; i bet you support ron paul
&lt;/p&gt;
&lt;p&gt;&amp;lt;steg&amp;gt; does calling you Nando count as name-calling? ;)
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; call him obama
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     NandoFlorestan looks up this &amp;quot;Ron Paul&amp;quot; guy
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; &amp;quot;Congressman Ron Paul is the leading advocate for freedom in our nation's capital.&amp;quot; Sounds good
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; wrong definition
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; ron paul: master and commander, jesus's 3rd coming
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; when the terrorists attack, Ron Paul will FIGHT....for a better fiscal policy
&lt;/p&gt;
&lt;p&gt;&amp;lt;devinus&amp;gt; lol
&lt;/p&gt;
&lt;p&gt;&amp;lt;devinus&amp;gt; Ron Paul
&lt;/p&gt;
&lt;p&gt;&amp;lt;devinus&amp;gt; and Obama both have XHTML sites
&lt;/p&gt;
&lt;p&gt;&amp;lt;devinus&amp;gt; McCain has invalid HTML
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; NandoFlorestan: what is your website
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; oui.com.br
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; thank you for such genuine interest in my musings
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; such a wonderful audience
&lt;/p&gt;
&lt;p&gt;&amp;lt;stepz_&amp;gt; xhtml error handling is not exactly ideal for building robust stuff
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; zepolen: validation is not important, the main problem is if the xml is syntactically incorrect
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; then the browser &lt;em&gt;must&lt;/em&gt; abort rendering with a syntax error
&lt;/p&gt;
&lt;p&gt;&amp;lt;stepz_&amp;gt; html4 works fine, has no real problems and is more copmatible
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; I just wanted to understand what was the reason for the rage against this Ron Paul, he sounds perfectly reasonable to me in the interview
&lt;/p&gt;
&lt;p&gt;&amp;lt;mitsuhiko&amp;gt; actually america needs yet another gw bush
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; america is not a country
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; america is a continent.
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; the country is called United States of America.
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; There are many other countries in America.
&lt;/p&gt;
&lt;p&gt;&amp;lt;zepolen&amp;gt; if you have a problem with me you will have to take it up with my attorney
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; I didnt know there were so many trolls in #pylons...
&lt;/p&gt;
&lt;p&gt;&amp;lt;maqr[hax]&amp;gt; NandoFlorestan: i really hope that's your real name
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/a-fud-campaign-against-xhtml</guid>
      </item>
      <item>
        <title>SQLAlchemy has a new, easy declarative layer</title>
        <link>http://www.oui.com.br/blog/nando-en/post/sqlalchemy-decl</link>
        <description>
&lt;p&gt;A transcript from the #sqlalchemy IRC channel
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; deitarion: we just added &lt;a href="http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/lib/sqlalchemy/ext/declarative.py"&gt;a new declarative layer&lt;/a&gt; which removes a little of the verbosity, not sure if thats where you saw &amp;quot;too much boilerplate&amp;quot;
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; woot, declarative layer part of SA?  So not an extension?
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; its in ext/
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; we've had activemapper its just terrilby out of date
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; way out of date
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; this is way smaller than activemapper
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; its 90 lines
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; I ran into a lot of problems with it, and sent some fixes to johnathan but it ended up being too much work
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; i doubt this one has any big problems
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; since it does almost nothing :)
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; hehehe
&lt;/p&gt;
&lt;p&gt;&amp;lt;Gedd&amp;gt; justsomedood: what kind of problems?
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; It deferred class loading / table creation to make sure all dependencies were met before it did, that didn't always work
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; I ran into cases where if I didn't define my classes in the correct order it would never create them, or get stuck in a loop
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; I haven't used it since 3.10-ish I think though
&lt;/p&gt;
&lt;p&gt;&amp;lt;Gedd&amp;gt; ah ok
&lt;/p&gt;
&lt;p&gt;&amp;lt;Gedd&amp;gt; that explains it :)
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; zzzeek_, the synonym stuff in the declarative layer is sweet!
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; I think this may be an Elixir killer
&lt;/p&gt;
&lt;p&gt;&amp;lt;jek&amp;gt; nah
&lt;/p&gt;
&lt;p&gt;&amp;lt;Gedd&amp;gt; NandoFlorestan: FWIW, Elixir handles synonyms too
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; hmm, didnt know that.
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; NandoFlorestan: elixir has a ton of stuff this does not
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; So on this one, when defining &amp;quot;complex&amp;quot; relations(), with a primaryjoin on a table/object that hasn't been defined yet you'd probably have to make that at the end with a class_mapper()?
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; you can stick it on later, like User.someprop = relation(SomeOtherObject, priamryjoin=foo.c.bar==bat.c.foo)
&lt;/p&gt;
&lt;p&gt;&amp;lt;zzzeek_&amp;gt; theres no class_mapper() needed here really since the class goes right to the mapper.....its also there as class.__mapper__
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; k
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; cool
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; it would definitly condense my models and make them easier for others to read, and I wouldn't have to worry about the syntax changing
&lt;/p&gt;
&lt;p&gt;&amp;lt;justsomedood&amp;gt; me likes
&lt;/p&gt;
&lt;p&gt;&amp;lt;NandoFlorestan&amp;gt; that is why I like it: I already know the syntax
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/sqlalchemy-decl</guid>
      </item>
      <item>
        <title>Pylons without Buffet, and a critique of TurboGears</title>
        <link>http://www.oui.com.br/blog/nando-en/post/pylons-without-buffet</link>
        <description>
&lt;p&gt;Ben Bangert has decided to remove Buffet from Pylons. Of course it will still support all those templating languages, just not through Buffet.
&lt;/p&gt;
&lt;p&gt;The replacement? Just &lt;a href="http://pylonshq.com/pasties/729"&gt;a few basic render functions&lt;/a&gt;. They make it much easier to see how you'd modify parts if you needed to tweak options — something you cannot do if Buffet is in the equation.
&lt;/p&gt;
&lt;p&gt;Here is &lt;a href="http://pylonshq.com/pasties/730"&gt;ltbarcly's version of the same thing&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;ltbarcly agrees. Why do we need one function that knows how to render every possible type of template? Just have a function called &amp;quot;render_genshi&amp;quot;, one called &amp;quot;render_mako&amp;quot; etc., then you can do things like streaming in genshi, or form filling, and use all the caching etc in mako. Buffet doesn't do anything for you really — except give you the lowest common denominator.
&lt;/p&gt;
&lt;p&gt;He thinks, as I do, that dot notation for template names is stupid. If you write a common path instead, such as &amp;quot;test/blah.html&amp;quot;, it looks for &amp;quot;test/blah/html&amp;quot;... Who needs the additional text replacement code — who ever needed dot notation for templates?
&lt;/p&gt;
&lt;p&gt;(Mitsuhiko answers: Kid was the one that needed dot notation, because it compiled the template, then imported it.)
&lt;/p&gt;
&lt;p&gt;I wish TurboGears 2.0 does without Buffet, too...
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/pylons-without-buffet</guid>
      </item>
      <item>
        <title>Do you really need 21 MB of RAM for a Python website?</title>
        <link>http://www.oui.com.br/blog/nando-en/post/turbogears-pylons-ram</link>
        <description>
&lt;p&gt;I made a little experiment and found that using CherryPy 3.1, plus the packages I need, instead of the whole TurboGears stack, can save a lot of RAM.
&lt;/p&gt;
&lt;p&gt;How can a TurboGears website use 1/3 less RAM?
&lt;/p&gt;
&lt;p&gt;(If you host at WebFaction, your account is mainly constrained on memory usage.)
&lt;/p&gt;
&lt;p&gt;My TurboGears 1.0.4.2 application is using 23,888 KB on startup, then 27,512 KB after many requests for different pages. Pylons is more or less the same, since a Hello World takes up 21 MB.
&lt;/p&gt;
&lt;p&gt;(Python 2.5, Ubuntu 7.10. I understand this varies a lot based on OS.)
&lt;/p&gt;
&lt;p&gt;I decided to see what would happen if I rolled my own &amp;quot;framework&amp;quot; on top of CherryPy 3.1, which is vastly superior to CherryPy 2.3 — pity TG hasn't upgraded!
&lt;/p&gt;
&lt;p&gt;So I tried a memory consumption test for a CherryPy 3.1 based website.
&lt;/p&gt;
&lt;p&gt;I started with the CherryPy Hello World, then added import by import, measuring the impact in memory usage. The total memory used is annotated besides the corresponding import.
&lt;/p&gt;
&lt;p&gt;You can see memory usage with the following Linux shell commands:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ps aux
ps aux | grep python
ps aux | grep hello.py
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Don't confuse virtual memory with resident memory.
   I am worried about the latter only.
&lt;/p&gt;
&lt;p&gt;The answer: A CherryPy 3.1 Hello World amounts to mere &lt;strong&gt;7 MB&lt;/strong&gt;. After I import everything I remember that I need (including Genshi, SQLAlchemy and Routes), I'm using &lt;strong&gt;14 MB&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://paste.lisp.org/display/56714"&gt;Here is the (very simple) test for you to reproduce.&lt;/a&gt;
&lt;/p&gt;
&lt;h2&gt;Why this enormous difference?&lt;/h2&gt;
&lt;p&gt;Robert Brewer, CherryPy author, explains to me at #cherrypy:
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     well, I know Sylvain went on a tear recently to make sure we weren't importing things too early
 &lt;/li&gt;
 &lt;li&gt;
     so CP 2.x -&amp;gt; 3.1 might be a good chunk of the difference by itself
 &lt;/li&gt;
 &lt;li&gt;
     I also ripped out some of the stdlib modules from CP and rewrote them myself in order to be faster (e.g. no sense importing the whole MIME module when you're just doing http headers--a lot of the mime stuff is for email)
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of course, I owe my whole Python web programming experience to TurboGears. It provides sane defaults, especially for beginners. I learned Kid, then Genshi. I learned SQLObject, then SQLAlchemy. I also learned how to use Routes as the TG URL dispatcher. And there was the help of a large community.
&lt;/p&gt;
&lt;p&gt;But now that I am not a beginner, just using plain CherryPy could be a very similar experience.
&lt;/p&gt;
&lt;p&gt;Based on the result of this simple test, I am thinking of assembling a small TurboGears-like web framework. I would really just steal the things I really use. Make them work under CherryPy 3.1 (TG really should have upgraded.)
&lt;/p&gt;
&lt;p&gt;TurboGears 2.0 is being implemented on top of Pylons for good reasons... but CherryPy still seems to have several advantages over Paste or even WebOb, so it is not such an easy decision. At least for me.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/turbogears-pylons-ram</guid>
      </item>
      <item>
        <title>How to set up a nice Python development environment</title>
        <link>http://www.oui.com.br/blog/nando-en/post/development-environment</link>
        <description>
&lt;p&gt;A recommended way to start developing in Python in Linux
&lt;/p&gt;
&lt;p&gt;Newbies to the &lt;a href="http://www.python.org"&gt;Python programming language&lt;/a&gt; usually ask for an IDE. First of all, Python is a language that does &lt;strong&gt;not&lt;/strong&gt; really need an IDE. You can just use a text editor like Kate, with a very simple text completion based on words that already exist in the file being edited. I have been using 2 very good simple IDEs for Python: Eric 4 and Geany.
&lt;/p&gt;
&lt;p&gt;(Sometimes I try to use Eclipse/PyDev too, but I hate it when it hangs!)
&lt;/p&gt;
&lt;p&gt;Instead of worrying about an IDE, &lt;em&gt;&lt;/em&gt;make sure you install &lt;a href="http://ipython.scipy.org"&gt;ipython&lt;/a&gt;&lt;em&gt;&lt;/em&gt;. It is an enhanced Python interpreter, full of features such as tab completion, help, documentation viewing etc. However, ipython usage is beyond the scope of this post.
&lt;/p&gt;
&lt;p&gt;As a new Python developer there are some things that you should be worried about, but maybe you don't know. These things gradually led me to set up a development environment with these characteristics:
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;No root access&lt;/strong&gt;. Come on, you know better than becoming root for such mundane tasks as running or even editing your programs.
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;No installation from your distro's repositories&lt;/strong&gt;. Tempting as it may be to just &lt;em&gt;sudo apt-get install turbogears&lt;/em&gt;, as a developer you want to easily control which versions you are using, instead of just accepting an old version from the repositories. &lt;a href="http://peak.telecommunity.com/DevCenter/EasyInstall#downloading-and-installing-a-package"&gt;setuptools&lt;/a&gt; is a nice solution for that.
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;No installation as root&lt;/strong&gt;. As a Python developer you want to be able to swap packages and versions easily. Therefore, we shall install everything to ~/python/lib (&amp;quot;~&amp;quot; means your home directory, such as /home/nando).
&lt;/p&gt;
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are doing web development, note that this approach can also be used in shared hosting accounts where you have no root access!
&lt;/p&gt;
&lt;p&gt;The following tutorial shows how to accomplish these goals in Linux. We use nano as a text editor, but you can use any text editor you want. You also should know about file names that start with a dot: they are usually hidden from the user in Linux, and used for configuration and for programs to store user data. In Nautilus, the Gnome file manager, you can toggle visibility of hidden files by pressing Control-H.
&lt;/p&gt;
&lt;h2&gt;Step 0: Uninstall&lt;/h2&gt;
&lt;p&gt;First of all, &lt;strong&gt;uninstall any special Python packages&lt;/strong&gt; that you may have installed from your distribution's repositories, such as TurboGears, SQLObject, SQLAlchemy, Kid, Genshi, Django etc.
&lt;/p&gt;
&lt;p&gt;From your distro, keep only your Python, or better yet, just what your distro uses. There is really no need to custom install Python itself. Hopefully you already have Python 2.5, 2.6 and 3.0...
&lt;/p&gt;
&lt;p&gt;You can also &lt;em&gt;apt-get install setuptools&lt;/em&gt; -- that is ok.
&lt;/p&gt;
&lt;h2&gt;Step 1: Prepare program locations&lt;/h2&gt;
&lt;p&gt;Open a console to create the following directories:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mkdir ~/python
mkdir ~/python/lib
mkdir ~/python/bin
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The last 2 directories is where we will install all Python packages, using setuptools. Now we want to tell Python to look up those directories when searching for some Python package. So edit your .bashrc file:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At the top of that file, add these 2 lines:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export PYTHONPATH=~/python/lib:$PYTHONPATH
export PATH=~/python/bin:$PATH
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That adds the libraries to the Python path and the startable programs to the shell path. This will happen the next time the shell starts and reads the .bashrc file.
&lt;/p&gt;
&lt;p&gt;We also want that to take effect now. So go ahead and paste those 2 lines to your console, too.
&lt;/p&gt;
&lt;p&gt;To see your current settings use these commands:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;echo $PATH
echo $PYTHONPATH
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Configure setuptools&lt;/h2&gt;
&lt;p&gt;Now we want setuptools to use those 2 directories too, so when we say &lt;em&gt;easy_install TurboGears&lt;/em&gt; it will be installed in ~/python/lib.
&lt;/p&gt;
&lt;p&gt;You can always use &lt;em&gt;easy_install --prefix ~/python/lib TurboGears&lt;/em&gt;, but it is tedious to specify the prefix everytime. So let us make that a default place. Edit your ~/.pydistutils.cfg file:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nano ~/.pydistutils.cfg
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In that file insert:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[install]
# directory for packages:
install_lib = ~/python/lib
# directory for scripts:
install_scripts = ~/python/bin
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now &lt;em&gt;easy_install&lt;/em&gt; will install everything to ~/python/lib and ~/python/bin!
&lt;/p&gt;
&lt;h2&gt;Step 3: Install your stuff&lt;/h2&gt;
&lt;p&gt;Here is an example of using Python setuptools to install the necessary eggs for developing an old version of &lt;a href="http://code.google.com/p/webpyte/"&gt;Webpyte&lt;/a&gt;:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;easy_install -UZ ipython
easy_install -UZ &amp;quot;TurboGears &amp;gt;= 1.0.4 , &amp;lt; 2.0&amp;quot;
easy_install -UZ &amp;quot;SQLAlchemy &amp;gt;= 0.4.2&amp;quot;
easy_install -UZ &amp;quot;Routes &amp;gt;=1.7&amp;quot;
easy_install -UZ &amp;quot;Genshi &amp;gt;=0.4.4&amp;quot; &amp;quot;Markdown&amp;quot; &amp;quot;TurboMail &amp;gt;=2.1&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here is &lt;a href="http://peak.telecommunity.com/DevCenter/EasyInstall#downloading-and-installing-a-package"&gt;an explanation&lt;/a&gt;: -U means &amp;quot;find the latest available version&amp;quot;; -Z means &amp;quot;unzip the egg file&amp;quot;.
&lt;/p&gt;
&lt;p&gt;Because Python is able to run zipped programs, they have created this glorified zip file (with a standard structure) that the call an egg. Each egg contains programs and metadata -- information about itself. For instance, it knows its dependencies. The easy_install command takes care of dependencies for you.
&lt;/p&gt;
&lt;p&gt;Because it is easier to see the source files if they aren't zipped, I like to use &lt;em&gt;easy_install -Z&lt;/em&gt;, which extracts the eggs. So you see, an installed egg can be either a zip file (.egg) or a directory.
&lt;/p&gt;
&lt;p&gt;But where do these eggs come from? From the Cheese Shop, now known as Python Package Index: &lt;a href="http://pypi.python.org"&gt;http://pypi.python.org&lt;/a&gt; -- this is the place where you search for nice packages!
&lt;/p&gt;
&lt;h2&gt;Step 4: Uninstalling and upgrading&lt;/h2&gt;
&lt;p&gt;There is no remove command. To uninstall an egg, you just delete its directory and erase its line from the text file &lt;strong&gt;easy-install.pth&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;Usually you don't need to remove anything. setuptools supports multiple versions of the same package. The &lt;strong&gt;easy-install.pth&lt;/strong&gt; file determines which version is being used. Therefore, to upgrade to the newest turbogears, it is usually enough to just type:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;easy_install TurboGears
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Anyway, this is how I currently work in Ubuntu Linux. If you have any suggestions, I would like to hear them.
&lt;/p&gt;
&lt;h2&gt;Maybe an even better solution?&lt;/h2&gt;
&lt;p&gt;Weeks after writing this article I learned that &lt;a href="http://pypi.python.org/pypi/virtualenv"&gt;virtualenv&lt;/a&gt; exists and has a nice reputation. I haven't tried it yet, but it looks good.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/development-environment</guid>
      </item>
      <item>
        <title>Webpyte, a website system written in Python</title>
        <link>http://www.oui.com.br/blog/nando-en/post/webpyte-published</link>
        <description>
&lt;p&gt;I have published the source code for Webpyte, my new website system, based on the excellent web framework &lt;a href="http://www.turbogears.org"&gt;TurboGears&lt;/a&gt;. If you are a Python web developer, &lt;a href="http://code.google.com/p/webpyte/wiki/JoinUs"&gt;join us&lt;/a&gt;! Here is &lt;a href="http://code.google.com/p/webpyte/"&gt;the project home at Google Code&lt;/a&gt;.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/webpyte-published</guid>
      </item>
      <item>
        <title>Python is the 6th most popular language</title>
        <link>http://www.oui.com.br/blog/nando-en/post/python-popular</link>
        <description>
&lt;p&gt;In 2007, Python &lt;a href="http://www.google.com/trends?q=perl%2C+python"&gt;surpassed Perl&lt;/a&gt; and C# in popularity, becoming the 6th most popular programming language in the world, according to the &lt;a href="http://www.tiobe.com/tpci.htm"&gt;Tiobe Index&lt;/a&gt;.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/python-popular</guid>
      </item>
      <item>
        <title>Typography: Helvetica and Arial</title>
        <link>http://www.oui.com.br/blog/nando-en/post/helvetica-and-arial</link>
        <description>
&lt;p&gt;The history of the design of &lt;a href="http://www.codinghorror.com/blog/archives/001038.html"&gt;Helvetica&lt;/a&gt; and the subsequent &lt;a href="http://www.ms-studio.com/articles.html"&gt;scourge of Arial&lt;/a&gt; is pretty interesting.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/helvetica-and-arial</guid>
      </item>
      <item>
        <title>Resources for learning to program in Python</title>
        <link>http://www.oui.com.br/blog/nando-en/post/resources-for-learning-python</link>
        <description>
&lt;p&gt;&lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt; is a great language for beginners. (It is also a great language for any application: imperative programming, object-oriented programming and functional programming.)
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://greenteapress.com/thinkpython/"&gt;How to think like a (Python) programmer&lt;/a&gt;, a free e-book, teaches the basics in a very intelligent way.
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://www.diveintopython.org/"&gt;Dive into Python&lt;/a&gt; is the most famous e-book. It is even an installable package in &lt;a href="http://www.ubuntu.com"&gt;Ubuntu Linux&lt;/a&gt;.
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://www.python.org/dev/peps/pep-0008/"&gt;Style guide for Python code (PEP 8)&lt;/a&gt;
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://www.python.org/dev/peps/pep-0257/"&gt;Docstring conventions (PEP 257)&lt;/a&gt;
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html"&gt;Idiomatic Python&lt;/a&gt;
&lt;/p&gt;
 &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Enlightening blog posts&lt;/h2&gt;
&lt;ul&gt;
 &lt;li&gt;
     &lt;a href="http://dirtsimple.org/2004/12/python-is-not-java.html"&gt;Python is not Java&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://tomayko.com/articles/2005/01/20/getters-setters-fuxors"&gt;Python properties&lt;/a&gt;
 &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;For advanced programmers&lt;/h2&gt;
&lt;ul&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://docs.python.org/whatsnew/index.html"&gt;What's new in Python&lt;/a&gt;
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://www.ferg.org/papers/debugging_in_python.html"&gt;The Python debugger&lt;/a&gt;
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://www.pythonchallenge.com"&gt;The Python Challenge&lt;/a&gt; is for advanced programmers to improve their skills. You solve problems, then compare implementations.
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://www.sqlalchemy.org/"&gt;SQLAlchemy&lt;/a&gt; is a great ORM.
&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;&lt;a href="http://antroy.blogspot.com/2007/04/python-coroutines.html"&gt;Python coroutines&lt;/a&gt;
&lt;/p&gt;
 &lt;/li&gt;
&lt;/ul&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/resources-for-learning-python</guid>
      </item>
      <item>
        <title>Here comes another bubble</title>
        <link>http://www.oui.com.br/blog/nando-en/post/here-comes-another-bubble</link>
        <description>
&lt;p&gt;Have you seen this videoclip?
&lt;/p&gt;
&lt;p style='text-align:center;'&gt;&lt;object width='425' height='355'&gt;&lt;param name='movie' value='http://www.youtube.com/v/YuAJHaXKgFk'&gt;&lt;/param&gt;&lt;param name='wmode' value='transparent'&gt;&lt;/param&gt;&lt;embed src='http://www.youtube.com/v/YuAJHaXKgFk&amp;#038;rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='355'&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/here-comes-another-bubble</guid>
      </item>
      <item>
        <title>What's wrong with CS research</title>
        <link>http://www.oui.com.br/blog/nando-en/post/wrong-cs-research</link>
        <description>
&lt;p&gt;&lt;a href="http://unqualified-reservations.blogspot.com/2007/08/whats-wrong-with-cs-research.html"&gt;What's wrong with Computer Science research&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Same subject: &lt;a href="http://www.paulgraham.com/hp.html"&gt;Hackers and painters&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/wrong-cs-research</guid>
      </item>
      <item>
        <title>Beautiful short story by Isaac Asimov</title>
        <link>http://www.oui.com.br/blog/nando-en/post/asimov-last-question</link>
        <description>
&lt;p&gt;&lt;a href="http://www.multivax.com/last_question.html"&gt;http://www.multivax.com/last_question.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;...and since we are in a science fiction mood: &lt;a href="http://www.simulation-argument.com/"&gt;Are we living in a computer simulation?&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/asimov-last-question</guid>
      </item>
      <item>
        <title>Project management: C²I²</title>
        <link>http://www.oui.com.br/blog/nando-en/post/c2i2</link>
        <description>
&lt;p&gt;&lt;a href="http://www.zedshaw.com/essays/c2i2_hypothesis.html"&gt;The C2I2 Hypothesis&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://chadfowler.com/2006/12/27/the-big-rewrite"&gt;The Big Rewrite&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/c2i2</guid>
      </item>
      <item>
        <title>Interesting talks at Google Video</title>
        <link>http://www.oui.com.br/blog/nando-en/post/interesting-talks</link>
        <description>
&lt;p&gt;&lt;a href="http://video.google.com/videoplay?docid=6127548813950043200"&gt;The Paradox of Choice - Why More Is Less&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://video.google.com/videoplay?docid=-4216011961522818645"&gt;How Open Source Projects Survive Poisonous People (And You Can Too)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://video.google.com/videoplay?docid=448441135356213813"&gt;Practical Common Lisp&lt;/a&gt;
   is a &lt;a href="http://www.gigamonkeys.com/book"&gt;great book&lt;/a&gt; by Peter Seibel
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://video.google.com/videoplay?docid=7760178035196894549"&gt;Advanced Python&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/interesting-talks</guid>
      </item>
      <item>
        <title>Restoring Grub</title>
        <link>http://www.oui.com.br/blog/nando-en/post/restoring-grub</link>
        <description>
&lt;p&gt;If you install Ubuntu, then Windows in a different partition, the GRUB boot loader vanishes. But don’t panic and reinstall Ubuntu — you can recover it.
&lt;/p&gt;
&lt;p&gt;Boot to the Ubuntu Live CD, open up a Console window and type:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Create a directory called “mounted”:
mkdir mounted
# In there, mount the partition where Ubuntu is installed:
sudo mount /dev/sda2 mounted
# (For the above step you need to find the partition name on your own.)
# However, replace the /dev directory in the mounted partition with the
# current /dev directory:
sudo mount –bind /dev mounted/dev
# Change the root for now
sudo chroot mounted
# Finally, install grub to the first SATA disk:
sudo grub-install –recheck /dev/sda
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For more information:
&lt;/p&gt;
&lt;p&gt;&lt;a href="https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows"&gt;https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.ubuntu.com/phbc50/howtos/how-to_reinstall_grub"&gt;https://wiki.ubuntu.com/phbc50/howtos/how-to_reinstall_grub&lt;/a&gt;
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/restoring-grub</guid>
      </item>
      <item>
        <title>Favorite internet videos</title>
        <link>http://www.oui.com.br/blog/nando-en/post/favorite-videos</link>
        <description>
&lt;p&gt;Most of them at youtube...
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;
     &lt;a href="http://www.youtube.com/watch?v=EkTpUxh8Vxc"&gt;Star Trek music + Simpsons music&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://www.youtube.com/watch?v=1NkE11LIIvs"&gt;Piano and juggling act&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://www.youtube.com/watch?v=upzKj-1HaKw"&gt;Steve Jobs talks about Microsoft&lt;/a&gt;
 &lt;/li&gt;
 &lt;li&gt;
     &lt;a href="http://www.youtube.com/watch?v=K_TyX-wHI0k&amp;amp;feature=related"&gt;Steve Jobs and Bill Gates together&lt;/a&gt;
 &lt;/li&gt;
&lt;/ul&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/favorite-videos</guid>
      </item>
      <item>
        <title>Orchestration by Berlioz</title>
        <link>http://www.oui.com.br/blog/nando-en/post/orchestration-by-berlioz</link>
        <description>
&lt;p&gt;&lt;a href="http://www.hberlioz.com/Scores/BerliozTreatise.html"&gt;This website&lt;/a&gt; contains excerpts from Berlioz's &lt;em&gt;Grand Traité d’Instrumentation et d’Orchestration Modernes&lt;/em&gt;.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/orchestration-by-berlioz</guid>
      </item>
      <item>
        <title>Grip, for ripping CDs</title>
        <link>http://www.oui.com.br/blog/nando-en/post/grip</link>
        <description>
&lt;p&gt;&lt;a href="http://nostatic.org/grip"&gt;Grip&lt;/a&gt; is a great CD ripper/encoder for GNU/Linux. If you have never tried it, give it a go. It rips to wave using cdparanoia or others. It can &lt;em&gt;simultaneously&lt;/em&gt; encode the ripped tracks to the format of your choice. Supports cddb too. Easy to use.
&lt;/p&gt;
&lt;p&gt;I usually encode to the &lt;a href="http://www.vorbis.com"&gt;ogg vorbis&lt;/a&gt; format (...)
&lt;/p&gt;
&lt;p&gt;Ogg Vorbis is much better than MP3 (roughly the same audio quality for half the file size) and is free of patents.
&lt;/p&gt;
&lt;p&gt;On Windows, &lt;a href="http://www.winamp.com"&gt;Winamp&lt;/a&gt; has always been able to play ogg files. If you don't like Winamp there is plenty of other options too -- ogg vorbis really is the successor to MP3.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/grip</guid>
      </item>
      <item>
        <title>Autopackage: packaging software for multiple distros</title>
        <link>http://www.oui.com.br/blog/nando-en/post/autopackage</link>
        <description>
&lt;p&gt;&lt;a href="http://autopackage.org/"&gt;Autopackage&lt;/a&gt; looks very useful for free software developers.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://zero-install.sourceforge.net/"&gt;Zero Install&lt;/a&gt; is another perspective.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/autopackage</guid>
      </item>
      <item>
        <title>Where to change your MSN / Passport password</title>
        <link>http://www.oui.com.br/blog/nando-en/post/msn-password</link>
        <description>
&lt;p&gt;If you ever need to change your Passport / MSN password, you might lose half an hour searching for this function. It is buried &lt;a href="https://accountservices.passport.net"&gt;here&lt;/a&gt;.
&lt;/p&gt;
</description>
        <guid>http://www.oui.com.br/blog/nando-en/post/msn-password</guid>
      </item>
  </channel>
</rss>
