Spell checking with F#

{ Posted on Jan 25 2010 by claudio }

Some months ago I have written an introductory article on F# for the “IoProgrammo” magazine (sorry, Italian only!) and now I have published a second article on the latest issue of the same magazine.

This new article covers more advanced topics and is focused on writing a basic spell checker that mixes together the functional and object-oriented programming paradigms.

The spell checking algorithm is implemented in functional F# and is based on the Jaro-Winkler similarity distance while the UI is WPF-based and written with OO code.

I hope you will appreciate the article and I’ll be very happy to get any feedback from the readers.

IoProgrammo - February 2010

IoProgrammo - February 2010

Read More »

Ruby outperforms Python with Project Voldemort

{ Posted on Dec 04 2009 by claudio }

If you are performing some statistical analysis on a huge amount of data (try thinking about Twitter data) then the database can become a real bottleneck and that’s the reason why the interest on the NoSQL movement is quickly growing.

One of the most popular distributed key-value store that tries to overcome this problem is Project Voldemort, an open-source project based on Amazon Dynamo and sponsored by LinkedIn that uses it for some high-scalability storage problems.

Project Voldemort is written in Java and also provides the developers with C++ and Python client libraries to access the store. One thing that (strangely) was missing is the support for the Ruby language, mainly because of the lack of a stable Google Prototocol Buffers implementation for this language.

There is however a gem called ruby_protobuf, that besides being in alpha release, turned out to be reliable enough for my purpose of porting Project Voldemort Python client library to Ruby.

The library I wrote is called voldemort-ruby-client and is now released under the Apache 2.0 License on Google Code, so it is absolutely free for you to experiment with it.

While writing the library I also ported the Python test cases to Ruby and I found the latter to be 3000 times faster than the former!
Does anybody have a suggestion for the reason of this outstanding improvement?

In my machine the Ruby client performs about 2 millions PUT (or GET) requests per second against the 6 hundreds of the Python client.
Is there anybody else willing to repeat the benchmark on his machine and publish the results?

Read More »

A new beginning (and a new Wordpress plugin)

{ Posted on Dec 01 2009 by claudio }

It is never easy to write the first post of a blog, fortunately for me it is already the third time and actually the second for this very blog.
After three years of my first encounter with the blogging world I decided to move a step forward and reboot, but with much more experience by my side.

In this reborn blog I will focus on my passion, that is software development, and I want to start presenting the Wordpress plugin that I wrote for this event.
It is called Front Page Exclude By Date and is a very simple plugin that I needed to hide my old posts from appearing on the front page without deleting them and losing all links pointing to them.

You can still read the old posts by searching for them or clicking on your bookmarks and now you can also find on this blog the series of posts on functional programming and the F# language taken from the FSharp.it website, which is no longer updated and merged with this blog.

In the next days I’ll talk about my Ruby client library for Project Voldemort, stay connected and follow me on Twitter!

Read More »