Solve Your Own Problems

Photo by Audrey Fretz on Unsplash

One of my biggest personal problems is that I constantly forget birthdays. The cool thing about programming, is that you can use code to fix your own problems. This Friday, I set out to do just that.

Since I got to SB, I’ve been talking about writing some code to help myself remember birthdays. It started as an app, with the goal of importing birthday data from Facebook. But Facebook’s APIs are hard to work with — discovering this fact was the basis of my talk at the Modern Web Meetup earlier this year.

After I decided a fully-fledged app wouldn’t be the way to go, I settled on writing a Ruby script. Since Ruby is a general-purpose scripting language, I figured it’d be suitable for this task. Since my main professional development goal right now is to learn Rails, I thought using Ruby would dovetail nicely with that effort as well.

I started writing this script a while ago and messed around with it off-and-on, but I wanted to actually have something done by the end of Labs time today. I started running into issues with the Google Sheets API (I wanted the script to read directly from a Google Sheet instead of having to download a CSV file every time I update the spreadsheet), so I pared down the functionality and decided to just get something working.

It felt good to come away from Labs with a working side project, even if it was just a little script. Unfortunately, that satisfaction was a little short lived because I committed my Mailgun credentials to GitHub, and Mailgun suspended my account within a few minutes. Impressive monitoring!

I got some new credentials and hooked everything back up again. The big question mark currently is whether or not the cron job I set up on my local will run the script at the appointed time.

Here’s the link to the GitHub repo, no credentials this time 😅:

My next to dos involve hooking Google up and refactoring to be more Object Oriented. That said, it’s good to hit an MVP of something.