Why geeks should be your target for marketing

It’s simple; because they listen. As opposed to the masses, which are really good at ignoring you.

Do you really think Average Joe will listen when you say your Samsung Galaxy S II has a 1.2Ghz dual-core processor? No, he will ask his friend, Geek Mike, which phone he should buy.

Seth Godin, marketing guru, explains it perfectly:

He explains the TV industrial complex is gone, the golden years of the 60’s when all companies had to do is flood the TV with ads is now history. There’s too many choices, and way less time. Nowadays there’s complex networks of information, and everybody knows where and how to get recommendations of services and products, which probably will only be noticed if they are remarkable.

How do you explain that Google became such a big company without advertisement? You make a good product, and people talk about it. First the hard-core geeks, then normal geeks, there’s normal people, and eventually, even grandmas and grandpas. They started with doing one thing, but very well, and that made them remarkable. That’s why today even though Google+ as 74% males and 25% engineers (reference), they will spread the word, and eventually everybody will be there.

That is the viral effect of social networks. If you want something to spread through the network, you have to target the nodes that are more tightly connected, the ones at the center of the network. These would obviously be geek bloggers, many of which have thousands of followers, each of which will spread it to more and more people, until eventually you get to the masses. Google, Twitter, Facebook, the iPhone, they all seemed to be targeting only a small niche of technical people, but what many people didn’t consider, is that these geeks would find the value, and spread the message.

This should be obvious, but for some people it’s not. Some people say “oh, the geeks don’t like this, but it’s OK, they are not our target market” (Nokia comes to mind), which completely misses the point that if geeks don’t spread the message, you already lost.

And that is why GNOME 3, for example, already lost. They are ignoring the huge backlash from existing users telling them “we don’t care about you, you are a tiny minority”.

In this hugely interconnected world, you should not disregard the tiny minority that loves you, to seek the huge majority that doesn’t care about you, that is not only dangerous, but doomed to fail. Moreover, I would go even further and say, this tiny minority can actually tell you what you should do to reach the big majority better.

After two weeks of using GNOME 3, I officially hate it

I knew I was going to hate GNOME 3 even before trying, but Zeeshan insisted that my opinion wasn’t worth much without giving GNOME 3 a fair chance. So we made a deal, I would use GNOME 3 for a couple of weeks, and then I could say GNOME 3 sucks, at least with measure of validity.

So, after two weeks, I still hate it. But why? Continue reading

gst-av 0.5 released; now with video encoding and decoding support

gst-av is a GStreamer plug-in to provide support for libav (formerly FFmpeg), it is similar to gst-ffmpeg, but without GStreamer politics, which means all libav plugins are supported, even if there are native GStreamer alternatives; VP8, MP3, Ogg, Vorbis, AAC, etc.

In addition, it is much simpler (2654 vs 16575 LOC), has better performance, and has a bit of extra features (such as less latency), and doesn’t use deprecated API’s. In a previous post I measured exactly how much improvement compared to gst-ffmpeg there is; it’s not much, but it’s some.

IOW; it’s possible that gst-av is the only GStreamer codec plug-in you would ever need :)
Continue reading

Getting proxy support on GNOME; for real (libproxy-simple)

If you open gnome-network-properties and setup your proxy accordingly you would notice that most network applications don’t really work. There are several reasons for that.

Since as long as I can remember I have looked for a way to add proxy support on my applications. There has been a number of network libraries, none of which have ever fitted the bill for me. Finally, came GIO, now part of GLib, which has many advantages (although IMO not ideal; it works perfectly). Unfortunately, no proxy support.

There’s also libproxy, which one might think has proxy support, but it doesn’t; it merely provides a mechanism to find proxy configuration. This is good, but not the full picture.

But since GIO has plug-ins, it might be possible to provide proxy support transparently, with the help of libproxy… right? That’s where GLib networking comes. Great! So we have everything we need.

Not really. Continue reading

msn-pecan 0.1.2 released; critical bug-fix


This is an important maintenance release, everybody should update. Apparently Microsoft shut down the Nexus servers that were used for authentication, which meant msn-pecan stopped working completely. Fortunately I found a trick to circumvent the problem without requiring an update the protocol used; use Passport 3.0 authentication. Had I known the fix would have been so easy I would have tried earlier. Sorry for the long delay.


  • Fix authorization; Passport 3.0 instead of nexus
  • Fix offline message reception
  • Improve reconnection/disconnection detection
  • Ignore reverse-list; the server returns wrong info
  • Show correct alias in chat window

Enjoy :)

Demétrio (1):
     Ignore reverse presence

Felipe Contreras (19):
     plugin: show proper alias in the chat window
     contactlist: fix for existing "null" group
     Improve disconnections
     ns: add time out detection
     Ignore reverse list completely
     Update libmspack to 0.2 alpha
     libmspack: fix compilation warnings
     libsiren: fix compilation warnings
     Fix some compilation warnings
     build: check for more warnings
     Fix authentication
     Improve auth parsing
     auth: reorganize to have a callback
     auth: add private header
     oim: use generic auth stuff
     oim: improve and fix message parsing
     Get rid of pn_auth_start()
     hack: mingw32 workarounds
     win32: tag 0.1.2

Download from the (usual place).

gst-av 0.3; better performance for vorbis and mp3

So, I’ve been working on gst-av, a GStreamer plug-in to use FFmpeg codecs (only audio for now), in order to get it in good shape for ogg support. First, I had to fix oggdemux and flacparse to be compatible with tagreadbin, it seems I managed to do it (with the help of a patch from Sreerenj Balachandran), so now the custom tracker extractors are not needed any more.

Then, with a bit of work I managed to get not only vorbis, but flac, and mp3 working.

That was good, but was it really worth it? Tuomas Kulve did a nice comparison of gst-av vs the default vorbisdec, and I wanted to do something similar, however, running a series of tests each taking 20 hours to complete wasn’t so appealing.

So I asked in #meego and #maemo IRC channels for a simple way to measure battery drain reliably, and automatically. It seems powertop can do that on some platforms, but Maemo’s powertop is a very different beast. Fortunately, the folks at #maemo seem to have been busy trying to get all possible information from the battery, and they pointed me to a very nice powerscript. However, I got some tips to get even better results (from ShadowJK, DocScrutinizer, and SpeedEvil), and the result is this maemo-battery script (needs i2c-tools, and root permissions), which essentially prints the current charge of the battery each 10 minutes.

With this I was ready, but just to be clear how to properly measure battery draw; make sure you are in offline mode, plug your headphones (otherwise pulse-audio would run extra algorithms), and immediately blank the screen.

Here are the results (units in hours of battery life):

These results show that vorbis with FFmpeg is massively better than libvorbis, so my work wasn’t in vain :). But it’s also interesting that FFmpeg’s mp3 decoder is slightly better than Nokia’s proprietary one. Also, FFmpeg still needs some work to complete with libflac. My guess is that these decoders can’t be optimized much further; now the bottlenecks would have to be pulseaudio and gstreamer.

This is the raw data (in mA); I ran my script for one hour for each test, and some I ran multiple times just to verify; the results seem to vary ±1 mA.

current -- mp3: 63, vorbis: 110, flac: 62
gst-av -- mp3: 61, vorbis: 62, flac: 69


Why not use gst-ffmpeg? You might ask. Initially that’s what I tried, but it doesn’t support vorbis, nor flac, which seems to fit GStreamer’s tradition of getting away from FFmpeg as much as possible. Then when I read the code it was clear to me that it was overly complicated; I’m familiar with FFmpeg’s API (it’s unbelievably simple), so I decided to play around, and see if I could get something working; I did, and the result was incredibly simple, and oh so sweet :) As a comparison, gst-ffmpeg is 16357 lines of code, gst-av is 563 (sure, gst-av does much less; just what is needed). Another reason that goes hand-in-hand with this, is the ability to tweak it; my goal is to get the absolutely best performance, and for that I want to be able to understand what the code is doing. And finally, gst-ffmpeg is using deprecated API.

What about performance?

The difference is not that big: ~1.6h of battery life, but it’s something.

current: 63, gst-av: 61, gst-ffmpeg: 66

What now?

Now we need to package FFmpeg; probably just include the codecs we need, and then ogg support might include these instead. Any volunteers?


It turns out the issue was flacparse which is total crap: it’s using 4 times more CPU time than FFmpeg’s decoder just for parsing. After fixing it now it takes only 20%. I’m trying to get new measurements in a more automated and precise way now. I’ve pushed the code to my repo already.

msn-pecan 0.1.1 released; important bug-fix


This is a maintenance release with not so many changes, mostly to fix the nasty DST bug. Everybody is encouraged to update.

That’s basically it. Enjoy :)

Felipe Contreras (7):
      oim: trivial cleanups and reorganization
      Fix date parsing for DST
      tests: add tests for DST date parsing
      plugin: add official set_alias()
      oim: fix crash on bad auth
      win32: tag 0.1.1
      dc: trivial cleanup

Download from the (usual place).

felipec’s installation notes

I regularly get rid of my home directory in order to prune my configuration, get rid of cruft, and backup important stuff. Here I’ll try to share the important steps to get a decent linux system configuration from scratch. Some of these are specific to GNOME, and some to Fedora, but mostly are generic.

root permissions

I hate to type the root password so I add my user to the ‘wheel‘ group and edit ‘/etc/sudoers‘ to add:

So I just need to type ‘sudo -i‘ and I log-in as root (no password).


The first thing to do is to get rid of that annoying metacity. I choose openbox because the defaults work fine, and it doesn’t need anything special, just install it, and re-login with “GNOME/openbox”; voilà.

Now you have a decent window manager that resizes windows with alt + right button. And also you can configure it in many ways.

However, if you decide to stay with metacity, this makes it slightly more usable:
gconftool-2 --set --type bool /apps/metacity/general/resize_with_right_button true

Update: I found XFCE to be much superior to GNOME, and the WM works as expected by default.

keyboard settings

The next annoying thing is the keyboard settings; I find the repeat rate too slow:
gconftool-2 --set --type int /desktop/gnome/peripherals/keyboard/rate 98
gconftool-2 --set --type int /desktop/gnome/peripherals/keyboard/delay 242


I find bash too conservative; zsh provides many more options and extensibility, so install the ‘zsh‘ package, copy ‘/etc/skel/.zshrc‘ to your home, and then as root:

usermod -s /bin/zsh <user_name>

However, the defaults don’t play well with gnome-terminal; each console will show “Terminal” instead of the cwd, so edit ‘~/.zshrc‘:

case $TERM in
        precmd () { print -Pn "\e]0;%n@%m: %~\a" }

Unfortunately, zsh doesn’t use readline’s inputrc, but it’s easy to convert:

bindkey -e
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[5~" history-search-backward
bindkey "\e[6~" history-search-forward
bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word

# for rxvt
bindkey "\e[8~" end-of-line
bindkey "\eOc" forward-word
bindkey "\eOd" backward-word

# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line

# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line

After doing these changes, re-login.

Certain settings are not specific to zsh and can be shared with bash, for that I use ‘~/.profile‘, which I manually include on ‘~/.bash_profile (not needed on ‘~/.zprofile‘):, and link ‘~/.zprofile‘ to it.

test -r ~/.profile && . ~/.profile


I avoid typing as much as possible, and quite often what I want to do is already in the history, so I find history-search-* commands essential. Fortunately this is now enabled by default in Fedora 13, but for the unlucky ones here are the instructions.

First, copy ‘/etc/inputrc‘ to ‘~/.inputrc‘ and make a minor modification:
"\e[5~": history-search-backward
"\e[6~": history-search-forward

This allows nice searches through the history, like ‘cp ‘ will search for the previous command starting with ‘cp ‘, type PGUP again and will search backards again.

However, you’ll need this on your ‘~/.profile‘:

export INPUTRC=$HOME/.inputrc

(a similar change would need to be done on zsh’s bindkeys)


Many applications benefit from these (on ‘~/.profile‘):

export EMAIL=felipe.contreras@gmail.com
export EDITOR="gvim --nofork"

And also, set your real name (as root):
usermod -c “Real Name” <user_name>

GNOME vim syntax

I like to have GLib code properly highlighted (in C), so I install gtk-vim-syntax which has a lot of stuff (D-Bus, GTK+, clutter, etc.).

Create ‘.vim/after/syntax‘, copy the files you are insterested on (glib.vim, gobject.vim, and gio.vim for me), and then, on c.vim:

runtime! syntax/glib.vim
runtime! syntax/gobject.vim
runtime! syntax/gio.vim


These go into ‘~/.gitconfig‘.

I like colors in git:
ui = auto

I’m not going to list all the aliases, just this one which is very useful:
l = log --oneline --decorate --graph

I find mergetool essential to resolve conflicts:
tool = gvimdiff
prompt = false

Everyone should have their own exclude file:
excludesfile = /home/felipec/.gitignore

This is mine:

Very useful if you use sendemail often, (for more information see this other post)
aliasesfile = /home/felipec/.mutt/aliases
aliasfiletype = mutt
chainreplyto = false
confirm = auto
smtpserver = /usr/bin/msmtp
envelopesender = "auto"

And a few more:
name = Felipe Contreras
email = felipe.contreras@gmail.com
default = current
denyCurrentBranch = warn

Look and feel


Since I have a laptop (with LCD):
gconftool-2 --set --type string /desktop/gnome/font_rendering/hinting full
gconftool-2 --set --type string /desktop/gnome/font_rendering/antialiasing rgba
gconftool-2 --set --type string /desktop/gnome/font_rendering/rgba_order rgb

Also, I like the Droid fonts, and Iconsolata.

I copy them to ‘~/fonts‘, and instead of of manually configure everything on the
system to use them, I create a ‘~/fonts.conf‘ file like this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
      <family>Droid Serif</family>
      <family>Droid Sans</family>

Then re-login.

mouse cursor

I like jimmac’s DMZ cursor theme.

gconftool-2 --set --type string /desktop/gnome/peripherals/mouse/cursor_theme dmz


Fedora has it installed by default, but if not, you can just extract the tarball into ‘~/.icons‘.


I also wrote my own color scheme for vim, just copy to ‘.vim/colors‘, and then on ‘~/vimrc‘:
colorscheme felipec

felipec's vim color scheme

My custom color scheme


Before I know it, I need Flash, which I install manually by downloading the tarball and extracting ‘libflashplayer.so‘ into ‘~/.mozilla/plugins‘. You don’t need to restart your browser, but it can’t hurt.

Then when I need to do some multimedia-related stuff I configure rpmfusion. Then add mplayer, which plays pretty much everything, or gnome-mplayer if you want a fancier UI.

After doing all this, and installing a few essential packages (such as vim-X11, gcc) I consider my system usable :)

For the rest of my configuration files, check in github.

maemo-scrobbler 1.0 released; last.fm+libre.fm multi-scrobbling

I got tired of waiting for my patches to be merged into mafw-lastfm, so I continued with my project which I decided to name maemo-scrobbler.

maemo-scrobbler is a scrobbler application (last.fm/libre.fm) for the Nokia N900 that listens for events coming from the official media player app through MAFW.

The inspiration (and some code) comes from mafw-lastfm which does basically the same thing, but lacks some features. However, the code-base of maemo-scrobbler is completely different as I wrote it from scratch. First, I wrote a simple libscrobbler library which uses libsoup and a test application that can be easily run on the desktop. This way I was able to test the main use-case throughly.

Compared to mafw-lastfm, maemo-scrobbler has:

  1. Support for multi-scrobbling (both last.fm and libre.fm at the same time)

    Includes a song queue per service.

  2. Improved song queue handling

    Since internally it uses libscrobble (which is independent of MAFW), the important code can be easily tested on desktop sw, and it has been done so… throughly.

    It doesn’t matter how flaky your network is, or that the servers are down, the songs will be submitted.

  3. Permanent storage

    The song queue is not lost, even on crashes, device reboots, or software updates.

  4. Video clips are ignored

    Small feature, but important.

In other words: maemo-scrobbler Just Works™ ;)

It’s now on extras testing, please give it a try and vote up.

For more info and the source code, check in github.

msn-pecan 0.1 released; the best option for Pidgin/libpurple

After a bit more than two years of development we are proud to announce the first stable release of msn-pecan. The project started as a “fork” of libpurple’s msn protocol (read below why it’s not really a fork), but it has grown and soon will become a standalone library with support for Telepathy too.


I’ve been involved in Pidgin (formerly Gaim) since 2002, trying to improve it’s support for the MSN protocol which has been a very difficult task due to the reluctance of the Pidgin development team to take the issues seriously.

But don’t take my word for it, you can read an example of their excuses on John Bailey’s blog:

So yes, we have been “neglecting” Pidgin to a certain extent. Our time is a precious resource, and in many cases we simply have better things to do or simply don’t have the time to sit down and attack bugs to get them closed.

So yes, Pidgin neglects MSN, and yes, they need help; they themselves acknowledge that. IOW their MSN plugin is under-maintained.

The main reason for that is that the people who wrote the code have left the project. You can read all about it on this post; after several years of leaving the project my code still accounts for 42% of the code base.

The result of this bad maintenance is already visible in their bugzilla, but what is not visible is that many bugs are simply closed as invalid after two weeks of inactivity.

Despite all this, they rejected my help. And that’s how msn-pecan was born; I took my own code and carried development away from Pidgin. One way of looking at this is that Pidgin’s MSN has become the fork, and msn-pecan is the trunk ;)


Bugs are actually fixed

The main advantage of having the original development team (or person) is that the whole code base is maintained, which means that no bug will fall through the cracks due to lack of expertise.

Besides, all bugs are carefully evaluated and unlike Pidgin; they are not closed automatically. The result is that most bugs are resolved as fixed, and even verified. Even if it takes months for the reporter to verify, some bugs are that important.

This means if you report a bug to msn-pecan; you have higher chances of getting it fixed.


Since msn-pecan’s code is better organized, every operation is under control, which means less resources are wasted; faster login times, faster response times, etc. This might not be important to many people but in some platforms, like Nokia N900, it’s essential to maximize battery life, and minimize network bandwidth (e.g. 3G network).


The main feature of msn-pecan is that it will always login. Many people have reported not being able to login to Pidgin’s MSN and they are with msn-pecan. We ensure this by prioritizing login issues as critical, and fix them ASAP. Currently there are only two login problems open in our tracker, and they will definitely be solved by 0.2, or sooner.

A very important feature is fast file transfers with p2p connections, it has been by far the most requested feature, and therefore basic support has been introduced in 0.1. It will work on most situations, but not all, further development would be needed to support more scenarios.

Other features include: winks, plus! sounds, and plus! tags.

Again, unlike Pidgin, we try to prioritize features based on user feedback. This way we ensure that the features we implement are actually relevant to our users. That’s how we found out that people wanted offline messages, and handwritten messages, and the next one to implement is multiple login support. In many cases we implement the features before Pidgin.


We want to support as many clients and platforms as possible, therefore in our plans are:

Also in the scope is videocall support, but that might take some time.

The release

So in these two years the objective has been to reorganize the code, and stabilize it as quick as possible while developing the most wanted features. I believe we have reached that objective, therefore 0.1 is a release that is ready for mass consumption. Please spread the word.

These are the stats:
204 files changed, 50254 insertions(+), 15940 deletions(-)

Special thanks should go to Devid Antonio Filoni who has taken a big amount of tasks: translations, Ubuntu PPA, Adium builds, Instantbird support and porting patches from Pidgin, not to mention the usual development. Thanks Devid! Also important have been the contributions from Elliott Sales de Andrade, although his work goes to Pidgin, Devid makes sure we get the juicy patches. Single patches are also highly appreciated, please keep them coming :)

     1  Albert Cervin
     3  Alexandre André
     6  Andrea Piccinelli
     1  Chris Stafford
     3  Christiano Farina Haesbaert
     1  David Geary
    89  Devid Antonio Filoni
     1  Edgardo Fredz
     2  Eion Robb
     2  Elias Julkunen
    10  Elliott Sales de Andrade
     2  Erik Fredriksen
     2  Evan Schoenberg
   866  Felipe Contreras
     1  Geoffrey Antos
     1  Gulars
     1  Jisakiel
     1  John Bailey
     1  Jovan Turanjanin
     1  Ka-Hing Cheung
     1  Keir Lawson
     2  Luís Neto
     2  Marco de Moulin
     2  Mike Ruprecht
     3  Octavio Alvarez
     1  Peter Skov
     1  Sergei Zivukov
     1  Simo Mattila
     1  Simone Contini
     1  Tao Wei
     3  Thiago Silva
     1  Thomas Gibson-Robinson
     3  Víctor Manuel Jáquez Leal
     1  Wei Hsiang Hung
     1  Ying-Shiuan Pan
     1  ZyroBlue
     1  drummingdemon

Since we want to reach an audience as wide as possible, please vote up on sw sites:

Grab it while it’s hot! (usual place)