Elixir Wizards S5E1 Launchisode and Outlaws Takeover with Chris Keathley, Amos King, and Anna Neyzberg
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s5e1-launchisode-outlaws-takeover/
Wisps - A touch of whimsy
It is entirely too easy to make simple stateful backends for delightful little things with Elixir and Phoenix. My latest one brings a bit of magic to my site: https://underjord.io/wisps-a-touch-of-whimsy.html
Bonus credit to Sasa Juric for removing the suck from SSL with site_encrypt.
Choosing Elixir version manager
Famous <a href=”https://nts.strzibny.name/elixir-version-manager/“>Elixir version managers</a> and how they differ.
Advent of Code Elixir Starter
https://github.com/mhanberg/advent-of-code-elixir-starter
This is the Elixir scaffolding I use when completing the advent of code challenges. It comes complete with:
- Modules and tests for each problem
- Mix task to run each problem
-
Benchmark your solutions with
mix d01.p1 -bto run your solution with benchee.
Visual Elixir Reference
This is a guide I started working on when I started learning Elixir. It visually explains some of the functions of the Elixir standard library.
Any feedback is welcome!
Melvin Cedeno on Teaching Functional Programming with Elixir // Triangle Elixir Dec 15th 7PM ET
Melvin Cedeno will be presenting on Teaching Functional Programming with Elixir on Dec 15th at 7PM ET to the Triangle Elixir group; it’s online like everything is these days, so hop on and join us if you’d like.
ThinkingElixir 024: LiveView Uploads with Chris McCord
In episode 24 of Thinking Elixir, we talk with Chris McCord about the Phoenix LiveView 0.15.0 release which includes uploads! Chris explains the background on the release and his video showing it off. He shares his go-to stack when starting a new Phoenix project (HINT: it includes TailwindCSS). We talk about current gaps in the tooling and where things might go from here in both the short and long term. A great visit with lots of insights!
A minimalist LiveView testing guide
Let’s apply Sandi Metz’s minimalist unit testing guide to LiveView. There are so many parallels, and our tests benefit from Sandi’s wisdom.
https://www.germanvelasco.com/blog/minimalist-liveview-testing-guide
Domain-driven error handling. Don't handle errors - prevent them.
Good error handling is crucial, but the role of errors in software design is often underestimated. This post describes 4 techniques to improve error handling in your system by designing it with failures in mind.
https://mkaszubowski.com/2020/11/18/domain-driven-error-handling.html
Introducing MockMe Hex Package
This last week I published a Hex package for mocking third party APIs. This package starts a real http server when your tests run that mimics the third party api you’re connecting to. This allows you to easily write integration tests which test your entire code path as it would perform in production, complete with real HTTP requests and responses.
Use is as simple as defining a list of routes and running your tests.
%MockMe.Route{
name: :swapi_starships,
path: "/swapi/starships/:id",
responses: [
%MockMe.Response{
flag: :success,
body: MockMePhoenixExample.Test.Mocks.SWAPI.starships(:success)
},
%MockMe.Response{flag: :not_found, body: "starship-not-found", status_code: 404}
]
}```
I hope you find this pattern as useful as I have.
ThinkingElixir 023: Gleam and Static Types with Louis Pilfold
In episode 23 of Thinking Elixir, we talk with Louis Pilfold about how he created Gleam, a static typed language that runs on the BEAM. Louis explains some of the challenges with bringing static types to the BEAM and shares ideas on what can possibly be done about it. We learn how Gleam got started, how it works, and how Elixir and Erlang can interop with it. We cover the recently released Gleam OTP work, talk about Type Driven Development and much more!
[Live Coding] UX with LiveView: Parsing Wiktionary
In the 2 part of the language learning LiveView app series, I continued working on the Wiktionary articles parser.
I tried a number of approaches, e.g. HTML tree reconstruction and level tracking, but in the end settled on extractor functions for specific sections of the article. I was using LiveView to render intermediate results.
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.
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.
LiveJoy with Phoenix LiveView
A basic “no JS added” REPL for the Joy programming language built with Phoenix LiveView
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
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!
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:
