Elaine Yeung

Elaine works at Sentry on the Operations team as a software engineering intern. Prior to Sentry, she taught elementary school for four years then spent another four years as an assistant principal. As an administrator, she led her school’s adoption of a blended learning model, integrating personalized instruction across all grades, including pre-kindergarten! Passionate about data-driven decision making, Elaine aggregated multiple sources of raw student performance data, all collected in differing methods. After being, in essence, a human API for two years, she grew frustrated by traditional spreadsheet application’s ability to control input and taught herself SQL, thus leading her down the road to software engineering. Elaine loves podcasts and improving her StarCraft 2 strategy.

Speaker home page

How I Learned to Stop Shell Scripting and Love the Stdlib

DevOps & Automation, Intermediate
8/19/2018 | 3:35 PM-4:05 PM | Robertson

Description

My first assignment at Sentry was to write a tool that monitored Google Cloud resource quotas and alerted us on Slack whenever our servers reached a specific threshold. How did a self-proclaimed lover of shell scripts end up using python? What lessons about working on an engineering team did I learn in the process?

Abstract

On the web console for Google Cloud Platform (GCP), users can see and manage resources. Google also provides a command line tool (gcloud) that also allows users to interact with GCP APIs. My assignment was to create an internal tool that would use information from gcloud to calculate percentages that we would otherwise have to grab from the GCP console compute engine resource quotas.

Fortunately, I knew shell scripting! I wrote version 1 (pure Bash with lots of sed and grep) and version 2 (jq is a great utility for parsing JSON) but experienced frustration using binaries that varied on different platforms. Finally, it was time to reach for Python and use excellent stdlib modules like argparse, json, and subprocess to create a better tool.

Through the process, I l gained some important insights about learning on the job in an engineering organization and the value of readable code.