Articles on Web

Lenny Turetsky

Lenny Turetsky

An AJAX Auto-Save Implementation

For a recent client engagement, we were tasked with implementing auto-save on a multi-field form: any time any of the field values changed, we’d save the form to the server. This is a common scenario where users are composing longer inputs, such as emails, word processing, and spreadsheets.

Zoe Madden-Wood

Zoe Madden-Wood

New Arrow Functions in ES6!

Among many of the new features of ES6, aka ECMAScript 2015, is the arrow function expression, also known as the fat arrow function. For those that have been programming in CoffeeScript, the syntax will look quite at home. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.

Jeff Dickey

Jeff Dickey

Roll Your Own Asset Pipeline with Gulp

I’ve found myself using Gulp for just about everything involving HTML/CSS/JS these days. It’s super fast, quick to write scripts for and flexible. I’m at a point now where I have a ton of projects I can just cd into, run gulp and be up and running. It’s the best solution I’ve found for delivering

Michael Wynholds

Michael Wynholds

Database migrations for Cassandra with ActiveColumn

We at Carbon Five are pleased to announce the release of ActiveColumn – an object mapping framework for Apache Cassandra. Currently at version 0.1.1, this gem is young but functional with its first major feature of data migration support. Prior to Cassandra 0.7, keyspaces and column families had to be maintained by hand in a

Sunset
Jared Carroll

Jared Carroll

Better Error Handling in Ruby with Rescue Else

The other day I came across some code that was making HTTP POST requests to a 3rd-party API. The API used 3 types of HTTP response codes: 200 (Ok) 422 (Client error) 500 (Server error) Here is the code: The error handling in the above code seems to be casting too wide a net because

Jared Carroll

Jared Carroll

TDD your way to a richer domain model

A well established and accepted design principle in the Rails community is “skinny controller, fat model”. This involves placing an application’s domain logic in models and keeping the request handling controllers simple and sparse (i.e. “skinny”). The result is a more modularized, reusable, rich domain model. The following is an example of using TDD to

Jared Carroll

Jared Carroll

RSpec best practices

Rspec is a great tool in the behavior driven design process of writing human readable specifications that direct and validate the development of your application. We’ve found the following practices helpful in writing elegant and maintainable specifications. First #describe what you are doing … Begin by using a #describe for each of the methods you

Christian Nelson

Christian Nelson

Join us for a Ruby Hackfest

We’re hosting a hackfest this upcoming Wednesday, October 13th. The doors open around 6p and we’ll code until 9 or 9:30, ending the night with optional lightning talks on the interesting work done. Come with your own ideas or team up with others and help out. http://www.meetup.com/sfruby/calendar/15036702/ There will be food and drinks, courtesy of

Dark colors
Jonah Williams

Jonah Williams

Deploying to Heroku from TeamCity

Previously I discussed our TeamCity configuration using RVM and mentioned that we often use git to deploy projects. Today I’ll share an example of how a TeamCity build agent can trigger deployments of a application hosted on Heroku and some of the challenges I found.

Jonah Williams

Jonah Williams

Using RVM on TeamCity build agents

We have been using TeamCity to manage the continuous integration, testing, and deployment of many of our recent projects. We have also been using RVM on all of our recent Rails projects to allow us to install multiple ruby versions and create isolated gemsets for each project. RVM proved to be particularly useful on our