Alcides Fonseca

40.197958, -8.408312

Versions Review

Versions is a OS X GUI for Subversion. And I proudly say that is partly work of a Portuguese developer.

Versions is very powerful1 and elegant GUI for SVN. makes it easier to see changes over the time, and even diffs. This is not the best approach for SVN, in my opinion.

Using Versions (or any other GUI like RapidSVN, which is opensource, or so…) is another distraction in your workflow while working. The best solution I see (and that I use) is having SVN integrated with your File Explorer (being TortoiseSVN for Explorer in Windows or SCPlugin for Finder in MacOS. This way, when I’m working with files, I am using the file explorer and that’s where I want to rearrange folders, delete stuff add folders.

Other situation where I also need to take SVN actions is the IDE/Editor that I am using. In my case Textmate, and sometimes Eclipse. I hit the save shortcut combo almost everytime I change a line, but the real saves are when I commit to the repository. And I want that power inside the editor, not in another window. That’s why I find that SVN is meant to be inside your workflow tools, and not in some stand-alone app.

1 A lot of people I know would just reply ‘Not as powerful as the command-line’. Which is true, but there’s a compromise between features and easy-to-use, since this this product is not targeting hackers, but designers/webdesigners/webdevelopers (or just devigners)

OpenID and Redirects

When I moved to this wiki, I had the problem to keep the old links from being broken. I learnt that lesson, and me being a innovative guy (which means I keep doing and changing stuff over here), I now moved the wiki to this subdomain and alcidesfonseca.com redirects here now.

This simple change broke all my authentication through OpenID. The authentication works, but the url verified is now wiki.alcidesfonseca.com, that is not the one associated with my account. This thing really worries me. So, heres the workflow:

Consumer -> http://alcidesfonseca.com -> http://wiki.alcidesfonseca.com -> http://alcides.myopenid.com

And if I can authenticate against my provider (MyOpenID), I prove that I am wiki.alcidesfonseca.com, but not alcidesfonseca.com. Wouldn’t it make sense to prove that I am also alcidesfonseca.com since I am the url that is redirected to?

As for now, I guess I’ll have to make some simple placeholder with HTML headers. BTW, have you checked http://stream.alcidesfonseca.com?

BuzzNumbers

Remember that little mashup I released almost an year ago ? Well, I found out that now there is a pro version called BuzzNumbers. This media analyzer thing is going to turn out a great business like I though that time.

JSRocks (Server-side JavaScript with Python)

John Resig posted about the State of The Art in terms of embedding javascript in other languages. I was glad to see that there was one Python related project: Python-SpiderMonkey. Then a nice hack idea popped in my head: now I can do JavaScript Server-Side like I want!

So if you want, you can download my Javascript implementation of a simple CGI script in Python where you can access GET, POST, SERVER and COOKIES variables through request.get, request.post, request.server and request.cookies (also have request.post_files, but I haven’t tested uploading files). This is based on my previous work in pungi. And you also have a new File class (with read, write, readlines and close methods) as well as Sqlite (a wrapper for SQLite3 databases, with only the query method). This is the basics that allow you to write your first webapplication based on Javascript.

If you wish, you can download it and test it yourself. I guarantee nothing!

  • Install Pyrex (sudo easy_install pyrex)
  • Install Python-SpiderMonkey ( SVN checkout and sudo python setup.py install
  • Copy the jsrocks folder to your htdocs. Keep in mind you need mod_rewrite and .htaccess files enabled.
  • Just visit /jsrocks/ and /jsrocks/test (which call index.js and test.js)

NOTE! This is just a hack to prove it could be possible. Using an interpreted script to call another interpreter is not the best idea. Oh, and through CGI even less plausible (fastCGI is more admissible though). I believe that something like mod_js is a better approach (although last time I checked it lacked File IO and Database connections). Google (Steve Yegge) apparently likes the idea of using Rhino, which I don’t like that much.

Regarding new Google's favicon

You may have noticed that Google has a new favicon, the small icon you see in your browser next to the URL or in your bookmarks list. Some people have wondered why we changed our favicon — after all, we hadn’t in 8.5 years(!). The reason is that we wanted to develop a set of icons that would scale better to some new platforms like the iPhone and other mobile devices. So the new favicon is one of those, but we’ve also developed a group of logo-based icons that all hang together as a unified set.

Source: Official Google Blog

So it was not for Children Day’s, it is in fact, because the iPhone, Google has changed the favicon. After 8.5 years with a pretty good icon, they are changing to a worst one, because of the damn phone that’s changing the industry.

Update: Looks like the Google Reader favicon that is loaded in Safari is the 32×32 version (that is targeting the iPhone), slightly different from the traditional shown in Firefox and other browsers.

MTV Youth Trends

(Via OpenGardens) This is a great presentation from MTV where they show a few statistics that prove that young people are spending less time in front of TV and more and more on the Internet, mainly social networks. I guess some Portuguese companies should take a look at this presentation and start changing the way they work.

Lego Mindstorms NXT

Last week I borrowed a Lego Mindstorms NXT Educational Set from the Physics Department to use in the last class I’m giving to 13 year old kids about programming with Python.

First of all, I dealed with the hardware and spend about one hour assembling bricks like I used to do…. 10 years ago. Lego rocks! Since I hadn’t much time to spend with it, I followed the Tripod model, but in the end I realized I didn’t had the extended set, so I started to invent, like it is supposed to! Here’s the final result:

Now the software: I could let kids use the programming GUI, but I don’t like it very much, and the purpose of the whole course was about coding, so I wanted Python. Since the robot cannot run Python itself, I was running the program in my macbook that would remote control it.

The “NXT Python library is really helpful”, but OS X requires a little hack on the bluetooth module, so this page explains it all.

So I did two programs: One to remote control the NXT with my Wiimote. With the arrow keys, I can control it’s moves, the minus/plus allows me to control the speed, which is very useful when turning! And when it bumps something, The wiimote rumbles and lights up the LEDs for each active sensor.

The second program, just makes the robot wander around and when bumps something, he turns a bit. That’s enough for it to spend some time by itself :)

You can download the source code (with all the necessary libraries, that you must sudo python setup.py install inside each dir).

The line that changed my browsing

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

If this is an option, why there isn’t a checkbox in the preferences for this? I bet I’m not the only want to want this behavior. And seems like it doesn’t work in Safari 4 preview.

“Save this page as a standalone web app” will bring the fluid/prism/air competition to the “OS side” (Microsoft/Apple/Linux).

Moving to Air

No, I’m not buying that Macbook Air thingy… (sigh) After some ranting and disillusions about Python GUI’s, I gave Adobe Air a try and did Yet Another Twitter Client in 1 hour, 37 lines of JS, 23 of HTML and 28 of CSS. So damn simple!

And the next day, I was exploring Dashboard Widgets (for a project, not that I use it, which I don’t) and I copied pasted the code, added the icons and the Info.plist and voilá, it worked without changing a line of code! It’s really Java’s idea of write once, run everywhere (I am assuming it runs in linux, since only advanced features are not implemented yet).

My next projects that include a desktop app, will be written in Adobe Air, despite my love for Python. (Javascript is my #2 programming language). And writing UIs in HTML+CSS is much more fun than wxWidgets, Tk, GTK and even WinForms!

You can now comment using disqus

Since I’ve updated my website to a bliki, I’ve missed having comments a lot! It’s no fun to not know what your readers think of your content (even if it’s negative, as long as they aren’t rude).

Well, some folks have put some pressure on me to enable comments here, something I’ve been wanting to do for sometime now, but I have other priorities in my todo list. So I enabled disqus, which is a really simple commenting system.

However I am not happy with this solution. First: It’s a JavaScript widget. I want to read comments on my Windows Mobile device. So I need a hardcoded solution. And second, it doesn’t work well with OpenIDs. I want to be able to blacklist some OpenIDs if I want to, and also have some authentication system (although it’s very easy to set up an anonymous provider.

At last, I’m not sure if I want my wiki pages to have comments. Maybe I’ll have comments only for blog entries. It’s something to think in the next month or so. In the meanwhile, feel free to use the current disqus system.

Os Social Media em Portugal


Qual a maior lacuna no panorama dos Social Media portugueses?

Paulo Querido: “A falta de participação.

A total ausência de informação nos mainstream media.

A fraquíssima prestação do país em termos de empreendedorismo. Os projectos portugueses que existem nesta área são TODOS de indivíduos ou pequenas startups, sem capacidade financeira. Não há mercado nem investimento nem apoio de nenhuma espécie.”

Na entrevista do Hugo Silva ao Paulo Querido, com quem concordo perfeitamente neste ponto, inserido numa série de entrevistas sobre Social Media.

Geeks portugueses mais sociais

Provavelmente foi muita influência da Web 2.0, mas noto que a malta geed de terras lusas anda mais social. Já não somos aqueles tipos com barba grande atrás de um terminal numa cave qualquer. Agora somos maltas fixes que gostam de ir para os copos!

Penso que esta história começou com o Barcamp que o Fred e o fuzy importaram lá de fora. Pouco depois recebemos a Shift, também importante mas se calhar a um nível mais internacional. Depois ainda lá conseguimos arranjar alguns eventos porreiros onde nos reunir (Tecnonov, TakeOff) menos desconferenciados.

Para álem destes eventos, o Ricardo tentou trazer para Portugal o OpenCoffeeLisbon. No entanto, a coisa não correu muito bem pelos motivos que falarei mais à frente.

Depois do Verão, voltámos a carga com as segundas edições ( Barcamp, Tecnonov e TakeOff) e tivemos a estreia de outros eventos: o CodeBits, onde o Sapo mostrou o seu lado mais geek 2.0 e o BarCampFCT. Este último teve pouca adesão em relação ao que eu esperava, apesar de ser em Lisboa (onde está o core da tecnologia nacional). Mas essa malta toda das empresas não são os que se interessam em participar neste tipo de eventos.

A malta que aparece neste tipo de eventos é a malta jovem e empreendedora, que quer aprender novas coisas. Não aqueles dos empregos das 9 as 6, que sabem exactamente a mesma coisa do que quando saíram da Universidade. É a malta que explora novas coisas, como a Web. E descobre o serviço que nos tem ajudado a ser mais sociais: o Twitter.

É verdade, graças ao Twitter, a malta começa mais a saber e a aderir a estas coisas. O Celso e a malta da 7Syntax reinventaram o OpenCoffee num OpenPub que começou a pegar moda e até já há um derivado: o Twittlis. E com estes, já se está a levantar um conceito dentro da área, desta vez pela malta do Porto, o GOD que para já se encontra no Twitter. Para terminar, temos ainda o WebTrip em que a ideia é dar a volta a Portugal em Web Networking.

É bom ver como as coisas mais simples da Web Social começam a mudar o mundo, começando por nós, a malta entusiasmada. Só falta levar este conceito ao mundo empresarial (que tardam sempre a apanhar estas modas) e finalmente ao mainstream.

280 Slides

280 Slides is a web-based Javascript clone of Keynote. I loved the style and this is how simple I want web editors to be. Microsoft, you should take some ideas from here to Office Online.

The most amazing thing about this is happening under the hood: the developer wrote a library that abstracts browser rendering engines using Canvas, SVG and Flash (on a per-need basis) into a unified language – Objective J which is – as the name suggests – a mapping from Objective C to JavaScript.

Source: Wait till I come!

Escolas pouco livres

Vinha eu da escola básica onde ando a dar aulas todo contente porque vi no boot menu deles o Caixa Mágica (Por acaso para os meus objectivos era melhor eles estarem em Windows, mas estive muito tentado a mandá-los fazer reboot), quando a minha irmã se vira para mim e:

“Miguel, podias-me instalar o Microsoft no computador lá de baixo?”

Para contextualizar, a minha irmã é uma aluna do 11º ano para quem o computador é uma coisa que serve para carregar o MP3, para ver o hi5 de mês a mês e de vez em quando para um trabalho ou isso. Basicamente o oposto de mim. Analisando agora a frase, a minha irmã até sabe umas coisinhas: sabe que eu não tenho essa coisa do “Microsoft” no desktop (que enquanto a cave está em “remodelações” não estou a usar). Mas afinal o que é isso do Microsoft? Pensei eu que era o Windows, mas afinal não. “O Access e isso…” Afinal ela queria o Office!

Fazendo lá o sacrifício de tratar das coisas a garota, lá liguei o computador (que ainda tinha o Vista das ultimas brincadeiras que andei a fazer) e meti a sacar o Office 2003 que parece que é o que ela usa nas aulas. Gostaria aqui de salientar que o download é legal! Porque se eu não o tivesse, o que é que ela iria fazer? Choradinho aos pais para irem comprar o Office? E que ia ser o 2007 e ela muito ágil que é com os computadores ia confundir tudo (até eu confundo um bocado) e correr mal o exame?

Porque é que os programas de TIC não são em software gratuito (e já agora opensource, não que lhes interesse muito, mas fica bem) ? Ou no mínimo permitir qualquer “marca” de programa, desde que uma pessoa soubesse chegar aos resultados…

But then again, eu aprendi Office na primária. Porque raio é que isto do TIC só começa no 9º ano??? Será que até lá eles não precisam de fazer trabalhos no Word e no Powerpoint, e usar o Excel para gerir a mesada?

Cronnix

In OS X it’s really simple to install an application: you just drag it into your applications folder. However to uninstall it might not be that linear. For example, I uninstaleed SyncSyncSync, but whenever I opened Terminal.app I’d get a “You have new mail.” message. Reading those messages, I understood there were 2 cronjobs running that would sync my stuff, but I’ve removed that application!

So after some google search, I installed Cronnix and deleted them. I loved this app!

OS X 10.5.3

So 10.5.3 came out and it was announce that it corrects more than 200 bugs. I hope that’s right as it’s sized 489 MB. (That along with Fireworks CS4 Beta will screw up this month’s bandwith limit.

I wasn’t really interested in bug fixes (since I don’t have any great issue with my installation), but for new features. And I got two that I consider important:

First, many users were blogging about the fact that Spaces were app-oriented, instead of task oriented, and Apple did the right thing and introduced a checkbox where you can choose the behavior you prefer. Grubber has a nice post on this feature. Since I am one of those who use spaces to organize apps, this doesn’t have any effect on me, but I hope by 10.5.4 they make spaces independent within multiple monitors, since that’s really annoying!

The second feature I’d like to highlight is the hability to sync your contacts with Google Contacts right from the AddressBook. But there’s a but: it will only be visible if you have connected an iPod Touch or an iPhone. Or you can just hack around it. This one make me think why didn’t Apple gave the option to all their customers. Are they really hoping people will still pay for the (shitty) .Mac service when Google’s offering one similar for free. They really have to refresh that service!