Code Warrior: Matthew Erhard

by Britni Birt

December 10, 2015

Page not Foundis definitely not what you want to be seeing when you visit a state government’s website. Under certain circumstances, a new bug in the Rails framework version 4.2.3 would incorrectly compute the URLs it generates, resulting in users being unable to reach the pages they request.

Matthew Erhard, lead developer for Rhode Island Interactive / NIC (RI.gov) and graduate of Launch Academy's first cohort, found this bug while testing the updated version of the Rails framework. If not caught in time, this bug might have led to users being incorrectly redirected when requesting important public information or trying to use an online service.

Matt figured this was a bug worth fixing, and decided to take the issue to the source. Rails is an open source framework, meaning that the source code is available to the entire Rails community for suggestions and comments. Bug fixes are submitted for review by a core group of Rails admins, and if the fix solves usability problems without creating new ones, it is eventually merged into the core code. Recognizing the potential for this fix to benefit everyone developing on the Rails framework, Matt got down to business.

As the original reporter of the bug, he decided to create a test app to reliably repeat the functionality problems. “I had to describe [the bug] because they needed to know how to reproduce the problem to fix it,” he says. Rails typically needs a test script in order for people to run and see the issue happening in real time. He realized, if he was going to raise the issue, he might be able to fix it as well.

So he got to work on the code that would eventually fix the error produced by the update. Though he says his initial implementation was a little confusing for some, the GitHub community interaction was a great way for him to get some feedback and solidify his solution.

“I would sit with [the suggestion] in my head for a while and continue to make adjustments,” he says. The waiting process proved to be helpful, and once Matt was able to succinctly explain his bug fix, Rails developers accepted it right away.

The suggestion made its way into the core code of Rails around eight weeks ago, benefiting the millions of users who interact with the platform daily. Matt's contribution was pointed to by Rails core developer Jeremy Daer as an ideal example of how the open source process should work. On his recognition from Daer, Matt says, “It was a nice surprise to me.”