Articles on Refactoring

Andrew Hao

Andrew Hao

Taking Elm for a Test Drive

Elm emerged on the scene in early 2012 as a strongly-typed, functional language that compiles down to Javascript. With its architecture and type system, it claims to provide bulletproof guardrails to help developers build systems that are highly reliable, with “no runtime exceptions in practice”. Elm prides itself on having a low barrier of entry

Jared Carroll

Jared Carroll

Extracting Data Access Out of Active Record

The Active Record pattern combines data access and domain logic. Over time, an Active Record class can accumulate a large amount of query methods. Moving these methods into a separate object can result in smaller, more cohesive domain objects.

Jared Carroll

Jared Carroll

#TODOs Never Get To-Done

Over time all software begins to rot. At first a young codebase is small and lean, it’s a pleasure to work on, a single developer may even be able to understand the entire codebase. However, iteration after iteration time constraints and poorly specified features begin to manifest themselves in the codebase. TODOs are everywhere, tests

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

What can we help you with?

Tell us a bit about your project, or just shoot us an email.

Interested in a Career at Carbon Five? Check out our job openings.