Cristian Álvarez
banner
crbelaus.com
Cristian Álvarez
@crbelaus.com
I write software (mainly #ElixirLang) and I do martial arts. Sometimes I blog at https://crbelaus.com/
Pinned
Over the last few months I've been in charge of deep data structure refactors on a big #ElixirLang application.
I'll write a detailed blog post with the lessons learnt, but the most important takeaway is to rely on pattern match and guards as much as possible.
Version 0.7 of the #ElixirLang Error Tracker 🐛 is out with improved LiveView support, MariaDB fixes, better sensitive header redaction and an all-new Igniter installer.

github.com/elixir-error...
Release v0.7.0 · elixir-error-tracker/error-tracker
What's Changed Igniter installer by @crbelaus in #149 Improve documentation of Error kind field by @tjarratt in #154 Require LiveView 1.0 at least by @crbelaus in #159 Require Ecto 3.13 at least b...
github.com
November 9, 2025 at 10:22 AM
Reposted by Cristian Álvarez
It's official! Igniter support is coming to the next version of #ErrorTracker 🚀. It's already merged on main and will be included in the next release @zachdaniel.dev #ElixirLang
May 11, 2025 at 6:03 PM
I got a small PR merged into Plug.
You could use Plug.RequestID multiple times with different options but it always set the same logger metadata, overriding the previous value with each call.

This is configurable now.

github.com/elixir-plug/...

#myelixirstatus #elixirlang
Customize the Logger metadata key name by crbelaus · Pull Request #1267 · elixir-plug/plug
In certain scenarios we may want to use the Plug.RequestID plug multiple times with different headers or assigns. While this is possible, the issue is that every call adds a :request_id key to the ...
github.com
April 24, 2025 at 6:48 AM
I wrote about embedding external resources in your #elixirlang application so the compiler can keep track of when they change.

crbelaus.com/2025/03/31/e...
Embedding external resources in Elixir code | Cristian Álvarez Belaustegui
If your Elixir module reads external resources during compilation you should use the @external_resources attribute so the compiler can track those resources and recompile when they change.
crbelaus.com
April 6, 2025 at 5:58 AM
My pull request has just been merged!
If you use difftastic with #elixirlang (you should! it is amazing) you will notice that changes in ~H sigils are now properly highlighted.

github.com/Wilfred/diff...
February 10, 2025 at 5:53 PM
The #elixirlang ErrorTracker has just surpassed 40k downloads.
Codebase has been slowly improving and stabilising since the initial release. We just need a logger handler and then it can be considered "done".

github.com/elixir-error...
GitHub - elixir-error-tracker/error-tracker: 🐛 An Elixir-based built-in error reporting and tracking solution
🐛 An Elixir-based built-in error reporting and tracking solution - elixir-error-tracker/error-tracker
github.com
February 10, 2025 at 9:01 AM
Other shows I enjoyed recently are: Yellowstone, The Americans and Ozark.
January 4, 2025 at 7:52 PM
Silo is amazing. Best sci-fi show I've watched lately along with Severance. Others (Fallout and The Expanse) are great but not at the same level IMHO.
January 4, 2025 at 7:48 PM
Amazing to see how well the ErrorTracker and @ash-hq.org work together 🤝
I just configured ErrorTracker (hex.pm/packages/err...) on my project that uses @ash-hq.org and found it’s super easy to restrict the error dashboard to logged in users.
If you use Ash Authentication and its Phoenix extension, you only need to pass the `on_mount` option. It just works!
#ElixirLang
December 31, 2024 at 6:42 PM
Thread worth reading for #ElixirLang devs.
ecto queries in liveviews and controllers? discuss. 🍿 #ElixirLang #phoenix #code
December 28, 2024 at 9:58 AM
For example "upcoming_events" may be such a scope that is extracted. Each LiveView or controller builds its own query based on that scope and then applies the required ordering, filtering, etc.
December 28, 2024 at 9:57 AM
This is what we do at work and so far it has worked great. We try to keep an eye on common "scopes" (as Ruby on Rails calls them) that show up in multiple queries and extract them out.
December 28, 2024 at 9:57 AM
I started using it in my day job (about 12 people in the team) and for my personal projects as well.
You can use it on any git repo without forcing others to switch (the rest of the team is using git).
December 26, 2024 at 8:11 PM
After using it daily for a few weeks I can confidently say that jj is to git what Tailwind is to CSS.

I went from "I don't think this adds any value over vanilla git" to "I don't know how I ever worked without this".
December 26, 2024 at 9:56 AM
This is the way.
December 18, 2024 at 2:57 PM
TIL that you can use github.com/michallepick... to install prebuilt Erlang versions with asdf instead of compiling them from source. Much faster and less problematic.
GitHub - michallepicki/asdf-erlang-prebuilt-macos: Erlang plugin for asdf version manager, using Erlang builds by erlef/otp_builds for macOS
Erlang plugin for asdf version manager, using Erlang builds by erlef/otp_builds for macOS - michallepicki/asdf-erlang-prebuilt-macos
github.com
December 18, 2024 at 8:16 AM
Just compiled my job codebase to #ElixirLang 1.18 rc.0 and it already found dead code (four unused function clauses which were the only callers of some other private functions) and a typing violation (min/2 comparison between two structs).
December 17, 2024 at 11:48 AM
Por el momento nada, pero le tengo muchas ganas. Todo lo que he visto es brutal, especialmente esto:
bsky.app/profile/giac...
If like me you're in the "ORM bad" camp I have the nicest Gleam library for you. With Squirrel you can stick to good old sql and it will take care of generating the needed Gleam code that is fast, type safe and just works™️
December 14, 2024 at 11:00 AM
Elixir 1.18 improves the type inference and checking and is now able to detect dead code, clauses that will never match, etc.
hexdocs.pm/elixir/1.18....

This will only get better over time. For example upcoming Elixir versions will be also able to do type inference on guards.
Changelog for Elixir v1.18 — Elixir v1.18.0-rc.0
hexdocs.pm
December 12, 2024 at 3:32 PM
This allows the compiler to understand which data structures you are using an helpfully warn you if you try to access non-existing fields.
This makes it so much easier to move fields around and rename them confidently.
December 12, 2024 at 3:32 PM
Over the last few months I've been in charge of deep data structure refactors on a big #ElixirLang application.
I'll write a detailed blog post with the lessons learnt, but the most important takeaway is to rely on pattern match and guards as much as possible.
December 12, 2024 at 3:32 PM
Just added the book to my reading list. I’ve also found the exercises and will start doing them tomorrow morning.
Thanks for the recommendation @thebrianb.bsky.social !
December 11, 2024 at 9:48 PM
Thanks! I will take a deeper look. I've been also recommended this book: www.goodreads.com/book/show/14...
Healing Back Pain: The Mind-Body Connection
“Dr. Sarno saved me from a life of pain.” — Howard Ster…
www.goodreads.com
December 10, 2024 at 10:44 AM
Good luck! (Or break a leg 😂)
We in the Elixir community are thankful for your work!
December 9, 2024 at 7:34 PM
Looks like I have to learn other things than playing the guard!
December 9, 2024 at 7:32 PM