In this series, we'll explore the most effective ways of working with Elixir projects, examining the various tools, techniques, and processes that are available in Elixir. There are several topics to explore, and each of them has various trade-offs we'll need to navigate and discuss. Our ultimate goal is to identify specific answers and practical tools that unlock the most effective and simplest ways of working, such that the solutions can start simple and stay useful as a team and their product grows.
Table of Contents
Elixir: A Brief Overview
For those new to the language, Elixir is a dynamic, functional programming language created in 2011, with syntax inspired by Ruby. Similar to how Java uses the Java Virtual Machine, Elixir runs on the Erlang Abstract Machine (BEAM). The BEAM, originating in the mid-80s, is known for powering critical and highly fault-tolerant distributed systems at scale.
It's a very interesting language because it manages to be simultaneously easy to pick up, has a standard-library with superpowers that are just out of this world, and its community is friendly and welcoming. But this isn't the series to deep-dive into Elixir itself, as there are great resources for that already. For example:
- Official Elixir Website and Documentation: The official Elixir guide is a great starting point, with thorough documentation and great getting started guides.
- Thinking Elixir podcast: An informative and friendly podcast covering recent developments and community insights.
- The Elixir Forum: An excellent place to ask questions and engage with the community. It's known for being welcoming to newcomers.
Exploring Elixir?
Now back to exploring. This series is an open learning journey: I am myself skilling up in Elixir, so this is genuinely a dive into the unknown to explore what's possible in Elixir projects. We are very explicitly not rushing in to write Elixir application code, rather our focus will be the many details and root-decisions that surrounds the application. We'll focus in particular on the many decisions that are often made in a hurry when projects are just getting started, that can end up scaling horribly and cause all manner of irritations and slowdowns as a project grows.
Topics
2. Setting Up an Elixir Dev Environment
We need Erlang and Elixir installed, which might sound simple, but there are trade-offs to consider for a shared team environment. We'll also add a PostgreSQL database to keep our explorations relevant to real-world scenarios.
This article explores asdf, mise, Nix, and pkgx, to set up a reproducible development environment.
3. Building a Basic Elixir Web App
Today we'll change gears a bit: It's time to make a web app. We'll need a project to work on for later articles in order to explore how to work with Elixir code, and so for this article we'll dive into some of the different ways to build a web app in Elixir. Our goal will be a simple example of a web app, and ideally it should make a data database call to be representative of real-world projects. Let's see what solutions we can find.
This article explores Cowboy, Plug, Bandit, and Phoenix to set up a web app.
4. Streamlining Development Workflows
Today we'll define and implement our daily development workflows. We'll begin by identifying what makes a workflow truly effective — drawing from cutting-edge research on software delivery practices. Then we'll establish really simple mechanisms for managing code changes so we can move quickly and accurately as a team. And importantly, these workflows must be flexible enough to scale as our team and product grows. Let's dive in!
This article explores how to write shell scripts to set up effective and efficient workflows.
5. Simplifying Elixir Developer Onboarding
Onboarding can be a costly but hidden drag on a team — not just in raw setup time, but also in how easily it becomes a process full of uncertainty and fragility. How developers get started reflects the standards of care a team chooses to uphold, and we should explore how simple and safe we can make this experience.
This article explores streamlining developer onboarding via semi-automated scripting.
6. Automating Tests in Elixir Projects
How do we write fast, reliable tests in Elixir? How do we keep modules decoupled and easy to test? Testing is a broad topic with many opinions, and today we’ll explore techniques that will let us have informed discussions about how we want to test. Because good tests aren't just about passing — they’re about helping us move fast, and deploy with confidence.
In this article, we'll set up automated tests in Elixir, explore dependency injection, and compare tools like Mox, Hammox, and Double to keep tests clean and scalable.
7. Testing Shell Scripts with Bats
Automated testing is crucial for reliable software development, yet shell scripts are frequently left untested, despite managing critical tasks like deployments, database migrations, and CI pipelines. Neglecting tests here can lead to subtle bugs and fragile workflows. Today, let's make sure all our code is testable, treating shell scripts with the same discipline we apply to application code.
This article explores the Bash Automated Testing System (Bats) to properly integrate shell scripts into our codebase.
…and more articles to come as I find time to write them. If you have suggestions for topics please leave a comment.
Top comments (1)