Error Handling in Elixir Libraries

There was an interesting discussion yesterday on the Elixir Slack about how libraries should handle errors. This is a more thought-through and elaborate expression on my views on the matter. In the post, I’ll present an idealised version of how I think a public API for functions that may produce errors should look like.

»

Serving Encoded JSON With Poison

When building JSON APIs you often find yourself in a situation when you have part of the JSON already encoded and want to embed it in a bigger structure. A common solution is to decode the encoded part and embed the outer structure just to encode it back again. It’s obvious how that back-and-forth decoding and encoding is wasteful. Fortunately with poison we have a much better alternative.

»

Understanding Lists

Lists are a basic data structure in functional languages, but they are also quite confusing for people accustomed to dealing with mutable arrays in imperative languages. The two things: arrays and lists are used in similar situations, they are however more different than it may seem. I’d like to address that explaining how lists work and implementing couple of functions form Enum module ourselves.

»

Parallel Downloads in Elixir

I was working on a project where I needed to download Gravatars of all contributors to a given git repository. But, there can be a lot of them, so doing this in parallel may be a good idea. Oh, I know a language that is good at concurrency! Let’s use Elixir for this.

»

Creating Ecto Adapters

As I wrote last week, this summer I’m working on bringing the power of NoSQL to Ecto. This week I’d like to share with you what I learned about Ecto adapters alongside some tips on how to implement Ecto adapters for new databases.

»

Elixir and Google Summer of Code

It’s already over a month I’ve been working on my Google Summer of Code project - providing Ecto with NoSQL adapters. Before my work began we decided together with José Valim - my mentor and creator of the Elixir programming language - to start with MongoDB. There were couple of reasons, among them the fact that it’s one of the most popular NoSQL databases, and it seemed that even though it’s not a SQL database the semantics are not that distant.

»