Originally published on techtrails.io

The backstory

When you’re working on a Web service that other people/businesses depend on, such as an API, responding in a timely manner is often seen as a quality criterion.
Some companies like Algolia have even made it a motto with their #millisecondsmatter hashtag!

So I was forced to move away from Inbox to Gmail because “Gmail now has all the features you love from Inbox”.

Well. No. I think Gmail was and still is an inferior product in many ways, first and foremost the cluttered, very busy design.

Inbox was clean, looking great and pleasant to use. Looking at my Gmail inbox almost makes me anxious, everything is packed (even in the cosy/comfortable/whatever display setting).

Now for the features… Inbox was more task-oriented: you could mark an email as “done”, which is different semantically than “archive”.

That I can still live with…


Cher OVH, client à titre personnel chez vous depuis de nombreuses années, je ne me pose presque jamais la question du prestataire à choisir pour la réservation d’un nom de domaine ou la location d’un serveur.

Hier encore, j’ai commandé chez vous un nouveau nom de domaine. J’ai du coup reçu ce matin un questionnaire de satisfaction qui me demande comment, selon moi, vous pourriez vous améliorer.
J’ai bien une idée, mais la limitation à 1000 caractères de votre formulaire m’empêche de la développer, donc j’espère que vous la lirez ici !

Je “bug” à chaque fois…

Taming ExecJS

Originally published on techtrails.io

In my research for an integration of React with Rails, I have encountered a very annoying error on the server side when pre-rendering some React components. It was even more frustrating that I didn’t know how to debug my script when it was executed on the server to find out what the problem was.

After some digging and thanks to the help of Matt Hink I finally found a way to get a debug session in javascript code executed on the server.

Running in debug mode

The solution was of course to execute this server-side script in debug mode, but…

A small update

Originally published on techtrails.io

In my previous article, I described a way to get the best of several worlds: Ruby on Rails, React JS and Browserify.
The intent was to keep using Rails as the great backend framework it is, but make it possible to embrace more advanced Javascript techniques thanks to Browserify as a module “packager” and React JS as a front-end framework.

This article has apparently been well received and raised the interest of many, si I wanted to push some quick updates about it:

  • I have published a sample Rails project on Github that implements what’s described…

Originally published on techtrails.io

This is a quick note about storing geographic coordinates in your database. It actually holds true whether you’re using Rails or not, but that’s the context in which I became aware of the problem.

So, what’s the problem?

As you probably know, latitude and longitude values are floating-point numbers. Their precision is important: a slight change in the decimal part makes the coordinates point to a different place in the World.

Working on a friend’s project, here’s how the problem showed itself:

I could not find back an Event record using its own latitude and longitude values! …

or how to provide a virtualized dev environment using Vagrant and Salt

I’m sometimes working on a project that is using quite an old stack of softwares, based on Ruby 1.8.7 and Ruby on Rails 2.3. My computer is already configured to work on this project, but recently my fellow designer needed to work on it too, and he’s got this brand new MacBook with almost nothing installed on it.

I could setup rbenv or RVM to manage the Ruby versions, and the project does use Bundler, so I’d be quite safe on this side. …

Packaging your React components

Originally published on techtrails.io

Using Node.js, I’ve grown accustomed to using CommonJS modules and I like them as a solution to dependency management and scope isolation in Javascript.

Using Rails, what you natively get is Sprockets, which I feel doesn’t provide the same robustness and flexibility CommonJS does.
So how could I continue using modules within Rails?

Browserify is a tool that lets us require modules in the browser just as we’d do in a Node.js application. It’s been wrapped into a gem called browserify-rails that makes it possible to use the require function in our Rails-served Javascript files.


Part 1 — Server-side rendering

Originally published on techtrails.io

Server-side rendering of React components to improve SEO and minimize your web app initial loading time.

Update 16 Jan. 2016
It’s been more than a year since this tutorial has been published, so I have updated to reflect the latest evolutions of the different libraries that are used here.

The complete code for this tutorial is available here.

Background & goals

I tend to like trying out new technologies.
During the past year or so, I have been developing some little javascript-heavy projects, using CoffeeScript, Backbone, Node.js, Mustache, Grunt, Yeoman… all the buzzy libraries/frameworks we hear about nowadays!


Originally published on techtrails.io

Using Devise and the Cequel ORM to authenticate
your users using a Cassandra database

Devise is a “flexible authentication solution for Rails”, while Cequel is a Ruby ORM for Cassandra that uses CQL3 (Cassandra Query Language). We’ll set these up together to achieve our goal: authenticating users of a Rails app using a Cassandra database to store their credentials.

This is rather a “high-level” tutorial: I assume you already know Ruby on Rails, that you can find your way around on Github to install tools and find information about a gem, and so on. …

Olivier Lance

Co-founder of Sylights and Digital Cuisine — Web and MacOS X developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store