Alcides Fonseca

40.197958, -8.408312

Direitos dos consumidores

Deparei-me hoje com um post do “Michael Foord”:“http://www.voidspace.org.uk/ sobre a” saga que ele teve com a empresa Dabs.com por causa de um portátil com uma drive defeituosa”:http://www.voidspace.org.uk/python/weblog/arch_d7_2008_08_23.shtml#e1006, que recusaram reparar 2 ou 3 dias depois do fim da garantia e diziam que foi o utilizador o autor do defeito, sem sequer ver o portátil. Claro que em Portugal, embora a garantia seja de 2 anos, se fosse depois da garantia, a empresa não tinha nada que dar qualquer compensação.

In my previous blog entry about this several of my American readers seemed to think that Dabs’ response was reasonable – after all the laptop was outside warranty. This leads me to believe that consumer law is a lot stronger in the UK than it is in the US. In the UK, if someone sells you something, it has to be fit for purpose and not suffer from manufacturing defects – which includes a requirement that it stay working for a reasonable period of time. If something stops working then the fact that the manufacturer or retailer offers a limited warranty (limited in time or liability) does not reduce their legal responsibility or your statutory rights (UK Sale of Goods Act).

Wow, realmente faz sentido. E obriga a indústria a fazer produtos de qualidade. Para álem da garantia. Porque os computadores vêm com garantia de 2 anos, mas quando os compramos, tencionamos usar no mínimo 3 anos, e deviam durar uns 5 anos.

Mas ainda há melhor:

Because I was fairly confident of this I decided that I would take Dabs.com to the small claims court (the County Court in England). The whole procedure was pretty straightforward, and correspondingly interesting. It is the first time I have done this as an individual.

The first step is to send a ‘letter of action’ to the company, stating exactly what you want and giving them a timed deadline to do it and warning them that you will proceed with a claim if they don’t.

Having done that (and received no response) I then filled in the court paperwork, asking for three hundred pounds compensation for the repair of the laptop. The fees for this are thirty pounds which will be added to your compensation if you win.

Ou seja, eles têm um tribunal para estas situações que envolve pequenos indivíduos e empresas. É fácil preencher os documentos (como podem ver no post original) e os custos (aceitáveis – 30 libras) do processo são pagos pela empresa caso esta seja culpada.

Se houvesse uma coisa destas em Portugal, eu já tinha recorrido umas poucas vezes, e já tinha recebido umas poucas indemnizações de algumas grandes empresas. Eu sei que temos a Deco, mas é preciso ser sócio, e não se compara a facilidade que lá se tem.

Mr Socrates, can I has small claims court plz?

Cartoon Polémico

Estava a dar uma olhadela pelo Expresso quando vi estas reacções todas em relação a um cartoon da semana anterior. Como eu acho que estes católicos extremistas são um bocadinho parvos, fui ver qual era o cartoon que estava a gerar tanto desconforto. Obrigado ao Ricardo Martins por me ter arranjado o cartoon original, e não vejo onde é que aquele cartoon é ofensivo. E com tantos cartoons que são feitos, porque é que o papa tem de ser tratado de uma forma diferente dos outros caricaturados? Para os cristãos pode ter uma consideração especial, ser pai deles todos, representar quem eles quiserem, até ter poderes sobrenaturais. Mas não deixa de ser uma pessoa comum e com os mesmos estatutos que todos os outros1. Não é por ser papa que não pode ser caricaturado. E desde que se saiba que é ficção, a vossa santidade não o pode processar por difamação (senhores de direito, corrijam-me se estiver equivocado).

1 Exceptuando talvez os países onde não existe democracia

Backup scenario at 2008-08-28

Hardware:

Projects

Being school or work related, I have them in a SVN repository in Dreamhost. So I always have all the versions before in the server. Some of my personal code projects are not in SVN, but in GitHub, as I am trying to migrate over to git.

Dreamhost

I need to backup all my production websites in Dreamhost, along with the database. Luckily, they provide a monthly backup I can request, and I store all the database dumps, and tarballs form the user directories in my storage backup.

Documents in Macbook

I have a backup.sh that uses rsync to backup all my work-related stuff from the macbook to the external backup drive. I run it almost daily (after I work on something). Works pretty well, but I intend to buy a small usb external disk for time-machine backups.

Storage and Backups in the MyBook

The Storage (Movies, Music, Software) and the Backups from the Macbook in the MyBook are backup’d to my desktop. Yes, I am doing backup of backups, and you should too! I am using the fantastic SyncToy to keep those in sync.

PDA and PIM information

As for Windows Mobile, I sync it using SyncMate with my Macbook, and the contacts are also sync’d with Google Contacts (through the com.apple.iPod.plist hack). My todos and calendar are also backed up to Dreamhost account, through CalDAV.

As for email I use Gmail, but I keep a copy of my me@alcidesfonseca.com email in dreamhost. That and Google Reader, allow me to have access to them anywhere and always be up to date, but I am relying on manual OPML exports for GReader.

SyncToy

SyncToy is a nice Microsoft Powertoy for Windows XP that allows you to have pair of folders sync’d.

It rocks as a backup solution!

Mousers vs Keyboardists

The geek web trembled with the announcement of Ubiquity, the QuickSilver for the web. Well, it happens that I am not a fan of that application. I rarely use Spotlight to open my apps (which is fine for me). Why? Because I’m a Mouser, I am more productive using it, and shortcuting through all applications.

I’m happy that I wasn’t the one thinking the same:

Now don’t get me wrong, I am a fairly fast typist. But my problem is I can’t remember commands. Putting a keyboard command in my head is like putting sand in a sieve. The reason I love graphical interfaces is because I can’t remember shit. I wish I could, because I am sure I would be much more efficient. Keyboards are much faster than mice and GUIs. The problem is when you are staring at a keyboard you have to remember what to do. A GUI is for me a giant cheat sheet.

Same applies to me. I have two modes. The one when I’m writing code from scratch and my both hands are on the keyboard, and using the cmd+s shortcut a lot! Or I have one hand on the mouse, poping up menus, and clicking in buttons, and the other in cmd+c,v.

Even a long, long time ago, when I used to live without a mouse in Windows 3.1, I use the Alt shortcuts that allowed me to navigate through the menus, instead of the Cntr shortcuts that had to be memorized.

So most of the geeks are productive with their keyboard, and even in terminals and terminal-based editor like emacs or vim, but I’m really happy in my GUI software just like the majority of users, to whom the only keys they use in the keyboard are the letters, numbers, space and enter :)

IE8 Beta2 out

And IE8 beta2 is out

I’m a critic of IE7 and now IE8’s UI layout, because it steals the worst parts of the new Vista organization, and the Vista organization is just not that good. (Short aside on the Vista organization if you missed it: menus are gone, except when they’re not. If you’re going to uproot things, go all the way because that’s the only way you’ll make it work. Also, many programs are now somehow web pages with flow layouts and links. That’s the closest analogy I can find, but it’s not perfect because it implies that IE should fit hand in glove, and it just doesn’t.)

Read the whole post from Jesper about IE8 beta2.

Beta 2 has yet to provide any new breakthroughs, which is a bit unnerving since a fair bit of the previous process turned out to be the same old game of providing the solution using new standards — even standards that had been shot down in the HTML5 working group before!

Outch!

WebcamInput

WebcamInput

This project aims to be a easy-to-include unobtrusive code to transform a input type=file into a webcam input. People can then click to get a picture, and upload it.

I am developing this in order to scan some book covers easily, but I believe this could also become very popular in the Social Network world, where you take an instant picture for your avatar.

Show me the files!

Here they are or maybe you just want to try it yourself online

How it works

It consist of a Flash swf file to get the webcam, and some javascript glue. In the server side, you just have to guess if you are receiving a file (if the user is not using javascript) or if it is a string and base64 decodeit.

A simple php file that has that condition for you is included. You might want to tight up the security, too.

Todo List:

  • Make a Django Widget out of this

Real-Time Web Collaboration Tool

My master’s thesis project was a web collaboration tool that I felt people needed to explore ideas, resolve issues, track progress, and be more productive.
Availability, scalability and highly asynchronous communication were a priority, enabling efficiency and full interactivity.

I have actually seem a live demo of the project, and it’s really impressive. It is not available in HD; so it might be hard to understand most of it, but1 it’s a project manager, that also let’s you collaborate on real-time. The technologies used are also something interesting. Jabber, SVN and long-lived http connections.

1 Scroll down to the bottom of the page and download original quicktime movie.

O Quarto Operador Móvel

Anacom já abriu concurso para o quarto operador móvel

Nos termos definidos pelo regulador, as entidades que já detenham licenças móveis, nomeadamente a TMN, a Vodafone e a Optimus não podem concorrer a esta licença.

Sim, esperemos que não aconteça nada parecido com o que aconteceu em 2002 com a OniWay. Gostava de ver um operador realmente inovador a estragar o mercado dos outros, nomeadamente internet 3G nos telemóveis a uma flatfee barata.

Ou então, era um operador japonês investir cá em Portugal, mas já estou a sonhar alto.

Invest in side projects

Side projects are less masturbatory than reading RSS, often more useful than MobileMe, more educational than the comments on Reddit, and usually more fun than listening to keynotes.

You should really REALLY read this! Or watch the video

My temporary solution to the twitter pilgrinage

After Twitter loosing the SMS service in Portugal, most of the people have migrated to jaiku (that has sms’s) or friendfeed. What to do when my contacts are so spread apart?

iGoogle, add widgets for each of the service I’m in and what to communicate with people, and just let it be on my browser (that was how I was using twitter, via the website!).

( I don’t like the screen real estate that iGoogle takes on top and side, so I might be switching to netvibes, where I can remove that stuff)

Plastic SCM

Today I came across Plastic SCM which I believe it might be Distributed VCS solution for the Enterprise.

Although it’s written in C#, it runs in Windows, Linux, Mac and Solaris (thanks to the mono project) but lacks the server version and GUI tools in the last two.

Of course it doesn’t provide as many command-line utilities like git, but there are plenty of them and one thing that makes me like it: A task-driven workflow. I know that git is just small tools to make your own workflow, but I kinda like this default one.

For project management, you can track the different branches quite easily and even get a 3D visualization of the versions

For enterprise (specially if you are a Microsoft-based house), Plastic has really cool integrations. Visual Studio, Eclipse, JDeveloper, CruiseControl(.NET), VersionOne, Trac, Bugzilla, you name it. And you can import your CVS, SVN and SourceSafe, so no one can call you oldfashioned any more.

But what is really cool about Plastic, is the code merging tools. Besides the 3way code merging, it gives you merging of Binary files, like images, folders, Word files and other binaries. This is the future I want!

Oh and it’s free for Education and OpenSource Projects!

Veto à nova lei do divórcio

O Presidente da República, Cavaco Silva, devolveu hoje à Assembleia da República, sem promulgação, o diploma que altera o regime jurídico do divórcio, utilizando o chamado ‘veto político’.

De acordo com o site do chefe do Estado, “o Presidente da República decidiu devolver hoje à Assembleia da República o Decreto nº232/X que aprova o Regime Jurídico do Divórcio, solicitando que o mesmo seja objecto de nova apreciação, com fundamento na desprotecção do cônjuge que se encontre em situação mais fraca – geralmente a mulher – bem como dos filhos menores a que, na prática, pode conduzir o diploma, conforme explica na mensagem enviada aos deputado

Fonte: Expresso

Apesar de ser a favor de que caso um dos cônjugues queira terminar o casamento, o possa fazer, considero que o nosso Presidente da República fez bem em vetar o projecto de lei, visto haver algumas lacunas.

O exemplo apresentado é de um casal, em que a mulher sofre de maus tratos por parte do marido, que é o único a sustentar a família. Caso ele peça divórcio, ela fica prejudicada pois pode ficar sem direito a dinheiro nenhum. No entanto se calhar fica com mais alguma liberdade, talvez para denunciar a violência familiar de que foi vítima. Apesar de não se poder aplicar nenhuma regra a estes casos, se calhar poderia haver uma solução melhor prevista no projecto de lei, assim como em relação aos filhos do casal.

Legal age for drinking

College presidents from about 100 of the nation’s best-known universities, including Duke, Dartmouth and Ohio State, are calling on lawmakers to consider lowering the drinking age from 21 to 18, saying current laws actually encourage dangerous binge drinking on campus.
Mothers Against Drunk Driving says lowering the drinking age would lead to more fatal car crashes. It accuses the presidents of misrepresenting science and looking for an easy way out of an inconvenient problem. MADD officials are even urging parents to think carefully about the safety of colleges whose presidents have signed on.
But the statement makes clear the signers think the current law isn’t working, citing a “culture of dangerous, clandestine binge-drinking,” and noting that while adults under 21 can vote and enlist in the military, they “are told they are not mature enough to have a beer.” Furthermore, “by choosing to use fake IDs, students make ethical compromises that erode respect for the law.”

Source: CNN Health

So I’m straight-edge, I seriously hate drunk people and I don’t know why 21 is the minimal required age in the US to drink. I’m pretty sure that an high percentage of 18yo already drink alcohol that their parents or their older friends buy. Or that fake their IDs. And they are old enough to vote, but not old enough to drink?

In Portugal, where I live, the minimum age for drinking is 16 (and you see 14 yo drinking in discos). Most of the young people drink when they go out at night, but it’s not that serious, since they can’t drive until their 18. And the serious problem is driving drunk. And maybe start drinking before would teach them something.

So why wouldn’t a 19yo like me drink? I won’t, but I don’t see why not. I am perfecty aware of the dangers, as well as everyone else my age.

Python Universal GUI revisited

Do you remember my post about the need for a Python Universal GUI? There are a lot of solutions for developing Python GUI, but if you are considering multi-platform there isn’t a clear choice. Also, I haven’t find any library that makes GUI development easy1. The folks from Spain have discussed it the last days, so I’ve decided to start a project that will solve this problem.

Goals

  1. Has a simple and natural API. It will be somehow based on Ruby Shoes, but with a more OOP approach (Python doesn’t have blocks like Ruby does)
  2. It will use the best GUI library available in your system. This means, it will try to load wxPython, if you have wxWidgets, pyGTK if you are using Gnome, pyQt if you are using KDE, and so on. It will always fallback to tkinter, since it’s the one that comes with all Python distributions.
  3. It will still be possible to use library-specific features.

This way, you will only have to know a easy-to-use API, and the code will run in any system.

The Roadmap

Right now, I’m starting with the tkinter connector, since it’s the fallback one. I am also looking for an interesting name (suggestions in the comments below, please). The castellano-speaking folks suggested GUIdo, but since he doesn’t care about this GUI issue, I won’t go with that name.

I will then proceed with the wxWidgets since it’s my favourite, and then IronPython’s WinForms. Yes, I find it the best solution for a Windows-specific GUI, although it runs in a different runtime.

At this point I will have examples of the three situations (different runtime, a non-native library, and the fallback) so I will have the connector picker done.

So I’m also looking for people interesting in helping me in this project, since will be made in the few spare time I have. I’m looking for pyQt, pyGTK, Jython’s Swing, and other alternatives you might thing of.

Resources:

1 My choice at the moment is wxWidgets and I use wxGlade to generate the UI code.

MarcoPolo

If you have a Mac laptop, this is one of the first things you should install. MarcoPolo can detect your location through several factors (wifi, usb, bluetooth, gps, monitors, ambient light, ip, bonjour, etc…) and even from combinations. It then allows you to do several actions according to the location.

I use it to mount network drives, mute or unmute the system, to perform backups, to turn wifi on or off (when I’m on cable or not), but there are a lot of actions doable, and the obvious shell script that makes the possibilities unlimited.

OpenCellID

Fireeagle is now public, but I have had an account for a while now. The idea of managing my location around a few web services was pretty interesting, but in order to manage something, you have to have it.

So how could I automatically update my location? I’ve tried some python scripts associated with MarcoPolo, but it would only update my three work areas (atm). The best solution was my pda to update my location. Although the TyTN has a GPS chip inside, it lacks a GPS antenna that makes it useless. I don’t want to carry (or even buy!) a bluetooth gps dongle with me, so I googled around to see if there was any solution with CellID triangulation. Google Maps Mobile does use this solution and it works pretty well. The problem is that they use a proprietary database of coordinates of GSM antennas. Navizon provides a software to emulate the GPS through CellID, but I didn’t like the free application they provided. What about an open database?

I found OpenCellID and CellSpotting (this last one with bluetooth and wifi devices too) but none of them was enough populated to be of any use.

Yesterday, Dale Lane posted about the same problem and today he released his solution: A Windows Mobile application to record the coordinates of the CellIDs. One day that I’ll take a tour around Coimbra (usually when I got visits), I’ll get a GPS, or my fathers old iPAQ hw6940 and populate the OpenCellID database with Coimbra’s cells. And you could do the same, specially if you have a GPS enabled phone.

Mono isn't just for apes

I think there are three major types of critics of Mono in the Open Source community. Those who think Microsoft pays Novell for developing Mono to take over the world, those who think Mono is a project that will face patent problems in the future because Microsoft will claim copyright infringement and those who have a problem with Novell because of the patent agreement with Microsoft. Of course there are more. There are people who actually had a look at it and compare it to established platforms like the JVM and come to the conclusion that the Sun compiler is better than Mono or something similar. I agree that it’s perfectly okay to not like Mono because one is happy with the JVM or to hate Novell to sign that patent agreement with Microsoft. However none of that makes Mono as such a bad thing to have.
Mono itself is a fantastic piece of software and one of the best programming environments Linux users got since ages. The big advantage of it is that the Mono environment can host multiple programming languages, not just C#. Even though there are multiple languages running on top of it they can exchange code which is somewhat hard to achieve with the more traditional approaches. For example it’s nearly impossible to use a Python library with Ruby or the other way round. With Mono, IronRuby and IronPython this becomes somewhat possible. But I must agree that I haven’t played with that in detail so far. C# alone was convincing enough.

Read the whole thing by Armin Ronacher

I agree with is point. C# is the only mature (excludes D and Vala) that has bindings to linux/gnome features like GTK and DBUS. And the Java language is behind C#, I don’t know what those guys at Sun are doing…

Plus, it could be a nice way of migrating Windows developers to Linux platform!