news, opinion, tutorials, about ruby, aggregated
Sources About
GoRails Screencasts 

Decorators with the Draper Gem

Implement the decorator pattern with the Draper gem in your Rails application
Stories by Gaurav Tiwari on Medium 

BP, you got yarn installed in your system?

Stories by DHH on Medium 

Exponential growth devours and corrupts

There is no higher God in Silicon Valley than growth. No sacrifice too big for its craving altar. As long as you keep your curve exponential, all your sins will be forgotten at the exit.

It’s through this exponential lens that eating the world becomes not just a motto for software at large, but a mission for every aspiring unicorn and their business model. “Going viral” suddenly takes on a shockingly honest and surprisingly literal meaning.

The goal of the virus is to spread as fast as it can and corrupt as many other cells as possible. How on earth did such a debauched zest become the highest calling for a whole generation of entrepreneurs?

Through systemic incentives, that’s how. And no…

EquiValent - Web Developer Blogs 

Rails ActiveRecord Relation (Arel), composition and Query Objects

Ruby on Rails ActiveRecord::Relation (or Arel) is really handy tool to create complex SQL calls. In this article I'll show you several tricks I've came across over the years and show you how to combine them to Query Objects and Query Interfaces
Stories by Gaurav Tiwari on Medium 

Hey BP, Strange! Is webpack dev server installed?

Try adding it by running from your app directory,

Drifting Ruby Screencasts 

Ruby on Rails 5.1.0 Changes and New Features

Upcoming features include Yarn/Webpack, System Tests via Capybara, Encrypted Secrets and a bunch of other cool things!
Giant Robots Smashing Into Other Giant Robots 

Slicing up Rails Application.js for Faster Load Times

When using a fast device it’s easy to forget that page load times are impacted by not just network speed but processing power too. Browsing the thoughtbot website on a MacBook Pro with a fast internet connection and warm cache feels snappy. Backed by a CDN, the homepage usually loads in under a second for me.

On less powerful devices with slow internet connections the page load times have plenty of room for improvement. To assess this we can use Chrome dev tools to throttle the network and CPU.

Profiling with Chrome dev tools

Here’s a good starting point for profiling page load times with Chrome:

  • CPU throttling: “Low end device (5x slowdown)”
  • Network throttling: “Good 3G”
  • “D…

If you’re profiling the performance against a…

Virtuous Code 

No puddle of piranhas (SIGAVDI #31)

Hello friends,

It’s been a busy few weeks since I last wrote. Winter has been flickering on and off like an aging fluorescent light bulb. The daffodils have opted to declare an early Spring.

(Pictured: Our escape-artist chickens inspecting the daffodils while taking an unsanctioned leave from their run.)

I realized today that I used to put a lot more quotes from the books I was reading in these newsletters. It’s not that I stopped reading books entirely. But most of my reading lately has been in the genre of business and marketing, and there haven’t been a lot of excerpts that seemed appropriate for this context.

Maren Kate writes about brutal vulnerability:

“Fake it ‘till you make it”…

Notes to self 

Running wkhtmltopdf in Vagrant (without X server)

Chances are you might need to run wkhtmltopdf on your server or in Vagrant environment (e.g. to overcome compatibility issue such as Cannot mix incompatible Qt library (version 0x50700) with this library (version 0x50701)). That way you need to be able to run it without an actual X server.

Solution is luckily pretty simple. You can fake your X server with xvfb which is virtual framebuffer X server. On Fedora that comes as xorg-x11-server-Xvfb package:

# dnf install xorg-x11-server-Xvfb -y

Afterwards you can prepend your actual command with xvfb-run:

$ xvfb-run --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf --quiet --page-size Letter --margin-top 0.75in --margin-right 0.75in…
Stories by Gaurav Tiwari on Medium 

hey Nicholai

You would need to uncomment the dev server config in development.rb. It looks something like this,

Stories by Gaurav Tiwari on Medium 

Hey Krešimir

Thank you :) Yes, Heroku respects Procfile and uses web process as the default web server.

Riding Rails 

This Week in Rails: 5.1.0.beta1 release, Encrypted Secrets, System Tests and more!

Hi everyone,

Greg here with the latest from the world of Rails. It was a busy week with new releases and many improvements!


New Rails releases

The first beta release for 5.1.0 is out with some love towards JavaScript, System Tests, Encrypted Secrets and more!
There is also a new stable release for 4.2.8 and a release candidate for 5.0.2

Eileen joins Rails core

We’re proud to welcome Eileen M. Uchitelle to Rails core!

This week’s Rails Contributors

33 developers contributed to Rails this week. If you want to be part of this team, look at the issues list and make a contribution!


Custom url helpers and polymorphic mapping

This pull request introduces support for custom…

Ramblings of a techie 

Is your experience an Asset or a Liability?

We are already into few weeks into 2017. As with any new year, a lot of resolutions would have been made. I wanted this year to be the best one, better than any other year in the past and I am very sure most you would want the same. As with any year progressing, there are two things that will happen whether we wish or not. For professionals, (which is where I direct this article), you age a year and your experience will increase by a year. I am going to analyse on whether this natural progression is good or bad for our careers.

The Information technology is a niche industry that started booming, exploding, rather, in early 2000. Due to this immediate inflation and vacancy, opportunities…
Stories by Gaurav Tiwari on Medium 

Hi David Qorashi

Have you checked if webpack dev server is compiling and listing bundles correctly at http://localhost:8080/ ?

Riding Rails 

[ANN] Rails 5.0.2.rc1 has been released!

Hi everyone,

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

If no regressions are found, expect the final release on Wednesday, March 1, 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.0.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.

ruby – Bibliographic Wilderness 

rubyland infrastruture, and a modest sponsorship from honeybadger is my hobby project ruby RSS/atom feed aggregator.

Previously it was run on entirely free heroku resources — free dyno, free postgres (limited to 10K rows, which dashes my dreams of a searchable archive, oh well). The only thing I had to pay for was the domain. Rubyland doesn’t take many resources because it is mostly relatively ‘static’ and cacheable content, so could get by fine on one dyno. (I’m caching whole pages with Rails “fragment” caching and an in-process memory-based store, not quite how Rails fragment caching was intended to be used, but works out pretty well for this simple use case, with no additional resources required).

But the heroku free dyno doesn’t allow…

Virtuous Code 

How to clean up Medium feeds in Inoreader

How to fix one of the many annoyances of reading Medium blogs (if you happen to use Inoreader).

Giant Robots Smashing Into Other Giant Robots 

Mastering the Vim Language

From the Boston Vim Meetup, Chris Toomey talks about mastering the Vim language. Vim’s core is the amazing command mappings and text objects that allow for countless combinations to define precise edits. Learn how to master the built-in commands, motions, and text objects, and even how to extend the Vim language for even more power!

Check out more meetup presentations, editor tips/shortcuts, lightning talks, AMA’s, behind the scenes bloopers, and more by subscribing to the thoughtbot YouTube Page!

BigBinary Blog 

Ruby 2.4 implements Integer#digits for extracting digits in place-value notation

This blog is part of our Ruby 2.4 series.

If we want to extract all the digits of an integer from right to left, the newly added Integer#digits method will come in handy.

#=> [1, 2, 3, 7, 6, 5]

#=> 7

We can also supply a different base as an argument.

#=> [3, 2, 1]

#=> [15, 14, 13, 12, 11, 10]

Use case of digits

We can use Integer#digits to sum all the digits in an integer.
#=> 6

#=> 6

Also while calculating checksums like Luhn and Verhoeff, Integer#digits will help in reducing string allocation.

Greater Than Code 

Episode 021: Phil Sturgeon


Jessica Kerr | Coraline Ada Ehmke | Sam Livingston-Gray

Guest Starring:

Phil Sturgeon: @philsturgeon |

Show Notes:

00:28 – Welcome to Greater Than Code: The SJW Takeover

00:53 – Origin Story, Superpowers, and Bike Messengering

Build APIs You Won’t Hate


07:59 – Long-form Blogging (aka Rants)

08:50 – Codes of Conduct: Adoption, Enforcing, Conspiracy Theories

The Contributor Covenant

17:40 – What it means to be a “Social Justice Warrior”,…

Riding Rails 

Rails 5.1.0.beta1: Loving JavaScript, System Tests, Encrypted Secrets, and more

Rails 5.0 was released just some eight months ago, and now, some 3500 commits later, we’re already close to the next big release. And what release this version 5.1 is lining up to be! We’ve made great strides on long-term promises and key ergonomics while also spring cleaning a bunch of deprecated code.

Let me walk you through the highlight reel:

Loving JavaScript

We’ve had a stormy, perhaps even contentious, relationship with JavaScript over the years. But that time is past. JavaScript has improved immensely over the past few years, particularly with the advent of ES6, and with package and compilation tools like Yarn and Webpack. Rails is embracing both of these solutions with open arms…


Puts vs Return in Ruby

If you’re a new programmer, or interested in mentoring new programmers than this article is for you. It’s about the difference between puts and return. One of the more surprising things I learned this year was just how easy beginners mix these two concepts up.

I see the confusion

When you start your journey to become a progammer, one of the first things you learn is how to print text to the screen. In Ruby, you do this with either the puts or print method.

puts "hello world"

# or 

print "hello world\n"

After a few days or weeks, you’ve learned to do more things with Ruby, but puts is still how you ouput your results. You write a lot of code that looks like this:

input = gets.chomp

OmbuLabs Blog 

How to run multiple dependent builds on Circle CI

We all know the importance of having a CI tool integrated in your project. It allows you to run your entire test suite every time you want to merge a set of changes. If you have a core project and many projects that depend on it, you want to run the tests for the core project and the dependent projects at the same time. This article explains how you can do it with Circle CI.

I will explain how to do that with two Rails projects (an application and an engine)

In this example we have an app called my-app and an engine called my-gem. In my-app/Gemfile we should have something like this:

gem 'my-gem', git: '', tag: '1.0.0'

In order to edit the default…

zverok with ruby 

The Story of Four Weathers, or You Don't Need an API Wrapper

Once Rubyist see a new useful HTTP API, her/his first thought would be “does it have a Ruby wrapper?”, and if not, the next would be “once, I should do a Ruby wrapper for this!”

Though, once it comes to practice, it turns out that find (or create) a decent API wrapper is not an easy task. The worst thing is, each API wrapper design challenge turns out to be some kind of “state of the art work” (while, in fact, it should be an easy routine). It could be easier when the wrapped API is described in some formal manner, but it is rare the case.

To understand what I am talking about here, let’s look at some examples of Ruby API wrappers for the same domain, and how different they are.


Ruby Weekly 

This week's Ruby news, issue 337

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 337 — February 23, 2017
Filippos Vasilakis
An extensive tutorial (with fully working/deployed code) on building an API on top of the app built in Michael Hartl’s Rails Tutorial.

Gaurav Tiwari
Rails 5.1 will have first-class support for Webpack. This post explores the new alpha version of the official Webpacker gem and its features.

Nelson Elhage
“I find this interesting as a cautionary tale of how several of Ruby’s features interact to…
Blog - Saturn Flyer 

Building a tool that's easy for your team to use

In previous articles I shared how I moved a solution to a problem into a general tool.

Building your own tools helps you avoid solving the same problem over and over again. Not only does it give you more power over the challenges in your system, but it gives you a point of communication about how a problem is solved.

By building tools around your patterns you'll be able to assign a common language to how you understand it's solution. Team members are better able to pass along understanding by using and manipulating the tools of their trade rather than reexplaining a solution and repeating the same workarounds.

We can compress our ideas and solutions into a simpler language by building up…

Virtuous Code 

A random selection of marketing, business, and personal development resources

As I’ve mentioned before, my current study focus is marketing. Marketing naturally drags along with it a penumbra of related topics, including business models and work on personal focus and productivity.

When I’m studying a new topic, where I don’t even have a lay of the land,  the first phase of my research typically takes a “scatter-gather-cull” form.

  • Scatter: follow any and all leads, traversing multiple hops of connection, in order to identify a wide sampling of resources on the topic.
  • Gather: make some kind of weak connection to the resources that seem even marginally relevant and trustworthy. This often means signing up to a mailing list or subscribing to a blog feed.
  • Cull: as I…

I was talking to my friend Suzan yesterday about this process, and she asked me whose work I’ve been reading. This gave me the idea of writing up a quick list of the marketing-related mailing…

Stories by DHH on Medium 

Horses for courses

You wouldn’t use a race horse to drag a cart

It’s no more sensible to talk about a single category of programmers than it is a single category of writers. Yes, an intimacy with the language is (usually) shared amongst writers, but otherwise journalists and poets don’t have a whole lot in common as part of their daily work. Likewise, a programmer working on a new database storage engine doesn’t share that many overlapping concerns with a programmer writing a new web-based information system.

Yet companies and individuals continue to lump all programmers together in the big “software engineer” basket. That means sharing everything from interview techniques (like the dreaded whiteboard algorithm…

Riding Rails 

Eileen joins Rails core

We’re proud to welcome Eileen M. Uchitelle to Rails core. Eileen has worked tirelessly on Rails for three years, and just completed a major integration bit to have Capybara-backed system tests in Rails 5.1.

Her fingerprints are all over Active Record, she’s been reviewing tons of community pull requests, pushed testing ever forward, and written a bunch of needed documentation. A very well-rounded involvement indeed!

Eileen is Rails core member #14 and our first woman on the team ❤️🎉👏


How to share Rails i18n messages with React through webpack

Very specific title hu? This time I’m here for sharing a solution for a specific problem I encountered a couple of days ago.

There’s this existing Rails monolithic application. Team and customer decided that time had come for this app to be decoupled in two components: Rails would do its usual work as an administration and API backend, while React would be used for the frontend component. Everything related to the frontend would then be rewritten, keeping the same behaviour and visual design. But there are a lot of translations related to the user experience and that have now to be included in the javascript bundle, while they were before used by the server.

To do so, I was aiming to write…

Giant Robots Smashing Into Other Giant Robots 

Neat 2.0 Building the future of floated Sass grids

svg { color: inherit; } @media (min-width: 700px) { .full-width-image { margin-left: calc(350px - 50vw) !important; min-width: calc(100vw - 3rem) !important; } } @media (min-width: 1366px) { .full-width-image { margin-left: calc(365px - 50vw) !important; min-width: calc(100vw - 3.25rem) !important; } } .small-image { max-width: 400px !important; margin: 4rem auto !important; } .super-small-image { max-width: 150px !important; margin: 4rem auto !important; }

An illustration of the game snakes and ladders made to look like a grid

Version 2.0 of Neat has been released.

New and improved, this change is a substantial departure from its original attributes and behavior. The result is a simpler, more flexible system that…

Riding Rails 

[ANN] Rails 4.2.8 has been released!

Hi everyone,

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

This is the first version of the 4.2 series that officially support Ruby 2.4.


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-1 hashes.

Here are the checksums for 4.2.8:

$ shasum…
Schneems - Programming + Open source 

The Oldest Bug In Ruby - Why Rack::Timeout Might Hose your Server

Update: There’s a great resource for dealing with timeouts in Ruby called The ultimate guide to Ruby Timeouts, via @codefolio. Also there’s some good dicussion on Reddit around the possibility of maybe using Thread.handle_interupt in gems, read the comments.

The Ruby Rogues 

RR 298 Scope Wars and Being New with Malinna Leach

On today’s episode, Charles Max Wood, Jason Swett, Brian Hogan, and David Kimura discuss Scope Wars and Being New with Malinna Leach. Malinna is a Junior Full-Stack Web Developer who just graduated from Makers Academy. Tune in and learn more about Scope Wars and what inspired her to write the blog post.

Semaphore CI Community Tutorials on Ruby 

Stubbing the AWS SDK

This article is brought with ❤ to you by Semaphore.

Originaly published on Republished with author's permission.

If you’re reading this, dear Devop, you can probably remember a time before you were a Devop, or a Site Reliability Engineer, or whatever. Back to a time when you were a Systems Administrator, or a Unix Technician, or an Infrastructure Engineer; when your job involved switch blades and RAID cards, and you had to worry about LUN alignment and BIOS configurations.

Of course nobody is suggesting those tasks have disappeared but, with the advent of cloud computing, much of the yuckiness has been abstracted away from us. Instead of ‘remote hands’ we are…

Honeybadger Developer Blog 

Objects as Ruby Hash Keys

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.
Giant Robots Smashing Into Other Giant Robots 


Balance is great example of how viewers give physical dimensions to non-physical things. Balance is usually described as how “heavy” elements feel to the viewer according to how elements are arranged.

For displaying text, it’s best to provide a comfortable experience for the user to focus on the words. Users don’t want to be constantly distracted by something other than the content, but we can use balance and imbalance to help affect user behaviors and keep things visually interesting.

The most important things that influences visual weight are:

  1. Contrast and Color
  2. Texture and patterns
  3. Identifiable shapes

Contrast is the visual difference between the lightness and darkness of visual…

Black Bytes 

15 Weird Things About Ruby That You Should Know

15 Weird Things About Ruby That You Should KnowBy Jesus CastelloRuby is an amazing language with a lot of interesting details that you may not have seen before...…in this post I compiled some of those details for your own enjoyment in a nice-looking list :)​ 1 Heredoc + Method If you have some data that you […]

The post 15 Weird Things About Ruby That You Should Know appeared first on Black Bytes. Don't miss your free gift here :)

Stories by DHH on Medium 

Deleting Uber is the least you can do

Uber is what you get when you take Silicon Valley’s most toxic values, add billions of dollars in venture capital, and spice it with endless adoration from a fawning tech press. The resulting cocktail has turned as putrid as it’s been potent. And the inebriated corporate culture of Uber is acting as reckless and callous as a dangerous drunk.

I’m sure it didn’t start out this way. It never does. They were up against entrenched interests keen to keep a shoddy on-demand transportation system in place for another century. A perfectly unlikable foe begging for a D-Day Disruption. Hell, I cheered them on in this fight in the early days!

“Beware that, when fighting monsters, you yourself do not…
Everyday Rails 

Status report: Everyday Rails Testing with RSpec for RSpec 3.5 and Rails 5

A progress report on the latest version of my Rails testing book.
Drifting Ruby Screencasts 

Working with Internationalization

Adding translations into your website does not have to be hard. With Rails built in I18N functionality, we gain access to many helpers and conventions that makes it a much easier task. Learn how to add I18N into your Rails application.
Giant Robots Smashing Into Other Giant Robots 

How to manage your Python projects with Pipenv

We are well known for our work with Ruby and Rails here at thoughtbot, but generally we always try to use the most appropriate language or framework for the problem at hand. With that, I’ve recently been exploring machine learning techniques so I’ve been working a lot more in Python.

One of the big differences between working on Ruby projects and Python projects is the way that dependencies are typically managed. There currently isn’t anything similar to Bundler or Gemfiles in the Python universe so usually a Python developer will create a virtual environment using Virtualenv, and then annotate a requirements.txt text file with a list of dependent packages, which they can then install…

This approach works fine but…

Stories by Gaurav Tiwari on Medium 

Introducing Webpacker

Official Rails gem for bundling JavaScript assets with Webpack

Ruby Pigeon 

Methods Can Be Longer Than Five Lines

So you’ve decided to apply Sandi Metz’s Rules For Developers, including:

Rule #2: Methods can be no longer than five lines of code.

This rule sounds simple in theory, but you will discover difficulties when applying it strictly.

Let’s look at the pros and cons of short methods, and when it’s OK to break the rule.

The Good

Short methods are usually easier to read and understand.

  1. Small, well-named methods result in self-documenting code. Method names are a kind of documentation – they describe what a chunk of code does. Since every method is small, you will need to write more methods, which means more names.

  2. Small methods have lower cyclomatic complexity – fewer…

I have some – let’s call them “interesting” – stories about that particular codebase.

Before we get into the…

Riding Rails 

This Week in Rails: Freeze strings related to caching, query optimization for Postgres and more!

Hey everyone 👋

Prathamesh here with the latest from the world of Rails.


⚡️This week’s Rails contributors ⚡️

This week was full of improvements and bug fixes. We have 24 awesome people contributing to Rails with 3 first-timers!


Freeze fragment caching related strings

This change freezes the common strings used for fragment caching reducing the string allocations every time a read/write operation is performed on the fragment cache. The patch showed proper object allocation benchmarks showing a noticeable improvement, so it was accepted.

Optimize query for finding primary keys of a Postgres table

This change simplifies and optimizes the query used to determine the…

Brandon Hilkert 

Using PhantomJS to Capture Analytics for a Rails Email Template

Every Sunday Bark sends parents a weekly recap of their children’s activity online. The first iteration was pretty basic, things like “Your children sent X number of messages this past week” and “You have 10 messages to review”. But we wanted to go deeper…

Using PhantomJS, we were able to take screenshots of a modified version of the application’s child analytics page and include the image in the email sent to the parent. The email now contains everything the parent can see from the application, all without leaving their inbox.

The Problem

If you’ve every attempted to style an HTML email with anything more than text, you’re sadly familiar with its limitations. Tables and other…

Test Double | Our Thinking 

Test Organization With Contexts

Many of my favorite languages have testing libraries that support specs. Two distinct standouts that do not support contexts are C# and Java; luckily, their language features still allow the same goals to be achieved. Before we look at how to use them, let's talk about why contexts are awesome!

Defining Contexts For Test Separation

It’s beneficial to separate the setup and the “context” around a method call within a class. This allows a single test or set of tests to use similar setup or default values. The setup will be focused on one entry into the method under test, and extraneous noise can be eliminated.

Separating the contexts allows the scope of setup for one method or set of tests to…

Hi, we're Arkency 

Ruby code I no longer write

When we learn programming languages and techniques we go through certain phases:

  • Curiosity
  • Admiration
  • Overdosage
  • Rejection
  • Approval

etc. Similarly with other things we enjoy in our life such as ice cream, pizza and sunbathing :) We learn to enjoy them, we try too much of it and learn the consequences. Hopefully some time later we find a good balance. We know, how much of it, we can use without hurting ourselves.

I think we can have a similar experience in programming for example when you find out about metaprogramming, immutability, unit testing, DDD. Basically anything. We often need to hit an invisible wall and realize that we overdosed. It’s not easy at all to realize it and…

Greater Than Code 

Episode 020: Jenn Schiffer


Astrid Countee | Jessica Kerr | Coraline Ada Ehmke

Guest Starring:

Jenn Schiffer: @jennschiffer |

Show Notes:

00:16 – Welcome to “Neon Abstract Podcast Erotica!” …we mean, “Greater Than Code!”

01:15 – Origin Story



06:37 – Viewing Source and Learning How to Code

11:02 – Getting a Computer Science Degree

13:56 – Pixel Art, Sexuality in Tech, and Online Presence

@aphyr (Kyle Kingsbury)

Ashley Madison Scandal

26:54 – How do potential employers react to your satire?

28:41 CSS Perverts

36:03 – Vetting Potential Employers and Company Culture; Dealing with Toxic People


Jessica: Everyone has something that they keep quiet about because they…

Giant Robots Smashing Into Other Giant Robots 

Emacs as a Python IDE

From the New York Emacs Meetup, Drew Werner shows how, with a little effort, Emacs can be a powerful, multi-language IDE with code completion, documentation lookup, and more. Using Python as our language, we will show how to use the the auto-complete, epc, and jedi.el libraries to create a semantically rich editing experience. We’ll discuss how these libraries work together and how to customize them for your own setup.

Check out more meetup presentations, editor tips/shortcuts, lightning talks, AMA’s, behind the scenes bloopers, and more by subscribing to the thoughtbot YouTube Page!

GoRails Screencasts 

ActiveRecord Explain

Learn how to use ActiveRecord Explain to analyze your SQL queries generated by ActiveRecord
Ruby Weekly 

This week's Ruby news, issue 336

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 336 — February 16, 2017
Tyler Lippert
A (complete) 4 part series that digs into Rack, how to use it to handle incoming requests, how to create a templating system, and then how to extract common code to build your own framework.

Starr Horne
A test of Unicode improvements in 2.4.0 and how they’ve affected everyday Ruby operations and methods.

Benjamin Curtis
A systemd-based script to run one Sidekiq process per core and watch memory consumption per process.

Sqreen  Sponsored

Find if a list is circular with memory constraint

Usually developers when thinking about a solution put their focus on the complexity of the algorithm (O(n), O(n^2) …) rather than the memory consumption, so lets see an example where the constraint is the memory S.
I would like to share the solution to an interesting exercise that I was asked to solve during a technical interview.


Implement a function which says if a list is circular.
A circular list is made by a sequence of elements, each one connected to the next in sequence where the last must be connected to any of the previous ones.

Examples :

The only constraint for the solution proposal is that it has to use constant memory a.k.a S(1) .


Let’s consider which are the…

Giant Robots Smashing Into Other Giant Robots 

Android Interpolators: A Visual Guide

If you like pina coladas 🍹, and getting caught in the rain 🌧, AND you can’t remember the difference between each of the various Interpolator subclasses, then this blog post is for YOU 👈🏼!

Animations – motion, interactions and transitions – are all a critical component of material design. They help to make the user experience feel more natural and fluid. But designing and implementing the perfect animation can be a cumbersome and timely process. Luckily, the Android SDK does a lot to help us along - with things like ViewPropertyAnimator and Transitions, but often times simply remembering all that is available can feel like half the battle.

Say 👋 to interpolator

Well folks,…


How to Read Ruby Documentation

Trying to go from being a beginner to an intermediate programmer can seem like running toward a constantly moving finish line. Tutorials are great, but they can only take you through a set use case, and you still might not understand what’s going on under the hood.

One thing I’ve noticed: beginners use tutorials while experienced programmers read and refer to documentation. If you’re going to move past being a beginner, you need to become comfortable with docs.

I thought it would be interesting to devote an article entirely to the Ruby docs. I want to clear up misconceptions about using docs, how to understand them, and how to use them more effectively.

When should you use the…

Stories by DHH on Medium 

Your software just isn’t mission critical

Programmers love to invoke the vocabulary of importance. We don’t just have guidelines, no, we have fucking LAW OF DEMETER. Good and bad ideas alike are dressed in big words so we can all seem oh so clever.

And it’s not just the concepts that attract grandiose dressings, it’s also our purpose. If it isn’t CHANGING THE WORLD, then clearly there’s something wrong with the ambition calibration! Get with the mission, man!

Speaking of mission, I doubt that yours is all that critical. At least not in the sense the term “mission critical” was actually invented to describe. You know, shit like if there’s a bug in the lunar module, the fucking space ship might be stranded on the moon, and the…

reinteractive Feed 

What happens when your user study throws you a curve ball?

We’ve recently run usability studies on an application for a financial product where, after a user inputs a couple of screens worth of data, a tailored product solution appears. We had a nice prototype, and all was well except for one thing… During the usability study, we received the following feedback: the recommendation arrived too fast. Wait, what? Yes, the results arrived too quickly after the user hit send, which made people think that it wasn’t real. Some of the user feedback was “the...
Giant Robots Smashing Into Other Giant Robots 

Validation, Database Constraint, or Both?

The validations provided by Rails are extensive. They cover presence, uniqueness, format, numericality (sic), and more. For any given constraint on your data it’s quite often possible to construct a one-line validates statement composed of the provided validators that protects your application from “garbage” data.

When validations aren’t enough

As we’ve covered previously, some of these application layer validations are insufficient for ensuring database integrity and must be backed with database constraints for this purpose. Each uniqueness constraint, for example, must be backed by a unique database index to protect against race conditions. Developers must also consider if…

Kir Shatrov blog 

Class attributes and ActiveSupport

It’s not uncommon case to provide a class-level accessors for some kind of configuration. For instance, ActiveRecord has multiple class-level settings:

ActiveRecord::Base.inheritance_column = "type"
ActiveRecord::Base.schema_migrations_table_name = "schema_migrations"

Some of them are model-level:

class Post < ActiveRecord::Base;end

Post.ignored_columns = ["legacy_column"]

How do you implement them? You can start with the vanilla Ruby implementation:

module Configurable
  def setting

  def setting=(value)
    @setting = value

class Post
  extend Configurable
  self.setting = "default"

Post.setting # => "default"

However, the default value… 

[Off-Topic] Carpe Diem e os Mitos da Felicidade

Don Draper

"Mas o que é felicidade? É um momento antes de você precisar de mais felicidade." - Don Draper

Um dos grandes mitos da sociedade moderna, perpetuado por uma torturante repetição diária nas redes sociais, é o falso "objetivo" da "busca pela felicidade".

Complementando ainda temos o mito da "motivação". TL;DR: motivação é super-estimada, muito mais do que realmente merece.

"As pessoas tem duas maneiras de pensar, ela diz. Aqueles com 'pensamento fixo' acreditam que seus talentos ou habilidades estão cravadas em pedra. Aqueles com 'pensamento de crescimento' acreditam que seus talentos e habilidades podem ser desenvolvidos. Pensamentos fixos enxergam cada conflito como um teste de seu…


Announcing Hanami v1.0.0.beta1

This v1.0.0.beta1 release marks Hanami's feature freeze for 1.0, along with a couple new features, and a few bug fixes.

From now on, Hanami API's are stable and won't be changed until 2.0.

The stable release (v1.0.0) will happen between the end of March and the beginning of April 2017, which coincides with the Hanami season in Japan. 🌸

Between now and then, we'll release other beta and release candidate versions.


Hanami is now compatible with Ruby 2.3+ (including the latest 2.4) and with Rack 2.0 only.

Project Logger

We added the project logger, available at Hanami.logger. If you need to log a piece of…

Stories by DHH on Medium 

A fuck-you money attitude

There’s an irresistible allure to the concept of fuck-you money: Being able to tell anyone off for any reason without risking your livelihood. What’s not to love about such audacious freedom?

But is this actually happening? Who are all these newly-minted millionaires that suddenly start telling people to go fuck themselves? I don’t recall many notable examples. If anything, it’s the opposite.

Shortly after that glorious fuck-you check clears, they’re off to the next thing. With new venture capital chains. Yanked about by a new board. Shackled to a new set of hockey-stick growth expectations. You do what you know.

So the fuck-you money dream doesn’t so much seem like a goal as a perpetual…

The Ruby Rogues 

RR 297 Scaling Web Applications

On today’s episode, Charles Max Wood, Jason Swett, Brian Hogan, and David Kimura discuss Scaling Web Applications. Tune in and learn more as each of them share their own experiences in scaling Ruby applications!

Honeybadger Developer Blog 

Testing Ruby's Unicode Support

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.
Justin Weiss 

Writing a one-time script in Rails

Have you ever wanted to import a bunch of data into your app from a CSV file? Or maybe you need to fix badly encoded characters in some of your customer reviews. Or you changed your mind about how you wanted to store data in Redis, and had to move everything from the old format to the new one.

At Avvo, we called these “ad-hoc tasks.” As in, you probably only need to run them once. So what’s the best way to handle an ad-hoc task in Rails?

Write a database migration

A migration works well if you need to change the structure of the data in your database. It tracks whether the task was run, it carries over changes to other environments – it’s what migrations were built for. It’s also what…

Giant Robots Smashing Into Other Giant Robots 

Form and Space on the Web

We occupy three-dimensional space. Sometimes it’s fun, sometimes it’s dangerous, but that is where we live and it influences how our brains are accustomed to interacting with the world.

In fact, we’re so accustomed to it that we will subconsciously assign fake three-dimensional attributes to digital elements on a flat screen. Dropdown menus don’t just replace the content they cover, they feel physically “above” them. When we scroll down a page, the elements that move off-canvas are still in our mental map, even though they are no longer being emitted by the screen. They aren’t pixels of color; subconciously, they are real. We can’t help ourselves. But we can use the illusion of depth to…


There is trouble brewing, or: Openssl issues on Ruby with Homebrew

This post is to describe an issue I’ve run into using < 2.3 versions of Ruby on OSX with rvm and brew.

Don’t even get me started on working with older versions of Ruby — we have some maintenance projects running in ruby-1.8.3! Even modern Rubies may give you a hard time, however, and this is one of the times. Actually, I am writing this post as a reminder for me because I ran into the same problem twice now, and what is worse, the second time it took me nearly the same amount of fruitless googling to solve it as it took the first. And the solution was the same! So, let us proceed with order.

After system-wide update of openssl using Homebrew on OSX Yosemite I encountered this problem…

OmbuLabs Blog 

How to test a React app using capybara-webkit

I have been using the capybara-webkit gem for a while now since I first tried it out after making the switch from Capybara + Selenium.

Using capybara-webkit speeds up my Selenium tests due to its headless nature, and it's very straightforward. However, I had some trouble testing a Rails based React app.

In this post, I will explain how I worked around the issues that came up when trying to use capybara-webkit with React.

capybara-webkit depends on Qt, which you can install on OSX using Homebrew. When running the tests using capybara-webkit with Qt 4.8, I noticed nothing was getting rendered. To debug this problem, I used capybara-webkit's debug mode, which spits out problems you would…

reinteractive Feed 

WTF Just Happened? A Quick Tour of your first Rails App

WTF Just Happened? A Quick Tour of your first Rails App You've just completed your first Installfest or Rails Girls. And you've not only built - but also published - your blog application! It's pretty awesome, right? But then you get home and, after a few days, you take another look at your project. "What is all this stuff? I didn't write that!" There are so many folders and files, none of which you explicitly sat down and created. What are they all for? After my first Rails Girls, I had t...
reinteractive Feed 

MVC: Model

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. MVC: Model Most web applications will have a database attached to them. Within an MVC architecture, we interact with data in our database through our Models using Ruby code. That's right, there is no need to learn SQL! As a general rule, a model in a Rails application corresponds to a table in a relational database. Our model provides a way for us to treat the database table as if it wer...
reinteractive Feed 

Rails Routing

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. Rails Routing The purpose of the routes.rb file is to control the conversion from an HTTP request to a Rails method call. You can think of it as a directory that takes a HTTP request and looks up the corresponding Rails controller method. The REST routes know the action to call in the controller based in the HTTP method. As we have discussed in an earlier article REST and Rails, you will...
reinteractive Feed 

Database Migrations

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. Database Migrations When we need to make changes to our database schema (adding or modifying a table), we do so with an Active Record migration. A migration file is provided for you when you run rails generate scaffold Post, or you can create your own by running rails generate migration. Below is the migration file that was created for us when we ran rails generate scaffold Post title:st...
reinteractive Feed 

MVC: View

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. MVC: View A view in Rails is a template for a HTML document. This template has the extension *.html.erb. The .erb part means that it may include embedded Ruby code. The view template contains the HTML structure together with Ruby code that is used to populate certain fields with data. We use the tags <%= or <% and %> to indicate the beginning and the end of the embedded Ruby code. <% me...
reinteractive Feed 

MVC - Controller

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. MVC - Controller As we have discussed in our article on REST and Rails, you will know that a Rails resource comes with seven standard methods for requesting data: show update destroy index create new edit Consequently we will need seven methods in our controllers, one for each of them. Rails knows this and provides it for you automatically. Below is the controller code that you get fr...
reinteractive Feed 

MVC and Rails

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. MVC and Rails Understanding the MVC pattern is key to understanding Rails. MVC divides divides the work of an application into three separate but cooperative subsystems: models, views and controllers. At a high level, models labour behind the scenes, views are the smiling face at the front, and controllers are the masterminds behind it all. The browser sends a request to your Rails a...
reinteractive Feed 

REST and Rails

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. REST and Rails REST is an approach to communications that is often used in the development of Web services. It is one of the defining features of Rails. HTTP access methods One of the main features of a REST-based web application is the use of HTTP access methods (also called verbs) when determining how to respond to a request. HTTP defines four different methods for requesting data: ...
reinteractive Feed 

Rails Configuration Files

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. Important Configuration Files People often say that Rails favours convention over configuration. However, that doesn't mean you can forget about configuration altogether. You may have noticed that your new Rails project comes with a config directory that contains a lot of files. So much for convention over configuration! Many of these files you don't need to worry about, but there are t...
reinteractive Feed 

Gems and Bundler

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. Gems and Bundler Ruby Gems A Ruby gem is a self-contained piece of code that performs a single piece of functionality. You can find gems for pretty much anything you could ever want; from extracting data into CSV format to integrating with Google analytics and everything in between! In fact, Rails itself is a gem. It is a gem for building web applications. See Rails: A Gem of Gems for mo...
reinteractive Feed 

Rails: A Gem of Gems

Note: This post is intended as a supplement to WTF Just Happened? A Quick Tour of Your First Rails App. Rails: A Gem of Gems In a previous article, Gems and Bundler, I described Rails as a gem for building web applications. To be totally correct, Rails is more accurately described as a gem of gems. A standard Rails application depends on several gems, specifically: actionmailer A framework for designing email service layers. You could think of it as a wrapper around Action Controller and...
Drifting Ruby Screencasts 

Decoding and Interacting with Barcodes

Using the QuaggaJS Library, learn how to scan and decode barcodes with your Ruby on Rails application. Using provided callbacks, interact with controller actions to provide a seamless experience.
Giant Robots Smashing Into Other Giant Robots 

How to Skim a Pull Request

We review quite a few code diffs; it is our job. Often, when jumping on a new project, we start by reviewing pull requests.

After years of this we have each developed a few tricks to find problematic areas when reviewing our first pull request on a legacy codebase. And so I present to you an unexplained, incomplete, and arbitrarily grouped list of keywords that will cause us to read your Rails code more with more care and suspicion.

None of these are wrong, but all of them are noteworthy.

The times, they are a-changin’

  • Calling ActiveRecord::Base#create, ActiveRecord::Base#save, or ActiveRecord::Base#update_attributes without checking the return value,
  • #map!, #select!, #rejec…
  • Hash#[]=, …

They walked…

Stories by Gaurav Tiwari on Medium 

Hey Carlos, The gem received some API changes when it was merged till now so, you need to update…

Also, have you checked out this repo, it’s up to date.

Riding Rails 

This Week in Rails: Ruby 2.4 on Rails 4.2

Hello! This is Tim , bringing you another edition of This Week in Rails.


This week’s Rails contributors

This week saw contributions from 26 contributors, including 4 for the first time! What a fantastic bunch!

Rails 4.2.8.rc1 has been released!

If you’re using Rails 4.2, you may want to get a head start by trying out the release candidate for the latest patch release. It’s the first Rails 4 release to support Ruby 2.4, so see if you can give it a try to help us iron out any kinks!


Deprecate locking of dirty records

ActiveRecord::Base#lock! and #with_lock reload the record before doing the actual locking. If there were any unsaved changes, they will be discarded…

Giant Robots Smashing Into Other Giant Robots 

Reaction to Executive Order 13769

On January 27th, the executive branch of the United States issued an executive order banning the people of seven predominantly Muslim countries from entering the U.S. This order has resulted in the detainment of hundreds as they arrived at airports, denies safety to refugees, traps the over 90,000 visa holders from those nations either inside or outside the U.S., and threatens immigrant and refugee communities throughout the country.

We are outraged by this order and the hateful rhetoric backing it.

The immigrants and refugees who come to this nation deserve our welcome and support. An order that tears apart families, detains and imprisons innocents, and needlessly causes suffering for…

Giant Robots Smashing Into Other Giant Robots 

Investment Time

thoughtbot is a consulting company. We design and develop software for our clients four days per week, typically Monday through Thursday.

For almost a decade, we have dedicated Friday each week to “investment time”, self-directed time working on things other than client projects. Here’s how it works and what we’ve learned.


Our clients expect four days of work from each of us each week. They’re not expecting five days of work. One day per week for investment time creates slack.

We don’t stop work on Fridays; we prioritize other tasks (improving ourselves, the company, the community) that can be dropped if important client things come up. This is slack, and contributes to a …

Greater Than Code 

Episode 019: It’s Made of People!

This episode is in loving memory of Melia L. Moore


Astrid Countee | Sam Livingston-Gray | Jessica Kerr | Coraline Ada Ehmke

Guest Panelists:

Darin Wilson of Infinite Red and Keyboardist in @4Minus1Trio
Cheryl Schaefer of Launch Code and CoderGirl

Show Notes:

01:11 – What it means to be a Senior Engineer When You Don’t Want to Go Into Management

05:07 – Generativity: The difference between your team’s output with you on it and your team’s output without you.

Gregor Hohpe: 37 Things One Architect Knows About IT Transformation

13:46 – The Job of An Architect

22:09 – What are the managers doing? “It is too much to ask for your manager to be your career mentor?”

Sam Gerstenzang:…

Giant Robots Smashing Into Other Giant Robots 

Block Web Crawlers with Rails

Search engines “crawl” and “index” web content through programs called robots (a.k.a. crawlers or spiders). This may be problematic for our projects in situations such as:

  • a staging environment
  • migrating data from a legacy system to new locations
  • rolling out alpha or beta features

Approaches to blocking crawlers in these scenarios include:

  • authentication (best)
  • robots.txt (crawling)
  • X-Robots-Tag (indexing)

Problem: duplicate content

With multiple environments or during a data migration period, duplicate content may be accessible to crawlers. Search engines will have to guess which version to index, assign authority, and rank in query results.

For example, we…

Riding Rails 

[ANN] Rails 4.2.8.rc1 has been released!

Hi everyone,

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

If no regressions are found, expect the final release on Wednesday, February 15, 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.


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…

Ruby Weekly 

This week's Ruby news, issue 335

This week's Ruby and Rails news
Read this e-mail on the Web Ruby Weekly Issue 335 — February 9, 2017
Kjell-Magne Øierud
Rather than saving the current state of a system, you save events. The state of the system at any point in time can then be rebuilt by replaying these events.

Richard Schneeman
From last year, several handy tips on figuring out where methods are defined, opening a project’s dependencies, returning a ‘debugged’ gem to its pristine version, and more.

Sergey Dolganov
A look at the ways in which you could judge Ruby gems based on their…
Devon C. Estes 

Three APIs for Method Objects in Ruby


Here are the two APIs that I think make sense for Method Objects in Ruby:

1) Stateful

class MultiUseMethodObject  
  def initialize(at_least_one_persistant_argument)
    # ...

  def call(any_number_of_ephemeral_arguments)
    # ...

2) Stateless

class SingleUseMethodObject  

  def initialize(any_number_of_ephemeral_arguments)
    # ...


  def call
    # ...

I've written (and spoken) before about my love of Method Objects in Ruby, but there's one very important thing I wanted to cover in more depth - the API of a method object.…

OmbuLabs Blog 

Announcing AfipBill

If you live in Argentina and you ever use AFIP, you should already know that their platform is not the best in terms of user friendliness. We wanted to integrate OmbuShop with AFIP (using their API) in order to generate and print the bills for each seller. Unfortunately, there is no way to do this because the API doesn't generate a printable version (PDF) of the bill.

The old way to print the bills was to access the AFIP website, create the bill and download it. This is a very tedious task, specially because we needed to send a monthly bill to each of our sellers.

That's why we decided to create this new Ruby gem. With afip_bill you will be able to easily generate a PDF bill for your…

Giant Robots Smashing Into Other Giant Robots 

Learning by helping

Over the past year, I’ve been learning Elm. I did the usual things when learning a new language:

  • Go through the tutorial
  • Build a lot of toy projects
  • Read blog posts
  • Subscribe to the $LANGUAGE-Weekly newsletter

One of the biggest spikes in my knowledge came from an unexpected source.

I joined the elm-lang Slack community and started hanging out in the #beginners channel. A lot of the questions were “What is the syntax for X?” or “How do I do Y?”. The docs have the answers to all of these.

As someone who’s been in the software industry for a while, I’ve developed a few critical skills:

  • Searching Google
  • Reading documentation
  • Designing small experiments to test hypotheses

Google: How do I Elm?

It can be…


Animated Turtle Graphics using PDF

After seeing one of Jamis Buck’s weekly programming challenges being the implementation of a turtle graphics system, I decided to tackle this one using HexaPDF as backend.

First I will introduce the basics of turtle graphics. Then I will show you how a simple implementation using HexaPDF looks like and some examples. After that it’s show time - (ab)using the presentation capabilities of PDF to animate the turtle graphics!

Turtle Graphics Basics

If you are not familiar with turtle graphics, here is a short primer:

  • There is a turtle which has an initial position and heading.
  • It can move a given number of steps forward or backwards.
  • It can turn a given number of degrees to the…

The turtle follows the instructions that you give and draws…

Blogs on Luca Guidi 

How To Test Ruby CLI: Console

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations.


Hanami console is an interactive REPL based on IRB, which is useful to interact with the objects defined in a project.

 hanami console
irb(main):001:0> repository =
=> #<AuthorRepository:0x007fdc917373a8 ...>
irb(main):002:0> repository.all
=> []
irb(main):003:0> author = repository.create(name: "Luca")
=> #<Auth…
Stories by DHH on Medium 

Join Basecamp as our new Rails programmer

Basecamp is hiring! We have a rare opening for a Rails programmer to work on new product development within our General Practice team. We haven’t had an opening for this kind of work for a few years, so we’re excited to welcome someone new to the team!

This is a position for an experienced Rails programmer, but you don’t have to be a rock star, a ninja, or a superhero to apply. In fact, if you self-identify in any of those categories, we’d rather you don’t!

We’re looking for someone with a strong track record of putting Rails to work and bringing products to life. This is not a junior position, but, imposters everywhere, this is in reach to YOU. If you ship solid work, you have the experience…

Virtuous Code 

Side-hustle mindset versus product-business mindset

If you occupy the same technocratic sphere I do, you know what a “side hustle” is. In fact, there’s a good chance you either have one, or feel like you ought to have one.

Note: I’m not a big fan of the term “side hustle”. It has seedy connotations. But it seems to be the most commonly understood term for a product one develops on the side in order to bring in a second stream of income. So I’ll use it here.

Nearly everyone who has a side hustle dreams of it someday becoming so successful that it becomes their primary source of income. For many, this is an achievable dream. But there are growing pains in making that transition.

I’ve made the transition from selling one e-book on the side, to…

Honeybadger Developer Blog 

Introducing our Sidekiq cluster script

Here's an easy way to run multiple Sidekiq processes via systemd.
Giant Robots Smashing Into Other Giant Robots 

Let Vim Do the Typing

From the New York City Vim Meetup, George Brocklehurst shows Vim’s various built-in completion mechanisms. This will allow us to let Vim do the typing, writing fewer typos and faster!

Check out more meetup presentations, editor tips/shortcuts, lightning talks, AMA’s, behind the scenes bloopers, and more by subscribing to the thoughtbot YouTube Page!

ruby – Bibliographic Wilderness 

ruby VCR, easy trick for easy re-record

I do a lot of work with external HTTP API’s, and I love the vcr for use in writing tests/specs involving these. It records the interaction, so most of the time the tests are running based on a recorded interaction, not actually going out to the remote HTTP server.

This makes the tests run faster, it makes more sense on a CI server like Travis, it let’s tests run automatically without having to hard-code credentials in for authenticated services (make sure to use VCR’s filter_sensitive_data feature, figuring out the a convenient way to do that with real world use cases is a different discussion), and it even lets people run the tests without having credentials themselves at all to make minor…

But in…

BlockScore Blog 

Cognito Compared to Traditional ID Verification

Traditional methods of electronic identity verification use a two phase approach. The first phase asks the user to show “this is who I am” using name, date of birth, address, phone number, and social security number. The second phase challenges the user to prove who they are by assembling questions from that person’s past, often called Knowledge-based Authentication (KBA).

KBA has been an industry standard for over a decade. Unfortunately fraud-mitigation techniques become stale as fraudulent actors find ways around them. While KBA can be tuned to increase efficacy, such as limiting the time permitted to respond to questions and limiting the number of attempts a user has to retry failed…

The Miners - Medium 

Git: Ours or Theirs? (Part 1)

Tips for resolving conflicts automatically

In this article, I will assume that you already have a basic understanding of Git and consequently is familiar with the process of sharing code when you are working in a team. If you do not know about that, I would suggest you to read more about those topics here and here before going through this post.

If you are here on purpose, you probably know that this article relates to a really cumbersome situation that you constantly get into when trying to share your code with coworkers, who are working in the same repository. We all know that those situations, known as conflicts, may become a lot harder or time-consuming depending on the number of changes…

The Miners - Medium 

Deploy de App Ruby on Rails em VPS

PaaS ou VPS? Ultimamente tenho preferido serviços PaaS como o Heroku, mas muitos clientes preferem uma VPS na maioria das vezes pelo preço fixo, mas já até mesmo vi um cliente escolher Amazon por que ganhou bônus lá.

Convenções usadas neste post

  • Terminal na máquina de desenvolvimento:
% cd ~
  • Terminal no servidor:
ubuntu@ip-172–30–0–58:~$ sudo su -

Ferramentas usadas

Neste post nós vamos usar o Passenger, sua escolha foi feita por causa do zero downtime, i. e., o Passenger vai parar sua app e iniciar novamente, porém ele vai coordenar isso de forma que nenhum usuário perceba essa mudança

O servidor usado foi um Ubuntu Server 16.04 LTS (HVM), SSD Volume Type — ami-e13739f6

Como o propósito desse post é apenas a instalação de…

The Ruby Rogues 

RR 296 The Future of Work in Web Development with Erik Dietrich

On today’s episode, Jason Swett and David Kimura discuss The Future of Work in Web Development with Erik Dietrich. Erik is the founder of DaedTech LLC, programmer, architect, IT management consultant, blogger, and technologist. Tune in and listen as he talks about where he sees things are headed in web development.

GoRails Screencasts 

Rails Counter Caches

Learn how to use counter caches in your Rails app
Giant Robots Smashing Into Other Giant Robots 


Color is such a fundamental part of how humans understand the world that we often overlook how it is processed and why it influences us.

The how

Humans perceive a small part of the electromagnetic spectrum through our eyes as light, on a scale of frequencies which we call color. Light that has a short frequency is perceived as blue, and a longer frequency is perceived as red. Some humans have a deficiency in the ability to distinguish some colors, so it is important to remember that a discussion about color is about how most humans process light and is necessarily subjective. We will talk about accessibility in relation to color blindness later.

The electromagnetic spectrum…

The Miners - Medium 

Crazy Developer in Git commit - -amend

Are you new on git? And you know these commands: git add , git commit , git pull , git push , git status. But are you starting to feel limited with those commands? This post is for you! After reading it you will have learned the command: git commit --amend , or at least will have some notion of how it works.

So lets imagine a guy called Crazy Developer and he’s working in a crazy project and he only knows those basic commands I mentioned. So he decides it’s time to add and commit some changes, and to do that he makes use of the commands he’s comfortable with.

So he checks the status:

$ git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
Greater Than Code 

Episode 018: Cheryl Schaefer


Astrid Countee | Sam Livingston-Gray | Jay Bobo

Guest Starring:

Cheryl Schaefer of Launch Code and CoderGirl

00:16 – Welcome to “Let’s Get this Ship on the Road!” …we mean, “Greater Than Code!”

01:06 – Origin Story and Mentorship

Cheryl Gore Schaefer: Grow Your Team In 90 Days @ RubyConf 2016

Empowerment Through Mentorship

11:38 – Avoiding Burnout: “How can I show up better as a Mentee? How can you keep yourself from giving up and washing out? When you find your skills have atrophied, how do you find the resolve to try…

Hi, we're Arkency 

A potential problem with PStore and Rails

Today, I’ve noticed an interesting post about PStore in Ruby. This reminded me a recent story we’ve had with PStore.

Let me start by saying that I like PStore. It’s a simple solution which can definitely work.

I like to think about persistence as something that can be easily replaced if needed. At least in theory ;) In our projects , we often use the pattern of repository. As long as you provide another repository implementation which has the same API, persistence should still work.

In one of our >5.years projects, we’ve been migrating servers to a better machine. As part of this, we’ve made one app to work on several nodes instead of 1 as it was so far. The database node was already…

Black Bytes 

Hash Tables Explained

One of my favorite data structures is the hash table because it’s simple & powerful. You probably have used it before since it’s an efficient way to store key-value pairs. There are some interesting computer science concepts behind the implementation of a hash table that are worth studying, and that’s exactly what we are going […]

The post Hash Tables Explained appeared first on Black Bytes. Don't miss your free gift here :)

Honeybadger Developer Blog 

Simple tips to make scaling your database easier as you grow

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.