elixir

28 Articles
A wizard riding a phoenix into the blue skies.

A Bluesky Starter Guide for Elixir Devs

Join the Elixir community on Bluesky. Learn account setup, find peers, and smoothly transition from X. Key steps for efficient migration.

A phoenix mocking a wizard in his library.

Easy Mocking in Elixir

Quick, dependency-free mocking in Elixir tests. Learn how to configure your mock once and use it everywhere. Simple and effective for all test suites.

A wizard sitting on a comfy couch chair while reading a Saga from a book to a Phoenix.

The Saga Pattern in Elixir

Explore the Saga pattern in Elixir for managing complex, multi-step processes. Learn about choreography and orchestration approaches, with code examples for implementing long-lived transactions.

A phoenix rising from its ashes.

Resurrect your Phoenix Context

A retraction: I changed my mind about Phoenix contexts. Here's how I structure my Elixir code with a simpler, more effective design in the true functional way.

An image of a vibrant phoenix positioned behind the planet Earth, hurling files at different regions on the globe. Each file has a streak behind it, and explosions are shown where the files hit the globe.

Distribute your Files Globally with Tigris and Fly.io

Serve your files quickly to users all around the globe with just a small configuration change using Tigris' globally distributed S3-compatible storage solution.

a wizard's apprentice opening a drawer at the top of a wizard's tower, forest landscape in the background, digital art

Animate a Side Drawer with LiveView.JS

LiveView.JS is great for client-side animations because no round-trip to the server is needed. Here's how you can use JS to animate a side drawer.

a young wizard apprentice looking at a book with a magnifying glass in an old library, digital art

Unaccented Name Search with Postgres and Ecto

Postgres does not support searching for names with special characters by default. Here is how to fix it.

a wizard stealing a secret book from the lair of a phoenix, digital art

How malicious libraries can steal all your application secrets

Adding libraries is a massive security risk. They gain FULL access to your configuration, database, and file-system. Here's how they could steal them and how to protect yourself.

an old wizard holding up a VCR videocassette into the camera standing in his chemical laboratory, digital art

Announcing my new Video Course!

My first video course "Build an MVP with Elixir" helps you to get started with Elixir by building a real-world product together!

an old wizard listening through a door, digital art

Listen to Database Changes with Postgres Triggers and Elixir

Postgres Notifications allow you to subscribe to any changes in your database, even if they weren't made by your Elixir application! Let's learn how to set them up!

an old map with marked countries and their flags lying on a wooden table, old wizard hunching over the map, digital art

Build dynamic Forms with JSON Schemas

Define custom forms without writing a single line of HTML. JSON Schemas help you define and adjust forms and validate user input all through a single configuration file.

A phoenix rising from a computer screen

Build a Roles and Permissions System for Phoenix - Part 2

Learn how to prevent PII leaks from your Ecto queries by adding query restrictions to your Roles and Permissions system.

A phoenix rising from a computer screen

Build a Roles and Permissions System for Phoenix - Part 1

Learn how to control access to your system by assigning granular roles and permissions to your users.

A developer holding a mug of coffee with shaky hands staring at a computer

Simulate Latency, Jitter, and Package Loss in Phoenix LiveView

Learn how to make your LiveView app more resilient by simulating bad internet connections.

A librarian frantically searching through a catalog of books

The Complete Guide to Full-text Search with Postgres and Ecto

A detailed deep-dive into efficient full-text search for multiple languages, result ranking, tsvectors and tsqueries, search modifiers, and so much more.

A librarian searching through a thick book

Efficient Name Search with Postgres and Ecto

Search through millions of strings efficiently using indexed ILIKE or SIMILARITY queries.

Two clock with frustrated faces pointing a finger at each other

Prevent overlapping time ranges with Ecto and Postgres

Block overlapping appointments efficiently in your database using exclusion constraints and don't worry about double-bookings ever again!

A panda reserving a sunbed at a pool by laying down a towel

Optimize Ecto's insert_all with Placeholders

Write more efficient bulk insert queries and avoid sending duplicate data by using placeholders.

A panda carrying a pile of books through a dusty library

The complete guide to Upserts with Ecto

Implement insert-or-update functionality for your schemas directly with Ecto's on_conflict option.

A panda packing his suitcase in a hotel room

Organize your tests with context tags

Clean up your test configuration and highlight test specifics with dedicated tags.

a wizard filling an elixir into a bottle in a dusty laboratory

Import a CSV into Postgres using Elixir

Learn how to dump and analyze large amounts of data from a CSV file into Postgres quickly.

two wizards looking at a whiteboard in a modern laboratory

Simulating Conway's Game of Life with 100.000 Erlang Processes

Learn about how to tweak the performance of 100.000 Erlang processes and why Elixir isn't really that slow.

a numbat writing a book

Set up Livebook on your Raspberry Pi with Nerves

Write and test code directly on your Raspberry Pi with Livebook.

a numbat calling another numbat through an old rotate phone

Sending text messages from a Raspberry Pi with Nerves

Send a text message using the Waveshare GSM/GPS/GNSS Hat on a Raspberry Pi and Nerves.

a phoenix showing his id card to a security person at a club

How to implement U2F Authentication with Phoenix LiveView

Arguably, the strongest multi-factor authentication method is U2F. Here is how to integrate it with your Phoenix LiveView application.

a phoenix flying against a purple hot air balloon

How to deploy a Phoenix project with Fly.io

Fly.io allows you to quickly deploy a Phoenix application in different regions in the world. Here is how to get started.

Bridge the Gap - Bring your Software to life with Elixir and Nerves

Writing code is fun, but nothing tops seeing your code moving things in the real world. That’s why I tested out the Nerves library.

State Management with Phoenix LiveView and LiveEx

Writing code is fun, but nothing tops seeing your code moving things in the real world. That’s why I tested out the Nerves library.