Elixir/OTP Supervision

I’ve gotten questions over time about process supervision in Elixir. There’s a lack of clarity for some developers. This is especially true for companies that adopt Elixir. There are probably a few people (if you’re lucky) who know Elixir to some level. But the majority of developers that are onboarded will not know anything about the language.

Read More

Debugging Elixir in Production

Assuming you are making good use of Logging and generating metrics you may still encounter problems in an Elixir allocation that requires more than that in order to understand what is going on and address the problem.

Read More

Elixir, Parameter Validation with Ecto

Elixir is a language that first appeared in 2012. There is a web framework called Phoenix that is what is primarily used to develop web-based software in Elixir. The Ecto library is used in Elixir to interact with relational databases. However, Ecto can also be used to validate parameters passed to API endpoints. This is a quick example to help you understand how this is done. It assumes you are already at least somewhat familiar with Elixir and the Phoenix framework. The example is just that, an example. It’s not complete. It’s not meant to be an example of production-level code. You can think of this as an intro and getting started type of thing. It’s got enough complexity to get you past some initial hurdles.

Read More

Four Thousand Weeks

Notes on the book “Four Thousand Weeks: Time Management for Mortals” by Oliver Burkeman. I enjoyed the book. I think it’s worth reading. It’s not your typical time management book (such as Getting Things Done). It’s not focused on making you more efficient at getting through your day. It wants the reader to think about what it is that they actually want to accomplish in the limited lifetime that each of us is gifted.

Read More

Elixir, Programming Puzzles and Sorting Arrays

There are a number of programming puzzle sites that are worthwhile tools for learning a language, brushing up on your skills or just exploring how other people might solve problems differently than you. I think this is all good. I’ve found it especially helpful in learning a new language. One of the interesting things about trying to solve some of these puzzles with a language like Elixir is that you have to work through the problem in a different way then you would in a language like “C” or Java. Arrays and sorting are common problems where you’d index into an Array with those languages but you want to avoid that in Elixir since you’re dealing with Lists and iterating into a List gets expensive. Here’s an example of a problem where I solved it a different way.

Read More