Monday, November 26, 2007

Zune outselling Amazon.com

0 comments
I wouldn't expect that, but it's good news for Microsoft.

http://seattle.bizjournals.com/seattle/stories/2007/11/19/daily3.html

A Zune media player is the top-selling digital musical device on Amazon.com, outselling Apple. Inc.'s iPod for the No. 1 ranking.
On Monday morning, Microsoft Corp.'s heavily discounted, 30-gigabyte, $134 Zune digital media player was ranked the No. 1 bestseller in the Seattle online retailer's (NASDAQ: AMZN) list of top-selling MP3 players in the "Electronics" category.
Apple's four-gigabyte iPod nano was No. 2, followed by Apple's 80-gigabyte iPod "classic" at No. 3.
Last week, the Redmond computer giant (NASDAQ: MSFT) introduced a new 80-gigabyte Zune player, but they're hard to find. Amazon's site on Monday said they're "temporarily out of stock" and no future shipping date was listed. Microsoft's own Zune site said the 80-gigabyte player can't be ordered until "early December."

Sunday, November 25, 2007

Reading figures

0 comments
Always amazed when traveling to Europe or to the US with the number of people you see at the airports, or on trains/buses, reading, I wondered the percentage of people in these countries that actually read books. Today I saw a text by the Seattle Times editor on this subject with the alarming figures that only 47% of Americans "read a work of literature - a novel, short story, play or poem - within the previous year". It seems to have dropped 7 points in the last 10 years and they are trying to fight that. Although any decrease is worrying, it is still pretty substantial figure. I wonder what would be the result of the same report on developing countries, where you can noticeably see that people don't read in general.

Although I confess I am reading more non-fiction literature, fortunately I am part of the group that read a work of literate the previous year.

Reclyced fiber and ink

0 comments
Looking for some information on the front page of "The Seattle Times", I see that "60% of The Seattle times newsprint contains recycled fibers. The inks are also reused". I wonder if this is something special or a kind of standard among major newspapers, but that definitely makes me glad.

Who will dream to be an astronomer?

0 comments
In "The Seattle Times" of today there is an article on China's efforts to fight against pollution that is inherently tied to its huge development in the last years (see online version here).

I am very glad to see that they are awakening to this problem. This problem will affect more directly the Chinese people, but not only them. Pollution from China can travel to as far as the US West Coast and can be felt even here in Seattle area. Some of the actions they are taking is the increase in the clean techonology investments (which doubled since 2006) and they are also working with planners, architects and venture capitalists to address these issues. One of most ambitious plan is to build a eco-friendly city on the outskirts of Shangai. The whole world watch with attention this effort.

Young Chineses can already notice the effects of the uncontrolled development and many environment groups are trying to educate people about the importance of going green. One of the activists, Wen Bo, who was born in a time with blue skies and white coulds, regret that this time is over. And he says something very interesting about how that could impact future generations: "if they've never seen starts, how can you expect them to dream to be an astronomer?". It is interesting to think how future generations may see the world in such a different way.

People with the mindset that "environmental protection and development are inherently a contradiction" still justifies the damages to the environment as the country grows and don't seem to care much about the problem. The reason behind this behavior is that they see no other way to develop the country, which was very poor a few decades ago. But, as another activist says, "Live is not just about money." Balance is probably one of the most important keys for live.

Finally, one curious information is that China is on the way to overtake US as the largest emitter of carbon dioxide, although US still consumes more energy. As a matter of fact, energy consumption per capita in the US is 6 times China's. But being a high energy consumer does not mean that you will necessarily emit more carbon dioxide. And China must learn that. Maybe a "war" between US and China over which country is the greenest one could be one of best wars ever. And acting together, like they are doing now with joint efforts from China government, entrepreneurs and experienced people from the US, I foresee a possible great future.

China's impact on the world is not only about US or the pollution here in the Seattle area, but they will set standards. Worrying about environment is something that should be a top priority as doing it early in the process is much easier than trying to patch that later. I can see, mostly in developed countries, that protecting the environment and having an impact as low as possible has made its way into people's lives. I can see that all around me and how I end up try to do my part as well. Being a "compulsive" recycler, and avoid using disposable bags when doing groceries or disposable cups when drinking my daily coffee at the office are the two timid steps I took toward this direction.

PS: Although China is being the focus currently, we cannot forget about other country that has been having amazing growth rates and that is the country that had the highest increase in energy consumption in the 1990-2004 period: India. I would like to see similar initiatives with the Indian people. As it happens with Chinese people in the US that impact on this discussions (and sometimes even move back to their native country), hopefully the same will happen with India.

Wednesday, November 14, 2007

Podcast Diogo Mainardi com Reinaldo Azevedo

0 comments
http://veja.abril.com.br/idade/podcasts/mainardi/

Diogo e Reinaldo discutem reportagem da Veja sobre 50% dos brasileiros não saberem identificar o Brasil no mapa.

Luck

0 comments
The harder I work, the luckier I get.
-- Samuel Goldwyn

Wednesday, November 07, 2007

Goethe

0 comments
"Treat people as if they were what they ought to be, and you help them to become what they are capable of being." - Johann Wolfgang von Goethe

Wednesday, October 03, 2007

"Congreço"

0 comments
Carimbo do Congresso Nacional em imagem da Folha de São Paulo. Como diz o Reinaldo Azevedo, é o apedeutismo deixando o seu rastro.

HackerTeen defaced?

0 comments
Interessante ver o site de um curso que se propõe, entre outros, a ensinar técnicas de segurança a jovens ser atacado duas vezes no mesmo dia. Isso aconteceu com o HackerTeen, proposta com a qual eu tive contato em 2005, mas sobre a qual eu não tinha visto nenhum tipo de comentário, nem a favor nem contra até agora.

Dado que já existiram comunidades do Orkut contra o HackerTeen (mas não achei nada procurando nesses dias) e também com esse ataque, fica evidente que muita gente é contrária ou ficou insatisfeita com o curso, embora devemos esperar que toda proposta que toma maior atenção sempre vira alvo de críticas. Mas isso não nega que o site deles deveria (e deve) estar bem protegido para não manchar o nome de um curso de segurança para jovens.

Mais sobre os ataques, que ocorreram em maio de 2006, podem ser lidos no fórum da InfoSecurity Task Force. Veja que os invasores publicaram uma carta aberta criticando o HackerTeen.

Dom Lula, o apedeuta

0 comments
Curioso para saber o que quer dizer apedeuta? Segundo o Wikcionário: 1. sem instrução; 2. ignorante; 3. estúpido; 4. insipiente. Pois é, assim o nosso culto presidente é referenciado há bastante tempo. Realmente boa escolha de adjetivo.

Basics of uncompressed digital audio

0 comments
Do you want to learn the basics of digital audio, such as sample rate or bit depth? Definitely this primer available on ArsTechnica is worth your time.

Monday, October 01, 2007

Propaganda de mau gosto do Itaú

0 comments
Sexta-feira fui ao banco Itaú quando me deparei com os cartazes com propagandas do produtos ou serviços ou simplesmente para vender a imagem do banco associado a algum conceito. Nesse dia, em particular, notei um cartaz em que o banco era associado ao conceito da era digital, com o símbolo do arroba (@) estilizado com o i circundado. Até aí, nada de anormal ou que chamasse a atenção.

A diferença do cartaz que vi foi o fato desse i estilizado ter sido "pintado" (ou seria pichado?) em uma porta de ferro com giz de cera. Exatamente como crianças e adolescentes, num claro caminho rumo a ser um possível pichador no futuro, começam. Em São Paulo é fácil notar, para aqueles que são atentos, como as crianças pintam muros e portas com giz de cera ou canetas de ponta porosa ("canetinhas") no seu caminho à (ou de volta da) escola. No cartaz ainda colocaram ao lado da porta de ferro uma criança bem nova, com expressão de ter feito algo errado.

Diretamente não defendo que isso sirva necessariamente de incentivo, mas achei de bastante mau gosto e torna normal algo que não deveria ser incentivado. Talvez em breve eles estejam colocando propaganda em que esse i estilizado esteja pichado em algum muro e ao lado apareça um jovem, com vestimentas características daqueles que exercem esse tipo de atitude.

MySQL Foreign Key Problem (errno: 150)

2 comments
If you have this problem the following error message and you are just trying to import a dump from other machine, maybe I can offer you a tip. The error message is

ERROR 1005: Can't create table (errno: 150)

So, in this case, try to add the following to the top of your dump file:

set foreign_key_checks = 0;

It will disable, during the import session only, foreign key checks. Otherwise, mysql will complain when trying to create the first table that has a foreign key that refers to a table not yet created. It's a very useful tip when migrating databases (and that sometimes we forget).

Wednesday, September 26, 2007

Land Reform

0 comments
Inspired by Miguel de Icaza doubt about "Reforma Agrária" (which happens to be the same in Portuguese and Spanish), I searched and found the term in English: Land Reform.

Tuesday, September 25, 2007

Espetáculo grotesco na TV Cultura

0 comments
Leia aqui texto do Reinaldo Azevedo sobre a participação do Mano Brown no programa Roda Viva da TV Cultura. Interessantíssimo.

Monday, September 17, 2007

Is Apple new Microsoft?

3 comments
I really like iPod and, believe me, I do like iTunes as well. It is simple, and straightforward to use, in my opinion. But this guy has a point when he writes about Apple becoming a new Microsoft. It's worth reading it.

Thursday, August 02, 2007

GTK system tray icon example

12 comments
It's hard to find an example of system tray icon example. In the past, we should use libegg, but this library is deprecated. The current option, when using GTK, is the Status Icon. GTK implements freedesktop's System Tray specification and works on any desktop environment that is compliant (like KDE or GNOME).

I created a very simple example to help other people to solve this problem more quickly in the future:

#include 

void tray_icon_on_click(GtkStatusIcon *status_icon,
gpointer user_data)
{
printf("Clicked on tray icon\n");
}

void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button,
guint activate_time, gpointer user_data)
{
printf("Popup menu\n");
}

static GtkStatusIcon *create_tray_icon() {
GtkStatusIcon *tray_icon;

tray_icon = gtk_status_icon_new();
g_signal_connect(G_OBJECT(tray_icon), "activate",
G_CALLBACK(tray_icon_on_click), NULL);
g_signal_connect(G_OBJECT(tray_icon),
"popup-menu",
G_CALLBACK(tray_icon_on_menu), NULL);
gtk_status_icon_set_from_icon_name(tray_icon,
GTK_STOCK_MEDIA_STOP);
gtk_status_icon_set_tooltip(tray_icon,
"Example Tray Icon");
gtk_status_icon_set_visible(tray_icon, TRUE);

return tray_icon;
}

int main(int argc, char **argv) {
GtkStatusIcon *tray_icon;

gtk_init(&argc, &argv);
tray_icon = create_tray_icon();
gtk_main();

return 0;
}


Don't forget to compile with GTK libraries.

There are some other aspects when implementing a tray icon and you want to minimize to tray, such as:

- Hide/Show window to avoid minimizing it to the task bar (yes, use gtk_widget_hide() and gtk_widget_show()) when the user clicks on the system tray icon
- Listen to the "window-state-event" (GObject's signal) to detect when minimizing and, instead of doing that, hide the window (ie, "minimize to the tray").

Finally, in case you experienced something interesting concerning system tray icons, please share with us.

Love - Wim Wenders

0 comments
"I don't want to do anything anymore that's doesn't come out of an act of love. And I think anything else you do out of any of other motive is a waste of time." -- Wim Wenders

Conviction - Wim Wenders

0 comments
"I realize more and more that's not worth it doing anything that you can't really do without full conviction". -- Wim Wenders

Wednesday, August 01, 2007

Climbing the corporate ladder sucks

0 comments
"Blog: I spent a good part of my life obsessed with climbing the corporate ladder. And for what? Because I was programmed to do it. I had sacrificed everything in the name of obsession."

Read more here.

Monday, July 30, 2007

Cold evening in São Paulo

0 comments


São Paulo: Moóca and Vila Prudente view from Ipiranga.

Sunday, July 29, 2007

Where was I?

2 comments
Have you ever had the feeling that you didn't live the past few months of your life? After around 7 months without even opening my photo album application (more on that later), this week I opened and started organizing the (very) few photos I took during this whole period. Looking back, it's hard to recall many outstanding events where I should have shot some pictures (except for two travels abroad). And, much worse than that, I feel that I haven't lived. It's completely blank in my memory. I lived totally attached to memories and some psychological chains from the past and expectations of a future that may not become true.

What is exactly live mean? Each person consciously or not ascribe a very unique meaning to it. Most of people never spend a second thinking about such a subject, but some of us fortunately have done it. And what I mean here is not breathing, feeding yourself or having a shelter, it's to surviving, but what do you understand by actually living your life. It's the answer that some people are proud to spread when inquired about their lives - and unfortunately usually at the end of them: "I have really lived my life". Unfortunately, to the majority of the population, this is something people regret because, at least partially, they never gave a single thought about that until the moment they have to face it. The bright side is that, at least some of them are privileged enough to have this opportunity while still alive.

To me, the meaning of living is difficult to answer in a few words and only conceptually. At least now, when I start delving into my feelings about it. I realize that taking photos is a good sign of when you are actually living and they lead me to the following thought: actual living is directly related to moments worth of a shot. Yes, that would be a good start of this personal definition of live. Some people define life generally as a handful of moments that are worth remembering. Photos, shot of the moments you are living through, are usually registering moments worth remembering some day in the future - and when your memory will probably fail. As I heard these days, photos are the "memory crutches", assisting us to remember what we've lived. I would go a little further and would say that they are a good tool to live again what you've been through from a different perspective. In summary, there is a tight relation between photos and memories.

Besides having memories worth recalling, and photos turn themselves into somewhat accountable memories, there is something quite important to me when we discussing such a concept: balance. In the past, I used to think that success, mainly professionally and financially would be something very important to me and should require my total focus and energy. After all, when we want something very badly, should we not inject all our energy into that? And be totally focused on it? Yes, I totally agreed with that and I wanted these goals badly.

After you start succeeding on one targeted area or, not even succeeding, but only catching a glimpse of what that would be, your life starts providing data with which you may start a review process. This process is composed of putting together your concepts, your initial goals and how they steered your life - and remember, you did that (and allowed that to happen). A very interesting English phrase related to that is "be careful what you wish for, you may get it". In my opinion, it's a very rich phrase that can lead us to different aspects of this subject, but let's focus now only on one of them.

Getting what you wish for is a very interesting psychological challenge because you experience how achieving a particular goal really is. And, more interesting, you can experience it in comparison to what you expected, what's been an illusion in some degree. Why an illusion? The reason is that you created an illusion on how would feel when that goal is achieved. At minimum. I could write a lot on how far our mind could far (and mine is a good at doing that). How is an achieved goal will be like is something we will never be able to know for sure, even if you are really conservative and your expectations are very close to your actual feelings when you get what you wished. The first and most common feeling after getting what you wished for is that it does not fulfill your expectations. You may start thinking that the achievement was below your expectations? Not necessarily. But it's very likely it will be different from what you expected. That is the point: it's different. Handling these scenarios properly, at least in terms of feeling good about yourself is not an easy task. Most of times achieving a targeted goal brings frustration, despair and we have to find a next goal to live on illusion of the following idealized goal. It can be an endless vicious circle.

I realized that succeeding on different life areas is important to me. I understood that, even being really good at some areas still constantly I caught myself asking myself "what the heck I am doing with my life". I was not enjoying it the way other people were enjoying. And that made me doubtful about my personal choices. Above that, were those initial choices right to me? Are these choices, is my day-to-day life bringing happiness to me? Is the process being enjoyable rather than only the final idealized goal (which is not always reachable)?

A very strong personal work on this front are has been done and will be done. I am struggling to achieve my ideal balance, enjoying the process towards it, and I am sure it's an ongoing process that must be kept alive to avoid making the same mistakes. Seeing my photo album application woke me up from a life where I was blind (at least for the past 7 months) and that was very good. Writing about this makes me feel good and starts to make a later (but still in time) life balance adjustment. Now this lesson must be crystallized in my mind with two questions about any given period of time: Where was I? Were there moments worth a shot? I must be able to answer verbosely the former and the latter must have an answer similar or better than "Yes, there were many of them" to bring me full satisfaction. Last, but not least, "many of them" must be enough, but not too many. It must follow each one's life balance directives, avoiding jeopardizing other areas that are also important. Otherwise, we get "out of the frying pan into the fire" and the unbalance comes back to our lives.

Labels (tags)

0 comments
Inspired by many other sites and blogs (like Tiago Luchini's or flickr), I will start tagging my blog posts to make it easier to search throughout the blog from now on.

Saturday, July 21, 2007

Lake Louise and Visa to Canada

0 comments
Yesterday I was dreaming about spending a future vacation in Chateau Lake Louise, in Canada. It's a wonderful (and expensive) place to visit, but definitely it will be worth it.

Then I thought about any visa requirements for Italians to visit Canada. I found the Canadian Embassy in Italy and the good news is that, like the US Waiver Program, we don't need any visa to visit this country provided that we have a return ticket, a valid passport and enough money for the expenses incurred during the travel period. Really great!

JasperReports Scriptlet Example

23 comments
Back in October 2005, I posted some directions on how to create a Scriptlet. Since that project, I had some experience with Eclipse BIRT, but never used JasperReports again. But that post was very popular and _lots_ of people wrote comments or send me an email asking for examples. I never had the time or energy to search my old projects and find the example that motivated that post until today (finally!). This code is in production since November 2005, although it's been a long time since I was called by the company for any maintenance.

So, below you can find an example class and some report excerpts. Refer to the previous post for more details on how they were built. I will also send both files to everyone who wrote a comment or sent me an email (if I find all emails here). In case you want to receive these files, please drop me a note that I will send whenever I have some spare time.

PriorityScriptlet.java

package br.com.specchia.cerville.sac.returns;

import net.sf.jasperreports.engine.JRDefaultScriptlet;
import net.sf.jasperreports.engine.JRScriptletException;

public class PriorityScriptlet extends JRDefaultScriptlet {
public String priorityDescription()
throws JRScriptletException {
Integer priority =
(Integer) this.getFieldValue("priority");

if (priority.intValue() == 1)
return "Importante";
if (priority.intValue() == 2)
return "Normal";
if (priority.intValue() == 3)
return "Baixa";

return "Nenhuma";
}
}


priority_list.jrxml - excerpt 1
(scriptletClass line was manually inserted)

<jasperReport
name="priority_list"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="535"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
scriptletClass="br.com.(...).PriorityScriptlet"
isTitleNewPage="false"
isSummaryNewPage="false">


priority_list.jrxml - excerpt 2
(where the method is called - I used iReport to edit this)

<textFieldExpression class="java.lang.String">
<![CDATA[" " +
$V{PriorityNumber} + ". " +
$P{REPORT_SCRIPTLET}.priorityDescription()]]>
</textFieldExpression>

Wednesday, July 18, 2007

Fim da CPMF

0 comments
Um amigo me indicou um abaixo-assinado da FIESP com relação ao fim da CPMF. Se você compartilha da opinião de que esse imposto não deve ser prorrogado, contribua com esse abaixo-assinado.

Switching back to Microsoft Office?

0 comments
That's not a very common news: a company switching back to MS Office from OpenOffice. And it probably will happen happen more much often in the future for other open source software (like Linux) than we may expect. Many aspects of a migration are not considered or are totally unknown, and not always it ends up paying off. And I am writing this text from a Linux box :-)

Wednesday, July 11, 2007

UTF-8/Accented characters and 406 Not Acceptable?

0 comments
If you have an URL with accented or UTF-8 characters and start getting a 406 not acceptable error, check if you have mod_security enabled in your apache configuration. I have mod_security enabled, and had also a particular setting "SecFilterCheckUnicodeEncoding On".

Although my Apache configuration has a "AddDefaultCharset UTF-8", mod_security blocked all URLs that have words in Portuguese with accents with a "406 Not Acceptable" error. Disabling this unicode encoding check fixed the problem.

Saturday, July 07, 2007

Opera; L'Italiana In Argeli

0 comments
If you are in São Paulo and like (or would like to get to know) opera, a very good option is to go to Theatro Municipal and watch "A Italiana em Argel" (original title "L'Italiana In Argeli) by Gioachino Rossini. It's surprisingly good and unexpensive. See more details on Wikipedia.

Movie: A Soap

0 comments
Movie Suggestion: a Soap (in Portuguese, Além do Desejo).

Quote from Scrubs

0 comments
"Nothing in this world that's worth having comes easy."

Friday, June 22, 2007

A very good blog

0 comments
A friend of mine moved some months ago to Finland and has an outstanding blog that is worth reading. He writes about various subjects, what also includes his experiences in his new country. Check it out here.

Emacs 22 font lock mode

0 comments
I just installed Emacs 22 and my first upgrade issue was regarding font-lock-mode. For you that had "lazy-lock-mode" defined in your .emacs file, upgrade it to "jit-lock-mode", otherwise Emacs will complain about it and won't open your files. See a post here about this problem.

Still can't say much about it, but I am glad that it has Python mode :-)

Thursday, May 24, 2007

Curious why you have ~/.config...

0 comments
... and why some applications are porting their configuration to be under it? It's part of the freedesktop standards. Check it here.

pyNeighborhood patch

0 comments
Recently some of my patches or bug reports have been made some progress. Some days ago a patch I sent to pyNeighborhood was committed and now I have a contribution to a project written in Python :-) Thanks to Mykola Lynnyk (pyNeighborhood's author) for accepting and committing it. I hope it helps improving this good application.

Thursday, May 17, 2007

Heuristic

0 comments
"A heuristic is a technique that helps you look for an answer. Its results are subject to a chance because a heuristic tells you only how to look, not what to find. It doesn't tell you how to get directly from point A to point B; it might not even know where point A and point B are. In effect, a heuristic is an algorithm in a clown suit. It's less predictable, it's more fun, and it comes without a 30-day, money-back guarantee." - Steve McConnell, "Code Complete"

Wednesday, May 16, 2007

gtk: when the window stopped moving?

0 comments
It's very common to use the following gtk function to start to move the window when the user pressed the left button:

gtk_window_begin_move_drag()

The control of the window is passed to the window manager, which will move the window. However, you may want to find out when the window stopped moving in order to update something, like a background image. There is no specific signal for that and trying button-release-event is something that does not work either (* - see below).

A friend of mine suggestion a good solution for that. First, you connect to in-focus-event. This event will be emitted right after you stop moving the window. But, it is emitted whenever you click on the window, even when not dragging. Then, what you can do is the following:


gboolean on_focus_in_event (GtkWidget* pWidget, GdkEvent* event)
{
if (moving) {
moving = FALSE;
// move stopped
// do whatever you need
}
return FALSE;
}

gboolean on_button_press (GtkWidget* widget,
GdkEventButton* button, GdkWindowEdge edge)
{
if (button->type == GDK_BUTTON_PRESS &&
button->button == 1)
moving = TRUE;
gtk_window_begin_move_drag(
GTK_WINDOW (gtk_widget_get_toplevel (pWidget)),
button->button, button->x_root, button->y_root,
button->time);
}

...

gtk_widget_add_events (window, GDK_BUTTON_PRESS_MASK);

g_signal_connect (G_OBJECT (window), "button-press-event",
G_CALLBACK (on_button_press), NULL);
g_signal_connect (G_OBJECT (window), "focus-in-event",
G_CALLBACK (on_focus_in_event), NULL);



(*) The button-press-event works when you click but does not move the window. So, you can connect to the button-press-event to detect this case and undo anything you may have done when the user first clicked.

Tuesday, May 15, 2007

Exit code from gobject spawned processes

1 comments
[Python] Do you spawn a process using gobject's spawn_async() and want to find out what's the exit code? First, you have to add a callback to child_watch_add() function, which will be called when the process exits. This callback has this signature:

def callback(pid, condition, user_data)

Condition is the exit status information, but soon you will find out that it does not match the exit code. The reason is that it has both the exit code and the exit signal encoded in this variable. So, to find out each one, you have to do the following:

exitCode = (condition >> 8) & 0xFF
exitSignal = condition & 0xFF

Really really hard to find this information on the web to be able to check the exit code and do the appropriate action. I hope this helps you.

Monday, May 14, 2007

Most popular Hibernate bug: now fixed!

0 comments
This bug is the most popular Hibernate bug and has been open for quite a while. I hit it last year and created a patch that has been working perfectly for me since then. Although it seems that it wasn't used (mostly because hibernate has been changed the parts where I changed since 3.1 and also some better ideas came up), I am glad that it was fixed after all. I hope I can test it soon and be able to use, from now on, a stock version rather than patching it for each upgrade :-)

Other bugs, like this one are more than 2 years old and still not fixed. And I also provided a fix for it.

Saturday, May 05, 2007

Gems

0 comments
"The manager's function is not to make people work, it is to make it possible for people to work." - DeMarco and Lister.

"The top performers' space is quieter, more private, better protected against interruption, and there is more of it [...] Does it really matter to you [...] whether quiet, space, and privacy help your current people to do better work or [alternatively] help you to attract and keep better people?" - DeMarco and Lister.

(quoted in "The Mythical Man-Month", Frederick Brooks)

Sunday, April 29, 2007

One Step Forward and One Step Back

0 comments
Systems program building is an entropy-decreasing process, hence inherently metastable. Program maintenance is an entropy-increasing process, and even its most skillful execution only delays the subsidence of the system into unfixable obsolescence. - The Mythical Man-Month, Frederick Brooks

Sunday, April 22, 2007

Windows Media Player plugin for Firefox

0 comments
Not sure if it works fine, but it may be worth the try. Check it here.

Photos

0 comments
http://www.flickr.com/photos/rodrigocastro

iPod gang

0 comments
According to an article on Folha de São Paulo, there is a specific gang that targets iPod owners. A man and a woman appraches the victim, being attracted by the white Apple earphone, and steals the iPod device. I don't know why I still get surprised by such a news.

BTW, just recently I knew that there is an iPod index to compare the purchasing power among countries. It happens that Brazil is the country where you find the most expensive iPod device in the world. Yup, in the whole world. For example, while an iPod Shuffle 1Gb costs between 60 and 70 dollars in the US, you won't be able to find it below $210 in Brazil - well, at least where it is supposed to be legally imported.

Tuesday, March 27, 2007

Tab/Browser source for an event

0 comments
Do you want to find out what browser (tab) an event comes from? That is a tricky think to do if you have no idea (and not so easy to find). I found it in MozillaZine forum. In case it is not available or the discussion gets removed, that is the code (for Firefox 2.0):


function exampleLoadListener(event) {
var doc = event.originalTarget;
// make sure to get the top frame
doc = doc.defaultView.top.document;
var browser = gBrowser.getBrowserForDocument(doc);
var tabIndex = gBrowser.browsers.indexOf(browser);

alert(tabIndex + " - " + doc.title);
}
getBrowser().addEventListener("load", exampleLoadListener, true);


If you want to use it with Firefox 1.5, there is no getBrowserForDocument(). You must replace it with getBrowserIndexForDocument(). And, with the browser index, call gBrowser.getBrowserAtIndex() to get the browser object itself. Of course, if you want the tab itself, you can use gBrowser.tabContainer.childNodes[tabIndex].

Saturday, March 24, 2007

Italians and US Visa waiver program

0 comments
Are you Italian and not sure if you need a Visa to travel to the US? Check Italian Embassy web site in the United States. It is very confusing and the same passport type may require a visa or not depending only on its issue date. For example, I have a machine-readable passaport and fortunately was issued before Oct 26, 2005, so I don't require a visa. Anyway, it is always good to print out such a page and have it with you if you are going through US immigration soon.

And, by the way, it scares me to have a biometric passport. Its security is so weak that you can clone it while it is in its delivery envelope. Check this page to know more. If you have or need to renew your passport, be sure to be careful while holding it with you.

Telefonica site does not work properly on Firefox

0 comments
A huge company like Telefonica builds a web site that only work properly with IE. Just unbelievable. And for a state like São Paulo with over 40 million people and where the company has, I would guess, more than 90% of all landlines.

Tuesday, March 20, 2007

Openoffice and PPS?

3 comments
Do you often receive lots of PPS files and use openoffice to open them? The only difference between PPT and PPS is not the file format, but how Microsoft Powerpoint handles them. The former is opened in edit mode and the latter in slideshow mode. OO, however, does not open PPS in slideshow as it should, what is not such a big deal as it is only one click away, but why not make it easier if we can?

There is a recent extension (or package, depending on the term your distro uses) for OpenOffice named ImpressRunner. Install it and, whenever you open a PPS, it will be directly displayed in slideshow.

http://oooconv.free.fr/impressRunner/ImpressRunner-1.0.oxt

And its announce email:
http://www.mail-archive.com/dev@native-lang.openoffice.org/msg03011.html

Sunday, March 18, 2007

Hope, Faith and Love

0 comments
Nothing worth doing is completed
in one lifetime.
Therefore we must be saved by hope.

Nothing worth true or beautiful makes
complete sense
in any context of history.
Therefore we must be saved by faith.

Nothing we do, no matter how virtuous
can be accomplished alone.
Therefore we are saved by love.

- Reinhold Nibuhr