Modular software design - 10 common mistakes
Since the introduction of Phoenix Contexts, modularity is a popular topic in the Elixir community. Here are 10 common mistakes that might hurt your modular design:
https://mkaszubowski.com/2020/09/17/modular-software-design-mistakes.html
Elixir Wizards S4E18 Eric Steen on Neuroevolution in AI
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s4e18-steen/
Geo encoding and displaying maps with OpenStreetMap and LiveView
A series of blog posts and an example LiveView application that demonstrate GEO location of an address and displaying the location on a map.
Dictator 1.0: tiny library under a new perspective
Dictator is a tiny authorisation library that allows you to easily control what your users see. We finally got around to version 1.0. This version took a big refactoring, with some good additions: a clearer API and router-based policies.
https://subvisual.com/blog/posts/dictator-1-0-a-new-perspective/
Announcing Alchemy Conf: More than a conference
14 & 15 May 2021, in Braga, Portugal, Alchemy Conf, a new Elixir conference, will be taking place. CFPs will be opening soon. In the meantime, explaining what Alchemy Conf stands for and how everything will happen:
ThinkingElixir 013: Video chat using LiveView with Jesse Herrick
In episode 13 of Thinking Elixir, we talk with Jesse Herrick about creating a video chat app using WebRTC and Phoenix LiveView. We cover the WebRTC protocol, discuss a number of helpful resources, learn how Phoenix helps accomplish the goal, discuss the JS hooks, pushing events from the server and much more!
Prototyping with Phoenix LiveView: A Perfect Play Queue Final Stream
Wrapping up our adventure in prototyping a play queue in Phoenix LiveView by adding group by album view, selection, deletion, and applying a bit more style to the result.
OpenTelemetryDecorator: add OpenTelemetry traces with one line of code
Yesterday I published my first hex package! A decorator macro that lets you add an OpenTelemetry trace to a function, (and specify span name and attributes) with one line of code. For example:
@decorate trace("add", [:a, :b, :result])
def add(a, b), do: a + b
Curious Case of String.slice/3: trim by graphemes, by codepoints, and trim like SalesForce does
Putting a string in a tight DB or SFDC field may end up not exactly how expected. Going a bit beyond the standard way of slicing strings in Elixir: https://medium.com/@adworse/the-curious-case-of-string-slice-3-de081c021e41
Using Ansible to Deploy Elixir Applications on Dokku
Deploying Elixir apps using Phoenix can be difficult, especially if you are used to ruby git push deploys. Here’s how I used Ansible to deploy a Elixir app using Phoenix on a AWS EC2 instance via Dokku. http://mikebian.co/using-ansible-to-deploy-elixir-applications-on-dokku/
Elixir Berlin meetup #75 September
Elixir Berlin meetup #75 September
“Distributed tracing in Elixir” by Yatender
“Be a better parent to your children” by Herminio
Elixir macros return AST
One of the basics in understanding Elixir macros is the fact that Elixir macros return AST.
Elixir Wizards S4E17 Johnny Winn on Kitchen Secrets and Beautiful Coding
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s4e17-winn/
Membrane, Phoenix, Nerves
Binary Noggin released a new post about using Membrane, Phoenix, and Nerves to build a streaming video service.
Beware of the Software: A Screencast pt. II
About two years ago I did the first episode of a screencast called Beware of the Software. A couple of days later, I burned out and it was put on a pile of “things to handle later”.
I now feel confident enough to say the second episode is here: https://mendes.codes/blog/two-years-ago-i-did-a-screencast
Avrora: explicit split between schema reader and schema writer
Starting 0.13 you can have an explicit split between schema reader and schema writer.
This means that you don’t need to have local files with schemas if you would like to rely only on the schemas already registered in the registry.
config :avrora,
# ...
registry_schemas_autoreg: false
If you disable auto registration and have schema registry configured, two major behavior changes will happen:
- Local files will be completely ignored for schema resolution
- For encoding and decoding, the schema will be retrieved from the registry (see n.1)
For the case when the schema registry is not configured – behavior should remain the same 😉
Also, an Avrora.Encoder
module gets some attention and was refactored. It was split into several submodules which implement the same behavior. It allows code to be reused and well tested separately. But everything comes at a cost, hopefully pros and cons should balance each other.
Happy coding everyone and any feedback is welcome 🤗
Highlights from ElixirConf 2020
We put together a roundup of our team’s favorite talks and moments from ElixirConf 2020:
Enumerable: Custom Data Structures in Elixir, part 1
Follow along in beginning to create an Array data structure built on tuples, and learn about the Enumerable protocol.
https://blog.brettbeatty.com/elixir/custom_data_structures/enumerable
ThinkingElixir 012: All a Flutter over NIFs and Ports with Connor Rigby
In episode 12 of Thinking Elixir, we catch up with Connor Rigby and learn about his recent Flutter work for Nerves. We take this opportunity to get his perspective on when to choose NIFs or Ports for native integrations, how to make NIFs more portable, get a recommendation for multimedia processing and much more!