Use transducers to improve Clojure code readability

February 11, 2017

One of the uses of transducers can be applied to the ->> threading macro, to compose several processes through a list into one single pass while keeping the code intent clear and readable. For example, the follwing code loops through the list twice

(->> [1 2 3]
     (map #(* 2 %))
     (map inc))
Continue reading →

Towards a statistical software engineering and control

February 3, 2017

With statistical software engineering and control I mean actually driving development towards the optimization of statistical measures of the software and using tools to control these measures.

This post is more about my internal rants than about reality or anything usable, but I have been thinking about this quite a lot lately and have decided to embark in the implementation journey.

Continue reading →

Handling low level byte frames in Clojure with Gloss

January 27, 2017

Gloss is a (another) fine library by Zach Tellman which handles low level byte manipulation in Clojure. Sounds weird? It is!

How do we functionally handle system level byte frames that are otherwise naturally manipulated in assembler or C? Gloss comes to rescue.

Continue reading →

I like Windows 10 and the new Microsoft (despite their past)

January 25, 2017

I hate to say this, but I like Windows 10. It seems that starting to remove old school people from the picture, including Bill Gates and their friends, is starting to pay off.

Microsoft products have always been mediocre, a cheap refurbish of ideas already implemented or circulating around. I understand the complexity of a massive (and conservative) customer base such as theirs, but that is no obstacle for the myriad of mistakes they've had in the past.

Continue reading →

Clojure good practices

January 17, 2017

Reloadable code makes the developer's life easier, making it possible to change the code and hotload it on the fly into a running system, or reload it minimizing the impact on it.

In my experience working with Clojure, I have founds a couple of guidelines that allow me to follow this principle. I will summarize them next:

Continue reading →

Monads: Scala vs. Clojure

January 10, 2017

This summary follows from the magnificent talk by Juan Manuel Serrano Hidalgo as part of the CodeMotion 2016 in Madrid, Spain, available on Youtube.

Juan Manuel not only masterfully gives the fundamental idea of monads in Scala, but it does so in the finniest and most enjoyable way possible.

Continue reading →

Elasticsearch and GIS

September 15, 2016

We saw that MySQL comfortably deals with GIS data. Now it is the turn of Elasticsearch.

We will upload the geospatial information from a shapefile to Elasticsearch. Shapefiles are a standard in the GIS world, and are normally accompanied by other files, including a DBF file. This DBF file can be opened in Excel or Libreoffice, and it normally specifies region data, including names. For this example, we will use the Global Adminsitrative Area's Spain shapefile

Continue reading →