On Elixir Metaprogramming

Metaprogramming is a scary word: it sounds like voodoo for programmers, and in some manners it is. It is used by most popular Elixir libraries and as I leveled up as an Elixir programmer, I needed to understand how it worked under the hood.

https://www.christianblavier.com/on-elixir-metaprogramming/

Why, when and how to optimize your recursion

Sometimes you have to recursively iterate over a possibly too large set of data. Find out how to protect yourself from running out of memory.

https://www.elvismelkic.com/recursion-optimization/

LiveJoy with Phoenix LiveView

A basic “no JS added” REPL for the Joy programming language built with Phoenix LiveView

https://dev.to/palm86/livejoy-with-phoenix-liveview-3cb1

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.

How Elixir helped to break the code challenge puzzle?

https://medium.com/blackode/how-elixir-helped-to-break-the-code-challenge-puzzle-88654d843878?source=friends_link&sk=4f38fa4d10eeb2e22e919a417d0d2227

Using Ecto.Sandbox with frontend testing frameworks

An in-development cookbook of recipes on how to use the ecto sandbox in e2e tests with various frontend frameworks, where the frontend is a separate repository. Currently has recipes for

Vue with Cypress React with Testcafe Angular with Protractor Ember with ember-qunit

https://github.com/bego-talks/e2e-recipes

Announcing AppSignal for Elixir 2.0

We’re now saving you more time by making the installation process smoother, instrumenting Ecto out of the box, and giving you better insights by specifying more errors.

https://blog.appsignal.com/2020/11/17/announcing-appsignal-for-elixir-integration-2-0.html

ThinkingElixir 022: Running migrations in production with Patryk Bąk

In episode 22 of Thinking Elixir, we talk with Patryk Bąk about running migrations in production. For production systems where downtime or service interruptions are a problem, we sometimes need to take special care when migrating data structures or the data itself. Patryk shares some valuable tips and techniques along with examples of when to use them. We chime in with war stories, our own tips, and mistakes we’ve made. A great resource when migrating data in your own systems. Check it out!

Podcast Episode

My Perspective on Protocols in Elixir

Elixir protocols are a powerful mechanism for achieving polymorphism. But with great power comes (you’ve guessed it) great responsibility. I want to share my perspective on this as I’ve seen many useful and very complex protocol implementations in this post:

https://timmo.immo/blog/protocols-beware

Announcing Muzak and Muzak Pro

Muzak is a mutation testing library for Elixir applications, and Muzak Pro is the full-featured version of Muzak designed for business use. You can find more information about Muzak and Muzak Pro in this announcement post: https://devonestes.com/announcing_muzak

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.

Wrote a little helper to use SvgSprites in Phoenix projects.

Published my first contribution to the Elixir community. A small helper to embed SVG Sprites in a convenient way inside templates in a Phoenix project.

https://hex.pm/packages/svg_sprite

Shopping Cart Product Variations

New episode on handling multiple product variations in a shopping cart app.

https://elixircasts.io/shopping-cart-product-variations

Stubs or mocks? Or Mox?

I am working on a project that needs a lot of mocking in the testing department. Here is 100% straightforward introduction to Mox.

ThinkingElixir 021: Tailwind CSS, Alpine.js and LiveView with Patrick Thompson

In episode 21 of Thinking Elixir, we talk with Patrick Thompson about the PETAL stack. The combination of Phoenix, Elixir, Tailwind CSS, Alpine.js and LiveView! Patrick and David help me understand why people are excited about Tailwind CSS, how it works nicely with Alpine.js. Add LiveView to it and I’m sold! Very beneficial and productive stack. Patrick shares his insight and a ton of great resources. Check it out!

Podcast Episode

Optimizing for Free Hosting - Elixir Deployments

This is a guide to launching a Phoenix web app on a free-forever Google Cloud Platform instance, with single-command zero-downtime deploys, using Elixir releases, without hot code reloading.

https://damonvjanis.medium.com/optimizing-for-free-hosting-elixir-deployments-6bfc119a1f44

Understanding Associations in Elixir's Ecto

Data modeling in Ecto takes a bit of getting used to. The goal of this post is to give a short but definitive answer to this problem.

https://blog.appsignal.com/2020/11/10/understanding-associations-in-elixir-ecto.html

Messenger App Tutorial with Phoenix LiveView (Updated)

In this tutorial series, freshly updated to include the latest Phoenix LiveView version, Michal explains how to build an instant messaging app with Phoenix LiveView, with live-updated conversations, push notifications and connection failure handling. https://curiosum.dev/blog/elixir-phoenix-liveview-messenger-part-1

Low Hanging Fruits in Frontend Performance Optimization

https://pawelurbanek.com/frontend-performance-optimization

In this blog post, I describe the often-overlooked techniques that can significantly improve your web app’s overall performance.

These tips apply to all the web technologies like Ruby on Rails, NodeJS, Python Django, or Elixir Phoenix. It does not matter if you render an HTML or serve an API consumed by the JavaScript SPA framework. It all comes down to transferring bytes over the HTTP protocol. Frontend performance optimization is all about making this process as efficient as possible.

A Blog and a Website hosted fro $5/m

I built a new blog and a website and I am hosting it on a $5/m droplet. I decided to blog about the process https://andrewbarr.io/posts/website-and-blog-5-dolllars-a-month-p1

10th video in the series about building cryptocurrency trading bot in Elixir

10th video in the series about building cryptocurrency trading bot in Elixir - this time we will fine-tune trading strategy per symbol

we will move hardcoded settings from the leader to the database. We will look into the reasons why we should introduce a new database for the naive app instead of using the datawarehouse application’s database. Lastly, we will update the leader to fetch settings from the database.

Link: https://www.youtube.com/watch?v=45x8ctriYRs&list=PLxsE19GnjC5Nv1CbeKOiS5YqGqw35aZFJ&index=10

Swoosh 1.1 Recipient Protocol

The Recipient Protocol enables you to easily make your structs compatible with Swoosh functions.

defmodule MyUser do
  @derive {Swoosh.Email.Recipient, name: :name, address: :email}
  defstruct [:name, :email, :other_props]
end

Now you can directly pass %MyUser{} to from, to, cc, bcc, etc. See Swoosh.Email.Recipient for more details.

https://hexdocs.pm/swoosh/Swoosh.Email.Recipient.html