Getting up to speed with Python (a book for self-learners) - March 20, 2018

This book aims to teach the basics of the python programming language using a practical approach. Its method is quite basic though, after a very simple introduction to each topic, the reader is invited to learn by solving the proposed exercises. (...)


A TDD approach for building a simple microprocessor model in Python - September 20, 2017

Modern microprocessors are a very complex piece of machinery with a lot of different parts. I've learned assembler and microprocessors in my undergraduate course some years ago but I've been working on higher level software languages for quite some time now. (...)

Building a basic HTTP Server from scratch in Python - February 09, 2017

In its essence, the modern web is just text going back and forth between clients and servers. As developers, we often use web frameworks to help us build strings to send to the clients. (...)


Creating an embeddable Python distribution on OS X – From python sources - June 06, 2016

Yesterday I published a blog post on how to create a standalone python 3.5 distribution from the homebrew binaries. However, as I mentioned in the final remarks, the compiled dynamic library has a minimum OS X version which matches the OS X version where you compile it. (...)

Creating an embeddable Python distribution on OS X – From homebrew binaries - June 05, 2016

I am currently working on a cross-platform Electron application that needs to make network calls to an embedded Python web server. Since this application must run on OS X and Windows, and I don't want my users to have to install Python 3 themselves, I have to include the Python interpreter with the application. (...)

The chart diet – Or a sedentary life as software developer - May 08, 2016

On my last job as software developer I had a very sedentary life. Long story short, my weight increased from 72kg to 82kg. I do not have an athletic body but I have always been a kind of sportsman. (...)

Deploying Flask applications in WebFaction – A hands-on tutorial - May 05, 2016

WebFaction is a service that provides fully managed servers and other extras for developers. I have been their client for more than 5 years now and never experienced a problem that wasn't handled swiftly. (...)

The Sierpinski triangle - February 15, 2016

The Sierpinski triangle is a fractal with the form of a triangle subdivided recursively into smaller ones. This wikipedia page talks about it in some detail and shows several different ways of building the triangle. In this post I will show an implementation using the chaos game technique. (...)

Django translation tutorial – Setting user language - February 02, 2016

In the previous post I have shown how to setup the translations on Django templates and javascript code. However, although there are several ways to configure how Django uses translations, so far we have used the settings to define an application-wide language. (...)

Django translation tutorial – Templates and Javascript - January 26, 2016

In the previous post of this tutorial series we implemented the translation of a string in the view. But in production projects most of the time we will be working with Django templates or Javascript code. The goal for this third post is to set up the translations for Django templates and Javascript. (...)

Django translation tutorial – Settings and translation files - January 10, 2016

In the previous post of the Django translation tutorial, we implemented a simple view which returns a message defined in the output variable. (...)

Django translation tutorial – Introduction - January 04, 2016

Lately I've been working in a Django project where one of the requirements is that the users can choose their preferred language in the interface. In terms of implementation details, this means that most of the strings in the views (...)


Comparing probabilistic search and linear search methods - December 26, 2015

In my last post I did a little comparison of behaviors between the linear search and binary search algorithms. Not surprisingly, the binary search algorithm makes fewer iterations than the linear search, regardless of the list size. (...)

A small comparison of two search algorithms - December 19, 2015

For those that have been in the web development industry for a while, you know that in most cases developers use high level frameworks such as Django or Rails for their projects. These frameworks are interesting because they deal with the basic functionalities (...)

Static websites with flask - August 22, 2015

Building static websites with frameworks such as Flask allows for a clear separation of concerns. For instance, you can separate website functionality over multiple files or use technologies, such as markdown, to generate HTML content. (...)


Embedding Python in Android – Compile C Cython extensions - April 29, 2014

In this article, I will show how simple is to create a regular C Cython extension and set it up to run on embedded Python for Android. (...)

Embedding Python in Android – Compile C++ Cython extensions - April 28, 2014

In this article, I will show how you can cross-compile a C++ Cython extension to use on your embedded python interpreter in Android. (...)

Embedding Python in Android – Standard Library - April 25, 2014

On the previous articles I've shown how to cross-compile Python for Android, build a native interface for accessing the interpreter from Java code and run some code. However, I still haven't show how to include modules from the standard library. (...)

Embedding Python in Android – Adding log to the Python Interpreter - April 24, 2014

If you have followed the previous article on this tutorial series, you now have a Python interpreter embedded in your Android application. (...)

Embedding Python in Android – Python Interpreter - April 23, 2014

In the previous article, I have shown how to create an Android application which uses the Java Native Interface to interface with C/C++ code. (...)

Embedding Python in Android – Java Native Interface - April 22, 2014

In this tutorial I will show how to write an Android application which uses the Java Native Interface to access native code in C/C++. This will be useful later because we will access our Python interpreter from Java through JNI and C/C++. (...)

Embedding Python in Android – Tutorial series - April 21, 2014

In the last months I have been implementing a Python library for a cross-platform application of mine. I've chose Python for many reasons - it is cross-platform, allows for fast development, has very concise code (...)


Android tablet bq Edison – Restore stock partitions - December 15, 2012

If you mess around with an Android device, and you don't use the Windows-based tools, chance are that one day you are going to brake something. And that is when setting your tablet's partitions back to stock is important.. (...)

Android tablet bq Edison – Root (on any OS) - December 14, 2012

The bq Edison is an Android tablet built by the Spanish company bq. It is an affordable device with excellent specifications for its price, namely a Rockchip 3066 Dual-core SoC with a Mali 400 Quad-Core GPU, 16 GB internal SD, 1 GB Ram memory, and shipped originally with Ice Cream Sandwich. (...)

Installing Mac OS X on Virtualbox 4.2 – EFI Method - December 04, 2012

Yesterday I've published a post on how to install Mac OS X – Snow Leopard - in Virtualbox 4.2 using external boot loaders. Unfortunately that method causes a lot of kernel panics and is not reliable because sometimes it boots successfully, sometimes it doesn't. (...)

Installing Mac OS X on VirtualBox 4.2 – With an external bootloader - December 03, 2012

By various reasons, some people need to install Mac OS X on their computer. Some want to play with it, some want to have fun messing around with the installation on their computers (google Hackintosh), and others want to produce software for it without having to pay big bucks for Apple hardware. (...)

Changing ZTE Blade Kernel configuration file for CM9 - June 21, 2012

In CM9, device's kernels source code should be integrated with CM9's source code. So, if you have the CM9 source code, you probably have a kernel/folder with the source code. (...)

Some reminders for CM9 - May 20, 2012

When uploading patches, if you get something like Permission denied, make sure your .gitconfig has the correct username. (...)

Compile Android kernel for ZTE Blade - April 25, 2012

The three things that I most like about the ZTE Blade is that it is a low cost Android handset, it has a very good screen (480*800 px) and, most important, it has a great community behind it. When I first bought mine almost 17 months ago, it came with Android 2.1. Now, Android 2.3 (Gingerbread) runs pretty fast and is really stable, and Android 4.0.3 is almost usable on a daily basis. (...)

Welcome - April 23, 2012

Welcome to my blog! I've decided to name it Technology & Life so that I can write about several topics, but the focus is on technology, mostly software. (...)