Systems | Development | Analytics | API | Testing

AppSignal

Functional Programming in Elixir with Witchcraft

While Elixir is a functional programming language, it is different from most of the other popular functional languages like Haskell, Scala, OCaml, and F#. Elixir pragmatically handles concurrent systems with high fault tolerance. In other words, Elixir is an FP language because this naturally fits it, and not for its own sake. So, porting idioms blindly from Haskell to Elixir can lead to undesired results.

How to Keep Database Table Sizes Down and Prevent Data Bloat

Most web applications use a data store of some kind, often a relational database. When a web app becomes successful, it can become all too easy to start "hoarding" data in the database. But hoarding data leads to the unbounded growth of database tables (both row count and stored data size). While this works fine to a certain point, it is very useful to prevent some data bloat — or, if you cannot prevent it, to plan for your infrastructure ahead of time to adequately manage growth.

Use Streams to Build High-Performing Node.js Applications

The moment you type something on a keyboard, read a file from a disk or download a file over the internet, a stream of information (bits) flows through different devices and applications. If you learn to work with these streams of bits, you'll be able to build performant and valuable applications. For example, think of when you watch a video on YouTube. You don't have to wait until the full video downloads.

Test and Optimize Your Ruby on Rails Database Performance

In this article, you will learn how to test database performance in Rails and solve some of the most common database performance issues. When you develop a Rails application, ActiveRecord is the default tool that manages your database. ActiveRecord provides an easy and fast interface to query and insert data using commands like.where, .save, .create, and.update. Rails does the work of converting these commands to SQL queries, which is a good thing, but sometimes can cause performance issues.

Securing Your Phoenix LiveView Apps

LiveView is a compelling choice for building modern web apps. Built on top of Elixir's OTP tooling, and leveraging WebSockets, it offers super fast real-time, interactive features alongside impressive developer productivity. In this post, we'll show you how to secure your live view routes with function plugs and group live routes in a secure live session. Let's dive straight in!

How to Migrate Your Blog from Gatsby to Next.js

A while back, you were probably looking for a great solution to create your blog, and Gatsby was the most popular solution floating around at the time. Now that some time has passed, a new player has risen to fame on the scene: Next.js has taken developer blogs by storm. Whatever your reasons for switching, we will explain how to switch from the Gatsby stack over to Next.js in this post.

Build Interactive Phoenix LiveView UIs with Components

LiveView empowers developers to build interactive, single-page web apps with ease by providing a framework that eliminates the need for guesswork. In this post, we'll take a look at how you can layer simple, single-purpose functional components to wrap up shared presentation logic. We'll also use more sophisticated live components to craft easy-to-maintain single-page flows that handle complex user interactions.

8 Common Causes of Flaky Tests in Elixir

Flaky tests are like meme stocks — many people have them, but no one knows what to do with them. Today, we will change that by diving into some common causes and, more importantly, solutions for flickering tests in Elixir. Elixir has many great primitives that let us run tests asynchronously, including immutable data, lightweight processes, and the Ecto SQL sandbox. Running tests asynchronously can greatly speed up your test suite, but can also increase the chance of flaky tests.

What's New in Rails 7

Rails 7 is just around the corner. We don't have a confirmed release date, but it is expected to be available before Christmas, so not very long to go. The latest version as of this post's publication is 7.0.0.rc1, the first release candidate. Basecamp, HEY, Github, and Shopify have all been running the Rails 7 alpha in production, so we can expect even the release candidate to be pretty stable. In this post, we will look at some of the new features and changes that Rails 7 will bring.