Posts in English

XSS vulnerability on Simple Form

There is a XSS vulnerability on Simple Form’s error options. Versions affected: >= 2.0.0 Not affected: < 2.0.0 Fixed versions: 3.1.0, 3.0.3, 2.1.2 Impact When Simple Form renders an error message it marks the text as being HTML safe, even though it may contain HTML tags. In applications where the error message can be provided … »

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 … »

Playing with Elixir and Go concurrency models

In Go Concurrency Patterns talk, Google I/O 2012, presenter Rob Pike demos some great concurrency features from Go, like channels and Go routines, and how it can be used to build fast, replicated and robust software. Concurrency patterns is a very interesting topic but there was one statement in special that got me thinking: “The … »

The brand new Plataformatec blog

Today we are shipping a whole new design to improve your navigation and reading experience on our blog! Back in 2012 we rolled out our new visual identity and website, but we didn’t change our blog much at the time. So we decided that it was time to give some love to our blog and … »

Writing assertive code with Elixir

Functional languages are typically great languages for writing assertive code and Elixir is no exception. In this blog post, I would like to discuss some anti-patterns I have seen in Elixir code and how to rewrite them in a way to make the best of Elixir. Pattern matching Imagine you have a string with format … »