Posts

Showing posts from September, 2008

Anyway, you should stop finding bugs!

The title of this post is the phrase that Paolo (my brother) told me after the bug I discovered was actually confirmed on the Zope mailing list. The bug I've found is something which has haunted me for many years; I'm not sure why I've experienced this bug, and other people didn't; I'm surprised about it, but what I know is that software usually is known to work in a sound way in a known field. Outside of that field, you can't be sure about what it happens. This has nothing to do with closed or open source software: software is complex, and you learn how it works by experience. After this rant, let me show a small piece of software which can show the bug in action: import os import sys import unittest if __name__ == '__main__': execfile(os.path.join(sys.path[0], '../framework.py')) from Testing import ZopeTestCase from OFS import Image from Products.ZPsycopgDA.DA import manage_addZPsycopgConnection from Products.ZSQLMethods import SQL class Dou

What have I to test?

I'm currently working on a software who has to create a PDF document from an ODT template. Of course, I'm doing in python, and I want to test it. Actually, I already have the methods to create the PDF document. At the moment, however, the name of the template is hard coded in a class; the name leads to a file on the file system, in a specific directory, which contains the template. My next story requires that the name of the template to use bs different according to the configuration of an object. So, the first step could be to askthe name of the template to the object. In a first implementation, the method returns a fixed string; later, I can make it provide different names according to different configurations. Of course, this part is quite easy to check; also, I don't deal with actual templates, but just with file names. There is another part, however, which is not so easy: the other object which uses this path to actually build the PDF. In this case, my problem is that

Automated testing

Here is what I will watch today while I eat my pasta :-)

YouTube - Campfire One: Introducing Google App Engine (pt. 1)

Ok, this is the latest "cool" technology I'm watching, right now. And, of course, I've already created my own sample application: gflow.appstore.com , which at the moment is a simple guestbook application, but, who knows ;) ?

Plotting the execution times of tests

Image
After a message in the extreme programming mailing list, I sent the execution times of PAFlow unit tests to Kent Beck. He used google charts to plot the results, and here are the data :-) Just to explain what is going on: the x are the execution times, and the y are the number of tests which have that execution times. Both scales are logarithmic, with the y which is 1 at start and 1000 at top. 4096 actually means 4096 millisec.

The fastest wi-fi network... in Pisa!

A Pisa la rete wi-fi più veloce del mondo - Corriere della Sera

Optimizing "janitor"

Janitor is my laptop; I've used it for I think more than two years; even though you might consider it "old", I'm quite comfortable with it. Janitor is a Dell Inspiron 1300 with 2 GB of memory; even though it hasn't a top performing processor, its wide screen makes it very handy for my developing activites. As I already told, in the recent past I had some troubles, caused by the internal fan which cheased working all of sudden. After a lot of work, I finally made the thing I should have done in the first place: call the Dell assistance; they provided me with the obvious suggestion (i.e. to try cleaning the fan with compressed air) and it worked very well. In the mean time, however, I tried everything else. So, I found a number of optimizations for the Inspiron and for the graphic card (which was the one showing most problems when the fan was not working). In the end, I configured the device section of my /etc/X11/xorg.conf as follows: Section "Device"

Beautiful mornings (II)

And today , after I cleaned the fan of my computer a bottle of compressed air, my notebook is happily running again :-) Moreover , since I tryied to optmize all that I could , it seems to me that it is running much faster than before ( gmail being notably faster ).

Beautiful mornings

Image
You start some of your days with your best intentions; you wake up early, wash yourself, shave, get a breakfast and are ready in thirty minutes to work, even if it is Sunday. Then, you go to the computer and wait for your online pairer to show up. You're early, so it is not a problem if he's not there; in the meantime, you browse some online newspaper. Your computer seems a little more laggy than usual. You check, and see that the lightweight browser named Firefox is eating 300 MB of your memory, and 90% of your CPU. "Ehi!" you think, "it must be that effect once I read about Firefox not being too much happy when you resume from suspend mode. No problem, I will kill him and restart." But your computer still behaves like someone poured glue on your keyboard during the night. You're wondering where your online pairer is; now he's late, but after all you agreed to meet at 6:30 AM; maybe he just slept a little more than he should, and will be online so

Why are they so happy?

L'Università di Pisa batte tutti su Internet - intoscana.it - il Portale ufficiale della Toscana L’ultima graduatoria, pubblicata ad agosto e consultabile all’indirizzo www.webometrics.info, vede l’Università di Pisa al 207° posto nel mondo e seconda in Italia solo all’Università di Bologna, che occupa il 95° posto mondiale Basically, they are saying that the University of Pisa is number 207 in this particular list. I do not know the list. I do not know how accurate is. But exactly, what is so nice in being number 207 in a list where being the number 1 is better?

Slow running unit tests...

I've a problem, and it can be easily described: python2.3 test/runalltests.py (lots of work) Ran 2002 tests in 557.207s I work in cycles of 25 minutes, followed by 5 minute of rest, then 25 minutes of work again, and so on. If I think that I need to spend almost half of that time in running my tests, I cannot write tests anymore. This needs to be fixed.

He did it again...

Image
Another book Paolo gave me to read...