-
Testing your README.md
Posted on December 11, 2021I’ve wanted a good way to test READMEs in elixir. I started building something myself before my good friend Wojtek pointed out that there was a simple solution.
-
Good and Bad Elixir
Posted on June 2, 2021I’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.
-
Using Regulator
Posted on February 26, 2021I 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.
-
Telemetry Conventions
Posted on July 20, 2020I’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.
-
Reusable Elixir Libraries
Posted on February 8, 2020One 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.
-
Open Source is Not About You
Posted on January 18, 2020Rich 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:
-
Going back to RSS
Posted on January 17, 2020In 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.
-
Runtime Configuration in Elixir Apps
Posted on January 9, 2020I 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.
-
The dangers of the Single Global Process
Posted on August 12, 2019There 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.
-
Soft deletion with Ecto
Posted on January 10, 2019A 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.
-
Wallaby needs a new maintainer
Posted on August 10, 2018I don't have time to dedicate to Wallaby and I'm looking for someone to take over as the maintainer.
-
Setting the Isolation Level in Ecto Transactions
Posted on April 23, 2018Even in ACID databases you occasionally need to use stronger isolation guarantees.
-
Using dry-monad
Posted on March 19, 2018I 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.
-
Using Functions in Elixir Guard Clauses
Posted on April 9, 2016Elixir, 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.
-
Concurrent Feature Testing with Wallaby
Posted on April 7, 2016This post was originally written for the Carbon Five blog. I’m cross-posting it here for posterity.
-
Phoenix: The difference between web and lib
Posted on January 14, 2016In Phoenix we have 2 distinct places to put our code: the
web
directory and thelib
directory. If you’re coming from another framework like Rails then it might be tempting to think ofweb
as yourapp
directory andlib
as a junk drawer of miscellaneous modules and tasks. -
Building an Atreus
Posted on May 31, 2015I’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.
-
Escaping atom vim mode with kj
Posted on May 24, 2015 -
Flashing Raspberry Pi on Mac
Posted on April 13, 2015I just got a Raspberry Pi 2 for me and my daughter to hack around on.
-
DAS Keyboard keycap placement
Posted on March 24, 2015Through 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.
-
DateTime.parse is not a validater
Posted on June 25, 2013I 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.