Digests » 270
this week's favorite
When the contexts were introduced in Phoenix I was really excited. Baking in Domain Driven Design (DDD) concepts felt like a good guardrail. It would make us create lines in our code. Boundaries that would force us to get to know our business better, and in the process become better developers.
Using these simple techniques, we can force our untrusted input into a known-good struct as early as possible in our application. We’ve centralized the logic for parsing our external input and all functions called later can trust that they will receive well-structured input – at least to the extent possible in a dynamically typed programming language.
The scalability of ETS tables of type ordered_set with the write_concurrency option is substantially better in Erlang/OTP 22 than earlier releases. In some extreme cases, you can expect more than 100 times better throughput in Erlang/OTP 22 compared to Erlang/OTP 21.
So, what is pattern matching? The name reveals as much - it’s a way to process and extract data based on its structure. With it, the “=” operator works more like a matching operator than an assignment operator. Let me show you what I mean.
I wanted to learn how SSDP works, so I implemented an SSDP Directory! For those of you who aren’t aware, SSDP is a fairly simple protocol from the 90s that’s used to facilitate the discovery of network services. Nowadays, it’s also used by everything from smart TVs to Hue lights.