Elixir learnings - 2020 week 1
I'd like to reflect on what I've learned this week. There aren't any specific concepts that are of focus, this is essentially the net of what I googled throughout the week.
I'd like to reflect on what I've learned this week. There aren't any specific concepts that are of focus, this is essentially the net of what I googled throughout the week.
I learned that iex isn't technically a true REPL [5][iexrepl].
I also got to take a deeper foray into application logging. I've be…
Interestingly you can't use @doc macro for private functions. I understand the argument that documentation shouldn't be ge…
Self proclaimed as
The premier destination for learning and mastering Elixir
I've recently played with [Elixir school][elixir-schoo…
Something small, but I realized that you can pass in a default to Map.get in case the key you're looking for doesn't exist.
I also discovered…
export ERL_AFLAGS="-kernel shell_history enabled"
Found that [this][graphql-project-structure] was a …

I've been working on a personal project in my spare time and I've been focusing on writing unit and integration tests. I've probably spent more time writing tests than I have wri…
I've worked in systems where you can specify different groups of test. For example the last place I worked allowed you to mark a test aro…

This guide assumes that you're already running a Gigalixir application and have set up the necessary environment variables in Gigalixir…
Drop into a remote console
gigalixir ps:remote_console
Tear down the database and re-seed it.
# Migrate down Ecto.Migrator.run(MyApp…
config.exs is executed at compile time. Any calls to System.get_env/1 will be executed in your build environm…
This week's post is going to be pretty light on original content. Here's a digest of some informative links I read this week.
I was su…
Ecto has quite a few different ways to preload entities. I always find myself forgetting each of the different ways, so I'm just going to post each approach in h…
Sometimes when you're using IO.inspect/2 to debug values, your output can be a bit overwhelming. To make things
easier to read, you can pass IO.inspect/2 a label option.
Inte…

While at work I was reading through the exq library I stumbled upon an issue that discussed the perils of running a Superviso…
Below are a few references that I thought were good discussions around how to achieve DI in Elixir.
It is not that we have a short space of time, but that we waste much of it. Life is long enough, and it has been given in sufficiently ge…
Defining the following ensures that even after system restart your service is restarted
# /lib/systemd/system/torrent_top_10.service
[Unit]
Description=Run top 10 torren…
Many years ago I was told by a very wise man "Mind Ok, Everything Ok". It is so true. I have encountered poor, sick people who are happy, and rich…
The golden rule is: always load data on mount. But if you add live navigation with
live_patch, the data that can be changed on-the-fly must be now…
For a personal project I have some generators for live views. They handle most of the boilerplate of starting a live view based feature and create components, as well as their concomitant test files. …
While working through some of the ex_twilio documentation, I couldn't find any specific examples of how to respond to incoming…
Since the release of Phoenix LiveView 0.18.0 this post is no longer relevant. The remainder of this post is left h…
If you're using Alpine as part of your stack, you'll most likely have run into this one.
# ... def some_component(assigns) do ~H""" <div…
Here's the associated git repo. This is here primarily for seo and simplicity.
{ "version": "2.0.0", "tasks": [ { …
Even when an idea seems obvious, it can be useful to put a label or name to it. That is, once you explicitly identify something, it becomes easier to reason about or remember if you create a simple fa…

When modifying form values in Phoenix LiveView, it is possible to modify the value of all form fields that are not in focus on the client side from the server side. It is not possi…