Debugging Action Callbacks (aka Filters) in Rails
Rails provides before and after actions in controllers as an easy way to call methods before or after executing controller actions as response to route requests. Action Callbacks can be particularly helpful when implementing authentication/authorization for example, and are heavily used by gems such as Devise.
The Pros and Cons of Ruby Refinements
In Ruby 2.0.0, refinements were introduced as a new feature. Monkey patching has been used for a long time for modifying code behavior, but it creates side effects in code elsewhere that ends up affected by the modified code. The purpose of Ruby refinements is to provide a solution by scoping changed behavior to the […]
Why Sketching Sessions are Always Worthwhile
There’s a lot of talk in our industry about how we need fewer meetings and those that remain should be more productive. I totally agree with this; it makes me cringe to think that people actually have meetings about having too many meetings. In honor of productivity, I want to take the opportunity to give a shout-out to my favorite kind of meeting: team sketching sessions. Here are a few reasons why I love them and find them to be so worthwhile.
Gemfile Mining: A Dive into Bundler’s Gemfile
Bundler is fantastic, which is why it has become the de facto package and dependency manager for Ruby applications. I have used npm and golang vendoring and other language dependency managers, but none of them can even hold a candle to the simplicity Bundler offers. As I am sure you know, at the root of […]
Phases of refactoring complex Rails apps
ActionController::Parameters no longer inherits from HashWithIndifferentAccess in Rails 5
ActionController::Parameters will throw deprecation warnings if we treat ActionController::Parameters as hash.
UX idea for Uber (or Lyft, or…)
Here’s an idea to make it easier for the driver to identify who they’re picking up, and for the passenger to feel more confident that they…
Sign-in and sign-up forms: from mobile to desktop
There are so many theories about the do's and dont's of sign-in and sign-up forms. They are so simple and yet so difficult to get absolutely right. It seems like everyone has a different opinion about the right flow, the right placement, the right size, the right user experience. Click to read the complete post
Understanding a fundamental Ruby abstraction for concurrency
This article was originally published by Ross Kaffenberger on his personal site, and with his permission, we’re sharing it here for Codeship readers. One of the fundamental concepts in key Ruby libraries that embrace concurrency is the thread pool. You can find examples of thread pool implementations in gems like puma, concurrent-ruby, celluloid, pmap, parallel, […]