Ciao, Xiaomi, ciao.

Posted by – Monday 2016-08-08

About a year ago, the Chinese smartphone maker Xiaomi was burgeoning and among the top 5 sellers. In last months Xiaomi has lost ground to its competitors, and currently is not among them.

As an angry Xiaomi ex-customer, it makes me feel a bit happy. I think that Xiaomi deserves such fate, as well as another much worser.

A Xiaomi show

Why I bought, about two years ago, a Xiaomi RedMi 1 smartphone? For me, the selling point was the operating system. Xiaomi smartphones feature MIUI OS, a very polished version of the ubiquitous Android OS.

At the beginning it looked promising, but finished badly.


WordPress: a recipe for switching from Apache to Nginx.

Posted by – Monday 2016-05-23

This blog runs on a bunch of software items, among them an instance of the WordPress content management system and a web server. For years I have trusted on the Apache HTTP server, despite I never liked it. Recently I switched to Nginx, a web server that is gaining a lot of traction, particularly among the busiest web sites [1, 2].

Why did I do this switch? For some reason unknown to me, some weeks ago Apache’s appetite for RAM memory went through the roof. None of the solutions I tested worked, including an update from version 2.2 to 2.4. Thus, I had a blog that was unusable: almost every request raised a HTTP 500 error. The following data provides some context: this blog is a low traffic one – it serves an average of 70 pages per day – and it is hosted on an inexpensive VPS that has 512 MB of RAM memory.

The solution I took was switching to Nginx, and it worked.

LEMP: Linux + Nginx + MySQL + PHP

This post is a quick-and-dirty recipe for switching an existing WordPress blog from the Apache web server to Nginx in a machine running a Debian 7 operating system. There is no original research: the instructions given here are taken from several web pages about Nginx, PHP and WordPress and put together here; and it is likely that there is room for improvement.


Exporting MS Access databases to SQLite.

Posted by – Saturday 2015-07-25

Sometimes you are given a database in MS Access (MDB) format. If your operating system is MS Windows and you have a MS Access license, working with this database should not be a issue.

If your operating system is Linux, the odds of working smoothly with such database are not good. The usual recipe for opening a MS Accesss database – actually, a MDB file – in a Linux machine is using LibreOffice Base plus the appropriate database driver. Usually this recipe will not work at the first attempt – and neither after many.

MS Access to SQLite

The alternative explored in this post is exporting the database from MS Access to SQLite. Both database technologies have in common the feature of being serverless. The output of this export process is a SQLite database which, like a MS Access database, is stored in a single file.


Some useful and aesthetic free map markers collections.

Posted by – Tuesday 2013-01-22

When creating a web map with OpenLayers, Leaflet, Google Maps or similar, a problem that sometimes arises is finding useful and aesthetic map markers, especially when it is required that the markers themselves have a meaning – for instance, points of interest – that is inmediate to users.

Under this requirement the default marker icons usually provided might not be good enough, or not suit a particular need. In this post we will list some collections of free map markers icons that might fill this gap.

1. Google Maps icons, and more.

A set of map marker icons intended to be used to represent points of interest can be found at

Google Maps map markers

2. OpenStreetMap map icons

The Open Street Map project has its own set of map icons, that can be found at

Open Street Map icons

The Open Street Map icons themselves can be found at the Subversion repository, which is accessible via a web browser.


OpenLayers cluster strategy active state depending of current map scale.

Posted by – Monday 2013-01-07

1. The arena.

Among the strategies that OpenLayers has, a very important one is the cluster strategy (class OpenLayers.Strategy.Cluster). As explained in a OpenGeo workshop about OpenLayers [1]:

Loosely speaking, the OpenLayers.Strategy classes tie together the layer and the protocol. Strategies deal with when to make requests for data (or when to send modifications). Strategies can also determine how to prepare features before they end up in a layer.

The cluster strategy will pack together near features in a single one (clustering) before they are sent to the vector layer and rendered. The clustering threshold can be set by pixels or by distance.

OpenLayers cluster strategy example

This strategy is very useful when we have to deal with the task of showing a layer with a large number of features and we want offer users a clear presentation. Typically, this problem will happen at low zoom levels or, equivalently, at high map scale values. In this situation, most of the features, if not all, will lie in the map extent corresponding to the viewport.