Digests » 337

sponsor

Build, Secure, and Speed up Applications with Cloudflare

At Cloudflare, our mission is to help build a better internet. We believe the web should be open and free, and that ALL websites and web users should be safe, secure, and fast. That's why Cloudflare offers free DNS, CDN, SSL, DDoS protection, and web development tools to build applications. Sign up for free today!

this week's favorite

Shooting yourself in the foot with GenServers

Elixir’s GenServers are great. Their fault tolerance makes them a natural choice for situations where you need to store some state over time in a resilient way. They’re not without their gotchas, though. In particular, it’s quite easy to fall into traps with respect to scheduling work within the GenServer’s process.

Hot code reloading of Elixir OTP application

Elixir (Erlang/OTP) can deploy without stopping Erlang VM (BEAM). This feature is called Hot Code Reloading / Hot Code Swap / Hot Code Deploy. For the purpose of this article, we will refer to it as Hot Code Reloading.

Using Elixir's "with" statement

Elixir has many features to make code readable, maintainable, and correct. One of them is the with statement. Unfortunately, the with statement can be confusing to work with, because there are some hidden assumptions on how it's used.

How to update Elixir dependencies?

Just like it sounds — a dependency is some external code that your application depends on. You usually don’t want to implement it by yourself, and you probably need it to provide some additional functionality for your project. You save your time on coding something you really need.

Saving and restoring LiveView state

There are multiple ways to save and restore state for your LiveView processes. You can use an external cache like Redis, your database, or even the browser itself.

projects

Free Code Quality & Vulnerability Check

Are there vulnerabilities in your code? Scan your code for quality & security issues in real-time, for free.