What the etiquete says about…

When you make a list with two columns, “People that know me and would miss me if I die” and “People that know me and won’t care/would be happy if I die”, and the second is bigger then the first, what should you do? Kill yourself?

I hate computers

Day after day, I get more and more angry about my computers.

A few days ago, my desktop decided it was nice if its fan starting making noises. So far, I must turn it off to sleep, after almost 10 years sleeping in bedrooms with computers.

In an attempt to leave it off, I decided to connect into the internet with my laptop. I have a cable modem and I need to set the network card to use full-duplex or else it won’t connect. Guess what: I can’t switch my network PCMCIA to full duplex!

I’m holding myself to not burn all this crap and buy a new laptop (an Apple!). So far, the image of my future bike in my head makes me hold a little bit more. I can’t spend anything more on these computers. I NEED MY BIKE!

My take on how to fix Python documentation

I don’t like when people start criticizing without offering solutions. So I decided to make some suggestions on how to fix the Python documentation:

First, do not list modules, list what you can do. PHP does this and it is a lot easier to find the functions. But even the PHP documentation has some problems: the sidebar-with-quick-links only appears on the on-line version. The static, downloadable version, should also have that.

Also, some modules really need to get out, like the Pickle. There is not reason to it stay in the main module list when cPickle does the same and it is faster, even leaving the subclassing out — when writing an application, you must make sure it will work on every platform, no matter what. The main modules could take care of that, and subclassing something may lead to platform inconsistencies.

Second, group functions by module, no matter what. The time and datetime should be the same or, at least, make the later offer all the functions the first has.

Third, when dialing with classes, it would be nice to see how the hierarchy class is, showing all involved modules. Java does something like that, as well as GTK+, but with classes names (which leads us back to the first point). This could be shown inside the module documentation or as a separate index.

Now I must say that I’m not a documentation expert, and all this is just something I thought it would be nice. Of course, I didn’t “hacked” the documentation to see if it would work, leaving this a simple suggestion.

Python needs better documentation

While working on my last project, I noted that the Python documentation really sucks. I had to delete a lot of code just because I searched for something, didn’t found and, later, while looking for something else, found what I was looking for.

One example: I did some search for a function like strptime over the datetime modules (and related modules too). I didn’t found anything like that, so I wrote it my own. Later, while checking the strftime output flags (on the time module, I found that there is an strptime implementation. Lots of time and code wasted.

[Ok, I didn’t do a search over the site, and there is a large “search” box over it, but I was using the downloaded documentation, so no search there]

Another example: looking for the string functions, I decided to check what was deprecated. Important functions (at least, to me) like find will not work in the next major release. And there is no indication what I should use instead (unless they created a function with the same name).

Python is nice and works flawlessly, but they really need to review their documentation.

Finally, a program to download nntp articles!

After a few struggles and some procrastination, I finally ended that damn program that downloads NNTP articles. The only missing part is finally save them to file, but I’m must talk with to get a sample file to copy that.

In case you are wondering, we are both working on a new engine to CScience.org (yeah, no nice message right now). He basically wrote the engine all by himself, using a few ideas I had on my previous blog/engine. In the end of the project, he had the idea of use our (well, the CScience.org) current NNTP server to post the messages the engine would display. This way, we don’t need to implement an authentication scheme, leaving it to the NNTP server.

micr0s0ft for pennies

On my mailbox today, I got several messages with “micr0s0ft for pennies” messages, probably from a new virus using an unpatched hole of OutLook.

Spam is a bad thing, but as anything can be a motif for jokes, the guys in the office started making jokes about it.

– Oh, Microsoft for penises, right? So you are there, doing “your job” when it simply goes limp and you have to reset and start over
– No, no. It will get up and lock up, not allowing you to do anything.

The good thing about working on a office where almost everyone is a Linux user is that no one get hard feelings with jokes like that. :)

Tables, tables, TABLES! EARGHH!

One of the things I like to do when surfing on the internet is check how some “web designers” solve some problems.

Today I faced one of the worst solutions to a design, ever. The page showed an indented information, much like <blockquote> inside a <blockquote> does. Or you can also think about a <div> inside a <div> with the same class and a somewhat large left margin.

But the solution found was something really ingenious, at least: the put a table outside everything, then a table to the first level (with no margin), then a table inside it with the first level with one row and the first cell completely empty to create the margin and then another table, again with just one row and using the first cell to create the space.

I really don’t understand why people always try to make the things in the hard way…

Microsoft doesn’t hold the monopoly of bad code – Part II

After a good pizza, I just remembered another scary story about Oracle:

One of the “nice” things Oracle allows is to partition a table, in a way that you have data on two different files. This allow you to make backups without taking the whole table offline, and also allows you to remove a piece of your data from your storage. You can choose how to partition your table: by record number, by a date field, you name it.

It is nice and such, but there is one small problem: when you take part of the table offline, the indexes are not updated. So you can make a small select by an index, it will find where the data is but won’t be able to access it and your application will simply boom.