Sunday, January 20, 2013

Sparse bitset in scala, benchmarking 5 implementations

Recently in a Scala project, I've hit a problem with sparse bit set. Typically, I was moving around set of 30~50 integers between 0 and 2047 with operation such as xor, and, circular shift etc. Basic operations, but repeated extensively, were soon to become a bottleneck in my application. The first implementation used scala BigInt (the main reason was the straightforwards shift call) but it later appeared that other solutions were more suited to the problem.
In this post, I will profile basic operation on  5 implementation alternatives: Scala BigInt, mutable and immutable BitSet versus Java BigInteger and BitSet (Java type can be used inside the Scala application of course).
Source code is available on github

Tuesday, December 11, 2012

Sustainable JavaScript

JavaScript is certainly one of the most popular programming language [1] [2] [3] and the never increasing popularity of complex web application will not cut that trend soon.
Despite some intrinsic flaws of the language and environment, trends have emerged to turn JavaScript into clearer, more structured, deployable, testable environment. In this post, I will go through some of them. As a subjective point of view, they will reflect some techniques we daily use in the scope of large scale projects, computing and displaying rich information in bio-informatics.

I will mainly make here a short introduction to underscore.js, require.js and jasmine as the tools that recently made my day change and shine again. I will skip discussions about jQuery, chrome developer tool, html5 and backbone which also are invaluable, among many others.

Example code, usable as is or in an eclipse (aptana studio is perfect) is available on google drive
Part of a large scale tech jobs ad campaign in the Bay area

Saturday, August 25, 2012

Continuous Deployment in Perl: Code & Folks


Continuous Deployment in Perl: Code & Folks

pre-reviewed version, published in a Perl issue in the Software Developer's Journal (May 2012 issue)
This article was written together with my friend Pierre-Antoine Queloz (paqueloz@gmail.com)


Continuous Integration is the tactic of decreasing the latency between the implementation of a new piece of code and its integration in the overall project. It is the backbone of Continuous Deployment that is often defined as releasing software very frequently in order to satisfy customer needs and get their feedback as soon as possible. Both have shown their benefits and play an important role in the success of the current Agile software development trend.

Monday, December 19, 2011

Comparing hostip and geoip

What is the best IP address to geolocalisation system?

Seeking to analyze web log files by the country of request origin, I recently proposed a simple plugin wrapping hostip.info API. Of course, the major competitor in the field is maxmind geoip and they provide a free light version of their database. This database can be queried through their java API of a geoip Grails plugin.
Time has come for numbers. How each module perform on the same set of ip address? Even with 3% of uncertainties, maxmind geoip lite shows to be clearly the best.

Wednesday, December 14, 2011

hostip grails plugin: from IP address to localisation

Getting a localisation from an IP address is somehow straight forwards with available web services. However, for massive report (such as analyzing web logs from the remoteIP perspective), it is not doable, even with caching.
The idea of the plugin is to use the free distributed hostip database, mirror it locally and give a Grails service to query it.
There is another post, comparing hostip with maxmind geoip. It should certainly be read before jumping to hostip.

Tuesday, December 13, 2011

Perl & Hudson: continuous testing & deployment

One of the key point of Agile driven development is an infrastructure to seamlessly build, test and deploy the software at every commit.

Although lot of framework exists in the Java world, there is less available pointers on this topic with Perl. The aim of this post if to give a few practical hints on how we set up our continuous testing and deployment system using Husdon for multiple, dependent perl distributions.

Be ready, it's easy!

Sunday, October 2, 2011

A Perl URL checker

URL::Check : yet another URL check system
You want to get notified is something goes weird on a web site you develop and that should be running 24/7?
Given a list of url, you want to check if they exist and send receive an email in case of trouble.
The problem is so common and hundreds of solutions exists on the web, from simple crontab shell to more complex system (hyperic & co).
We propose here one more system. The constraints were:

  • check availability of url, response time or contents,
  • get email to be notified in case of failure,
  • a simple configuration system.