ruby

Class Comparison in Ruby

Posted May 24, 2014 by Taylor Fausak
How do you know if an object is an instance of a class? I did some research and discovered that there are at least 18 different ways to answer that question. But if you're using anything other than .=== and
patterns rails

Confidently Manage Business Logic with ActiveInteraction

Posted January 23, 2014 by Aaron Lasseigne
ActiveInteraction is a gem for managing application specific business logic. Instead of living in controllers or models, business logic can find a home in interactions. They are designed to integrate seamlessly with Rails by behaving like ActiveModels. Use ActiveInteraction to shrink your controllers, slim your models, and DRY your code.
testing ruby rspec

Write Faster Tests with a Factory Context

Posted January 13, 2014 by Taylor Fausak
A while back, I noticed our tests were slowing down for no apparent reason. It turns out our factories were creating a bunch of duplicate objects behind the scenes we didn't need.
rails

Building Custom Rails Attribute Validators

Posted October 29, 2013 by Aaron Lasseigne
The validation that ships with Rails is useful, albeit generic. It leaves us to construct our own validators as dictated by our domains. The good news is that Rails gives us the tools necessary to build our own validators.
rails

Building a Better Gemfile

Posted August 8, 2013 by Taylor Fausak
If you've been hacking on a Rails project for a while, chances are your Gemfile has spiraled out of control.
security

Immediately Migrating Existing Passwords to bcrypt

Posted June 18, 2013 by Taylor Fausak
Security cannot afford to be "eventually consistent".
testing patterns ruby rspec dry

Maintaining a Large Test Suite a DRY Approach to RSpec

Posted June 4, 2013 by Justin Powell
More often than not, tests are treated as an afterthought or a second-class citizen. They are written to fulfill a requirement or to provide a mental safety net for the additions being made. After a while, the tests can become unmanageable. It may reach the point where updating them along with the business logic is such a daunting task that you stop writing tests altogether to meet deadlines.

Reflections on Learning to Code

Posted May 29, 2013 by Virginia Traweek
ruby

Private and Protected: They might not mean what you think they mean

Posted May 20, 2013 by Aaron Lasseigne
If you’ve taken up Ruby after learning another language like C++ or Java and you haven’t reexamined the meaning of “private” and “protected” then you’re almost certainly not using them the right way. Let’s spend a minute investigating their use in Ruby.
security

Upgrading to bcrypt

Posted May 8, 2013 by Taylor Fausak
As a developer, it's your responsibility to protect your users' data. Depending on how you store passwords, it can either be trivial or impossible for attackers to compromise your users' accounts.
testing

REST API Integration Testing with Gatling

Posted May 3, 2013 by Justin Steffy
I've decided to try a tool that is meant for stress/load testing; that tool is Gatling.
iOS

Creating a Scrolling Filmstrip Within a UITableView

Posted April 26, 2013 by Jim Clark
While working on our current project, our UI designer came up with a mockup that displayed photo albums as a small horizontal scrolling filmstrip within a single table cell of a larger table view.
hack

OrgSync Hack Night Arduino

Posted April 19, 2013 by Virginia Traweek
OrgSync hosts a monthly hack night in partnership with the Dallas Ruby Brigade here in the office. As a software shop, we don't often get a chance to play with hardware. But last Tuesday we mixed things up a bit and experimented with an Arduino using Ruby bootstrapping gems.
javascript

Common Backbone Patterns Simplified with Marionette

Posted April 16, 2013 by Kevin Wade
I fell so head-first into Backbone that I quickly outgrew the conventions it set in place. I needed a way to nest views without a bunch of boilerplate, a way to clean up views after destroying them, and some sort of way to swap views in and out when switching modes in my app. There really aren't conventions set in place by Backbone to do these types of things.
iOS community

Recap of CocoaConf Dallas

Posted April 10, 2013 by Jim Clark
In the last couple of years, several independent developer conferences have sprung up to help share knowledge about iOS and Mac development with the community, and CocoaConf is one of them. Since late 2011, CocoaConf, presented by Dave Klein, takes a unique approach by hosting multiple shows in both spring and fall in cities around the country.
iOS

Frictionless Project Organization for iOS

Posted April 5, 2013 by Cameron Desautels
There comes a time in every MVC(-ish) app's life when it starts to get a bit heavy. Sure, a few out-of-place lines of code here or there don't hurt too much when the codebase is young and agile, but in a middle-aged app they start to be a concern. Slovenly habits beget more slovenly habits; refactorings don't come as easily as they used to. And before you know it, your methods won't even fit on a standard-size Cinema Display anymore. Something's gotta give.
design

A Designer's Workflow for HTML Emails in a Rails App

Posted March 29, 2013 by Tyler Lee
The emails that our users at OrgSync receive from our app were getting stale, and no one wanted the task of reconfiguring them because of how much a pain it is to work with HTML emails. We have 27 individual views that generate emails, but those views get populated with content from all over our application--so this isn't the easiest of projects to begin with. Add in the list of things that suck about HTML emails and you get a decent-sized headache.
ruby patterns activerecord

Decorate your Ruby Objects "Like a Boss"

Posted March 22, 2013 by Sonny Garcia
The "Decorator Pattern" is used to extend the functionality of a single object without affecting any other instances of the same class. You can easily add functionality to an entire class via inheritance, but it is impossible to extend a single object using this approach. This pattern allows you to apply your extensions in either a static or dynamic fashion.
ruby community

The Big Ruby Conf

Posted March 11, 2013 by Aaron Lasseigne
The inaugural Big Ruby Conference kicked off on February 28 with almost the entire OrgSync development team in attendance. With a few exceptions, most Ruby conferences lack an overarching year-to-year theme. Big Ruby Conf is clearly for the enterprise audience. While this may conjure mental images of suits, marketeers spewing buzzwords and piles of red tape, Big Ruby Conf suffers from none of these ailments.
testing

Stubbing External Service Calls with RSpec

Posted March 7, 2013 by Justin Powell
When building complex web applications, you'll find there are business needs that require integrating with external services. In other cases, it may be more feasible to leverage a pre-existing service instead of reinventing the wheel.
ruby jruby

Selecting Overloaded Java methods in JRuby

Posted March 4, 2013 by Sonny Garcia
JRuby, a Ruby language implementation that runs on the JVM, allows developers to leverage the vast number of powerful libraries that have been written in Java while maintaining the simplicity and terse nature of the Ruby programming language. Since Java allows for method overloading and Ruby does not, at some point we may find ourselves needing to choose which overload we want to invoke. Thankfully, JRuby provides us with a couple of mechanisms.
rails ruby perl ReDoS regex

ReDoS Regular Expression Denial of Service

Posted March 4, 2013 by Taylor Fausak
On Thursday, I ran into a puzzling issue at work. It first occurred three weeks ago and remained uninvestigated because it appeared to be a duplicate of another issue. When I deployed the fix for the other issue, I expected it to fix this one too. Turns out, it didn't.
ruby

Big Ruby Presentation Round-up

Posted March 4, 2013 by Cameron Desautels
Last week the OrgSync development team was out en masse at Big Ruby Conf in our own backyard of Dallas, TX. We had a great time and listened to so many fantastic talks that it's hard to keep track of them all. To help with this problem I decided to put together a complete list of talks replete with links to slide decks. Enjoy!
hack

Hacking Hubot with Hubot

Posted February 26, 2013 by Taylor Fausak
Right before last week's dallas.rb hack night, my coworker planted an idea in my head. He thought programming Hubot on the fly would be neat. I agreed with him; modifying Hubot from within the chat room simply by talking to him would be awesome. Since I spent last week hacking on Node.js, I figured I'd take a crack at it.