ThoughtSpot acquires Mode to define the next generation of collaborative BI >>Learn More

Additional Resources

template

Defining Metrics: A Template 
for Working With Stakeholders

Guide

10 Things Modern Business 
Intelligence Should Enable Today

video

Watch a Product Tour of Mode

Get started with Mode

Gems We Love

Image of author
Ushashi Chakraborty , Director of Engineering

August 25, 2019

5 minute read

At Mode, we have an interview question we often use during phone screens for engineering candidates which is “What is an example of a library you think is really well-written in ?” It is an open ended question that provides candidates an opportunity to talk through the libraries and open source code that they are familiar with and discuss reasoning behind liking a particular library.

The Application Backend Engineering (ABE) team at Mode majorly works on Ruby on Rails codebase. Hence, we decided to turn the tables and ask ourselves what our favorite ruby gems are. However, since we work at Mode, the team talked about the gems that we like with respect to what is being done everyday at work on the backend codebase. Here is what our team answered:

Alli Cernoch, Software Engineer: We use a lot of gems that I like for example faker, rubocop, act_as_paranoid but really the one that is my favorite is a very generic one — rspec and we use it heavily. It is very well documented. I wouldn’t like to write tests from scratch and it does half the job for me. I use it for every pull request so much so that I would not want to live without it!

Bindu Mohan, Senior Software Engineer: While trying to think of my favorite gem, the first thought that came to mind — that’s easy — rails! If not rails, rspec, pry, you get the point. I choose my favorites based on how useful they are to me. My favorite website is, of course, google.com! So my favorite gem is one that we use quite a bit at Mode. It is the halogen gem written by one of our own Heather Rivers. We use the gem to generate HAL-compliant JSON. HAL is the format we use for the JSON API we serve from within the web application. It is consumed by our browser JavaScript client and also directly by custom customer applications and internal tools. It has been downloaded over 11,000 times. acts_as_paranoid is another gem that we like to use at Mode. We are paranoid about deleting records especially when they contain metadata about data we purge from S3 based on our data retention policy. acts_as_paranoid makes this easy.

Brynn Gitt, Software Engineer: There are a couple of gems that I enjoy using at Mode. One of them is faker gem which helps you set up realistic data and development in test. If I want to have an organization with 30 users with realistic names and unique attributes, then it is easy to write a script to populate the database using faker. The gem is also good for a mid-workday laugh as it can give you random Michael Scott quotes like this! Another favorite I have is the algoliasearch gem. We use algolia to index various things on the site, users, reports, data sources. Algolia index provides api to search and while developing I can do things like changing settings to fine tune results, partial updates and batch updates.

James Youn, Software Engineer: My favorite gem is honeycomb-beeline because it was my entry to a lot of different things. It was also a source of growing pain for me as I was learning about http and using the gem I got to learn rack middleware, how rails handles incoming requests, how rails can be configured with puma, unicorn and other web servers. I learnt about observability tracking as well. It is also a library that I have had a PR on. I got to fork it and had our own use-cases for it to use it for the data we collect so that we can have usable matrix for two-three days. Before the library was sending too many requests to our datasets and I forked it to only focus on the ones we care about!

Jefferson Leard, Software Engineer: There is a gem called ruby-progressbar that I really like. Its purpose is to give you a little graphical progress bar on console. It gives you indication that your long running task is in progress which is handy esp. when you are running something on production with large amount of data and you have no idea if something is still running or stuck. Also, the look of the progress bar can be customized which can be fun.

Josh Susser, Senior Software Engineer: The gem that I find really useful is called overcommit. It is a simple framework for setting up git hooks for a ruby repo, like for pre-commit or post-merge actions. It helps us not to forget to update dependencies or run migrations when we check out new code, and will run linters and other checks before a commit. Previously we were using a DIY solution I'd hand-built before, but a coworker showed me overcommit and convinced me it did a better job. It's a small thing overall, but it makes collaboration a little easier, and sometimes it's those little things that count.

Oliver Sanford, Senior Software Engineer: My favorite gem is parallel-rspec. I have been really enjoying getting used to typing rake parallel spec and watching my test suites. People often have complaints about the language being slower and that is because they are running single threaded tests. In such situations, they can take a look at this gem. You can specify the number of core and it will fire up a separate ruby for each and run tests in a multi-threaded way. The gem can even time the tests and leave a record of its past which means that you can save out info and use that as a balance for grouping the tests which can make the tests even faster!

Vy Cu, Software Engineer: My favorite gem is rubocop. It is easy to use and understand. While it does seen annoying or disruptive at times to have your build fail when your specs pass and the only errors were rubocop related, it is a reminder that we need to think of code quality in balance with efficiency, velocity of shipping, etc. I like to think it’s the parallel notion of: When the trash bin is full, don’t add more rubbish to it. Do what you can to take it out!

We are excited to share more of our stories with you. If you are interested in working with us, please visit our careers page.

Get our weekly data newsletter

Work-related distractions for data enthusiasts.

Additional Resources

template

Defining Metrics: A Template 
for Working With Stakeholders

Guide

10 Things Modern Business 
Intelligence Should Enable Today

video

Watch a Product Tour of Mode

Get started with Mode