Why I started using emacs (and why you shouldn’t)

In what feels like a long time ago, I – as the curious software engineer that I am – began a journey. I had decided to try vim (“wha…? It said emacs in the title… is this the right art…” — yes it is, just keep on reading). It’d always baffled me why would people use such a barebones editor over a proper IDE but I figured, if so many people were using it and following it almost as a cult, there must be something to it. So I sat down and forced myself to learn some basics to get me started. And, of course, I started by learning how to quit the editor (relevant side joke: Q: How do you generate a random string? A: Put a Windows user in front of vi, and tell them to exit.), learned about the different modes and I learned basic things like moving forwards and backwards by units of words, and how to delete multiple lines and how to go to a certain line, etc. Basically the kind of thing I would be faced with whilst using vim to actually achieve something programming-wise.

[Continue Reading]

Continue Reading

Stuck at “Preparing your Desktop” After Migrating Windows Partition to SSD?

Recently at work I helped a colleague migrating his laptop from a HDD to an SSD. He was dual-booting his machine with Windows 7 and Ubuntu, and after skillfully shrinking his original partitions (in order to fit the SSD), we copied the partitions over with dd from the HDD to the SSD. After that was done, Grub was understandably confused as its entries were pointing to the HDD partitions rather than the SSD partitions but even after an update-grub and grub-install from within Ubuntu, Windows still wouldn’t boot.

We consistently got stuck at “Preparing your Desktop” screen and eventually Windows would boot into a completely empty desktop.

Keep reading to figure out how to fix this.

Continue Reading

Disable power management for the 8188eu driver in Raspbian

Many WIFI USB dongles out there rely on the 8188eu driver for support under Linux. In fact, in a previous post  I covered how to compile a 8188eu driver for your own Raspbian kernel which will keep being upgraded if you are vigilant enough to run rpi-update every now and then.

One thing I didn’t mention in that blog post is that certain devices which use this chipset will enter power management mode after some time.

If this is the case with your device, you can fix it by creating a file called /etc/modprobe.d/8188eu.conf which loads the configuration for the 8188eu kernel module and write the following inside:

options 8188eu rtw_power_mgnt=0 rtw_enusbss=0

Then restart your Raspbian and you should be good to go!


[Photo] Jupiter and its 4 largest moons

As some of you may know, I have recently taken up a new hobby. I started with (very) amateur astronomy. Now while the Dutch skies are not the best for astronomy due to having the worst light pollution in Europe (probably due to its extensive greenhouses and the artificial lightning they require), it’s still possible to see the closer objects to Earth such as the planets in our own solar system.

[Continue reading, photos below]

Continue Reading

Wat is alcohol ketonatus? (What is alcohol ketonatus?)

In het Nederlands: een simpel en een-zin antwoord is alcohol ketonatus is alcohol die door gebruik van een ketone (meestal is butanon in Nederland gebruikt) zijn geur veranderd is om het ondrinkbaar te maken. Het zou dus niet gebruikt zijn om te drinken (waarom willen mensen 96% alcohol drinken is wel buiten mijn verstanding maar ja…).

In English: A simple and one-sentence answer is alcohol ketonatus is the Dutch nomenclature for alcohol that’s been “denaturated”. Essentially, alcohol that through the usage of a ketone (in the Netherlands it’s usually butanone) is made undrinkable and should not be used for human consumption.


Some background… whilst living in the Netherlands, I often wondered why was “pure alcohol” nowhere to be found. There’s the alcohol shops, and the supermarkets, and they all sell wines and all kinds of distilled drinks but I could never find the pure ethanol which we in Portugal use to cook chouriça laid on an assador de barro.

[Continue Reading]

Continue Reading

How to see the International Space Station (ISS)

Last weekend me and my wife were down in Eindhoven in the south of what was a very sunny and warm Netherlands. While visiting a friend down there we discovered they have a telescope. Oh, I was so excited! For many years, having a telescope has been a dream of mine but alas… they aren’t exactly cheap instruments and I always had the feeling it would be something that would get old pretty fast.

However, as soon as I had the chance to point the telescope at the tiny shiny blimp in the sky which turned out to be Saturn, and as soon as I was able to see its rings hanging around its spherical mass of gas, I was in love. “Wait, let’s point it at the moon!” – and I was even more in love. Somehow there is some astronomic quality and reality to seeing things through that glorified mirror-lined tube that photos simply cannot capture. Much the same way a single photograph cannot capture the greatness of the Great Wall, much the same way photos cannot describe the feeling of a plane banking to 30 degrees inclination to pull you out of the floor, out to 39000 feet to take you places… astronomic photographs, as spectacular and colorful as they may be, cannot describe the feeling of DIY pointing the telescope and sitting there looking, wondering, imagining.

This means, of course, one thing: for the next few months I will be badgering my wife, trying to persuade her to allow me to invest in a good telescope.

Part of this persuasion started last night when the ISS was flying past us at its incredible speed. Normally the ISS would only be visible in the wee hours of the night and we would have to wait for the right day where all the conditions were met. You need a clear sky, the station to be passing around your area and patience to wake up in the middle of the night to see it. But last night at 23:13 would be a perfect time to spot it. Our plan was almost foiled by the patchy clouds which were planning to ruin the fun but a couple of minutes past the announced time, there it was, in all its glory. A small patch of reflected light, in total size bigger than any star, bigger indeed than any planet  and about as big as one of the planes which usually make for the Rotterdam/The Hague airport around the same area. But this one was different. It was not blinking but rather reflecting light, constantly so, and flying at a different bearing than of the planes. Hiding here and there behind one of the clouds, it was as visible as it could be in the sky which at that time was not yet so dark. In effect, as I recall, the sky’s light night blue was probably the best to spot the station. Too dark and the station’s colors would get lost in the background, too light and it is simply not visible at all, overexposed by the sunlight. It’s pretty tough to find a photo of what we saw last night, mostly because spotting the ISS with the naked eye requires conditions which are very adverse to photography (darkness + fast moving objects) so here’s a photo of the ISS in all its glory (photo courtesy of Wikipedia):


This was it, this was yet another step towards my space exploration. Yet another step in convincing my wife the 300 euro I need for a telescope will be worth it.

Oh yeah, my post’s title was about how to see the ISS, right? Oh that’s pretty easy… If you have a smartphone, specifically Android, you can use the ISS Detector app. Fill in your location and you’re good to go. Otherwise just head over to NASA’s very own “Spot the Station”: http://spotthestation.nasa.gov/ . It’s really worth it and you should definitely give it a go.

EDIT: Last night we were “station spotting” again and I managed to snap a picture of the ISS in all its glory. In a surprisingly clear sky, I feel that the photo does not make justice to the real thing but indeed, it is better than nothing!

2014-06-11 23.15.16 copy

[Project] How to easily monitor your plants’ soil humidity

You came here to learn about soil humidity monitoring, right?

Then you should probably scroll down to the part where I have a photo of my setup. However, if you have the time and feel like reading some of my ramblings, why don’t you just continue with the next paragraph? I promise you won’t be disappointed!

My beginning as an urban farmer

Spring is here and with it comes the sunshine, even in rainy Netherlands. For this reason I recently started growing all kinds of things at home. First I started with some of those tiny thumb-sized vases which come bundled with sunflower and lavender seeds but… soon after, I realized those vases were not gonna be big enough to hold that many seeds. Determined to see those plants through to flowering, I started buying bigger vases and soil. Soon after that, I was growing not only the sunflowers and lavender but I sowed some seeds I had bought a long time ago. I was now growing several shoots of mimosa pudica (aka the shy plant, famous for the fact that it closes its leaves when you poke it – which you can see on Youtube), a few more seedlings of chinese chives (or scientifically speaking, allium tuberosum, delicious in many dishes) and my proudest plantation, seedlings of the hottest pepper in the world: the trinidad moruga scorpion, which in the the Scoville scale is said to be approximately 500 times hotter than your average Jalapeño or Chipotle chilli. Now THAT’S spicy!

You like the post so far? Well keep on reading then!

Continue Reading

How to get the TP-Link TL-WN725N working on Raspberry Pi

Recently I bought two TP-Link TL-WN725N adapters off Amazon. They’re cheap and according to the RPi peripherals list [here], are supposed to work well under Linux. They do, however, require a special driver which is not included in the Linux kernel itself. This leaves you with two options:

– Use one of MrEngman’s pre-compiled kernel modules which is available on the Raspberry Pi forums [here] (kudos to MrEngman to his ongoing effort!).


– You compile your own kernel module.

However, keep in mind the following very important caveat: whatever your choice is, this process requires some basic knowledge of Linux! If you don’t feel comfortable messing around with kernel modules and such, I would recommend that you proceed with caution and maybe even ask a more experienced friend to give you a hand. It’s unlikely you will ruin your Raspberry Pi but you may very well ruin your installation. PROCEED WITH CAUTION.

Now, be aware that if you just want your wifi up and running and don’t want to be bothered, you really should take the easy way out here and check whether MrEngman has a pre-compiled module that’s been compiled with the same revision of your kernel. If you cannot find one or if you’re feeling especially brave, read on for the step by step on how to compile it yourself.

Also keep in mind that this tutorial applies to the Raspbian distribution. It may (or may not) work in Pidora (and others) but it’s up to you to adjust accordingly.

Continue Reading

Chronopost Portugal? Serviço enganador…

This post will, extraordinarily, be in Portuguese as it is a complaint and a warning towards a Portuguese courier company which is indulging in false advertising. This is, therefore, a warning for my fellow Portuguese countrymen.

Esta é uma história de como os meus pais, na segunda-feira passada (dia 7 de Outubro de 2013) me enviaram pela Chronopost Portugal uma encomenda para a Holanda, onde me encontro a residir. No site, a Chronopost anuncia o serviço Chronopost Classic onde prometem entregas para a Europa dentro de 3~4 dias a preços convidativos (24 euros até 10 kg).

Uma vez que a relação preço versus qualidade (anunciada) parecia bastante boa, decidi escolher o serviço da Chronopost.

Qual não é o meu espanto quando hoje, dia 11 de Outubro de 2013, passados 4 dias da expedição da encomenda, esta ainda não se encontra sequer na Holanda (de acordo com o track and trace). Depois de contactar por várias vezes a Chronopost e me terem sido dadas desculpas de que “os 4 dias são 4 dias de trânsito” e de que “o dia de expedição não conta”, o facto continua a ser de que excluindo o dia de expedição, faz hoje 4 dias desde que a encomenda se encontra em trânsito.

Após ter descoberto que não vai ser a Chronopost que me vai entregar a encomenda mas sim um dos seus parceiros (a DPD), decidi contactar também esta empresa afim de tentar obter um esclarecimento sobre quando a encomenda será entregue. Estes senhores dizem-me que será entregue apenas na segunda-feira, sete dias depois da expedição.

Fica aqui então o aviso que a Chronopost Portugal está a enganar os seus clientes com um serviço de pouca fiabilidade, prometendo entregas em 4 dias e fazendo-as em 7 dias. Conhece algum serviço mais fiável? Que tal deixá-lo então na secção de comentários em baixo?

Automatic Recovery of REST Interfaces

Recovery of REST interfaces is an interesting research topic which came into conversation with one of our industrial partners and which I would like to explore. This is also something mentioned by Maleshkova et al in their work on “Investigating Web APIs on the World Wide Web” (pre-print, IEEE citable). The authors claim that “two thirds of the APIs do not state the data-type of the input and 40% of the APIs do not state the HTTP method. If a standard interface description language, such as WSDL, [was] used […] this would be unthinkable”.

This is very true. Read on to know more.

Continue Reading