/images/avatar.jpg

Reading List: Intro to Quakers

Start of a List

Elixir has a lot of ways to get the first thing in a list. One of the first things you learn from the basic syntax guide on the Elixir website is that hd(foo) gets the first thing in a list, and tl(foo) gets the rest. You also learn [ head | tail ] = foo.

But what happens when it’s an empty list?

iex(1)> foo = []
[]
iex(2)> hd(foo)
** (ArgumentError) argument error
    :erlang.hd([])
iex(3)> tl(foo)
** (ArgumentError) argument error
    :erlang.tl([])

Dang, Elixir is stable

On Monday, my manager asked about on-call coverage for the Elixir app I work on. There are only a handful of people in the company who know Elixir, and he was concerned that I would feel like I couldn’t take a vacation.

Him: How often do you get on-call alerts?

Me: shrug Never 😏

Him: Wait, what? Do you have them set up? Do they work? 😰

Django Admin color picker

When I add a new model to the Django app at work, I try to make sure the results in the Django admin have good usability, too. Just because it’ll be mainly developers (and a few project managers) seeing it doesn’t mean I can neglect usability. Consequently, I spend some time on hacking the Django admin. My manager says I’ve been making it do things he didn’t even realize were possible.