Systems | Development | Analytics | API | Testing


Debugging in Ruby with Debug

Debugging is a valuable skill for any software engineer to have. Unfortunately, most software engineers are not trained in it. And that's not just specific to developers going through boot camps; even in universities, we are not often taught and trained to use a debugger. My teachers and mentors were more interested in getting me to write programs rather than debugging them. If we are fortunate, debugging comes at the end of the semester, in a short, last session.

Parsing CSV files in Ruby

Handling data in various formats is a common task in software, and CSV (Comma-Separated Values) files are among the most prevalent data formats you'll encounter. Whether for data migration, reporting, or simply importing and exporting data, processing CSV files efficiently is a necessary skill for any Ruby developer. In this article, we'll learn the practical aspects of parsing and handling CSV data using Ruby.

Resque v Sidekiq for Ruby Background Jobs Processing

Background job processing is integral to modern software architecture. Background jobs allow resource-intensive tasks to be handled asynchronously, improving your application’s responsiveness and efficiency. You can use background processing for tasks such as sending emails, data processing, and batch jobs. If you were to run these synchronously, they could significantly degrade the user experience and system performance. Thus, most frameworks have libraries for running background jobs.

Scaling Ruby on Rails Using Containerization and Orchestration

After Twitter moved from Ruby to Scala in 2009, the story was born that Ruby on Rails can’t scale. The story goes that it lacks robustness, is a memory hog, and lacks the concurrency features you need to grow an application. This has been the prevailing wisdom for over a decade. And then along came Shopify, showing that, as Lutke says, Ruby on Rails is a framework that can process billions of events per day and evidently does scale. Ruby on Rails is an excellent candidate for scaling.

Five Things to Avoid in Ruby

As a contract software developer, I am exposed to oodles of Ruby code. Some code is readable, some obfuscated. Some code eschews whitespace, as if carriage returns were a scarce natural resource, while other code resembles a living room fashioned by Vincent Van Duysen. Code, like the people who author it, varies. Yet, it's ideal to minimize variation. Time and effort are best spent on novel problems.

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.

Handling Exceptions in Grape for Ruby

Grape is a popular Ruby framework for building RESTful APIs. Exception handling plays a crucial role in ensuring the stability and reliability of any application, including those made with Grape. This article will explore the basics of Grape exception handling, including customizing exceptions. We'll also touch on some best practices, and how to integrate your app with AppSignal for enhanced error monitoring and management. Let's get started!

Behaviour Driven Development in Ruby with RSpec

RSpec is a library for writing and running tests in Ruby applications. As its landing page states, RSpec is: "Behaviour Driven Development for Ruby. Making TDD productive and fun". We will return to that last part later. This post, the first of a two-part series, will focus on introducing RSpec and exploring how RSpec especially helps with Behaviour Driven Development in Ruby. Let's dive in!

Stream Updates to Your Users with LiteCable for Ruby on Rails

So far in this series, we have been exploring the capabilities of SQLite for classic HTTP request/response type usage. In this post, we will push the boundary further by also using SQLite as a Pub/Sub adapter for ActionCable, i.e., WebSockets. This is no small feat: WebSocket adapters need to handle thousands of concurrent connections performantly.