news, opinion, tutorials, about ruby, aggregated
Sources About
Ruby News 

Nominations now being accepted for Ruby Prize 2017

We are very pleased to announce you that Ruby Prize will be held this year!

The Ruby Prize is given to recognize the efforts of remarkable activities and achievements in the Ruby Community. The prize will be awarded by the executive committee comprised of three parties, the Ruby Association, Nihon Ruby no Kai and Matsue City.

The Ruby Prize winner and final nominee (1-2 people) will receive an award at the RubyWorld Conference 2017, to be held in Matsue, Japan on November 1st & 2nd.

In addition, the Ruby Prize winner will also be awarded 1 million yen. Yay!

Nominees will be selected by the following:

  • Recommendations from the “Prize Member” executive committee
  • Recommendations from…

Please see below for more…

Drifting Ruby Screencasts 

Benchmarking and Refactoring the content_for View Helper

In a recent blog post, we looked into the content_for view helper to render breadcrumbs. Once we got the feature working, it's time to refactor the feature to lower technical debt.
Riding Rails 

New releases, bugfixes and more!

Hello everyone! This is Greg with the latest news from the Rails world.

Rails 5.1.3.rc1 and 5.0.5.rc1 released

Two new release candidates has been released this week, if there are no regressions found, the final releases are coming next week!

This Week’s Rails contributors!

28 people helped to make Rails better this week. If you want to be one of them, checkout the issues list, help is always welcomed!

Add bootsnap to default Gemfile

The bootsnap gem helps to boot a Rails application faster, and the gem is now part of the Rails default Gemfile.

Allow to pass a connection to the dbconsole command

With this change the dbconsole command can except a connection parameter, so if you are…

NRoweGT: Atlanta Ruby on Rails Consultancy 

Add Output to Your Long Running Rake Tasks

Expectations vs Reality

Have you ever worked on an item, tested it thoroughly on a staging environment, done extra dry runs for good measure, been completely satisfied with the results, only to have it hit production and you have no idea whether it’s working properly? I had such an experience recently with a one-off rake task. The following details that, along with what I learned and how to prevent it from happening to your projects. Chalk up another lesson about what it means for a feature to be complete

The Task

Recently I was involved on a team project around developing ingestion and display of user data. The basic process was this:

  • Get a list of all the objects from an S3 bucket
NRoweGT: Atlanta Ruby on Rails Consultancy 

Developers and Systems vs Goals

Systems and Goals

For most developers, our days is composed of accomplishing individual tasks, which makes it very easy to get lost in those details and solely focus on what’s at hand rather than the direction in which accomplishing that takes us. Rather than focusing on each step or feature as an individual item to accomplish, I say that it’s best to reframe each of them instead as a small step in the right direction.

Don’t Lose Sight of the Forest for the Tree in Front of You

“Don’t lose sight of the forest for the trees” is a common saying. It means that you shouldn’t let what’s right in front of you make you forget the big picture. Letting individual tasks own your thoughts is…

Ruby Weekly 

#358: How I Reduced My DB Server Load by 80%

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 358 — July 20, 2017
Richard Schneeman
How one line, hidden in a common ActiveRecord validation, caused large spikes in database response time and what to do about it.

Tom Van Eyck
A complete rundown of mutexes, condition variables, and how to use them together to write efficient threading code in Ruby.

Simple Programmer  Sponsored
Technical knowledge alone isn't enough—increase your income by leveling up your "soft skills." Learn new skills faster,…
Stories by DHH on Medium 

The company isn’t a family

Whenever executives talk about how their company is really like a big ol’ family, beware. They’re usually not referring to how the company is going to protect you no matter what or love you unconditionally. You know, like healthy families would. The motive is rather more likely to be a unidirectional form of sacrifice: Yours.

Because by invoking the image of the family, the valor of doing whatever it takes naturally follows. You’re not just working long nights or skipping vacation to further the bottom line, no, no, you’re doing this for the family. Such a blunt emotional appeal is only needed if someone is trying to make you forget about your rational self interest.

You don’t have to pretend…

Test Double | Our Thinking 

Tame the frontend with Elm

The video above was recorded at Fluent Conf 2017.

We're excited about Elm at Test Double. Elm is a functional programming language that compiles to JavaScript and promises robust frontend web apps by preventing runtime exceptions. Elm's type system helps you thoughtfully design applications, and its compiler guides you confidently through refactors with helpful error messages.

In this talk, I share the benefits of building applications with Elm while also diving into its syntax and functional programming concepts. In addition to no runtime exceptions, Elm touts:

  • Being as fast as the big JavaScript frameworks such as React and Angular
  • Safer null handling with the built-in Maybe type
  • No…
Hi, we're Arkency 

How to quickly add graphs and charts to Rails app

When how to visualize data in your Rails app there are certain factors that you need to consider.

  • Static graphs which generate images are out of question. They are not any simpler to use, install or maintain and are less usable. The ability to toggle and highlight is just a necessity in XXI century. Thus our options are limited to charts generated with JavaScript.
  • You are probably working for a startup with monetary constraints so using libraries which cost $200 is something might want to avoid.
  • You would prefer something looking good out of the box, which can also be easily styled by designers to follow the look&feel of the whole app.
  • You would like something maintained so it continues…

I am gonna propose you use Google Charts. Interactive and maintained by Google.

Model + SQL

class Order < ApplicationRecord
  def self.totals_by_year_month
        date_trunc('month', created_at) AS year_month,
        sum(amount) as amount
      FROM orders
      GROUP BY year_month
      ORDER BY year_month, amount
    ).map do |row|
        row['year_month'].strftime("%B %Y"),
  • date_trunc is a PostgreSQL function which truncates the date to certain precision.

This methods returns the data in format such as:

  ["July 2017", 346.0],
  ["July 2016", 50.0],

Obviously it is up to you what data and how you want to visualize :) This…

Hi, we're Arkency 

nil?, empty?, blank? in Ruby on Rails - what's the difference actually?

There are plenty of options available. Let’s evaluate their usefulness and potential problems that they bring to the table.


  • Provided by Ruby
  • Can an be used on anything
  • Will return true only for nil
# => true

# => false

# => false

# => false


  • Provided by Ruby
  • Can be used on collections such as Array, Hash, Set etc. Returns true when they have no elements.
# => true

# => true
# => true
  • but it is not included in Enumerable. Not every object which iterates and returns values knows if if it has any value to return

fib = do |y|
  a = b =
Riding Rails 

Rails 5.1.3.rc1 and 5.0.5.rc1 released

Hi everyone,

I am happy to announce that Rails 5.1.3.rc1 and 5.0.5.rc1 have been released.

If no regressions are found, expect the final releases Monday, July 24, 2017. If you find one, please open an issue on GitHub and mention me (@kaspth) on it, so that we can fix it before the final release.

CHANGES since 5.1.2

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub


If you’d like to…

Hi, we're Arkency 

Monitoring Sidekiq queues with middlewares

Sidekiq, similarly to Rack, has a concept of middlewares. A list of wrappers around its processing logic that you can use to include custom behavior.

In chillout we use it to collect and send a number of metrics:

  • how long did it take to process a job

    Obviously it is nice to notice when a certain jobs starts to work much slower than usually.

  • how long did it take between scheduling a job and starting a job

    This is useful to know if your Sidekiq workers are not saturated. Ideally the numbers should be around 1-2ms, which means you are processing everything as it comes and have no delay.

    Depending on what your application does a second or two of a delay might be good enough as well.…

Devon C. Estes - Articles 

Patronizing Open Source

In this week’s episode of The Bikeshed, Sean Griffin went through some of his issues with funding open source work through services such as Patreon, which allow individuals or companies to contribute to an individual or group on a recurring (usually monthly) basis. Well, all this talk of open source and money got the amateur economist in me thinking, so here’s my take on the topic.

Blog - Sandi Metz 

Why We Argue: Style

This post originally appeared in my Chainline Newsletter.

I've been thinking about why we argue about code, and how we might transform vehement differences of opinion into active forces for good.

My thoughts spring from a very specific context. Ten or twelve times a year I go to an arbitrary business and spend three or more days teaching a course in object-oriented design. I'm an outsider, but for a few days these business let me in on their secrets.

Here's what I've noticed. In some places, folks are generally happy. Programmers get along. They feel as if they are all "in this together." At businesses like this I spend most of my time actually teaching object-oriented design.


Schneems - Programming Practices, Performance, and Pedantry 

How I Reduced my DB Server Load by 80%

Database load can be a silent performance killer. I’ve been optimizing the query performance of a web app I run designed to get people involved in open source, but was seeing random spikes of query times to 15 seconds or more. While I had been seeing this behavior for some time, I only recently began tuning my database queries. You can read about my efforts to First I sped up my home page with some indexes (and Rack Mini Profiler). Then I tracked down and killed some expensive queries. After these major improvements the average response time was around 50ms and my perc95 was under 1 second. Yet, I had this annoying issue where in a 24 hour period, my perc95 response times would shoot up to…

Search Results for “ruby” – via @codeship 

The Ultimate Guide to API Design

Reading Time: 15 minutes

This article was originally published on Quantum Mog’s Blog by Erich Reich, and with their permission, we are sharing it here for Codeship readers.

So you need to design an API. Where do you start? Far too often internal services slowly turn into APIs. Hacked together one endpoint at a time. These undocumented spaghetti monsters just pile up technical debt and create enormous knowledge hurdles for new developers to scale over. This article is designed to help you either start with a good footing from scratch or to refactor your existing API into something far more manageable.

Task Automators

A small detour, but it’s always better to ask the tough questions first. D…

Search Results for “ruby” – via @codeship 

Realtime with React and Rails

Reading Time: 11 minutes

When I was thinking about creating something to showcase using ActionCable (websockets) in a Rails app with React, I first thought of building a chat. But everybody builds a chat. So next, I thought about a realtime dashboard. But then I realized I had no data in this demo app with all but one user (me). So I decided to build a realtime map application that allows you to broadcast your location to anyone you wish.

In this article, we’ll explore how to use Rails, React (via react_on_rails gem), MobX, and websockets (via ActionCable). The demo app can be found here. The full repository can be found here.

“Showcasing ActionCable in a Rails app with React” via…

The Miners - Medium 

How to Organize your Styles with ITCSS

A sane, scalable, managed CSS architecture.

Everyone knows how CSS can be painful when not written properly. It is not an expressive language, it has a global scope, cascading rules (the source order really matters), inheritance, and selector specificity wars. The way CSS works makes it easy for bad code to take over. It is possible to use nested selectors to override existing rules, use !important to quickly solve a styling problem, write CSS to undo other CSS, and so on.

If you want to know more about how CSS works, read this.
The selectors specificity war

These issues are especially recurring on large projects with lots of developers involved. If we do not understand their impact, our…

BigBinary Blog 

Rails 5.1 returns unmapped timezones from ActiveSupport::TimeZone.country_zones

This blog is part of our Rails 5.1 series.

The ActiveSupport::TimeZone class serves as wrapper around TZInfo::TimeZone class. It limits the set of zones provided by TZInfo to smaller meaningful subset and returns zones with friendly names. For example, TZInfo gem returns “America/New_York” whereas Active Support returns “Eastern Time (US & Canada)”.

ActiveSupport::TimeZone.country_zones method returns a set of TimeZone objects for timezones in a country specified as 2 character country code.

# Rails 5.0
>> ActiveSupport::TimeZone.country_zones('US')

=> [#<ActiveSupport::TimeZone:0x007fcc2b9b3198 @name="Hawaii", @utc_offset=nil, @tzinfo=#<TZInfo::DataTimezone: Pacific/Honolulu>>,…
The Bike Shed 

118: Nonsense In, Nonsense Out

We discuss the economics of remote work, ActionDispatch::SystemTest in RSpec, and the use of Patreon on open source projects.

GoRails Screencasts 

Debugging: How to Interpret a Stacktrace

Learn how to analyze and understand the Ruby stacktrace when something goes wrong in your app
Hi, we're Arkency 

Non-coding activities in a software project

Recently in our project, we came up with a list of non-coding activities. Those are the tasks that need be done quite regularly and might be easy to be forgotten.

If we tend to forget them, then there’s a risk that someone else will introduce a process around those activities. Sometimes it may mean new people will be brought so that they “manage” those activities. In my opinion, the more can be done by a developer the better, because we don’t introduce non-technical people to the communication loop.

  • read communication on pivotal (and optionally reply)
  • read communication on slack (and optionally reply)
  • build/monitoring failures
  • review commits from others
  • work on our tickets
  • look at…
Drivy Engineering 

How we are using member voice to improve UX

Whether it’s on social media, on the app stores, through emails or phone calls, we receive hundreds of messages from our users every day, and answer each of them.

If answering questions is good, fixing the original problem is even better. We truly believe in this virtuous circle as a customer centric company.

Since customer service data is the first accessible and actionable “member voice” data in every company, we started by focusing on it. In collaboration between product, customer relationship & data, we wanted to turn our volumes of tickets & phone calls into clear contact reasons, to identify pain points on which we should focus to improve user experience.

Qualify customer service…

Posts on 

Ruby concurrency: in praise of condition variables

In a previous post, we talked about the benefits conferred by Ruby mutexes. While a programmer’s familiarity with mutexes is likely to depend on what kind of programs she usually writes, most developers tend to be at least somewhat familiar with these particular synchronization primitives. This article, however, is going to focus on a much lesser-known synchronization construct: the condition variable. Condition variables are used for putting threads to sleep and waking them back up once a certain condition is met.
Hi, we're Arkency 

How to keep yourself motivated for blogging?

You got your programming blog, but you don’t blog too much? You don’t feel like doing it? What can you do about it?

Remember why

There is a reason why you started or want to start blogging. Write it down and remember why you are doing something, what you are doing it for. It might be:

  • you want to change a job, you don’t like your team, you don’t enjoy working with, you want to work in a better team, more experienced or in a different technology
  • you get nicely paid but your work is boring, blog is a way to escape it for a little time and do something more interesting, something different
  • you want to get your first programming job
  • you want to speak at programming conferences
  • travel around…

Whatever your goal is, remember about it. There is something you are trying to achieve here. There is a dream you…

Drifting Ruby Screencasts 

Creating Custom Ruby on Rails Generators

Simplify your workflow by using custom generators to streamline the creation of files and templates that you use often.
Michał Konarski 

What can Go teach you about OO design?

Golang has been gaining a significant popularity over last months. New articles and blog posts are written every day, new Go projects are started on Github, language-oriented conferences and meetups attract more and more people. This language certainly has its time now. Recently it even made its way to the elite club of 10 most popular languages in the world, according to TIOBE:

It certainly is a cool language and I recommend you to spend some time with it if haven’t already. I think that even if you’re not planning to use it in a long run it may help you to improve your…

Ruby Pigeon 

Super Secret Methods

Here is a quirk of the Ruby language that I discovered a few weeks ago.

Method names can not contain a period character.

def secret.squirrel
#=> undefined local variable or method `secret' (NameError)

This is because the period character is syntax used for defining methods on specific objects.

secret = "hello"
def secret.squirrel

p secret #=> "hello"
p secret.squirrel #=> :shhh

Even though the syntax does not allow periods in the method name, surprisingly, the Ruby runtime will allow it. Using define_method, the syntax limitations can be bypassed.

# this works
define_method('secret.squirrel') do

The method above can’t be called using normal…

Riding Rails 

This Week in Rails: Active Storage, telling secrets and time travelling!

Hello everyone! This is Roque bringing you the latest news from the Rails world.

It’s been two weeks, so let’s begin!


Active Storage is coming to Rails 5.2

A brand-new framework for managing user uploads is coming to Rails ecosystem. The TODO list is full of ideas, and it’s a great opportunity to send a PR and improve the library.

This Week’s Rails contributors!

We had 24 people who helped make the Rails better this week. Two of them contributed for the first time ever! If you would like to help out, check the issues list.


rails secrets:show will tell secrets!

The command will the decrypt encrypted secrets and display them in your console if you have the key file.


Hi, we're Arkency 

Handle sidekiq processing when one job saturates your workers and the rest queue up

I saw a great question on reddit which I am gonna quote and try to provide a few possible answers.

Ran in to a scenario for a second or 3rd time today and I’m stumped as how to handle it.

We run a ton of stuff as background workers, pretty standard stuff, broken up in to a few priority queues.

Every now and then one of our jobs fails and starts running for a long time - usually for reasons outside of our control - our connection to S3 drops or as it happened today - our API connection to our mail system was timing out.

So jobs that normally run in a second or two are now taking 60 seconds and holding a worker for that time. Enough of those jobs quickly saturate our available workers…

Virtuous Code 

On being the employee who “needs improvement”

Reading Coraline’s post on a year at Github inspires a lot of feelings: feelings on behalf of a friend; feelings about culture; feelings about how organization structure always wins out over intent.

But it also brings up some much more personal feelings.

Once upon a time I had this job at an extremely small company. It was going along swimmingly, I thought. Until the day maybe half a year in when my bosses called me into a meeting to tell me that I had not been performing satisfactorily.

It was a remote job with a fair amount of autonomy (which was one of the original selling points for me), and I had been taking advantage of the freedom to prioritize family needs when they came up. To the…

Hi, we're Arkency 

How to safely store API keys in Rails apps

Inspired by a question on reddit: Can you store user API keys in the database? I decided to elaborate just a little bit on this topic.

Assuming you want store API keys (or passwords for SSL ceritifcate files) what are your options? What are the pros and cons in each case.

Save directly in codebase


  config.mailchimp_api_key = "ABCDEF"


  • Won’t work with dynamic keys provided by users of your app
  • Every developer working on your app knows API keys. This can bite you later when that person leaves or is fired. And I doubt you rotate your API keys regularly. That includes every notebook your developers have, which can be stolen (make sure it has…
Hi, we're Arkency 

The easiest posts to write for a programming blog

Here are the 4 easiest types of posts that you can write about on your programming blog:

  • before/after
  • show some code, explain
  • explain how you solved a problem
  • opinion on another blog-post

The purpose of this list is not for you to always write easiest posts. But to know that not every post needs to be a bible, guide or very deep dive in. Shorter forms are welcomed nicely in programming communities and does not require tremendous amount of time to read. They have their own, valuable place in your blogging style. Especially at the beginning of your blogging journey when you are not an expert yet. And especially when you want to build a habit and keep writing regularly, but you don’t…

Stories by DHH on Medium 

Time wasn’t the like catalyst for what changed.

Time wasn’t the like catalyst for what changed. Hiring hundreds of people is the more likely culprit. One solution, which we subscribe to, is simply not to hire hundreds of people. Trust like Noah describes is so much easier to build, sustain, and distribute within just fifty people. We like easy solutions like that.

Virtuous Code 

How to categorize objects

How do you categorize software errors?

There are several possible axes we might think of:

  • Severity: e.g. notice, warning, error, fatal.
  • Module: what library or group of classes did the error come from?
  • Layer: database, framework, controller, model, view.

In Exceptional Ruby, I suggested a different approach for categorizing errors. Rather than thinking of different taxonomies that errors might fall into, think about how various types of errors are dealt with. For instance:

  • Inform the user that they tried to use the system in a way that is either not supported or not permitted.
  • Note that the system is in a state that was never planned for, inform the user of a fatal error, and log a…
Ruby Weekly 

#357: Is Ruby Too Slow For 'Web-Scale'?

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 357 — July 13, 2017
Nate Berkopec
A detailed look at the fallacy of benchmarks & what matters when it comes to creating web apps.

Ruby on Rails
Due to become a part of Rails 5.2, Active Storage makes it simple to upload and reference files in cloud services, like Amazon S3 or Google Cloud Storage, and attach those files to records.

Mike Gunderloy
A practical, four-part look at using Active Storage in its current early form. Part 2 digs into using S3. Part 3, Google…
Devon C. Estes - Articles 

My New Favorite Elixir Testing Trick

When I write my Ruby tests, I’m a big fan of using test doubles and asserting those doubles receive messages with the correct arguments. I guess I like to practice what Justin Searls calls Discovery Testing.

BigBinary Blog 

Difference between type and type alias in Elm

This blog is part of our Road to Elm series.

What is the differnece between type and type alias.

Elm FAQ has an answer to this question. However I could not fully understand the answer.

This is my attempt in explaining it.

What is type

In Elm everything has a type. Fire up elm-repl and you will see 4 is a number and “hello” is a String.

> 4
4 : number

> "hello"
"hello" : String

Let’s assume that we are working with users records and we have following attributes of those users.

  • Name
  • Age
  • Status (Active or Inactive)

It’s pretty clear that “Name” should be of type “String” and “Age” should be of type “number”.

Let’s think about a moment what is the type of “Status”. What is…

Christoph Lupprich 

Single file Rails applications - serving requests

Last time we packed a Rails application into a single file so that we can isolate bugs and easily share reproduction steps on GitHub or in a gist.

This time I wanna continue with the idea of crafting single files Rails applications that present an isolated topic by actually making them respond to requests. For that, we need to boot a webserver. Of course Rails has us covered here, since we can easily invoke rails server in our terminal, and Rails will boot our app and make it accessible via HTTP. We only need to find the right lines that make rails server work and invoke them in our app.

The first thing, however, we wanna do is to run our tests. Previously we've used minitest/autorun

A Year of Commits 

A Few RSpec Helpful Hints

Two main frameworks dominate the Ruby testing world: Rspec and MiniTest. RSpec is a very expressive testing framework with many great features and helpers to make tests readable. When writing RSpec tests, here are just a few not so obvious hints that could make tests even easier to write, read, and maintain.

Assuming a system exists with Books and Authors, let’s utilize these hints to make testing easy.

class Book
  attr_reader :title, :genre

  def initialize(title, genre)
    @title = title
    @genre = genre

class Author
  attr_reader :books

  def initialize(name, books)
    @name = name
    @books = Array(books)

  def has_written_a_book?
Test Double | Our Thinking 

3 Months of Elm: Our Experience

For the last 3 months we have been hard at work building out an ambitious Elm front-end project with one of our clients. We are building products for a very complex industrial-scale business domain. Our customers need to view and edit very large and very dynamic domain specific maps, stream event data, and investigate telemetry data. Much of the application uses SVG to drive the display of complex maps and figures. What follows is a loose collection of our thoughts about Elm as a language and a tool to leverage for front-end projects.

Type System

Elm's type system is its hallmark feature. Defining your types, their relationships, and how they relate to the outside world allows the language…

ruby – Bibliographic Wilderness 

on hooking into sufia/hyrax after file has been uploaded


Our app (not yet publicly accessible) is still running on sufia 7.3. (A digital repository framework based on Rails, also known in other versions or other drawings of lines as hydra, samvera, and hyrax).

I had a need to hook into the point after a file has been added to fedora, to do some post-processing at that point.

(Specifically, we are trying to run a riiif instance on another server, without a shared file system (shared FS are expensive and/or tricky on AWS). So, the riiif server needs to copy the original image asset down from fedora. Since our original images are uncompressed TIFFs that average around 100MB, this is somewhat slow, and we want to have the riiif server “pre-load” at…

Jon McCartie 

The Christian Church Has No Alternative...

The Christian church has no alternative but to engage in actions which challenge the evils of society—poverty, ignorance, disease, oppression, injustice, war, and prejudice—and to attempt to create more human alternatives. The Christian faith community therefore is called: to stop contributing to our social ills; to take a stand on social issues; to raise a prophetic voice against injustice; to take positive action on behalf of liberation; to influence public opinion; to join with others working for social justice; to identify with and become the advocate to the cause of the outsider; to eliminate the chasm between personal and social religion (why don’t we turn the current enthusiasm…

All Ruby Podcasts by 

RR 318 Metaprogramming with Jordan Hudgens

RR 318 Metaprogramming with Jordan Hudgens

Today's Ruby Rogues podcast features Metaprogramming with Jordan Hudgens. We have panelists Jerome Hardaway, Brian Hogan, Dave Kimura and Charles Max Wood. Tune in and learn more about metaprogramming!

[00:02:00] – Introduction to Jordan Hudgens

Jordan is the Lead Instructor at Bottega. Bottega has locations in Salt Lake City, Utah and in Phoenix, Arizona. They’re a full-stack development code school.

[00:02:55] – Metaprogramming

Metaprogramming was one of those scary concepts. At the code school, when the students learn about metaprogramming and how it works, you can tell that it’s definitely a pretty exciting thing. Its formal definition is…

Speedshop - Ruby on Rails performance consulting 

Is Ruby Too Slow For Web-Scale?

1(Okay, okay, I know. Betteridge’s Law of Headlines. Of course Ruby and Rails are fast enough for big websites - Shopify makes it work and they’re one of the largest in the world. But some people genuinely do seem to think that Rails ‘isn’t fast enough’. That’s what this article is about.)1 Okay, okay, I know. Betteridge’s Law of Headlines. Of course Ruby and Rails are fast enough for big websites - Shopify makes it work and they’re one of the largest in the world. But some people genuinely do seem to think that Rails ‘isn’t fast enough’. That’s what this article is about. How does one choose a framework or programming language for a new web application?

You almost certainly need one,…

Greater Than Code 

Episode 039: The B-Side of Software Development with Scott Hanselman


Jessica Kerr | Astrid Countee

Guest Starring:

Scott Hanselman: @shanselman |

Show Notes:

00:16 – Welcome to “Hanselminutes!” …we mean, “Greater Than Code!”

00:57 – Origin Story and Superpowers; Struggling and Prevailing

“The struggle is part of the journey.” – Scott Hanselman

13:51 – Systems Thinking, Problem Solving, and Instilling Those Values on Kids

19:11 – There is Value in Suffering

Antifragile: Things That Gain from Disorder by Nassim Nicholas Taleb

21:39 – Being a Teacher Over a Programmer; Ideas of Mediocrity, 10x Engineering, and Comparison to Others

We RISE Women in Tech Conference

Jessica Kerr: Hyperproductive development

Amanda Palmer: oh Lorde, deliver…

Cognito Blog 

SSN From a Phone Number?!

Hello Cognito

It's true - Cognito can return a Social Security Number from a phone number. As crazy as this may seem at first, our ability to link phone numbers with real-world identity is a huge benefit to both consumers and the businesses.

In order to understand why, we need to dive into how fraudsters currently steal your identity to defraud online businesses.

How fraudsters bypass identity verification

The industry standard, knowledge-based authentication - sometimes also called "out of wallet questions", uses information like your address history, your car loans or mortgage data to ask questions that supposedly only the person to whom this data pertains would be able to answer. For instance,…

Schneems - Programming Practices, Performance, and Pedantry 

Using Heroku's Expensive Query Dashboard to Speed up your App

I recently demonstrated how you can use Rack Mini Profiler to find and fix slow queries. It’s a valuable tool for well-trafficked pages, but sometimes the slowdown is happening on a page you don’t visit often, or in a worker task that isn’t visible via Rack Mini Profiler. How can you find and fix those slow queries?

Black Bytes 

Everything You Need to Know About Ruby Constants

There is a lot more to Ruby constants that you might think… For example, you can change the value of a constant, unlike other languages like C or Java. Since this is such an important topic let’s explore it in detail in this article! Defining Constants A constant doesn’t require any special symbol or syntax […]

The post Everything You Need to Know About Ruby Constants appeared first on Black Bytes. Don't miss your free gift here :)

Hi, we're Arkency 

Using influxdb with ruby

InfluxDB is an open-source time series database, written in Go. It is optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring, application metrics, and real-time analytics.

We use it in chillout for storing business and performance metrics sent by our collector.

InfluxDB storage engine looks very similar to a LSM Tree. It has a write ahead log and a collection of read-only data files which are similar in concept to SSTables in an LSM Tree. TSM files contain sorted, compressed series data.

If you wonder how it works I can provide you a very quick tour based on the The InfluxDB Storage Engine documentation and what I’ve…

Michał Konarski 

How to avoid inheritance in Ruby?

What’s wrong with the inheritance? Let me illustrate it with an example.

Let’s say that a client asked you to create a traffic simulator application. He wants it to be able to simulate the movement of some vehicles. If you use an object oriented language like Ruby you’ll probably come up with a model class that contains all the logic and properties, like this:

Vehicle class Vehicle class

You reach back to the client with the complete solution. Fine. But now he tells you that he wants these vehicles to be either cars or trucks. You know these types will share at least some behavior, so you don’t want to duplicate the code. No problem! Let’s use inheritance! It’s a proper is-a relation, so why not?

Vehicle with inheritance V…

Michał Konarski 

How to avoid inheritance in Ruby?

What’s wrong with the inheritance? Let me illustrate it with an example.

Let’s say that a client asked you to create a traffic simulator application. He wants it to be able to simulate the movement of some vehicles. If you use an object oriented language like Ruby you’ll probably come up with a model class that contains all the logic and properties, like this:

Vehicle class Vehicle class

You reach back to the client with the complete solution. Fine. But now he tells you that he wants these vehicles to be either cars or trucks. You know these types will share at least some behavior, so you don’t want to duplicate the code. No problem! Let’s use inheritance! It’s a proper is-a relation, so why not?

Vehicle with inheritance V…

The Bike Shed 

117: S.A.L.T. (Justin Searls)

We chat with Justin Searls about testing, programmer personality types, programming communities, and putting spreadsheets on the Internet.

Drifting Ruby Screencasts 

Virtual Columns with JSON Data Types

Continuing from Episode #87, we take a deeper dive into virtual columns in Rails 5.1 and use them to parse JSON Data Types with adding indexes to the virtual column.
BigBinary Blog 

type alias vs type in Elm

It took me some time to fully understand difference between type alias and type in Elm.

This is my attempt to explain it to ensure I fully understand it. Hopefully it is of use to someone else too.

In Elm everything has a type. Fire up elm-repl and you will see 4 is a number and “hello” is a String.

> 4
4 : number

> "hello"
"hello" : String

Let’s assume that we are working with users records and we have following attributes of those users.

  • Name
  • Age
  • Status (Active or Inactive)

It’s pretty clear that “Name” should be of type “String” and “Age” should be of type “number”.

Let’s think about a moment what is the type of “Status” here.

What is “Active” and “Inactive” in terms… 

Upcoming built-in Upload Solution for Rails 5.2 (ActiveStorage)

Update 07/11/2017: Just after our twitter brainstorm, DHH and @gauravtiwari stepped up and started a new branch to add Direct Upload to Cloud support right away. Of course it's still work in progress but it will be great that it will come with the support out of the box.

Update 07/20/2017: I need to clarify a few points. First, I am recommending Cloudinary's proprietary solution, but there are caveats. You're trading off easy of use for vendor lock-in. And I only recommend it for photos/images. If you need to upload super-large files (videos, or arbitraty binaries such as big tarballs) you need to research more and perhaps build a custom solution with Shrine or similar. Another statement I…

Ruby Facets

rescue from blocks in Ruby 2.5

Did you know that you don't need to use the begin/rescue/end pattern within a Ruby method definition body? If you do, you might have tried like me to apply an inline rescue statement with no begin or end inside of a normal Ruby block, say a block passed to Array#each for example.

But... it doesn't work. Although it works fine inside method bodies, this is invalid syntax in Ruby 2.4 and prior, which is kind of infuriating because putting a rescue statement at the same nesting level as the do statement makes rescue operation very neatly visible.

Thanks to Josh Cheek however, this oddity will disappear from Ruby 2.5 which should arrive this coming…

All Ruby Podcasts by 

MRS 010 My Ruby Story Dave Kimura

My Ruby Story Dave Kimura

On this episode Charles talks to Ruby Rouges panelist Dave Kimura, the creator of Drifting Ruby, the popular Ruby on Rails Screencast and Blog. Find out more about how Dave got interested in programming and first introduced to the world of Ruby. Dave also talks about how and when he started Drifting Ruby.

How did you get into programming?

Dave discusses living in Germany during middle school in the 90s. During this time, he owned a simple Mac LC II. He found a floppy disc that contained a program called Chipmunk Basic, which was his very first exposure into the world of programming. His interest with programming was further sparked by computers at…

Ruby Weekly 

#356: A Thorough Tour of Ruby Exception Classes

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 356 — July 6, 2017
Andrew Powell-Morse
A now-complete series of posts focusing on Ruby’s rich plethora of built-in exception handling classes. It has just ended with a look at fatal errors.

Drivy Engineering
Chrome can now run headless, making it possible to run headless specs without PhantomJS.

An official lightweight Ruby implementation designed for linking and embedding. mruby 1.3 is a key release including the safe navigation operator, Array#dig, Object#freeze and…
Search Results for “ruby” – via @codeship 

Graphing Benchmark Results in Ruby

Reading Time: 8 minutes

Nothing presents performance statistics quite as well as having graphs for benchmarks. Whether you want to present an alternative way for code guidelines based on performance or show a presentation, seeing the difference makes a difference. What we’ll cover here will show you how to generate graph data images from your own Ruby codebase’s benchmark suite, with presentation-worthy quality.

“Generate presentation-worthy graph data images from your benchmark suite.” via @6ftdan
Click To Tweet

The benchmark I often like to use when comparing code is iterations-per-second. You can find an excellent Ruby gem for that at benchmark-ips. This will give you numbers showing how…

EquiValent - Web Developer Blogs 

Rails Asset Pipeline compilation and Docker

Discussion on Rails Asset Pipeline compile in Docker image so that CDN can pick up assets.

'Learn Ruby on Rails' Updated for Rails 5.1

I’ve completed the Rails 5.1 update for Book Two of my book series Learn Ruby on Rails.

It’s important to have an accurate and up-to-date tutorial for beginners getting started with Rails. I’ve updated all the code examples in the book for Rails 5.1.

The book shows how to integrate Bootstrap with Rails for layout and styling. Rails 5.1 drops jQuery which is required by Bootstrap so I’ve updated the book to show how to add a jQuery gem and modify the application.js manifest.

In previous editions of the book, I used the SimpleForm gem because I liked the elegance and simplicity of the form helpers in SimpleForm. It made forms a little easier for beginners. However the release of Rails 5.1…


Successful Kickstarter

On June 5, 2017 we successfully concluded a Kickstarter campaign to raise funds to update Rails Composer for Rails 5.1. 122 backers pledged $6,963. I’m always awed at the community support for the project. Thank you!

With support from the community, I will work on a new version of Rails Composer and update the RailsApps example applications for Rails 5.1.

Rails 5.1 requires extensive changes to the RailsApps example applications. All of the example applications use Bootstrap for layout and styling. Bootstrap requires jQuery but Rails 5.1 drops jQuery so we’ve got to add a jQuery gem and modify the application.js manifest to restore the jQuery dependency.

In Rails 5.1, the familiar form_f…

Drivy Engineering 

Running feature specs with Capybara and Chrome headless

At Drivy, we’ve been using Capybara and PhantomJS to run our feature specs for years. Even with its issues, PhantomJS is a great way to interact with a browser without starting a graphical interface. Recently, Chrome added support for a headless flag so it could be started without any GUI. Following this announcement, the creator of PhantomJS even announced that he would be stepping down as a maintainer.

Setting feature specs to run with a headless version of Chrome means that our features specs can be executed in the same environment most of our users are browsing with. It is also supposed to improve memory usage and stability.

Installing prerequisites dependencies

Assuming you already…

Greater Than Code 

Episode 038: Category Theory for Normal Humans with Dr. Eugenia Cheng


Coraline Ada Ehmke | Rein Henrichs | Jessica Kerr

Guest Starring:

Dr. Eugenia Cheng: @DrEugeniaCheng |

Show Notes:

00:16 – Welcome to “Shopping is Hard; Let’s Do Math!” …we mean, “Greater Than Code!”; Eugenia’s Introduction


How to Bake Pi: An Edible Exploration of the Mathematics of Mathematics

Beyond Infinity: An Expedition to the Outer Limits of Mathematics

YouTube Channels:




Eugenia Cheng Makes Math a Piece of Cake

Everyday Math

Want to help make us a weekly show, buy and ship you swag,
and bring us to conferences near you?
Support us via Patreon

Or tell your organization to send sponsorship inquiries to mandy@greatert…

01:54 – Getting Into Math: Is math useful? Is…

Ruby Together News 

May And June 2017 Monthly Update

Hello! Welcome to the monthly update. During May and June, we paid for 179.4 hours of developer work on Bundler, RubyGems, and other open source tools. Our work was supported by Stripe, Basecamp, Icelab, Gitlab, Cloud City, and many others.

ruby together news

In May and June, Ruby Together was supported by 81 different companies, including Sapphire member Stripe. 3 companies joined as new members, including Day of the Shirt and ClickFunnels.

On top of those companies, 6 new developers signed up as members or friends of Ruby Together, including Josh Cass, Mark Tareshawty, Anıl İyidoğan, Dian Pan, and Sangwon Yi. In total, we were supported by 113 individual members and 73 friends of Ruby…

Stories by DHH on Medium 

I don’t think this is compatible with pursuing investors in the traditional startup/VC sense of it.

I don’t think this is compatible with pursuing investors in the traditional startup/VC sense of it. But I think that’s a path you should RECONSIDER anyway.

GoRails Screencasts 

Tracking Metrics with Ahoy and Blazer

Tracking business metrics can be time consuming and costly but the Ahoy gem lets you easily track metrics and Blazer makes it incredibly easy to analyze your data
Stories by DHH on Medium 


This guy never had enough, is that really you?

The underpinning tenet of chasing exponential growth is that anything less than “all of it” is never enough. If there’s more possible, more out there, then it’s your gawd damn duty to hunt it down and make it yours.

Such a pursuit is undoubtedly exciting in its Napoleonic grandeur. Why stop at making a dent in the universe, if you can bend it whole? Glory awaits only those who stand atop all others.

Or at least so goes the virtue of conquerors. Dominators. WINNERS! It’s what we’re being sold over and over again as The Way. The path to relevance and impact. And who doesn’t want to bathe in those.

But it’s not the only paradigm available for rent.…

Drivy Engineering 

The Tech Recruitment Process At Drivy

I recently saw another article highlighting the many ways in which recruitment in software development is broken. Whiteboard coding, random trivia, poorly trained interviewers… it’s all very painful and it seems to be the situation in a lot of places.

However there are companies trying to turn this around. For instance I loved the “Companies that don’t have a broken hiring process” list, and I’m constantly working to make sure Drivy deserves its place in it.

Since this is still a major pain point, I decided to share how we handle recruitment for engineering positions at Drivy. I don’t think that it’s perfect or much out of the ordinary. I’m also convinced that it’s going to evolve as it…

Drifting Ruby Screencasts 

Virtual Columns in MySQL

In Ruby on Rails 5.1.0, generated virtual column support was added for MySQL and MariaDB. Using generated and stored columns can leverage heavy calculations to the SQL side.
Ruby Weekly 

#355: Build A Query Parser Using Ruby, Parslet, and Elasticsearch

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 355 — June 29, 2017
Ryan Bates returns, offering all Pro and Revised RailsCasts episodes for free going forward.

Christoph Lupprich
It’s possible to create a Rails app from a single file, including migrations, MVC resources, and tests.

Richard Schneeman
Following up on a previous post about building a queue mechanism, this post examines atomicity and lock-free code in Ruby.

Redisgreen  Sponsored
See inside your database with large key…
Appfolio Engineering 

Improving the bundle size of Reactstrap from 295kB to 84kB

At AppFolio we use open source software to build parts of our product. As we spend time fine-tuning the performance of our products, we also end up finding possible improvements in the open source packages that we use. By contributing the improvements back to the projects, we are able to have others in the open source community benefit from the work that we do, everybody profits.

In this post I’ll focus on one of such contributions: the migration of Reactstrap from using Webpack 1 to using Rollup. Reactstrap is an implementation of the Bootstrap 4 components in React.

The migration of Reactstrap from Webpack 1 to Rollup has two major effects: it reduces the bundle size of the library…

Honeybadger Developer Blog 

Just Launched: Search Improvements!

Big improvements are coming to search at Honeybadger! To kick things off, we're proud to announce (drumroll please) a date picker! This is only the first in a series of planned search UI improvements, which you can read about inside. 

Rails 5.1 Deployment Checklist for Heroku

I released THE CONF yesterday. I hope you enjoy the conference program and take advantage of the limited early-bird discount!

Anyway, the website itself is super simple. A single page site. I chose to use Rails 5.1 as the site structure because it takes care of all the stuff I'd have to add manually in any other framework. Specially now that that it brings native Yarn and Webpack support it's a breeze to use by any competent front-end developer.

But even with the many built-in niceties, a full production setup still requires extra steps that most beginners will not know. So I decided to compile a small checklist of things you must take care of before deploying to production. It's not an…

Schneems - Programming Practices, Performance, and Pedantry 

How to write a lock free Queue

Update: I did mention that lock free data structures are really hard to write, it looks like there might be some issues that haven’t been addressed in the implementation of this LF Queue that we’re referencing. The rest of the analysis is still valid and hopefully useful to you, just know there’s actually more that needs to be done, don’t try to use that code for a mission critical application out of the box.

Tech Tips and Freebies – Rubyroid Labs Blog 

Welcome Rails 5.1.2.rc1 Release

Reading Time: 1 minute

Ruby on Rails Release 5.1.2.rc1 has just been published. Let’s have a look what improvements it has brought about.

Only recently we were talking with Aaron Patterson, a member of Ruby on Rails core Team.

And now we are welcoming the new release of Ruby on Rails technology. Though this version is pretty humble, it still brings about a number of stabilization fixes and a few nice amendments.

Action Pack

With the changes from Rails 5.1.2.rc1driven_by now can register poltergeist and capybara-webkit, which is really nice. it also allows setting additional options with the help of :options parameter.

Action View


Red Panthers 

Readability of text using odyssey

When you are writing something like article, text, document etc you are focusing on readability. If you are not then you should. As readability influence how a reader can read and understand the content, how you are presenting the content etc. It would also influence how much likely one is to share your article as well. To find the readability there are a lot of statistical tests. Few are listed below.

  • Flesch-Kincaid readability test
  • Flesch Kincaid Grade Level

  • Gunning Fog Score

  • SMOG

  • Coleman Liau Index

  • Automated Readability Index (ARI)

Recently in a project that we worked on we were asked to find the readability of various pages of a website. We decided to start with…

All Ruby Podcasts by 

MRS 009 My Ruby Story Brian Hogan

My Ruby Story 009 Brian Hogan

On this episode we have another My Ruby Story and there is a good chance you might recognize him, he is one of’s panelists Brian Hogan. Aside from being a panelists on Ruby Rouges, he also has a couple other projects like as well as

How did you get into programming?

Brain talks about how his Dad has an old Apple 2 computer. His father was a teacher for the blind and the computer had a box on it that would talk. His Dad taught him that computers can have programs written for them and make them do things. Brain talks about having math issues one evening and his Dad helped by making a math program that would quiz…

The Bike Shed 

116: A More "WALL-E" Future

Amanda is joined by SF thoughtbot developers Tony, Josh, & Greg to discuss learning new languages (and whether developers should do that in their free time), machine learning, the future of AR/VR, and tech that strives to make a social difference.

Honeybadger Developer Blog 

Replacing a Complex Regular Expression with a Simple Parser

When we have to work with text, we often reach for regular expressions. But they're not the easiest solution to every problem. Recently I was struggling with a large regexp, when I realized it'd be less work to write a parser. This article explains the process.
Search Results for “ruby” – via @codeship 

Server Rendering React on Rails

Reading Time: 7 minutes

React apps give us incredible power in the browser, and with the react_on_rails gem from the folks at ShakaCode, we now have an easy way to use React inside of our new and existing Rails apps. In a previous article, I talked about how to get up and running with React in your Rails app.

In this article, we are going to talk about doing server rendering with our React components inside of Rails. An article by Tom Dale talks about misconceptions about server rendering. With so many misconceptions, what is it and why would you want it?

The app we’ll be discussing is located here.

“Discussing server rendering with React components inside of Rails” via @leighchalliday

What Is Server Rendering?

Usually with React apps, the HTML source returned…

Ruby Pigeon 

Refactoring From Inheritance To Composition To Data

“Prefer composition over inheritance” is a popular saying amongst programmers. In this article, I want to demonstrate what that looks like.

We’re going to refactor some Rails classes from inheritance to composition. Then we’ll refactor again from composition to something even better: data.

Inheritance (The Original Code)

In an attempt to show “real” code, I’ve taken this example from the Rails codebase. These classes originally came from action_view/helpers/tags. However, I have simplified the code by removing some of the unrelated parts.

This implementation starts with DatetimeField:

class DatetimeField
  def render(date)
    value = format_date(date)
    type = self.class.field_type
All Ruby Podcasts by 

RR 316 Learning Rails 5 with Mark Locklear

RR 316 Learning Rails 5 with Mark Locklear

On today’s episode, we have Learning Rails 5 with Mark Locklear. Mark works for The discussion ranges from the introduction of Learning Rails 5 to the strategies that most successful students have for learning Rails. Stay tuned!

[00:01:30] – Introduction to Mark Locklear

Mark Locklear works for, a USDA-funded or government-funded organization. He serves the Cooperative Extension Service but a lot of people know about 4-H Youth Group. They got a handful of websites that they maintain that are mostly Ruby on Rails-based.

He has been with for about 3 years. He is also a staff at a community college mostly…

Riding Rails 

Rails 5.1.2 has been released

Hi everyone,

I am happy to announce that Rails 5.1.2 has been released.

CHANGES since 5.1.1

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.


If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.1.2:

$ shasum -a 256…
Riding Rails 

Rails 4.2.9 has been released

Hi everyone,

I am happy to announce that Rails 4.2.9 has been released.

Following our maintenance policy, since the release of Rails 5.1.0, the 4.2 series will only receive new releases in case of severe security issues.

CHANGES since 4.2.8

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.


If you’d like to verify that your gem is the same as the one I’ve uploaded, please use… 

Estimates are Promises - A Better Metaphor

If you didn't know, I am frequently answering questions over Quora. Follow me there, so far I wrote almost 600 answers, many of which resembles my longest blog posts here.

One of the most popular answer regards the subject of "What is the hardest thing you do as a software engineer?". I wrote a similar answer in Brazilian Portuguese in the post "Estimativas são Promessas. Promessas devem ser cumpridas.".

In a nutshell, you can never give an estimate that is "correct". If you could, it would not be an "estimate", it would be a "prediction".

Let us assume that we have neither precognition powers nor magic crystal balls to tell us the future.

To estimate something is to "guess" the value…

Christoph Lupprich 

Single file Rails applications (for fun and bug reporting)

As you might know from previous posts, I keep a Rails playground project around. That’s a small application with a bunch of models, controllers and accompanying tests. It allows me to quickly try out a new gem that was mentioned in a blog post, see the effects of a configuration flag, or quickly prototype other ideas.

Sometimes however, even that very simple Rails application is too big. For example, when I want to share the application with friends or the internet. A default Rails application consists of a bunch of files that span multiple directories. That’s no longer suitable for a GitHub Gist or a simple email. Also, telling people to look at a bunch of files, but ignoring others,…

Black Bytes 

The Hidden Costs of Metaprogramming

Metaprogramming sounds like a very fancy word, but is it any good? It can be useful, but many people don’t realize that using metaprogramming has some costs. Just so we are on the same page… What is metaprogramming exactly? I define metaprogramming as using any method that: Alters the structure of your code (like define_method) […]

The post The Hidden Costs of Metaprogramming appeared first on Black Bytes. Don't miss your free gift here :)

Drivy Engineering 

Designing state machines

State machines are a very powerful tool but are often underused in web development. The design process forces you to think hard about how you want to model your data, about the different objects lifecycles, about the way you want to expose your data and communicate with your whole team, and about the upcoming evolutions.

Going through this process takes a lot of efforts but is worthwile, it brings a lot of structure to your code and your team. Also, the actual implementation of a state machine is usually very simple.

Intro : State machines are simple

A simplified state machine for a a Movie object can be represented like this :

And this diagram was generated with the following…

Drifting Ruby Screencasts 

Plotting Points on a Map from Scratch

Using the Google Maps Javascript API, learn how to plot markers onto a map. Load markers and info windows through AJAX calls to your Rails JSON API.
Devon C. Estes - Articles 

Experience is Ruining Software


Experience isn’t always helpful, and it often doesn’t mean what we think it means. The correlation between years of experience and the ability to meaningfully contribute to a team has yet to be proven, so we shouldn’t rely on that as a key indicator of potential. However, that’s the best we have right now when we’re trying to judge someone’s potential ability to contribute, and this is leading developers to chase emerging technologies in an effort to pad their resumes so they don’t miss out on future job opportunities.

Riding Rails 

This Week in Rails: 5.1.2.rc1 released and faster fixtures

Hi there! This is Kir from chilling Ottawa, bringing you another edition of This Week in Rails. Let’s dive in.


🎉 This Week’s Rails contributors! 🎉

We had 21 awesome people who helped make Rails better this week, with one first-time contributor! Would you like to help as well? Head over to the 👉 issues list.


🎉 Rails 4.2.9.rc2, 5.0.4 and 5.1.2rc1 have been released 🎉

It’s your chance to help us discover bugs in 4.2.9 and 5.1.2 release candidates. Also, Rails 4.2.9 will be the last release in 4.2 series, so it’s time to upgrade if your app is still running on Rails 4.


Use bulk INSERT to insert fixtures

Inserting fixtures in test environment became significantly…

Hi, we're Arkency 

Tracking dead code in Rails apps with metrics

When you work in big Rails application sometimes you would like to remove certain lines of code or even whole features. But often, you are not completely sure if they are truly unused. What can you do?

With and other monitoring solutions that’s easy. Just introduce a new metric in the place of code you are unsure about.

class SocialSharesController < ApplicationController
  def friendster

    # normal code

After you add a graph to your panel, you can easily configure an alert with notifications to Slack, email or whatever you prefer, so that you are pinged if this code is executed.

Wait an…

Hi, we're Arkency 

What I learnt today from reading gems' code

Today I was working on client and while I was debugging some parts, I had a look at some Ruby gems. This is always an interesting experience because you can learn how other developers design their API and how different it can be from your approach.


So here are some interesting bits from sidekiq code.

Sidekiq::Client initializer

module Sidekiq
  class Client
    def initialize(redis_pool=nil)
      @redis_pool = redis_pool ||
      Thread.current[:sidekiq_via_pool] ||

Quoting the documentation:

Sidekiq::Client normally uses the default Redis pool but you may pass a custom ConnectionPool if you want to shard your Sidekiq jobs…

Schneems - Programming Practices, Performance, and Pedantry 

A Tale of Slow Pagination

When I see a query in my logs without either a limit or a count clause, alarm bells go off because it is likely a hotspot. A pagination query has alimit so it usually flies under my radar:

Ruby Weekly 

#354: Rails' CurrentAttributes considered harmful

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 354 — June 22, 2017
Launch School
Goes a level deeper than most Rails tutorials, looking at the how and why behind what Rails does.

Ryan Bigg
A recent commit introduces a thread-isolated attributes singleton to Rails, but how and why could global state be a bad thing? Ryan Bigg investigates.

Contactually’s approach uses Makara, a DB connection proxy, to split query balancing among databases.

UpgradeRails  Sponsored 

The Economics of Software Development

The software development community is boiling nowadays with so many options all at once. You have dozens of active and very good languages such as Go, Elixir, Clojure. Dozens of very good frameworks, both in the back-end and front-end including React, Elm. Dozens of sound methodologies from good old Agile stuff all the way to Continuous Deployment with microservices.

Now, you're a small tech startup or even a small team in a big corporation. How to even start?

And the recommendation is: do the smallest thing that works first. Always. Of course, avoid "quick and dirty" as much as you can. But don't get paranoid and over-engineer too much.

Over-engineering is as expensive as doing things…

blog of Marian Posăceanu - rubyist most of the time 

JRuby, RVM and Vim walk into a (performance) bar

I'm not sure why RVM is still my default Ruby version manager yet the issue at hand should be reproducible on rbenv too.

Let's add a bit of context to this: we have an API written in Ruby and running on JRuby i.e. via JVM which implies slow start-up times compared to CRuby (yes, even with export JRUBY_OPTS='--dev'). I use Vim 8.0.502 which of course comes by default bundled with Tim Pope's vim-ruby .

The problem: since I've switched to JRuby I started to notice a slowdown whilst working in Vim with .rb files. I did not pay too much attention to it at first (read almost for a month) but today it really started to bug me. I had no idea what was causing the slowdown so I tried Vim's trusty…

The Bike Shed 

115: I Don't Need Another Google Hangout (Cecy Correa)

We talk with Cecy Correa about how to hire and get hired.

Giant Robots Smashing Into Other Giant Robots 

Tips for Using FactoryGirl Without an ORM

FactoryGirl is one of my favourite testing tools — I was a fan prior to joining thoughtbot. It’s one of those tools I miss immediately when working outside the Ruby ecosystem.

Recently I’ve been working on a Rails project that doesn’t need any database persistence and therefore doesn’t use an object-relational mapper like ActiveRecord. Instead data is fetched from an external JSON API and parsed into value objects written in plain Ruby.

At the outset, the value objects needed for unit tests were manually written for each example. As further attributes were added to the models this quickly became tedious; the value objects created for previous tests also needed updating.


Hi, we're Arkency 

Dogfooding Process Manager

Process managers (sometimes called Sagas) help us with modeling long running processes which happen in our domains. Think of such process as a series of domain events. When enough of them took place (and the particular ones we’re interested in) then we execute a command. The thing is that the events we’re waiting for might take a longer time to arrive, during which our process manager has to keep track of what has been already processed. And that’s where it gets interesting.

The Domain

Consider following example taken from catering domain. You’re an operations manager. Your task is to suggest your customer a menu they’d like to order and at the same time you have to confirm that… 

Starting with Blender

Blender is a beast. A true marvel of open source technology achievement, you should applaud everyone that have been involved in making this thing work as well as it does. It rivals the most expensive commercial options out there, from Maya to the venerable Pixar's Renderman.

The Blender community is so passionate and committed that they frequently produce high quality, almost hollywood grade, short movies within Blender in order to stress test the tool, fix bottlenecks and usability issues in a real world workflow.

This is primarily a post intended for "future me" to be able to jump back into a single resource list. As being a 3D modeler is not my full time job, I will have large hiatus…

All Ruby Podcasts by 

RR 315 Offshoring and Latin American Developers with David Hemmat

Offshoring and Latin American Developers - David Hemmat

For this episode of Ruby Rogues we have Jason Sweat and Brian Hogan for our panel along with Charles Max Wood and a special guest, David Hemmat from David and the Blue Coding team work to connect developer talent to businesses in need through a thorough process of vetting as well as a database collection of potential developers. Check out this episode to learn more!

How did you get started?


David talks about going to school in the Dominican Republic worked locally, but later found work with US companies. He also set up a friend with a US job and they realized that there may be a demand as someone to bridge the…

Stories by DHH on Medium 

Uber’s CEO is out because of pressure, not some ethical epiphany from the board

It’s hard to predict exactly how much pressure is needed to affect change, but it’s clear to see when there is enough. And there was finally enough to flush out Uber’s CEO.

But let’s not kid ourselves. Kalanick didn’t get the boot because Uber’s board had some ethical epiphany. They presided over his misdeeds for years. Fat, golden years steered by toxic leadership and fueled by depraved acts.

Now greed has taken a backseat to fear. Fear that the pressure that once seemed so easy to ignore will suddenly drown them all. Flushing out the CEO goes from “impossible to even consider” to “impossible to avoid” in what seems no time at all.

On the board, it probably did look like “life comes at you…

The Life of a Radar 

Rails' CurrentAttributes considered harmful

I was made aware of this commit recently (thanks to Rebecca Skinner) to Rails which introduces what is effectively a global state to Rails applications.

Rather than writing why global state in-general is a bad thing myself, I will instead link you to this excellent question + answer on the Software Engineering Stack Exchange.

Very briefly, it makes program state unpredictable.

To elaborate, imagine you have a couple of objects that both use the same global variable. Assuming you're not using a source of randomness anywhere within either module, then the output of a particular method can be predicted (and therefore tested) if the state of the system is known before you execute the method.

This implementation also chooses to use thread-local variables which this answer over on Stack Overflow explains is not a good choice because:

  • It's harder to test them, as you will have to remember to set the thread-local variables when you're testing out code that uses it
  • Classes who use thread locals will need knowledge that these objects are not available…
All Ruby Podcasts by 

MRS 008 My Ruby Story Jordan Hudgens

My Ruby Story 315 Jordan Hudgens

In this episode it’s another My Ruby Story and this week’s story is Jordan Hudgens’. Jordan is lead instructor of Bottega, a code school based in Lehi, Utah but also located in Phoenix and Salt Lake City. You’ll hear a bit about how came to be as well as what makes it stand out from the rest. You’ll also catch a couple tangents including one on artificial intelligence, augmented reality, an IoT. Don’t miss this one!

How did you get intro programming?

Jordan talks about how at the age of 12 his father had a business and with their budget couldn’t afford a web designer. His father offers Jordan to buy him a computer if he can build the website.…

Greater Than Code 

Episode 037: Failure Mode with Emily Gorcenski


Coraline Ada Ehmke | Sam Livingston-Gray

Guest Starring:

Emily Gorcenski: @EmilyGorcenski | | Simple

Show Notes:

00:16 – Welcome to “Diamonds Are For Gender” …we mean, “Greater Than Code!”

00:56 – Origin Story, Superpowers, and Data Science

04:20 – Diversity and Career Paths in Data Science

10:51 – Ethical Debates Within the Data Science Field

Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy


FMEA (Failure Mode Effects Analysis)

17:21 – Software Development and Engineering; Failure Modes in Software

21:44 – Failure Modes in Democracy; Voting Machine Software

33:37 – Working for a Government Contractor

36:21 – Data…

Riding Rails 

Rails 5.1.2.rc1 has been released

Hi everyone,

I am happy to announce that Rails 5.1.2.rc1 has been released.

If no regressions are found, expect the final release on Monday, June 26, 2017. If you find one, please open an issue on GitHub and mention me (@rafaelfranca) on it, so that we can fix it before the final release.

CHANGES since 5.1.1

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.


Appfolio Engineering 

A Story of Passion and Hash Tables

Ruby 2.4.0 introduced a lot of great new features. One of them was open addressing for hash tables - the details of open addressing are a bit obscure, but Ruby hash tables are now faster. Everybody uses hash tables, so everybody gets extra speed. Awesome!

But how did that happen? There's an interesting story there. Let's tell that story and benchmark with Rails Ruby Bench, shall we? (Don't care about the story? Scroll down to the end for graphs of the speed differences.)

A Beginning and Some Dueling Banjos

Ruby's open addressing for hash tables is recorded by a truly wonderful bug report. If you don't care about my commentary, just go read it. Seriously.

It begins with Vladimir Makarov…