What are Specifications and Types in Elixir?

One of the most defining characteristics of Elixir as a programming language is the fact that it is dynamic, and so all types are inferred at runtime. This is in contrast to static typed languages where the developer must explicitly declare each type upfront. Dynamic verses static typing is one of those classic arguments that […]

Continue reading...

Writing Comments and Documentation in Elixir

An important part of writing code is making it easy to understand for other developers or your future self. In a perfect world, this is achieved through clear and concise code that shows the intent of the developer. There really is no better documentation than the code itself. However, comments and documentation are a critically […]

Continue reading...

Working with Mnesia in Elixir

Last week we looked at using ETS as a storage mechanism for storing any Erlang term in an Elixir application. ETS is part of OTP and so as an Elixir developer you can automatically start using it without setting anything up. This is pretty crazy when you think about it, what other languages ship with […]

Continue reading...

What is ETS in Elixir?

If you have been around the Elixir ecosystem for a while, you have probably heard about “ETS”. ETS stands for Erlang Term Storage. It’s a storage engine that is built into OTP, and is therefore available in Elixir through the interoperability with Erlang. ETS is a key / value store, and so you can think […]

Continue reading...

The Little Elixir & OTP Guidebook [Review]

The Little Elixir & OTP Guidebook is an introduction to Elixir and OTP that focuses more on the OTP side of things in contrast to Programming Elixir and Elixir in Action. Whilst it does provide an introductory section on Elixir and the syntax, the real heart of the book is focused on OTP. The book […]

Continue reading...

Building a Casino in Elixir

Over the last couple of weeks we’ve covered many of the fascinating aspects of Elixir, Erlang, and OTP that allow us to build highly available, fault tolerant applications. First we looked at using Agents as a way to store state in server processes. Next we looked at understanding GenServer and how we can use the […]

Continue reading...

Elixir in Action [Review]

Despite being a relatively young language, Elixir already has a wealth of learning resources available including tutorials, screencasts, and books. A while ago we looked at Programming Elixir, which serves as an excellent introduction to the language. Written by Dave Thomas, Programming Elixir is probably one of the best ways you can get your feet […]

Continue reading...

Working with Supervisors in Elixir

Last week we looked at organising Elixir projects using Mix. Mix is a build tool for creating, compiling, and testing your Elixir projects. In Elixir, an “application” is a set of modules that can be started and stopped as a single unit. One of the most important characteristics of Elixir and Erlang is it’s fault […]

Continue reading...

Organising your Elixir project with Mix

We have already covered a lot of ground so far in this exploration of Elixir, but in just about every example we’ve been running our Elixir code either in iex or from a single file. This is fine for getting to grips with the language and for very simple examples, but we’re going to need […]

Continue reading...

Understanding GenServer in Elixir

Over the last couple of weeks we have started to explore probably the most interesting aspect of working with Elixir (and Erlang) in that applications are built around this idea of small, isolated processes. First we looked at Understanding Concurrency and Parallelism in Elixir and how we can run our code in isolation and make […]

Continue reading...