I have the PR!

We recently implemented a stronger, more active, pull request culture at CustomInk, as part of our deploy process. As you may already know, a pull request is a feature on Github that broadcasts to others that you would like to have your changes merged into an upstream project. [note: Turns out it's built into git itself http://git-scm.com/docs/git-request-pull]. We find that it's great for learning what other engineering teams are working on. It's also a great opportunity to share knowledge.

Read More

Rails Multi-Database Best Practices Roundup

Seamless second database integration for Rails. 2016-01-11: We just finished a new version of SecondBase, our own gem that provides support for Rails to manage dual databases by extending ActiveRecord tasks that create, migrate, and test your application. It supports Rails 4.x and up. Check it out on GitHub. Since landing my first job programming with Ruby, most Rails applications I have worked with have managed two or more database connections. Often times these connections are both readable and writable....

Read More

Ruby's Private is for Methods Only

The other day I saw a pull request, on a Rails project, that declared a private inner class. Having my fair share of experience with Java, I am very familiar with the construct. Essentially, you declare one class inside of another class and declare it as private. This is often done to clean up your internal data structures and hide the implementation details from others. I couldn't recall ever seeing this in Ruby before, so it gave me pause. As...

Read More

Ruby Pretzel Colons

The Ruby Pretzel Colon is one of my favorite idioms. But it's salty goodness can be an acquired taste for new Ruby programmers. There seems to be an aversion to it's apparent magic. It is an unusual syntax. But it is easy to understand if you break it down into it's parts.

Read More

To the Cloud!

This month, WebOps overcame one of our final hurdles to rid ourselves of managing hardware, joining the likes of Netflix, AirBnB, and Dropbox in the cloud. We had been on a steady migration path and each step of the way, it has been a win for everyone; WebOps, Developers, Business Customers and most importantly, our customers. CustomInk now has more server capacity at it’s disposal than AOL when I left in 2010 all for an incremental hourly fee.

Read More

Customizing Rake Tasks In Rails 4.1 And Higher

I have been overriding, invoking, and executing custom Rake tasks since I was an early Ruby developer. Tweaking your project's automated tasks are likely the closest thing Rails developers come to building their own light saber. Most popular are adding or changing how the Rails test suite behaves. For example, adding Capybara to your project. Recently I have been upgrading projects from 3.2 to 4.2 and one thing that really stood out to me was how Rails testing tasks are...

Read More

ActiveRecord 4.2's Type Casting

Last month Rails 4.2 was released and if you have been keeping up with my posts, I even covered how you can upgrade from 3.2 to 4.2 in one step! This speaks volumes to how easy it is to adopt to outward facing API changes within our beloved framework. But often times, version changes bring implementation changes that we never see. For example, all of Aaron Patterson's work for AdequateRecord Pro™ are performance optimizations that affect no outward API interface...

Read More