Posts by Fabio Yamate

Converting Erlang code into Elixir

When you are new to any language, you probably want to run some existing code just to see how it works. Achieving success while trying new things is important, because it helps fueling your interest. The number of code examples in Elixir is increasing, but sometimes you will have to read some Erlang code. Recently, … »

How to serialize Date and DateTime to JSON without losing information

When building APIs, it is pretty common to use JSON as a serialization format. JSON defines serialization for boolean, number and string, but not for date/datetime values. What most serializers do with Date and DateTime values is to use the ISO8601 standard. For example: # Date format 2011-07-14 # DateTime format 2011-07-14T19:43:37+0100 However, you should … »

Splitting long CSS files to overcome IE9 4095 rules limit

CSS preprocessors like SASS and LESS improved the way we write CSS nowadays. It provides better ways to organize styles into files, that can represent a component or page, and then compile into a single file, following the idea of reducing HTTP requests. Also there are other features like variables, mixins and placeholders that help … »

Recurring events

We have been working in a project which deals with date events and we needed a recurrence feature in the application. An initial implementation could simply work with Rails ActiveSupport and use its Date helper methods, in order to shift by day, week, month and others. >> => Thu, 15 Apr 2010 >> … »