Posted on June 2, 2021
I’ve seen a lot of elixir at this point, both good and bad. Through all of that code, I’ve seen similar patterns that tend to lead to worse code. So I thought I would document some of them as well as better alternatives to these patterns.
Posted on February 26, 2021
I originally wrote this for the backend engineers at Bleacher Report. I thought that it might be useful to others to repost it here. I’ve obfuscated the names of the specific services but otherwise left it as is.
Posted on July 20, 2020
I’m a big fan of telemetry. It’s arguably the most important elixir project released in the past few years. Most of the mainstream libraries have started to adopt it, and that’s a good thing. But, there’s still a lot of inconsistency in how telemetry is used across projects. I thought it would be good to write up some of the conventions that I’ve been using.
Posted on February 8, 2020
One of my new goals is to try to make my elixir libraries more reusable. It’s an easy mark to hit if you only use modules and functions. But once you start adding processes, ETS tables, and other stateful constructs, the solutions get murky.
Posted on January 18, 2020
Rich Hickey posted this gist back in 2018 about the entitlement of people who use open-source software. I’m not going to re-iterate his points and instead suggest that you give it a read. But, I’ll leave you with one of my favorite quotes:
Posted on January 17, 2020
In the middle of 2019, I rediscovered RSS. I see you rolling your eyes; how could you possibly forget about RSS? I suppose I’d just gotten lazy. I’d allowed Twitter or some crappy news aggregator to dictate what I was reading. But, considering how I could become a more discerning consumer, it occurred to me that RSS hadn’t gone anywhere, and I should start using it again.
Posted on January 9, 2020
I gave a talk last year about how to properly boot elixir applications. In the talk, I showed how to load configuration values into an ETS table on boot, and this was the same pattern that I used initially in Vapor. I now think that this is a bad idea.
Posted on August 12, 2019
There are a few things in the Elixir/Erlang ecosystem that I consider required reading. To spawn, or not to spawn? by Saša Jurić is definitely one of them. If you haven’t read it, you need to. It’ll change the way you think about building elixir applications.
Posted on January 10, 2019
A common need in web applications is to “undo” a deletion event. This is referred to as a soft-deletion. The record still exists but its hidden from the user. Soft deleting allows the user to restore that data in the event that they need it in the future.
Posted on August 10, 2018
I don't have time to dedicate to Wallaby and I'm looking for someone to take over as the maintainer.
Posted on April 23, 2018
Even in ACID databases you occasionally need to use stronger isolation guarantees.
Posted on March 19, 2018
I originally wrote this as a getting started guide for other engineers at the company I was working at. I’m posting it here for archival purposes.
Posted on April 9, 2016
Elixir, like other pattern matched languages, supports guard clauses. Inside a guard we can use a set of Kernel functions and other predicates. Using any other function in a guard clause results in an error. Here’s an example to show what I mean.
Posted on April 7, 2016
This post was originally written for the Carbon Five blog. I’m cross-posting it here for posterity.
Posted on January 14, 2016
In Phoenix we have 2 distinct places to put our code: the
webdirectory and the
libdirectory. If you’re coming from another framework like Rails then it might be tempting to think of
libas a junk drawer of miscellaneous modules and tasks.
Posted on May 31, 2015
I’ve always been obsessed with keyboards. The first large purchase I made when I had a “real job” was a matte black Das Keyboard Ultimate with MX Cherry Blue switches. That keyboard has been with me for years now and its served me well.
- Posted on May 24, 2015
Posted on April 13, 2015
I just got a Raspberry Pi 2 for me and my daughter to hack around on.
Posted on March 24, 2015
Through a series of unlikely events the keycaps on my Das Keyboard became removed and re-placed in incorrect positions. Luckily I found this helpful chart that shows all of the cap positions.
Posted on June 25, 2013
I am prototyping a rails API at work and one of my routes accepts a datetime parameter. I assumed that I would be able to just use DateTime.parse and that would take care of any sanitization of the parameters.