Understanding floating-point numbers

Floating-point numbers vs real numbers Understanding floating-point numbers is essential when working with decimal values. Floating-point numbers may also be used to work with whole numbers that do not fit in a long integer (at the expense of losing precision). In any case, you don’t want to be caught off guard when seeing this: In… Read More »

Invisible files

i-nodes and hard links Unix-like operating systems store file information in a data structure called i-node table. File names are just a way to reference an i-node and the same i-node may be referenced by more than one name. These associations between file names and i-nodes are called hard links. When a file is deleted,… Read More »

How to migrate WordPress

This is a post based on my recent experience to upgrade this blog, a post about WordPress written in WordPress 😉 After three years, my WordPress website was way out of date and the warnings to update it were getting louder and louder: PHP version, WordPress version, theme version, plugins version… The last thing I… Read More »

How to create a sparse file

Sparse files are files with “holes”. File holes do not take up any physical space as the file system does not allocate any disk blocks for a hole until data is written into it. Reading a hole returns a null byte. An example of sparse files is virtual machine images. For instance, when I create… Read More »

Future beginning and end in Scala

A common issue noticed when reviewing pull requests is the understanding of the boundaries of Futures. In most cases, people take for granted that given a function with this signature the full body of the function will be executed in the Future. Let’s look closely into this with a couple of examples Example 1 Here’s… Read More »

How to construct objects in Scala

Scala’s object-oriented programming style comes with some syntactic sugar and a few tricks. In order to get a better understanding of how Scala works, we will examine a few Scala examples and the corresponding byte code (in reality, the Java code resulting from decompiling the class files). Examples Empty class Simplest possible example, an empty… Read More »