This article covers one of my favorite techniques for improving performance: memoization. It's a source of easy little performance wins that eventually add up and only occasionally reduce your application to a heap of smoldering rubble. Only very occasionally.
If you want Ruby's string methods to play nicely with Unicode, it's a good idea to normalize them. This article is a brief introduction to Unicode normalization for Rubyists.
The latest version of the honeybadger Ruby gem includes a lot of improvements and new features. Check it out!
One often-overlooked feature of Ruby's hashes is that you can use any object as a hash key, not just strings and symbols. In this post we examine how Optcarrot, the Ruby NES emulator, uses this feature to optimize its mapped memory implementation.
To see how far Ruby's Unicode support has come, I tested every string method to see which ones violate the principle of least surprise. The results are presented as a handy table that you can reference to see which string manipulation methods are Unicode-unfriendly.
Here's an easy way to run multiple Sidekiq processes via systemd.
In this post we'll discuss a few easy wins - things you can do when a Rails project is young to make it much easier to scale its data layer as the project grows.
You probably know how to ask Ruby to rescue specific exceptions. But how does Ruby know if a particular exception meets your criteria? In this article, we'll walk through Ruby's simple exception matching mechanism and see how we can use it to our advantage.
Many of the most common ActiveRecord idioms produce SQL which doesn't scale well as your dataset gets larger. In this article I discuss three of the worst offenders and offer work-arounds.
The other day I was searching for an introduction to Ruby exceptions written for beginners - people who know basic Ruby syntax but aren't really sure what an exception is or why it's useful. I couldn't find one, so I decided to have a go at it myself. I hope you find it useful.
Our recent sponsorship of Rocky Mountain Ruby 2016 showcases the growing diversity of the community - and the emphasis on non-technical content. Here's why it matters for developers looking into leadership positions.
Big-O notation gives you crucial insight into why your apps aren't as fast as you'd like them to be. In this post we'll uncover the meaning of things like `O(N^2)` and show how to use these concepts to speed up your apps and your database queries.
Are you deploying your apps to EC2 and wondering how to store your application secrets? Learn how to use KMS and IAM roles to store your secrets on S3 securely.
Starr deploys a simple Sinatra application to Amazon's EC2 Container Service (ECS) and load-balances it across two availability zones.
I recently found myself using `URI.join` to construct certain some redirect URLs. But I quickly ran into a problem. `URI.join` wasn't behaving like I expected. In this post we trace the unexpected behavior through the source of `URI.join` and back to the original RFC.
AptWatcher is a tiny Sinatra app that notifies your Slack channel about pending apt package updates.
What exactly are websockets? How do they work? In this post we're going to answer these questions by building a simple WebSocket server from scratch in Ruby.
In order to write a first-class command-line app, you have to understand a lot of details like arguments, environment variables, STDIN/STDOUT, and more. This post is my humble attempt to cover most of these details and bring together everything you need to know in one place.
Whether you use rails, Sinatra, or Lotus, you don't really have to think about how cookies and other headers pass from nginx or apache, to the application server and into your app. We're going to examine this journey in a little more depth. Because it turns out that the story of headers contains a lot of interesting information about the history of the web.