If you're interested in keeping up with my writing, you can find me as germsvel on twitter or follow my RSS feed.

CSS Selectors for Tests

Testing web pages often requires targeting elements with CSS selectors. But which CSS selectors should we use? Are some better than others? I think so.

Deadlines vs Appetite

One of the concepts I found most interesting about Shape Up is the concept of appetite. Like a deadline, appetite talks about the amount of time we're going to spend on a feature or project. But the process is wonderfully reversed.

Culture is a 50-day moving average

In a recent interview, Jason Fried said that culture is a 50-day moving average of our actions. That is incredibly freeing and compelling.

Using has_element?/3 for better LiveViewTest assertions

It's tempting to write `LiveViewTest` assertions that specify too much of our HTML. But that couples our tests to the implementation specifics. There's a better way: the `has_element?/3` helper can help us be specific without adding coupling.

A minimalist LiveView testing guide

Let's apply Sandi Metz's minimalist unit testing guide to LiveView. There are so many parallels and our tests benefit from Sandi's wisdom.

Break apart your features into full-stack slices

Our communication practices can be very disrupting. Remote work has taught me to be more considerate of how I communicate with others. We should treat other people's time as we like ours to be treated.

Pay the cost up front. Don't distribute it to others.

Our communication practices can be very disrupting. Remote work has taught me to be more considerate of how I communicate with others. We should treat other people's time as we like ours to be treated.

On Quitting Vim

Vim has a reputation for being hard to quit. But it turns out there are so many ways to get out of it — it's like vim wants you to quit. Let's look at a few.

Breaking Out of Ecto Schemas

With Ecto, 🎶 you _can_ always get what you want. And if you try sometimes, well, you might find, you can _select_ want you need 🎶.

Splitting a Commit

My workflow usually involves squashing many commits into a single one. But sometimes, the workflow calls for the opposite action -- splitting a single commit into many. This is how I do it.

5 Tips for More Helpful Code Reviews

Having your code reviewed can be daunting. But it can also be very helpful. As reviewers, we can make the difference. Here are five tips to make your code reviews more helpful to the author.

Faking External Services in Tests with Adapters

When faking external services in tests, start with something simple. I like having a public interface to adapters and having an in-memory adapter for tests. Let me show you an example.

Finding the Time to Refactor

Many people ask, "How do I find time to refactor?" I think the question itself betrays a misunderstanding of refactoring. Let me tell you when I refactor.

Let's Not Misuse Refactoring

Refactoring has a specific meaning. When we misuse the word, we lose the ability to communicate an important concept. Let's revisit what refactoring is and what it is not.

Back to basics: psql

The right tool for the right job, right? Well let me introduce you to psql.

Is Elixir a scripting language?

Elixir is known for being a language made for building distributed applications that scale, are massively concurrent, and have self-healing properties. But is Elixir good enough for the mundane scripts of this world?

Long-lived processes in Elixir

Long-lived processes are everywhere in Elixir. Let’s look at why they’re needed and how to create them!

How to organize your functional code

When coming from object-oriented languages, I often hear people ask the question, “How do I organize my code? Modules are just bags of functions!”. That is a question I asked myself as well, but after using Elixir and Elm for a while, I have noticed that there is a principle of organization that I keep using and that I see in the wild. I like to think of it as the principle of attraction.

An introduction to concurrency in Elixir

Concurrency is a first-class citizen in the Elixir platform. The concurrency model is that of isolated, independent processes that share no memory and communicate via asynchronous message passing. In other words, a process can run concurrently without concern of others, and processes communicate with each other only via send-and-forget messages.

Tests as Counselors of Design

One of the benefits of tests is that they are the first piece of code that will interact with our application. As such, they can offer valuable insights into the application's complexity.

Elixir simple_one_for_one Supervisors

Supervision trees are awesome. For a while I was a bit confused as to how to use the simple_one_for_one supervision strategy. Let’s look at it step by step by creating a simple bank account from which we can deposit and withdraw money.

Tests as Tools for Understanding

When working on a feature, I often find pieces of code that I have not seen before. In order to better understand the class or method, I like to use tests as documentation and as a way to explore the code's functionality.