Alcides Fonseca

40.197958, -8.408312

A new mobile device concept

What would the device do? Most likely it would work first in Wi-Fi hotspots, connecting from further afield as the range of 802.11-based access points grows and other wireless networks emerge. It would probably do VoIP and IM exceedingly well. It would possibly also do email, RSS, and music. All these we can pretty much take for granted. More interestingly, it may start doing completely different things. Its ability to go where laptops can’t go, and do things that mobile phones can’t do, will create new needs and new opportunities, which make people write new apps.

Read the whole article at Zengestrom

This is basically my HTC TyTN, a bit slimmer, and without the phone capability. It’s no big deal. And the iPhone can make everything, if you exclude the physical keyboard and being close.

If instead of phone, you had XMPP with video and audio, it would change the way people would use the phone. You’d see the status of someone, and you wouldn’t have to call if that person is in a meeting, or even call someone if you see he wants to have a chat.

However this kind of change will not happen overnight. The best way is to start making child-targeting devices XMPP capable, and let them explore it and use. A bit like Danger’s sidekick it would be an icon of a generation. A full qwerty1 keyboard would give them much more power and speed to start surfing the web on their mobiles.

This is counting on carriers providing a flat fee plan that’s affordable. And that seems to take ages in Portugal.

But all these ideas are not something new. What do you feel like’s going to be the major change in the mobile phone industry in the next years?

1 A dvorak keyboard would also rule, but I know it’s kinda risky.

git

git (this one is better for your eyes) is a DVCS created by Linus Torvalds. Besides the Linux Kernel, Ruby in Rails is one of the major projects migrating their source code to GitHub, the social network of opensource code.

Why should I use git?

Well I could say it was faster, or smaller than using SVN, but that’s not the problem to 90% of the developers. The real advantage I see is that you can commit offline, and branch and merge more easily than with SVN. You can even easily push your modifications to more than one repository online. And you’ve got submodules, which I should write about here in the future.

Getting git

Or if you feel confortable enough, you can compile it yourself

Global configurations

git config --global user.name "Alcides Fonseca"
git config --global user.email me@alcidesfonseca.com
echo ".DS_Store
Thumbs.db
Desktop.ini
*~
*.swp" > ~/.gitignore
git config --global core.excludesfile ~/.gitignore
git config --global rerere.enabled 1
git config --global rerere.autoupdate 1
git config --global push.default matching
git config --global apply.ignorewhitespace change
git config --global color.ui true
 

My workflow

Git follows the UNIX philosophy: it gives you little tools which you can use together to make your own workflow. So I usually have one central repository, another copy in my machine, and another copy in the production environment. So I first create the central one: if it’s opensource, I use GitHub otherwise in a ssh-accessible server:

mkdir example.git
cd example.git
git --bare init

Then, in the client side, I clone the repository1 to my machine (as you would checkout a SVN repository). All of the following can be done using git-gui, but I find it a bit ugly, so I stick to the command line and Textmate’s ProjectPlus.

git clone user@server:~user/projects/example.git
cd example.git

#make changes

git add . # this adds to the commit list all the files modified
git commit -m “Commit message”

  1. at this point, no code is uploaded back to the server

git push origin master # now we send the changes to the master branch of the origin server

Note: If you have more than the master branch, and you want your other branches to be on the server too, you have to manually upload it first with git push origin coolbranch and after that, all git push will upload that branches.

As you can see, you can commit locally, even if you’re offline. That’s one of the major advantages git has compared to centralized VCS like SVN.

Other useful commands:

git reset --hard HEAD^ # undo commits
git status # gives you a list of changes to commit, or not added
git mv file new_file # move
git rm file # deletes file

Branching

Another of git’s advantage against SVN is that it makes branching easier. So if you’re adding a new feature, you might want to do it in another branch.

git checkout -b newfeature 
# creates and moves to a new branch
#make changes, add and commit
git checkout master #go back to main branch
# correct a bug or something, git add and commit
git checkout newfeature # go back to the new feature branch
# make more changes
git checkout master # go back to master
git merge newfeature # and merge the two branches
git branch -D newfeature # deletes the branch

Remote Branches

Branches are local! If you want to replicate your branch in a remote repo, git push -u origin newfeature. And all pushes after that one include the newfeature branch. If you want to delete it. git push origin :newfeature.

If you want to continue working on a remote branch, you need to track it by doing git checkout -t origin/remotefeature

git-svn

You might not have a choice about the VCS you use, or for some other reasons (like external integration) you have to use SVN. Don’t worry, there’s a way of using locally git and committing to your SVN repository.

git svn clone https://svn.server,com/project -s --prefix=svn/
#or if you don't use the trunk,branches and tags:
git svn clone https://svn.server.com/project
git checkout -b work trunk # move to a second branch for your work
#make you changes, git add them and commit.
git svn dcommit # makes one SVN commit, for each of the commits you did before.
git svn fetch # equivalent to SVN update

More information about git-svn in Tsuna’s blog

Troubleshooting

Non-ASCII Windows username

If you have a Windows username with Non-ASCII characters, like “João Rodrigues”, git will not work properly because Windows doesn’t user UTF-8 for command line.

Solution:

Edit C:/Program Files/Git/etc/profile in your editor

Change: HOME="$USERPROFILE"
to: HOME="C:\Program Files\Git\home"

And that’s it!

Using command-line based vim to edit git commit messages on Mac OS X.

git config --global core.editor /usr/bin/vim

Source: Tooky

Resources

Workflows

1 URL schemes used by git

Tired of being the computer guy

(via José Marques)

Well, I’m kinda tired of when visiting my friends, always ending up formatting computers, or messing around with cables or so. Now I can’t take it anymore!

Not that I’m incapable of doing it, but my time is precious and I really don’t like making that kind of maintenance. You should read this blog post too, and you’ll reach the same conclusion as I did.

Take me to FOWA, FOWD or FOM

So it seems that Carsonified, the company that organizes FOWA, FOWD and FOM , and the authors of Matt are making a damn sweet competition.

The winner gets a full-paid trip to one of those events, tickets to all of them as well as backstage access and includes one VIP speaker dinner.

So how can you help me winning? Just leave a comment below, and when I reach 25 I’ll get electable. And if I win, you can count on blog posts about it.

And why I’m into this, if I am sceptic against this kind of contests? Because the prize is so sweet, and I don’t have to spend anything :) Plus, I’m a webwhore1.

1 The twit to which @sdsantos replied I’m a webwhore.

Madeira preocupada com a alimentação nas escolas

Podemos constatar, entre outros aspectos, que apenas é permitido o consumo de água, as crianças não podem levar «cesta» com alimentos, os fritos foram excluídos das ementas escolares e nos dias festivos os bolos e sumos devem ser com frutas ou vegetais.

Fonte: IOL Diário

Clap clap :)

De olhos nos crimes da praxe

A degradação física e psicológica dos mais novos como rito de iniciação é uma afronta aos valores da própria educação e à razão de ser das instituições de ensino superior e deve pois ser eficazmente combatida por todos, estudantes, professores e, muito especialmente, pelos próprios responsáveis das instituições”, sublinha o membro do Governo.

Excerto da carta enviada pelo Ministro Mariano Gago às Universidades, onde indica que os crimes praticados usando a praxe como desculpa serão denunciados como devido., via João Martins.

Eu vejo isto como óbvio. A praxe não é desculpa alguma para violar a lei, nem mesmo obrigar as pessoas a fazer coisas que não querem. E pessoalmente, acho que muitas vezes isto é feito por pressão social, e não sei até que ponto deveria ser ilegal.

Multi-Cursor

So I am more of a mouse person and I’m quite happy with that. But sometimes I feel like I could use more of that power. My left hand usually waits over my keyboard for the cmd+{Q,W,A,S,Z,X,C,V} combos and I could make more use of it. There are certain times when having a second mouse and a second cursor would be handy. Specially when I’m organizing files, practicing my design skills in Fireworks or just playing that weird opensource games, a second cursor would boost my productivity. I would call this Multi-Cursor.

A google away, I found a Multi-Cursor window management system but it is a different concept that mine. It just allows you to have several cursors from different users working in the same workspace, just like you can do in almost any remote assistance software since NetMeeting).

In my idea of Multi-Cursor, I’d be able to control (at least) two cursors from my mouse, and use both of them at the same time. This would require OS to have multi-tasking a bit more in mind, and allow specific applications to achieve the full potential of multiple point interfaces. I bet hardcore CAD users would love this feature. Of course most of the people wouldn’t, but I just wanted the possibility, not that it was the default setup!

And of course, the multi-touch systems like those in the iPhone or Surface would already be possible in any computer that could implement the multi-touch interface. And we could be using it with full potential, not only with simple gestures like those you do in macbooks pro and air, although I might admit that is one step in this path to the future’s human-computer interface.

Nem precisamos de investir na Ciência nem nada!

De acordo com o balanço do Programa Operacional Ciência e Inovação 2010, a que o SOL teve acesso, a 30 de Junho de 2008, o eixo V – Ciência e Inovação para o Desenvolvimento Tecnológico –, era o que apresentava taxas de execução mais baixas. Trata-se precisamente da vertente de estímulo à modernização tecnológica e a projectos que tornem as empresas mais competitivas e inovadoras.

Cinco dos seus sub-programas recebem dinheiro através do Fundo Europeu de Desenvolvimento Regional (Feder) e apenas um via Fundo Social Europeu (FSE), tendo havido apenas um caso com uma taxa de execução acima dos 80%(85,4%). Um dos sub-programas, Dinamização da Transferência de Tecnologia e Inovação, ficou a zeros, uma vez que não houve projectos aprovados. A média situa-se nos 66,8%.

Fonte: SOL (via)

De facto concordo. Portugal está tão desenvolvido na Ciência e Tecnologia que limitar-se apenas por 1/3 dos fundos europeus possíveis é perfeitamente normal! E ainda ficamos com o nosso orgulho!

BarcampPT2008

Mais um excelente evento geek em Portugal! Fuzy e a WBS organizaram a terceira edição da maior desconferência nacional.

E como este evento vive dos próprios participantes, tivemos direito às mais variadas apresentações. Começamos pelo Pedro Melo que deu uma apresentação sobre XMPP e deu bastantes sugestões de como poderiamos aproveitar este protocolo para melhorar as aplicações já existentes, ou mesmo criar novas. Fica também a nota pessoal de detestar que a Microsoft não tenha uma interface xmpp para o MSN Messenger, porque como rede mais utilizada em Portugal, é a única que me impede de desenvolver alguns projectos que tenho em mente.

A seguir tivemos um mini-curso de Scrum. Conhecia só por alto, e fiquei a saber o sistema mais por completo, com uns exemplos giros, e com uns esquemas muito marados com bolas de ténis que o Ricardo Mestre nos arranjou :)

Finalmente, como bons geeks que somos, Pizza! seguida de uma sessão de hacking. Desde o tradicional poker com arduínos humanos, openid e emails sem password Couchdb a correr com TraceMonkey, e eu aproveitei para terminar o código da apresentação do dia seguinte.

Domingo começou bem, depois do almoço pago, tivemos uma série de apresentações interessantes, das quais algumas só apanhei metade devido ao paralelismo de sessões. O Pedro Custódio ensinou-nos a atacar as torres gémeas com aviões com um bocadinho de Interaction Design pelo meio. Recomendo vivamente a apresentação, e se possível o vídeo se for disponibilizado pela organização.

Depois o Bruno Pedro deu umas dicas para f**** dinheiro1 e o Bruno Amaral falou do SocialMediaCafé, uma ideia que pretende ser o Orpheu do século 21. De facto vai de encontro ao que já tinhamos pensado fazer, mas tinhamos pensado em ir pelo god, embora talvez o socialmediacafe não fosse também uma má oportunidade para Coimbra.

Depois gostei de ver a coragem da Patrícia Furtado que sendo o primeiro barcamp (e ainda por cima uma das apenas duas mulheres presentes2) avançou para a frente sem nada previamente preparado e presenteou a malta de informática com conceitos e dicas de design. Já que acabamos muitas vezes por fazer designs para a web, já agora aproveitamos e fazemos alguma coisa bonita.

Fui para o auditório de cima para o sprint semântico, começando pelo “Bernardo Raposo” sobre RDFa, o André Luís sobre portabilidade de atenção por redes sociais, e finalmente a minha demo (que graças ao Murphy correu mal, mesmo testando meia hora antes) sobre a portabilidade de contactos em redes sociais. Quando tiver tempo escrevo um post dedicado ao assunto ao pormenor, mas se alguém quiser o código, basta pedir.

Ainda apanhei um bocadinho da apresentação do Fred sobre como a informática se pode comparar a outras áreas e como podemos extrair informação disso, exemplificando com a arquitectura.

Enfim, mais um fim de semana que nos lembra que ser geek não é estar enfiado num cubiculo o dia todo em frente ao portátil, mas sim o espírito de descoberta, e de partilha de conhecimento.

1 Ok, na realidade ensinou-nos dicas para ter algum dinheiro de parte, para o “investir-mos” como quisermos, embora o que estivesse mais focado, fosse o começo de uma startup, que foi o caso dele.

2 É bom que a organização tenha em atenção este pormenor para o ano!

Handivi

Handivi

In the Portuguese Web scene there were two projects that caught my eye. The first one is Tarpipe and the second one is Handivi.

I’ve been in touch with the 7syntax team and I was waiting the first alpha preview. Until that moment I knew nothing about it, except that it envolved Python and J2ME. Python for server-side, and J2ME for the client. Because that were what the were looking for in their job boards.

The application

For an alpha preview, it was pretty advanced, in my understanding. Only a few features missing, a few small bugs, and the deploying is yet to be well-designed.

The app is really nice to use, but it’s not for everyone. You need a 3G enabled phone (or a lot of pacience) that runs a Java Virtual Machine, this is all the 3G nokias around and a few more.

I tested it in my TyTN through wireless and it was fast enought., but I didn’t had the camera support.

The concept

At this point you should be wondering what this app does. Imagine a twitter clone, or maybe a jaiku one, since you can post video and pictures, and you follow friends. Just that, but always mobile.

Handivi is all about you sharing experiences with everyone or just your friends from anywhere. It’s a free, easy to use application for Java™ enabled phones on 3G mobile networks, where you can express yourself, create and socialize using photos, videos and messaging.

This is my understanding of it from what I’ve seen, and I hope the team doesn’t keep limited to this. Because it will not succeed as it is. Why?

One of the few things people mentioned in Twitter is that the need of an internet connection all the time will be too expensive for people to use. I don’t agree. This is not a product for this time, it is being developed for the next years, and phone carriers will have flat-fee 3G dataplans.

The problem is that we’re confined to the cellfone. When I’m at the computer, I dont want to see things in my small cellphone’s screen, I want to be able to use my computer as well. And I believe they are not forgetting this, and that a web interface is also in the works.

I know that in Japan people dont really need computers, and can do this stuff all from their mobile. But we aren’t them, and I don’t believe they are handivi’s target audience.

Ok, so if there is a web interface, is just a jaiku clone, with a J2ME client, instead of their S60 one. And Jaiku is owned by Google, so if they get one or two of their smart geeks making a J2ME client like Handivi, I bet they will ruin 7syntax success.

But I also don’t think this is the right approach. I don’t want to open a program to be able to access all my friends activity (or publish mine). Why can’t I do it natively from my phone’s SMS, MMS or Email service? That is the integration I like. If I wanted to open something to explicity ask for this information, I didn’t want to open a Java application, but rather my mobile browser. That all current phones have, unlike the J2ME.

Just as a final note, I understand the choice behind J2ME. Web-Browsers don’t have the system integration developers would want it to be. You just can’t take a picture or record a video from a website. And browsers should start thinking of this integration. Right now you can only archive this with plugins. That’s what I did with my webcaminput project and with Flash and Silverlight moving to the mobile, this might be the solution in 2-3 years, the time handivi kind of application will be really boosting.

1 Photo by Ricardo / zone41.net

Microsoft, two steps forward, one step back

So Microsoft went back and announce Standards Mode would be the default one in the upcoming IE8, but with the second beta, things have changed a bit. For Intranet websites, IE8 will still be using the IE7 mode.

It was the pressure from their big clients, that develop intranet solutions using their ASP.NET technology that is designed to work with IE7. And they don’t want to have to rebuild all of those applications. I still don’t believe this is the solution. First of all, if IE8 still uses IE7 rendering for intranet, we are not seeing intranet developers adopting standards anytime soon, right? And what if they make their web applications available not only inside their intranet, but also through the internet? The rendering will not be consistent.

Oh, and a small technical doubt, if IE8 needs restart between IE7 and Standards mode, how will it switch between modes between intranet and internet?

OpenSource Managing tips

Take some time to explain how in the hell a newbie is supposed to get this project up and going so they can starting looking around to contribute. If I look up after checking out the source and the clock’s little hand has moved while trying to figure out that I was supposed to run “ant build pleasegod -Dtest=john3:16″ to have the initial project actually work then it sucks. You are bleeding away potential developers because we don’t want to jack around with this stuff. Clean up your build instructions, automate as much as you can, and put a quick rundown of what needs to be done on the project’s website. Simple.

Why your open source project isn’t getting attention – A few tips for managing your OpenSource projects, that I will follow.

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