Some people might think making workplace a fun place is undesirable; they might think this will affect productivity badly. But from my personal experience, making workplace a fun place always brought me so much inspiration and passion. Dev Train is a model train that runs whenever a pull request on Github is merged, based on the number of insertion/deletion lines. (It choo-choos, too.)
First, you have to grab some of the toys from your toy drawer.
Things you need:
- Raspberry Pi × 1 (Or, any internet-enabled device you can program to do GPIO)
- Model Train × 1
The idea is simple. This model train I bought has a remote controller, and I hacked it to work with a Raspberry Pi.
The model train originally makes the stationary sound when it’s not moving. So, I had to do some hacky thing to remove the sound.
This is the photo of the controller part. I stripped off the plastic part of the remote controller and hooked it up with the GPIO pins on the Raspberry Pi.
And then I wrote a Python script that pulls the Git repository to check if there are any changes. If there is, the script gives signals to the GPIO pins to make the train run, and play the choo choo sound.
Github: stewartpark/DevTrain (Disclaimer: the code is bad, but it works)
My attempt to toy around at work was somewhat successful – sometimes the train doesn’t run and I have to fix it after work, but that’s because I broke the RF trasmitter a little bit. I think it was successful because the work environment I’m in and the people I work with were very open to new ideas; after I brought the train, we talked about what if we did snack delivery with this train in the office, and some people brought some LEGOs to add cute things around the track. Thanks to my coworkers, who were really supportive of this idea and helped improve Dev Train.