Written by thoughtbot

Back to Basics: Writing SQL Queries

Almost all applications store data in one format or another somewhere. Us

developers spend a lot of time thinking about our data. In a most cases we end

up storing that data in a relational database. The advent of the

ORM has made writing

raw SQL…

Sass's @content Directive Use Cases

Sass 3.2 added the @content directive , which allows

us to pass a content block into a mixin.

@mixin apply-to-ie6-only {

* html {




@include apply-to-ie6-only {


background-image: url(/logo.gif);




Interface Segregation Principle

Take a tour through the history of dependency management in statically compiled languages. Learn why languages like C++ and Java need to explicitly build up small interfaces where Ruby is saved by duck typing, and then discover the lessons Ruby de…

Shoulda Matchers 2.6.0

For the past four months, we’ve been hard at work on the next version of

shoulda-matchers , and we’re pleased to announce it’s up on

RubyGems .

2.6.0 is first and foremost a compatibility release, bringing a few of the

matchers up to date with the newest…

Extract Mostly-Constant Data from the Database

Using database-backed models in our applications can cause coupling and

performance problems. Extracting that data to Ruby constants helps to resolve

those problems.


Consider the following database tables and their data:


Liskov Substitution Principle

Ben and Joe tackle the third principle in SOLID: the Liskov Substitution Principle. Learn some basic rules you can apply to subclasses and other “is a” relationships to improve flexibility in your applications and reduce subtle bugs from interface…

Introducing Hound

We’re pleased to announce Hound , a hosted service that comments on Ruby

style guide violations in your GitHub pull requests.

Hound is currently free and available for public and private GitHub projects.

We intend to charge in the near future to ensure…

Build Phase Podcast: 34: Darth Brooks

Container view controllers and clever DJ names are on the docket for this week’s episode. Mark and Gordon discuss patterns for handling modal authentication views and other high level approaches to root view controller presentation.