Benchmarking Ruby's `method_missing` vs `define_method`

After recently benchmarking PostgreSQL to find out if some of the techniques we used were efficient, I decided to look at the usage of a controversed Ruby feature: method_missing. ...

July 21, 2015 · 5 min · Franck Verrot

Benchmarking PostgreSQL's SELECT Query Planning and Performance on Columns Aggregates

Executing a single query doesn’t always literally mean executing exactly ONE query. Sometimes PostgreSQL (like any other relation database) will have to extract parts of your query (subqueries) and re-execute it as many times as needed to generate the results you are expecting it to generate. This article shows how N+1 issues can also happen without an explicit intent to produce them. ...

July 12, 2015 · 8 min · Franck Verrot

Hijacking gem commands

Rubygems has been made extensible by the usage of plugins. Any gem that provides a lib/rubygems_plugin.rb file will be discovered by the gem infrastructure, whether it is loaded by your application or not. Adding new commands is fairly easy, here’s how we could replace existing ones (like install), using only Rubygems’ public API. ...

April 21, 2015 · 3 min · Franck Verrot

Moving back to Jekyll

This blog used to run Octopress and I blame myself for not updating it as much as it should have been updated. From now on, I’ll try using a basic Jekyll/GH Pages setup. Permalinks have been preserved, so I believe it can’t be a bad move anyway. As usual, finding subjects is going to be the tricky part, but I have some topics I always wanted to cover. So… stay tuned? :-)

September 28, 2014 · 1 min · Franck Verrot

Method definitions in Ruby 2.1.0 will not be void anymore

Ruby 2.1.0 will be released at the end of the year and among other features, a change done in the parser caught my eyes… ...

August 21, 2013 · 1 min · Franck Verrot

New username

A couple of days ago I’ve decided to drop my old username CesarioGW to become franckverrot. My GitHub and Twitter accounts have been renamed. I will slowly take care of the remaining accounts.

July 8, 2012 · 1 min · Franck Verrot

Pitch, Business Model, People: my wrap up of the 3rd Startup Weekend Lyon

Last weekend I had my first Startup Weekend experience. I must admit I have always been skeptical about this kind of events and came with two goals in mind: try to change my mind about it and pitch some idea I had in the back of my head for a little while. ...

April 21, 2012 · 2 min · Franck Verrot

ActiveValidators 1.9.0

ActiveValidators 1.9.0 is out! gem install activevalidators Read on for the full - yet concise - changelog. ...

April 7, 2012 · 1 min · Franck Verrot

What is the best way to pass NSManagedObjectContext around in iOS applications?

TL;DR Passing an NSManagedObjectContext in each and every NSViewController that needs CoreData can be done by different means, but some are frowned upon. In doubt, inject it. While pair-reviewing some code with my colleague Vincent Tourraine, we realized we wrote this kind of code into each viewDidLoad: method of each NSViewController subclasses we created: managedObjectContext = [[[UIApplication sharedApplication] delegate] managedObjectContext]; Doing so is more or less the same as using a global variable, as calling sharedApplication on UIApplication returns the singleton application instance. I kind of felt this was a code smell so I investigated. ...

January 18, 2012 · 2 min · Franck Verrot

ActiveValidators 1.3.0

ActiveValidators 1.3.0 has been released! gem install activevalidators Read on for the full changelog. ...

March 20, 2011 · 1 min · Franck Verrot