The Sweet Spot
On software, engineering leadership, and anything shiny.

Category: rails

2017
July
Pitfalls to avoid when moving to async systems

I recently published a post on the [Carbon Five blog](http://blog.carbonfive.com) titled ["Evented Rails: Decoupling complex domains in Rails with Domain Events"](http://blog.carbonfive.com/2017/07/18/evented-rails-decoupling-complex-domains-in-rails-with-domain-events/) that takes some of my thoughts about moving a …

2016
June
Rails, meet Phoenix: Migrating to Phoenix with Rails session sharing

You’ve resolved to build your company’s Next Big Thing in Phoenix and Elixir. That’s great! You’re facing a problem though - all user authentication and access concerns are performed on …

2015
Notes on performance tuning a Puma server

A couple of months ago, I was tuning a Rails app for one of our clients. This client wanted to know how performant their app would be under load. To …

March
Docker, Rails, and Docker Compose in your development workflow

(This post [originally appeared](http://blog.carbonfive.com/2015/03/17/docker-rails-docker-compose-together-in-your-development-workflow/) on the Carbon Five blog.) We've been trialing the usage of Docker and [Docker Compose](https://docs.docker.com/compose/) (previously known as [fig](http://www.fig.sh)) on a Rails project here at Carbon …

2013
December
Ember Data, Rails, CORS, and you!

I'm starting up a new personal project involving Ember-Data and Rails (more to come). The gist of it is that it's a pure frontend app engine built in Yeoman and …

2012
Decomposing Fat Models

Heard an awesome Ruby Rogues podcast recently: ["Decomposing Fat Models"](http://rubyrogues.com/083-rr-decomposing-fat-models-with-bryan-helmkamp/). Essentially, they're talking through Bryan Helmkamp's [Code Climate blog entry "7 ways to decompose fat ActiveRecord models"](http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/), which sums up …

April
Speeding up Rspec/Cucumber feedback times without sacrificing coverage

[Rocket Fuelled Cucumbers](http://www.slideshare.net/josephwilk/rocket-fuelled-cucumbers) View more [presentations](http://www.slideshare.net/) from [Joseph Wilk](http://www.slideshare.net/josephwilk) One thing the Blurb devs have been discussing is how we can speed up our test feedback cycles without sacrificing coverage. …

HAML object references

Did you guys know that you can use the '[ ]' brackets in HAML to automatically set the id and class on a tag, kind of like Rails' [tag](http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-tag) helper? # file: …

March
RSpec order-agnostic array matching

What's that? [You want to write an expectation for an array but your method returns the Array in a nondeterministic ordering](http://stackoverflow.com/questions/2978922/rspec-array-should-another-array-but-without-concern-for-order)? Simple. Write: my_method.should =~ See the [source](https://github.com/dchelimsky/rspec/blob/master/lib/spec/matchers/match_array.rb).