• What is Ruby String.length time complexity?

    I’ve been asking myself this question: is Ruby String.length like C strlen which is O(n)? In order to find it I’ve decided to dive into the Ruby MRI source code (which is written in C).

  • Abstracting SQL union with ActiveRecord

    Sometimes you might need to use SQL UNION in your application, in this article we explan you how to abstract SQL union creation within ActiveRecord.

  • Different caching strategies for Rails.cache and ActionController::Caching

    If you need to use different caching strategies for your Rails.cache and your ActionController::Cache (used for fragment caching) just put the following in your config/environments/env.rb file:

  • Thinner Rails Model with the Finder Pattern

    Hello everybody, today I want to share with you a pattern learned from gitlab: the finder pattern.

  • Javascript multiple inheritance with ES5 and AngularJs

    In this article I’ll show you how you can use multiple inheritance(trait) with Javascript EcmaScript 5 and AngularJS 1.0. AngularJS offer you a method: angular.extend that allow you to extend any object with the values and methods of other objects. In this article I show you how you can create a Dog. Dog is an animal but is also a mammal, for this reason a Dog needs to extend animal and also Mammal classes. Below is the code to create a Dog:

subscribe via RSS