Alcides Fonseca

40.197958, -8.408312

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!

CVs europeus e outras formatações

Porque antes, quando eu tinha uma pilha de cv’s para analisar, eu não procurava só as habilitações/cursos de cada candidato. Eu procurava elementos diferenciadores, que fizessem com que algumas pessoas se distinguissem – havia cv’s muito bem escritos e estruturados, havia cv’s que tinham uma organização fora do vulgar, havia elementos surpresa que denotavam criatividade. Agora aquilo é um deserto, o resultado de uma produção em série, um regressar à era industrial.

Depois da Jonas se ter queixado do Modelo Europeu, o Pedro Alves públicou no Inóspito um rant sobre o Modelo Europeu, do qual recomendo a leitura, e já que estão por lá leiam o meu comentário.

Is Microsoft trying to kill Apache

Microsoft are now free to take Apache source code and proceed to amend, tweak or customise it to the point of what Bruce Perens has called “engineered incompatibility” At that point Microsoft could repeat the successful disaster of bundling Internet Explorer with Windows, only this time it would be Apache and with all the attendant broken web standards that tormented web developers—but this time on the server instead of the desktop.

Nice article on the FreeSoftwareMagazine about Microsoft becoming SilverSponsor of the Apache Foundation. And it’s not that usual zealot crap!

Such misplaced generosity will simply invite it to pick off the Lamp stack one component at a time. Microsoft certainly “get it”. Do Apache?

Japan as the Example for the Future

I’ve lost my faith in TechCrunch a while ago, but today I’ve found an interesting article on why Japan can be considered an example of what’s coming next in the rest of the world or not.

The availability of cutting-edge phones is one reason why many Japanese people don’t own a PC but would rather browse the web exclusively on mobile devices. And it’s not just for short bursts. They never write SMS either but rather thumb-text push-mails, often containing little icons, emoticons and coded youth slang acronyms. Booking flights online, ordering clothes, auctioning off used stuff, gaming, paying for movie tickets via direct debit: all of this has been possible on Japanese mobile phones for years now.

This is how it works there, but will this be how we will be using technology in a few years? I guess not. Serkan Toto points out a few factors:

  • superior phones
  • lot of content
  • demanding customers

And also three agents:

  • Forward-looking politicians
  • Carriers
  • Content providers

As for the factors, I disagree with the first one. I have a pretty advanced phone (HTC TyTN) and I can’t make use of it, because I don’t have a flat fee internet plan, and it becomes to damn expensive to use internet on my smartphone (just checking the email for 4 days cost me 6 euros). I believe demanding customers are the most important. The majority of people in Portugal thinks just my dad, that also bought a PDA, and kept just making phone calls (now he’s back to the classic Nokia 3100).

As for content, Portuguese companies aren’t betting in mobile content, because no one uses it. But we sure have a lot of SMS spam and weird businesses around ringtones and java games, that would go away if everyone had internet in their cellphones.

So until carriers start to offer decent deals, we are not becoming any sort of Japan!

API library in a minute

Mason Browne just released Bricklayer, a simple way of creating your ruby library for a REST webservice. It walks you through the twitter example ( Twitter is the Hello World of REST APIs!) and you get 22 lines of a complete Twitter API.

I’m really considering doing the same in Python, but taking a different approach, more like the Django Models, but for APIs. I believe with that much APIs available, we need a simple way of adapting to each, one of the problems WS-* have being pointing out to RESTafarians for a while now.

Invoy

Now that I’ve founded a company, one thing that we are concerning about is a invoice software. We are right now analyzing a few options.

One of them is Invoy, a simple Invoice Software for Mac. I’ve been in touch with the Empty Factory guys and I’ve been testing a few betas of the software. Today 1.0 version was released and the price announced: only 25 euros!

Invoy is a really simple program: It lets you manage Clients and Items, and produce documents. And way more usable than golias programs like the Portuguese PHC. It really has the feeling of belonging to OS X, you can even drag contacts from the address book into your client list! You can also export documents to PDF, Numbers, Excel, email them (optional integration with Mail.app) or just print it like you didn’t care for the environment.

Right now it supports two languages: Portuguese and English, but in the next versions this list will increase. This is really an international product, but it follows some regional-specific rules like SAFT-PT, for instance.

This is an excellent software for Mac-users who do freelance work, or small companies with only a computer to deal this kind of stuff. This is not the case of JeKnowledge: although the mac ration is pretty high, we can’t narrow our choices, we need a multi-platform software. And we also need a centralized database. Invoy has a small SQLite database (which makes it really simple to backup!) but right now you can’t have a shared database across the network. But if you are one of those cases, Invoy make the €25 worth it!

Goodreads to Shelfari

I’ve never found a good movie-manager, that’s why I started with Movio, but as for books there are a few good options: LibraryThing which lacked a good design (yes, I do care about that), GoodReads and Shelfari.

The last two were pretty equal to me, until Luís brought to my attention they were keeping our password in their database. In fact, if you “Forget your password”, you’ll receive it in plain text in your email inbox.

As anyone concern about their privacy, I decided to migrate to Shelfari and delete my account in GoodReads. Luckily both services allow import/export, so I exported my GoodReads library to cvs, applied a bit of python magic and got a Shelfari compatible text file.

So if you have a GoodReads account, I suggest you to export your books, copy the file to same folder as my gr2sh.py script, and run it. It will produce a “my_shelfari.txt” file you will upload in the import section in Shelfari. As simple as that.

Don't dumb down museums

We should have museums about science and technology because those subjects are important, not so we can sell crap in the museum shop or increase the Sats results.

Read Tom Morris on Museums

Two Action Trailers

And both featuring Jason Statham:

Transporter3

Death Race

Via Miss Geeky

Python-bits

Today, I bring you three interesting resources from the Python World. The first one is a different approach to SQL in Python, using decorators. DB-agnostic (based on python db api 2.0), pySimpleDb makes it almost fun to use SQL in Python, object-oriented. Personally the best approach I have seen was Pungi’s1.

The second one is more for Unix geeks with a bit of Python flavor. Would you like to be able to pipe code inside python? Like xrange(-10, 10) | grep(lambda x: x % 3 == 2) | (x * (x + 1) for x in STDIN) | list ? Well python-pipeline is your solution!

Finally, I have spent a lot of quality time with Django (that is approaching 1.0) and here is a list of semantic apps and snippets to improve your projects.

1 which obviously was written by me. As an example of the syntax:


db = AutoDB('localhost',"user","pass","database")
for row in db.table:
	row['field'] = row['field'].upper()

Offline Commits in SVN

James Bennett wrote an interesting article called Let’s talk about DVCS

I agree 100% with him. People are all migrating to git and other DVCSs, but that approach is not the better for everyone. Myself, I like to have a central repository to all my team projects. I want users to commit to this repository, and not to have another ones. (I use SVN repos as a backup, and I trust myself more that I trust any of the people I work with for this kind of task).

But with SVN you can’t have offline commits, and that may become handy. Yes, that’s true. I’d love SVN guys to add what Bennett called waypoints, a way of doing intermediate commits in your local copy.

Please, get this thing in 1.6, and the GUI tools, please!

PushTheWebUp

Friends don’t let friends run old browsers!

That’s the spirit of the PushUpTheWeb, a movement for people to include a small javascript code that alerts the user when he’s not using the latest version of his browser. I’ll definitely add it to some of my websites :)

Btw, if you make websites, take a look at A List Apart’s 2008 survey

Document-centric GUI

Federico Mena-Quintero has given an interesting presentation on a Document-centric GUI for Gnome.

From my experience with non-tech people, I must agree with him that people waste too much time looking for their documents. Although I agree that a journal of files would do miracles, search is also something very powerful, and in most systems it’s too slow to use.

comparação entre isps

Estou quase a mudar de casa e está na altura de decidir o ISP a usar. Nos últimos 5 anos tenho sido Cliente SAPO ADSL com os quais tive vários problemas a nível de facturação (marcavam-me uns picos de tráfego que era impossível com a minha largura de banda. Depois tem um tarifário muito limitado que não excluí a assinatura do telefone. Ao longo destes anos todos a única coisa que gostei foi o serviço de dynip automático. Mas acho que vivo bem com outras alternativas como dyndns ou no-ip.org.

Como existe a possibilidade de começar a ter televisão por cabo ou IPTV para alargar a escolha a mais do que os 4 canais que temos actualmente, fiquei indeciso entre Zon, Meo e Clix.

Clix Meo Zon
Downstream 12Mbps 8Mbps 18Mbps
Upstream 512 Kbps ? 1Mbps
Tráfego Ilimitado Ilimitado Ilimitado
Mensalidade Internet €29,65 €35,30
Televisão 45 canais + 5 opcionais 35 canais base + 2 Packs 80 canais
Mensalidade com Televisão €48,00 €49,54 €57,69
Notas: Já tenho router-modem compatível, pelo que era menos um custo. O IPTV parece ser o futuro, mas ter de comprar uma box para cada televisão, não me agrada muito. Depois da Review do Macaco fiquei bem impressionado pelo serviço. Mas não devo poder esperar pela próxima box. Nunca gostei da TVCabo/Netcabo. Demasiadas reclamações e serviço fraco. No entanto, gostei agora do Zon@Fon que parece que o tráfego FON não conta e tal só é possível por ser cabo. Mas eu não sou grande adepto de cabo, porque entre ADSLs posso mudar sem grandes problemas. E nDSL está a caminho!

Notas gerais:

  • Tanto em publicidade, como no site poderão ver as mensalidades mais baratas, mas estão limitadas a um período de 1 ano ou 2 anos, a partir dos quais passa aos valores que estão na tabela. Como tenciono ter o serviço mais dos 2 anos, coloco a mensalidade mais cara.
  • Existem outros tarifários, eu selecionei os que me interessavam entre o preço e a velocidade. Pondero ainda a Clix 24Mbps caso 12Mbps seja muito lento para ter a televisão por IP.

Tendo isto em conta, gostava de ouvir opiniões de clientes actuais, ou de quem saiba de alguma coisa que possa influenciar a minha decisão, uma vez que vendo este quadro, os concorrentes estão bastante empatados, mas estou mais inclinado para a Clix.