Alcides Fonseca

40.197958, -8.408312

Backups para Pais/Avós

Dependendo da idade, poderão ter Pais ou Avós (ou irmãos) digitalmente menos literados, e que necessitam de uma mãozinha para certas tarefas. Tirando o Skype (e a funcionalidade Share Screen) que me ajuda a ajudá-los remotamente, recomendo vivamente que tirem 2 minutos para fazer o seguinte:

  • Criar conta no Dropbox (affiliate link)
  • Instalar no Computador da pessoa em questão
  • Definir Dropbox como pasta de Documentos:
    1. Ir à pasta do Utilizador, botão direito do rato em “Meus Documentos”
    2. Separador Localização
    3. Mover
    4. Escolher Pasta da Dropbox
    5. OK.

E pronto, a pasta “Meus documentos” passa a ter um backup automático que o vosso familiar/amigo nem sabe que existe, mas se (e acreditem em mim nisto!) acontecer um imprevisto, vai dar bastante jeito.

Caso a pasta ocupe mais que 2Gb, recomendo que usem um disco externo para backups de ficheiros grandes (para quem guarda vídeos e afins).

Ads:

New York City

I’m writing this post during the halftime of the SuperBowl, in which the team of my future city (Pittsburgh) plays. It’s also my second day in the US and I’ve registered some stuff that I find it different here:

If you want go form one place to another, you have to measure the distance using the Manhattan Distance, except if you go South-east and then you can use the Euclidean Distance by using the Broadway.

Other interesting bit that amused me was to see that smoke comes out of sewage covers just like in Ninja Turtles.

Streets are mostly one way, which makes it super easy to guess when to cross the road, but if I would ever driven here, the transit lights would drive me insane. I’d guess around Time Square, 50% of the cars are cabs, 20% are limos or “long cars” and the other 30% regular expensive cars (BMWs, Porsches, some Prius,..). Poor people use the metro, middle-class uses taxis, rich people have their own cars and really rich people have their own drivers.

Fast food is cheaper than proper food (even bought at the super market and not cooked). For instance, bottle water is more expensive than soda. Maybe this is the reason of the NY’ers overweight.

Matias Duarte on Android

I just wanna say that Google is lucky to have someone who takes so much pleasure from working on this issue, and that follows their vision of Android as a platform. I’ll be sure to keep an eye on Honeycomb for smartphones to see the differences he caused on the UI.

On being an atheist, an xmas message

I enjoyed quite much the xmas message from Ricky Gervais, mainly because it’s exactly what I think and feel about the issue.

I don’t care wether you are atheist or have a religion, but you should definitely read it! The most important quotes follow:

As an atheist, I see nothing “wrong” in believing in a god. I don’t think there is a god, but belief in him does no harm. If it helps you in any way, then that’s fine with me. It’s when belief starts infringing on other people’s rights when it worries me

“Do unto others…” is a good rule of thumb. I live by that. Forgiveness is probably the greatest virtue there is. Buts that’s exactly what it is – ‐ a virtue. Not just a Christian virtue. No one owns being good. I’m good. I just don’t believe I’ll be rewarded for it in heaven. My reward is here and now.

And the best is without a doubt:

When confronted with anyone who holds my lack of religious faith in such contempt, I say, “It’s the way God made me.”

PIL on SnowLeopard

Package Install

Nuno Lourenço created a PIL package for Python 2.6 on OS X.

Compilation

How to install PIL (Python Image Library) in Snow Leopard with freetype2 and libjpg support.

Libjpg

brew install jpeg Or download source and compile.

Freetype2

wget http://mirrors.fe.up.pt/pub/nongnu/freetype/freetype-2.1.10.tar.gz

tar -zxvf freetype-2.1.10.tar.gz && cd freetype-2.1.10

./configure && make && sudo make install

PIL

wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz

tar -zxvf Imaging-1.1.6.tar.gz && cd Imaging-1.1.6/

Open setup.py and change JPEG_ROOT and FREETYPE_ROOT to:

FREETYPE_ROOT = libinclude("/usr/local")

JPEG_ROOT = libinclude("/Users/alcides/Code/Support/homebrew/Cellar/jpeg/7")

Finally, sudo python setup.py install

Shift It

Organizing windows around your desktop is something that breaks you down from your main task. For Mac OS, I used to recommend 2up, which allowed people to make windows use half-screens (right, left, top or bottom).

However it has been discontinued, and I have found a better replacement which has the initial advantage of being opensource: Shift It (a fork of the initial project) allows you to also use quarters of screens, fullscreen and center.

I use this daily, mainly with terminal windows or with documents and editors, for having more than one window at the same time, and still maximize the used screen estate, without having to drag and move windows with the mouse.

I highly suggest it, and I am making available a pre-compiled version of the lastest commit, which has multi-monitor support.

The Desk

Desk – Music and Sound Design from Aaron Trinder Film:Motion:Music on Vimeo, via Nuno Póvoa.

About my desk

The desk itself is light-gray, very plain Fluxograma desk I won on a TV show when I was a kid, together with a top-of-the-line compaq presario and other stuff. The desktop quickly became obsolete, but the desk is the best one I’ve worked on.

I try to have only my computer (+external monitor, keyboard and trackball) on it, but due to this society’s dependence on paper, some documents get some private time with my desk. And once one sheet of paper accommodates, a lot of them start to join. All in one stack.

Outside people may say that stack is a pile of unorganized junk, but it is in fact organized, on a reverse-chronogical structure. I know where things are based on how far away the moment of “archiving” them is on my memory.

But I still hate to have paper. And I don’t have a scanner to process it. Nowadays, I find cameras much more suitable to record printed stuff.

In the future I believe desks will themselves be a multitouch surface, acting as a secondary display for the main screen on the wall, mainly focused on input.

I want a Kindle, but not yet

So I never really got a Kindle myself. I figured I’d like it, but not love it, so I’d wait until I maybe got one for a gift, or the price of a future generation dropped so low that it seemed inconsequential. Since the two major players in the digital reader space are Amazon and Barnes and Noble, both of whom are more interested in selling the books than the hardware, I suspect that the prices on them will keep dropping until one day they’re free if you purchase some number of books. Verizon will give you a phone for free so they can sell you the service for it, and I think Amazon will eventually do the same. They’re already rumored to be selling them below cost, and selling large numbers of books to their owners, and the price of e-ink screens will keep dropping from here. — Matt Maroon: Kindle and iPad

Exactly my thoughts. I don’t want to spend $100+ on them, if in one year they will be around $50. And I want a long-lasting one.

Como a Vodafone me desiludiu

Sou cliente Vodafone desde que tenho telemóvel (9 anos, e sim, na altura era Telecel) e nunca tive qualquer tipo de problemas, e considerava-me um cliente satisfeito. Até ontem.

Desde alguns meses para cá, tenho subscrito o aditivo Internet 100 que custa 5 euros por mês, e eu estou longe de chegar ao limite.

Ora como o meu telemóvel actual é um Blackberry Curve, decidi experimentar o aditivo superior Internet 300 visto que suporta o Serviço BB.

Dia 1 de Setembro, tinha 99.X Mb em 100 por gastar e 5 euros descontados na conta, e telefono para a linha dos aditivos para fazer o upgrade. A resposta que tive foi que tinha de cancelar o aditivo actual, perdendo tudo, e voltar a subscrever o plano 300. ou seja, perdia 5 euros, 100 Mb e ainda tinha de pagar de novo 10.

Isto para mim é inadmissível. O que eu aceitaria (e esperava) era pagar 5 euros de upgrade de aditivo (a diferença) e ficaria com 299.X de tráfego para gastar.

E a resposta da senhora que me atendeu foi bastante categórica. Não era mesmo possível creditar os 5 euros. Perdi o gosto que tinha pela Vodafone e fiquei mesmo desiludido. Eu a querer dar-lhes mais 5 euros e eles querem o triplo.

How to install RPy2 on Mac OS 10.6

How to install the R python bindings library RPy2 on Mac OS 10.6 Snow Leopard using Homebrew.

Install R

In order to install R in your Mac as a framework, make this change in your homebrew/Library/Formula

brew install r

Install RPy2

wget http://pypi.python.org/packages/source/r/rpy2/rpy2-2.1.4.tar.gz#md5=cf4e0d80ba498a6d76f107531966478d
tar xfz rpy2-2.1.4.tar.gz
cd rpy2-2.1.4/
sudo python setup.py build --r-home /usr/local/Cellar/r/2.11.1/R.framework/Resources/ install

Troubleshooting

If you are having a problem related to “-framework vecLib” when installing rpy2, insert a new line after #134 of setup.py with the following:

extra_link_args = extra_link_args[:-1]

Worked for me.

Le Chevalier d'Eon

A simple exercise: read through the real “Chevalier d’Eon”:http://en.wikipedia.org/wiki/Chevalier_d’Eon wikipedia page, and try to guess if he was a man or a woman.

Now, there is an anime based on this historic character and it’s history which resolves around the King Louis XV, Le Secret du Roi and Robespierre. Although they had introduced magic into the story, the result was quite interesting and made me like very much the show, specially the thought of the duality between the solitude of kings versus how evil/machiavelli/good they are.

Of course it also features some ideas of le Révolution Francaise opposing the existing honor to the King, which lead to a lot of intrigue and betrayals.

Gankutsuou: The Count of Monte Cristo

Besides the usual reading spike, I’ve been trying to watch more anime these holidays. After Monster, which I really enjoyed, I’ve watched Gankutsuou: The Count of Monte Cristo. It’s a adaptation of Dumas’ novel, but set in a distant future with spaceships and The Count being changed by a demon.

This futuristic changes were excused in my opinion (they were only there because of marketing tactics, I guess) but fitted the technique that they used to fill the clothes with static patterns (You really have to check it out!). Luckily they’ve retained the society, fashion and style of the time. There’s even a French spoken intro to every episode. Most of the times you don’t even know it’s set in the future.

Even if the plot is not surprising at all (even though I haven’t read the novel before), the anime is really well done, pursuing a more emotional and dramatic view of things, and I even trembled when one of the characters died (not going to spoil it, but you’ll know when you get there). And just like all the animes I’ve loved, this one also has a lovely soundtrack.

How to Access the Internet (A Guide from 2025)

So good, I had to blog about it: How to Access the Internet.

If the unbelievable decisions that are being taken in courts and in businesses regarding the internet and communication continue to be the way they have been the last years, I sense this amusing article will cease to be fiction very soon.

O Geek UsaIsto.com

Two lumberjacks, a younger one and an older one, raced to see who could cut down the most trees in a single day. At the end of the day the winner was obvious. The older lumberjack had won. The younger man could not believe it!

“How could you have cut down more trees than I did?” he asked. “Every hour you sat down while I kept right on cutting. I don’t understand. How could you have cut more trees while sitting so much?”

“When I sat down, I was sharpening my axe,” the older lumberjack said. “Why didn’t you stop to sharpen your axe?” “I didn’t have time,” the younger man said. “I was too busy cutting!”

Como developer que sou (ou pelo menos penso que sou), gosto de conhecer as ferramentas com que trabalho aprender mais sobre elas, e escolher as melhores para determinado fim. Seja qual for o tipo de ferramentas, e muitas delas são apenas processos.

Muitas das vezes exercito o meu lado voyeur, navegando na net à procura de Office Porn, sendo que uma paragem frequente é o The Setup, entrevistas bastantes simples a várias personalidades baseadas em 4 perguntas: Quem és? Que hardware usas? E que software? Qual é o teu Setup de Sonho?

Nas várias entrevistas é interessante não só saber o que usam, mas também o contexto, o workflow, as razões, que tornam a entrevista não só num show-off de gadgets, mas também numa partilha de processos.

Nesse espírito decidi organizar o mesmo, orientado a Portugal, onde convido pessoas que considero que fazem algo interessante a explicarem-nos como o fazem e que machados usam para o seu trabalho.

Podem encontrar as entrevistas em UsaIsto.com, seguir o RSS ou seguir no Twitter, visto que as entrevistas vão aparecendo com regularidade.

The Disappearance of Haruhi Suzumiya

Been kinda busy with school projects and exams, but took the afternoon to watch The Disappearance of Haruhi Suzumiya. I hadn’t seen the prequel series The Melancholy of Haruhi Suzumiya, but I got the story without a problem and, despite being a bit too long, it was an awesome movie. The slow pace and the time it took for the initial riddle to be solved grabbed me to the screen until everything was clear and explained. (It was so good, I even bared to watch it on CAM quality, and thrust me, I have seen better cams than this one)

When I saw the opening, I recalled the song, but don’t know where from (since i haven’t seen the series). Probably some Best of Anime OSTs or something like that. Cheerful.

I don’t know if it’s for liking animes with girls with “disproportional breasts”, or just because the whole alien + time travel theme is my thing, but I’ll probably give the tv series a go during this holidays.

About Thyme

This post is about as minimal as the app:

If you are looking for a simple way of logging the time you spent doing something, João presents you: Thyme.

Every time you use -f, a kitten dies

I’ve been only using git for little more than two years now, but having using it daily for every project (even those in subversion servers, via git-svn) I’ve learnt a few tricks and developed my own workflow.

During this semester, I have been working on a 13 people project and we are using git (and github) to manage the code. This means a large code-base with two different teams working on different parts of the software, that depend on each other. And I’m the lucky poor bastard who has to keep updated with the whole system and perform the merges of feature and bug branches.

Working on such environment makes weird stuff happen to the repository and when one gets to merge a branch, discovers everything is now broken and some stuff disappeared. Here are some things to avoid, learned from this and many other projects:

  • Developer A commits some stuff. He then pushes to master.
  • Developer B (almost at the same time) commits and pushes to master.
  • Developer A finds out he forgot to include one file, and commit amends the file. He then pushes with -f (because an amended commit requires it) and B changes are lost for ever (not quite, but B may delete that code once pushed).

Another interesting story is about a feature X that was accepted to be merged into master, but since it was based on a really old version and a total refactor of half of the code. Smart as I were, I decided to do a rebase instead of a regular merge, to resolve merges commit by commit. Turned out I needed to undo the rebase and turn it again on a branch without my conflict solving.

As a rule of thumb, avoid at all costs to use -f, because as easy and attractive as it might seem, in the end it might corrupt your repository. Also, merges are a nice way of keeping your history clean and prevent from losing individual codes.

LaTeX

LaTeX is a typesetting tool, the de facto standard for scientific publications.

MacOS Setup

Everywhere on the Internet you will be recommended to install MacTeX, which includes everything you will need. Although this is an hassle free alternative, I’d rather have as little junk in my hard-drive as possible, so I suggest BasicTeX (download), a minimal latex installation with the basics you need (such as latex and pdflatex tools working).

To create and edit tex files, I rely on my jack of all trades, TextMate and make sure to compile the file, and then watch it, so it updates automagically when you save the file. The downside is that you have to focus on the Preview window (which I do by cmd+tabbing).

If you are using an old template, you will see that it fails to compile due to missing modules. That’s the downside of a minimal installation, but the solution is as easy as apt-getting: sudo tlmgr install <module_name>. And it even selects the mirror that’s closest to you.

Finally, for managing my references I am using Papers.app (although I should definitely try Mendeley since it’s free and has a web interface). I import all the papers I am interested in. When writing an article, I select the papers I will need to reference, export them as a bib file, and then when I need one, I copy their citekey. As easy as that.