Blog

Behind the Scenes: PagerDuty's April Hack Day

by PagerDuty May 16, 2013 | 4 min read

Everybody loves Fridays, but the second Friday of every month is special at PagerDuty—that’s Hack Day. On Hack Day, anyone at PagerDuty can work on any project they like for the entire day, even non-technical staff. Whether it’s a tech demo, some kind of code cleanup, or odds and ends for a public GitHub repo, everyone is encouraged to participate. The following week, the hackers present their projects to the company and trophies are awarded for Most Awesome, Most Useful, and “No Codez” (non-programming) projects.

trophies - soft glow - smallThere’s good-spirited competition for the Hack Day awards, and some of the hackers put a lot of effort into their presentations. Some are so inspired, they even spend evening or weekend time to make it better (which technically is cheating, but at least they’re passionate!).

Everyone at PagerDuty loves seeing the projects, and April’s Hack Day did not disappoint. Here’s a look at the winners in the technical categories, plus an honorable mention.

Most Useful: Doug’s Colorized Prompts

One constant danger of coding is accidentally running commands on a production box that were intended for a test box. Doug Barth tackled the issue and defined command prompts that are customized based on the environment a programmer is coding in. There are three styles: Development, Staging, and Production. The styles are color-coded for each environment (green = development, yellow = staging, red = production), and a unique prefix is applied for programmers who don’t have color support in their terminal. For the root user, the prompt is underlined as an extra warning since they have access to break even more stuff. As a bonus, the title bar also shows the prefix so the programmer can easily spot the production tab he or she left open.

production_style  titlebar

Having distinct prompts for each set of servers will help PagerDuty programmers keep their code straight and prevent a lot of headaches. Thanks, Doug, for a truly useful hack.

Most Awesome: Evan’s MiFi Battery Hack

At PagerDuty, we rely heavily on a fleet of MiFi portable Wifi hotspots to provide connectivity to our on-call engineers while they’re on the road. Unfortunately, the battery life on these devices is pretty terrible, which creates some rather untimely obstacles. Since most of the engineers sit right next to their MiFis while using them, Evan Gilman developed some code to reduce the signal length of the MiFi to increase the device’s battery life. The code modifies the transmit power of the wireless card inside the MiFi, reducing it by an arbitrary amount.

MiFiIn his testing, Evan was able to achieve nearly twice the battery life, ensuring that a fully-charged MiFi will live past the 8-hour mark under constant moderate use. With this, we have hope that the days of searching for an outlet in the midst of a crisis are behind us.

The code isn’t suitable for public release yet, but Evan plans to package it into a gem once it gets polished a bit.

Runner-Up for Most Awesome: Ian’s Voting App

Ian Enders developed a web app that lets everyone at PagerDuty submit their categories for Hack Day and then place their votes. We used to vote on a white board, but this didn’t work very well with remote teams (we have a new office in Toronto). Yeah, it’s pretty meta.

ian_voting_app_500

The code is public and you can check it out at https://github.com/ienders/leethaxors. Have ideas to improve it? Fork it and let us see what you can do.

And that’s a wrap. We hoped you enjoyed seeing these projects and learning what we’re working on when we take a break from our regular work days. Stay tuned for more updates from future hack days.