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. ...
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. ...
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. ...
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. ...
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? :-)
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… ...
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.
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. ...
ActiveValidators 1.9.0 is out! gem install activevalidators Read on for the full - yet concise - changelog. ...
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. ...
ActiveValidators 1.3.0 has been released! gem install activevalidators Read on for the full changelog. ...