We’ve Acquired data.aiLearn more

Blog

ENGINEERING · JASON YUM · MARCH 2020

Why Sensor Tower Uses Ruby

Sensor Tower engineers explain why Ruby remains a central pillar of our product's tech stack.

Why Sensor Tower Uses Ruby

If you're an early career Data Scientist/Analyst or Software Engineer, or if you are a graduating Computer/Data Science major looking for your first technical role, one of the simplest, yet most helpful, pieces of information you can learn about a tech company is their tech stack. Knowing what tools a company uses provides great insights into how they operate.

During this research, you may ask yourself, "Why should I consider a tech company that uses Ruby? Isn't Python more prevalent and the preferred tool for Data Science?"

We're Ruby enthusiasts at Sensor Tower, so for this blog post I interviewed three teammates—two Software Engineers and a Data Scientist—to learn what they love about Ruby, and why it's a powerful tool in our tech arsenal and for our analytics and insights platform.

Meet Our Team Members

How They Started with Ruby

What was your motivation for learning Ruby?

Jamal Moon: My first exposure to Ruby was from a coding bootcamp (circa 2015, while I was attending college). I was primarily interested in learning more about web development, and, at the time, Ruby on Rails was very popular and seemed powerful, so I had my eye on it. Simultaneously, I was interested in learning a new programming language, and since Ruby was robust and different from what I was accustomed to (Java/C++), it was a good choice for me.

Stefan Lynggaard: Years ago, I worked on a system that had both Java and Ruby code. I was making feature changes that touched the Ruby code, so I had to learn it. Since then, I've had the fortune of working with very competent engineers who taught me a lot, and now I really enjoy working in the language.

Daniel Kuo: Ruby was one of the first things that was mentioned during my interview at Sensor Tower. I learned Python and R in my Master of Data Science program, but I didn't know Ruby well. I knew that it was famous for building web applications, so I knew learning to use it was a great move for working at Sensor Tower

Daniel, since you were newer to programming in Ruby, how did you go about learning it?

Daniel: It took me just a few weeks to pick up. I used Codecademy to get myself familiar with the syntax. The learning curve wasn't very heavy since I had programming experience with Python and they're very similar. If you have experience with Python, you won't have major difficulties picking up Ruby.

What Makes Ruby Unique

What's unique about Ruby compared to other programming languages?

Stefan: Ruby allows you to consume system resources at an unrivaled rate! Joking aside, I think Ruby has a combination of really great things going for it—if I had to pick one, I would say the vast treasure trove of gems.

Jamal: Ruby provides very robust metaprogramming capabilities that power many popular gems and enables us to get more done with less code. It also has a great standard library that provides common data structures and functions out of the box, and a lot of tools to create and manipulate data easily, like being able to define hash and array literals. Because it's an interpreted language, changes we make to the codebase do not cause recompilation, so we can test any change we make nearly immediately afterwards. This rids us of boring, time-consuming issues, and instead lets us focus on problems that are specific to Sensor Tower and the mobile insights industry.

How Ruby Is Used at Sensor Tower

Sensor Tower Platform

Daniel, for Data Science, we must be one of the very few analytics/insights companies that use Ruby over Python or R. What do you like about using Ruby specifically for Data Science?

Daniel: The bulk of a Data Scientist's work is cleaning and sanitizing data, and Ruby is just handier for scripting. 80 percent of Data Science work is cleaning data and only 20 percent is modeling data—data cleaning is the most important work. You need to make sure you have good data to work with in the first place. Ruby is really good at data transformation and munging (manipulation). It has more syntactic sugar to make things look more readable. Also, the big philosophy in Ruby is DRY: Don't Repeat Yourself. You can digest data and transform it with just a few lines of code, and I don't see equal emphasis on that in either Python or R.

Stefan, what about Sensor Tower's product, architecture, or processes makes Ruby a great fit for the work we do?

Stefan: In order to answer this question, we need to consider both its strengths and its weaknesses.

Ruby is slow, memory hungry, and has awful low-level responsiveness and control. Due to the nature of our business and product, we don't need to optimize for cost or latency, so its drawbacks are not really a big problem. We occasionally end up with issues when we try to load the entire world into memory, but those problems are normally trivial to solve and there is always a bigger EC2 instance if we need it.

In terms of strengths, there are many, but my personal list is:

  • A huge talent pool for hiring

  • Robustness

  • Expressiveness and speed of development

  • The gem ecosystem

Jamal, as a Full Stack Engineer, you work on a number of Front End projects in addition to Back End work. Any thoughts on how Ruby on the Back End helps with work on the Front End?

Jamal: Ruby doesn't provide much friction when developing, so banging out code for prototyping is fast. Working on the front end often involves creating a small prototype, collecting feedback, and making adjustments accordingly. It's a very iterative process. Ultimately, Ruby makes it easy to quickly fulfill the back end requirements for prototypes, allowing us to iterate more than we normally would. When we finalize the requirements for a feature, back end requirements that get scrapped only result in minimal time wasted, and back end requirements that still remain only need a bit more time of polishing (adding tests for example) before it's production-ready.

Anything you want to say to future Sensor Tower employees who have questions about using Ruby?

Daniel: Using Ruby for data transformation, cleaning, and validation is great. There are more and more Machine Learning packages being made available in Ruby. We have really great Ruby engineers on our team who love helping others learn how to write clean code and make things more efficient. It might take some time to get used to Ruby, but I think you will fall in love with it.

Want to Learn More?

Hopefully this post whets your appetite for learning more about Sensor Tower's product and technologies. If you're curious what technologies an organization uses, I recommend looking the company up on stackshare.io or checking out their job descriptions to see what technologies are listed.

If you're looking for an even deeper dive into the way our Engineers and Data Scientists work, check out these posts on Speeding Up the Back End with Graph Theory and How We Scaled to Thousands of Sidekiq Workers.


Sensor Tower's platform is an enterprise-level offering. Interested in learning more?


Jason Yum

Written by: Jason Yum, Talent Acquisition and Strategy Specialist

Date: March 2020