Decomposing domain models based on lifecycles

How can you decompose big domain models into nice modular design? I wrote a blog post (with examples in Elixir!) describing one of the possible techniques.

Step by Step Guide to Improving Cohesion in Elixir

I had the pleasure of using Elixir on a recent project. So I wrote an article on a helpful technique that I used to increase the Cohesion of my code. Please check it out!

How to migrate live production data

Migrating live data is risky. Let’s analyze how to do that safely.

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

Phoenix LiveView and PubSub

In this episode of ElixirCasts we’ll send events from a Phoenix LiveView JS Hook and broadcast them using Phoenix PubSub to update all subscribed clients in real-time.

Best Practices for Background Jobs in Elixir

Learn how to avoid some common mistakes while working with background jobs in Elixir.

Introducing Lean Server, HTTP Server in Gleam

Explanation of why I built, another, webserver. As well as the goals of this new server in Gleam.

Adding pagination with live_patch for my site using Dissolver

In this blog post, I show a lib that I’m currently developing called Dissolver.

Dissolver is a fork of Kerosene which is an Offset based paginator and in this post, I show how I use it along with a custom theme to integrate with LiveView and live_patch.

In addition, I show how you can use Dissolver to build out Ecto Queries so that you can paginate on a preload association like for example a tag of a post.

Simple Phoenix LiveView App: The Podcast Listing Page

Part 11 of the Simple Phoenix LiveView App series

This episode is just a quick refactor and restyling of the podcast listing page. It creates show note excerpts for it, play buttons for the audio and removes a lot of unneeded clutter.

5 top-tier companies that use Elixir

What connects Pepsi, Spotify, and Discord? They all use Elixir in their tech stack. Learn why in Curiosum latest article - 5 top-tier companies that use Elixir

Shameless plug: Check out @elixirstatus' other community project:

Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

Incident 0.4.1 released for Event Sourcing and CQRS

Just published Incident version 0.4.1 for Event Sourcing and CQRS, check it out #myelixirstatus

Implementing a custom ExUnit assert to test PDF output

I went on and implemented my custom ExUnit assert to visually vet PDF output.

Simple Phoenix LiveView App: Markdown show notes

Part 10 of the Simple Phoenix LiveView App series

It covers setting up an enhanced version of Markdown for editing show notes, and sanitize user-entered content.

Announced the Domo library's first release during the lightning talk at the ElixirConf EU Virtual

The library is to model a business domain with type-safe structs and composable tagged tuples.

Now a new valid way to have type-safe structs at the runtime is available:

defmodule Order do
  use Domo

  typedstruct do
    field :id, integer
    field :item, String.t(), default: "mixed fruits"
    field :quantity, float

  # the new!/1 constructor function is generated automatically
iex(1)>!(id: "twenty one", quantity: 20)
** (ArgumentError) Can't construct %Order{...} with new!([id: "twenty one", quantity: 20])
    Unexpected value type for the field :id. The value "twenty one" doesn't match the integer type.
    Unexpected value type for the field :quantity. The value 20 doesn't match the float type.

iex(2)>!(%{id: 125, item: "banana", quantity: 20.5})      
%Order{id: 125, item: "banana", quantity: 20.5}

It was awesome!

Please, give it a try, and star on the GitHub if you like it or hate it 😀

How to use Elixir LS with Vim

I’ve updated my article “How to use Elixir LS with Vim” to reflect the recent updates to Elixir LS and ALE.

The beauty of recursion and pattern matching in functional programming languages

…or how to write full-featured functions with ZERO INSTRUCTIONS about HOW it should work!

Elixir Wizards S4E5 Dave Thomas on Learning How Things Work

Latest episode of Elixir Wizards is out today! Check it out here:

Create mocks of erlang modules with elixir_mock v0.2.9

Version 0.2.9 of the elixir_mock library now allows you to create mocks from erlang modules like :erlang and :inet.

test "should create simple mocks from erlang modules" do
    mock = mock_of :erlang
    assert mock.self() == nil

test "should create custom mocks from erlang modules" do
    with_mock(mock) = defmock_of :inet do
      def ip(_), do: :fake_ip
    assert mock.ip(nil) == :fake_ip

`Blocked` released! Keep track of when hotfixes can be removed

Blocked is an Elixir-library that helps you to keep track of when hotfixes can be removed by showing compile-time warnings when issues (in your project repository or any other source-code GitHub repository) are closed. versionBuild StatusDocumentation

Blocked was made to improve the quality of your project’s code over time: It automates away the human task of checking whether certain hot-fixes, ‘temporary patches’ or ‘duct-tape code’ are still required. This makes it less scary to add a temporary workaround to your codebase, because you’ll know the minute it is no longer necessary!

Basic features:

  • Runs at compile-time as a macro.
  • Prints a compile-time warning any time an issue is closed that a piece of your code was waiting for.
  • Works for your own project issues as well as for issues of any other GitHub-hosted repository.
  • Allows specifying both ‘hotfix’ and optionally a ‘desired’ code block, to make it clear to future readers of your code what can be changed once the related issue is closed.
  • Configurable to work on private repositories as well.
  • By default performs only checking in Continuous Integration, to keep local compilation fast.

Simple usage example

defmodule Example do
  require Blocked

  def main do
    IO.puts("Hello, world!")"#42", "This code can be removed when the issue is closed") do
    # The reason is optional"#69") do
    # It is possible to indicate
    # the desired 'ideal' code as well, by passing an `else` block:"#1337") do
    # If the blockage is more general, you can also leave out the `do` block."#65535", "This whole module can be rewritten once we're on the new Elixir version!")
    # Blocked supports many ways of referring to an issue"#13")"elixir#13")"elixir/13")"elixir-lang/elixir#13")"elixir-lang/elixir/13")"")

Find it on GitHub and talk about it on the Elixir Forum! :-)

ThinkingElixir 001: News and Meet the Hosts

First episode of the Thinking Elixir Podcast! We cover recent community news and introduce the hosts. We discuss pattern matching, immutability, supervision trees, and concurrency as things that captured our attention when coming to Elixir. Mark Ericksen was a long time host of the Elixir Mix podcast and launched a new show. Check it out!

Podcast Episode

Correios CEP 0.6.0 released! Remove zipcode field and update HTTPoison.

Correios CEP allows to find Brazilian addresses by postal code, directly from Correios API. No HTML parsers.


Correios.CEP.Address.zipcode was removed in the version 0.6.0. Use Correios.CEP.Address.postal_code instead.

Changelog for version 0.6.0:


  • Update HTTPoison to 1.17.0 (hackeny 1.16.0)


  • The field zipcode in Correios.CEP.Address. Use the field postal_code instead.


  • Support for OTP 20.

Check it out at: