Systems | Development | Analytics | API | Testing

AppSignal

Using Dependency Injection in Elixir

While controversial in functional programming, dependency injection can be a useful pattern in Elixir for managing dependencies and improving testability. In this, the first part of a two-part series, we will cover the basic concepts, core principles, and types of dependency injection. We'll explore its benefits in terms of modularity, testability, and maintainability. Then, we will look into a specific scenario where dependency injection can be beneficial, in this case, testing.

Understanding Offset and Cursor-Based Pagination in Node.js

Pagination means dividing a big chunk of data into smaller pages. It unlocks performance benefits for the backend, while also improving UX by sending manageable pieces of data to a client. In this article, we'll explore offset-based and cursor-based server-side pagination approaches, compare them, and implement cursor-based pagination in Node.js. Let's get started!

Creating Forms in Ruby on Rails with Simple Form

Ruby on Rails has changed how we build web applications. Early on, the framework came with some great features to help you get started and build robust applications. However, it can still be tricky to build and handle forms. Simple Form is a great option. Let's examine what Simple Form is, why we might need it, and some real use cases.

Effective Testing in JavaScript

Kernighan & Pike, The Practice of Programming, 1999 Despite constantly changing technologies and the needs of customers, some wisdom seems eternal. Programmers need to test their code. But thorough testing takes time. When we do it well, everything works, and a massive testing effort feels like a waste. However, when we do it badly, our code is often broken, and we wish that we had done better testing. I have some good news for you.

Debugging in Ruby with pry-byebug

For a software engineer, even the basic use of a debugger can save a lot of pain: adding breakpoints (places in the code the program will stop at and expose the current context) is very easy, and navigating from one breakpoint to another isn't difficult either. And with just that, you can say goodbye to a program's many puts and runs. Just add one or more breakpoints and run your program.

What's New in Node.js 22

Node.js 22 has been released, offering a compelling upgrade for developers. It takes over the 'Current' release line, while v21 transitions into maintenance mode until its end-of-life in June. This release delivers advances like a stabilized Watch mode, pattern matching support in the fs module, a default-enabled WebSocket client, and a new--run flag for script execution. It also offers some performance improvements and the usual V8 engine upgrade.

When to Use Bun Instead of Node.js

Bun and Node.js are two JavaScript runtime technologies to run JavaScript on the server. Node.js is the undisputed king of server-side development with JavaScript, but Bun has gained popularity thanks to its unbelievable performance capabilities. The real question is, though: does it really make sense to use Bun instead of Node.js? Let's learn about Bun and Node.js, dig into their characteristics, and explore some scenarios where Bun can be a better alternative to Node.js.

AnyCable for Ruby on Rails: How Does it Improve over Action Cable?

In modern web applications, real-time communication has become more than a feature: it's gradually evolved into a necessity. Users expect instant updates, live interactions, and dynamic content. In Rails applications, Action Cable has long been the go-to solution, harnessing WebSockets to fulfill these demands. In this article, we introduce: Let's get started!

Should You Use Ruby on Rails or Hanami?

Ruby on Rails is the most popular web framework in the Ruby ecosystem and has a large user base, ranging from freelancers to large established companies. With an active user community and wide-ranging documentation, it can be used to build everything from simple applications to complex web platforms. That said, a new contestant is taking on Rails’ dominance for the full-stack Ruby framework title: Hanami.

Deep Diving Into the Erlang Scheduler

Erlang is renowned for its remarkable fault tolerance and high concurrency. Erlang's scheduler efficiently handles many lightweight processes. The scheduler plays a crucial role in managing processes, concurrency, and system resources, efficiently coordinating these elements to help Erlang maintain fault tolerance and support high levels of concurrency in its applications. This post will dissect some of the scheduler's key components and shed light on how it works internally. Let's get started!