Alcides Fonseca

40.197958, -8.408312

Capital de Risco em Portugal

Também me parece um pouco estranho este conceito de meter o dinheiro dos contribuintes em empresas de capital de “risco” que não gostam de correr riscos. “Ai eu não gosto e não posso correr riscos com o dinheiro dos investidores”. OK, tudo bem. “Ai é dinheiro dos contribuintes? Então bora lá correr riscos!!”. Se uma empresa de capital de risco tem uma oportunidade de investir numa empresa correndo riscos tendo a hipótese de ganhar uma pipa de massa, porque é que precisa da ajuda do Estado para correr o risco? Se não quer correr o risco mas o Estado acha que deve investir em empresas com risco, então é mais simples dar o dinheiro directo às empresas e não pagar comissões e partilha de lucros.

Excelente post do Mário Valente sobre o estado do Capital de Risco em Portugal com que eu concordo plenamente.

Opening MKV in Quicktime X in Snow Leopard

In Slow Leopard you can’t open MKV files, even if you have Perian installed, so here’s the solution. Usual disclaimer: Works on my machine™.

1. Install Perian, if you haven’t already
2. open ~/Library/Preferences/com.apple.quicktime.plugin.preferences.plist in the terminal, or just use the finder.
3. Expand WebPluginMIMETypes
4. Copy video/x-m4v
5. Having WebPluginMIMETypes selected, right-click and paste.
6. Rename that child to video/x-matroska
7. Expand it, then expand WebPluginExtensions and rename Item 0’s value to mkv
8. Close and now QuickTime X accepts mkv files.

Shut the fuck up methodology

During his keynote, he extended an invitation to any open source application to submit their software for testing by user-experience experts. The sessions would be recorded for posterity, and the developer would not be able to interact with the user. “‘If the developer is in the room, they have to say nothing. It’s the shut the f*** up protocol,’ Shuttleworth said. ‘You sit and watch someone struggle with the software that you’ve so lovingly produced.’”

Mark Shuttleworth is the men! I think Linux (or just any OpenSource software) should improve their usability and so does Mark Shuttleworth.

Technical details about Google Chrome Frame

The irony here, as I see it, is that an old, insecure feature Microsoft built to try to beat Netscape is now being used by Microsoft’s biggest current rival to patch IE. The upside for developers is that Microsoft is going to have a hard time killing Chrome Frame because it actually does the right thing — it’s not hacking IE via undocumented APIs or unscrupulous haxie-like code injection. They used Microsoft’s own well-documented and fully supported platform to do this. Bravo indeed, Google.

Interesting insight and some technical stuff on Google Chrome Frame.

7 signs your UI was created by a programmer

It’s really easy to spot if an interface was made by a programmer, or by someone who really cares about human-machine interaction. Here are 7 obvious signs and I’ve seen almost all of them in some software I’ve used, or even in some small projects I made.

Of course not all the projects have a budget for an interface designer, but not all programs are professional, right?

Writing a compiler using Python, Lex, Yacc and LLVM

I found a good post on how to build your own toy compiler using Flex, Bison and LLVM. I saw one disadvantage right in the beginning: you had to use C++. If I were just prototyping a compiler, I wouldn’t use C++ but rather a dynamic language. And last semester for the Compilers course that’s what I did.

Students were assigned to build a Pascal compiler (actually a subset, but not that small) and the tools suggested were Lex, Yacc (using the C language) and compiling the code into C. I took a different approach and decided to do the project in Python (I actually tried ruby first, but the ruby-lex and ruby-yacc projects didn’t pass my basic tests).

I wrote the language grammar using PLY (the lex and yacc DSLs for python) and it was pretty simple. As for the AST generation, I had only a class Node that accepted an type and a list of arguments while my colleagues using C had to make 1001 structs for each kind of node. Not that it wasn’t impossible using C, but dynamic languages make the code simpler and more clear.

For the code generation, I decided to go with LLVM. It is a very promising project. Just take a look at google’s unladen-swallow or macruby, even parrot is planing on using llvm for their JIT.

For writing the code in Python, I had to use the llvm-py which I may say it’s in a early stages and lacks documentation. That was my major problem using. I had only three resources: the official guide, a presentation in japanese with some source code, and the actual source of the project (in C and C++).

Since every time I got an error in the llvm code generation it crashed the program, I had to dig into the source code of the project and find that error message and reverse engineer what was wrong with my code (usually I was giving values or pointers instead of references and vice-versa). So if you are doing something more complex, you actually need some C++ reading skills.

The project however worked, and I’m making it available so anyone may use the code as an example until better resources are published.

Gender differences as perceived by aliens

Physically they had differences, odd limp appendages that dangled like half filled bags, the larger one had a tiny trunk between its legs next to some kind of external sacs. MorningLightMountain could see no practical use for either set.

From Peter F. Hamilton’s Pandora’s Star.

Action costs as a measure of Usability

During my erasmus programme, I am taking courses from the master on interaction design, something that I’ve wanted to learn for a while now. Right now I am taking “Graphical User Interfaces” where Usability is a main concern.

I’ve read about this but Russell Beattie makes an excellent suggestion on how to measure the usability and ease of use of an interface. This might be used as a guide line, but I don’t believe it should be followed blindly. Sometimes more “expensive” actions may have better results if you want more consistency across your application, or if the user can learn something with the process, or there are just too many ways of using your application that you can’t predict all of them.

As a tool for comparing different options, this is an good way of having an idea of which one is the best, even before running some usability tests.

The Mac way of installing applications

The discussion about the workflow of installing a new application has been revived.

I agree with the problems raised with dmg’s, specially with the need to unmount them. But with a zipped app, there is no way of instructing the user to move it to the correct place. I like the idea of suggesting the user to move the application to the right place, but I disagree with Andy Kim in two points:

First I would like to choose the place where I want to install the application. I don’t really use /Applications but ~/Applications instead (so apps don’t have root access) and I organize my apps in folders (Dev, Creative, Utils, etc…). I don’t think everyone should do this, but they should have the possibility of having their own organization.

Second, the dialog should be brought up when a new app is downloaded (using FSEvents or something similar) instead on the first time it’s opened. This has the advantage of having applications always in the right place and it’s easier to catalog the application if I do it right after the download, and not after some time when I’m checking the contents of the download folder.

Anyway, Apple should suggest a standard (and correct) way of doing this, and maybe allowing the possibility of extending the process with some scripts (for serial keys, EULAs, some shell-fu, etc..).

Snow Leopard

In the beginning of the semester, I took time to upgrade to Snow Leopard (10.6) since I had no project running, and I could use a refresh in my main (and for now only) computer. Since it didn’t asked anything, I actually updated the first time, but now I am doing a clean install and here are the steps I followed:

  • Backup with Time Machine
  • Erase your HD
  • Install Snow Leopard
  • Install XCode
  • Import from Time Machine Network Settings (since I had eduroam and a few networks saved and I don’t want to go through those settings again)
  • Copy documents and media from the time machine backup
  • Configure Mail.app (using this tip) and iCal
  • Install Software
    • Adium
    • Textmate
    • Transmission
    • AppCleaner
    • Adobe CS4
    • TwoUp
    • Perian
  • Do the Lock Computer service

Git, pip and other tools will be installed as they are needed, but I’m thinking about trying HomeBrew instead of the bloated macports. I’m still not conviced, but I’m really into a 64bit only package manager.

República 2.0

Chama-se República 2.0 e a ideia é aproximar os jovens da vida política. O conceito República 2.0 faz parte das “20 propostas jovens para Portugal” que vão ser apresentadas hoje em Lisboa pelo Conselho Nacional de Juventude (CNJ).

Bonita ideia.

A proposta da CNJ é a de que todos os órgãos de soberania criem plataformas digitais, como as redes sociais do Facebook ou do Twitter, que permitam a participação de todos, “melhorando a relação entre cidadãos e instituições e promovendo uma verdadeira democracia participativa”, explicou.

Essa rede devia sugir por si própria, e não devia ser incentivada pelos próprios partidos, quer pela sua função de representação, quer pela angariação de novos membros/votos. Já andava a pensar nisto há uns tempos e acho que é uma coisa que devia surgir, mas na qual não tenho grande esperança.

The Death of the Div element

I’ve given a couple of wedesign workshops, and one thing that makes it easy to explain is the div element. It just works as a box, and you have them nested. And that’s it.

Now with HTML5, there are a lot of new tags that somehow have the same function as div, but for special kinds of content. Article, aside, nav, etc…

While they help to organize the content in a semantic way (instead of using classes like in microformats), it raises the entry level on HTML a little bit. On the other hand it speeds javascript execution by using getElementByTagName, which might be really useful in full blown web applications.