Skip to content

Instantly share code, notes, and snippets.

@whalesalad
Created October 25, 2015 22:02
Show Gist options
  • Select an option

  • Save whalesalad/08bb0138133d6fdaa2ac to your computer and use it in GitHub Desktop.

Select an option

Save whalesalad/08bb0138133d6fdaa2ac to your computer and use it in GitHub Desktop.
Some interview answers from a long time ago that I found on my desktop

A description of your own favorite software project (code is a bonus)

If I had to pick one of my public repositories, it would probably be this one: https://github.com/whalesalad/arbesko-hornet

It's my favorite because it was pretty fun to build and ended up providing a lot of value to the customer that I built it for. The goal of the project was to allow less-technical members of Arbesko's web team to simply upload high-res images to an FTP folder and then have those processed/resized/cropped/etc... into the various formats needed for the website.

It runs inside of a Docker container because most of their infrastructure is not Ruby. It used to do a lot more (using the psd.rb library to take PSD's and covert those) but ultimately that was nixed due to some incompatible and very old PSD files.

It's also a fairly modern project of mine, so it reflects my style more.

A link to your Github (if you have one)

http://github.com/whalesalad

I have a handful of private repositories here which I can share with members of the segment.io team if you provide github usernames.

At one point I was mentioned in your official Ruby docs for helping to solve a problem with the Unicorn web server, but it looks like the docs have been rewritten since then. One of the private repos that I can share makes good use of your Ruby client, and that's where I discovered the bug.

Your favorite database, and why

I'm not sure if redis is the kind of answer you're looking for ... but if I was going to be stranded on a deserted island for the rest of my life with nothing but a programming language and redis, I think I could pass the time pretty well.

I've used it as a cache on all kinds of projects, namely to prevent excessive calls to a (potentially slow) REST API. The ttl/timeout feature is great for this, because I could hit redis all the time and if the data was gone, I'd hit the slow API again and put the data back into redis.

I've used it to serialize the state of long-running actor systems so that in the event of actor failure a replacement could start up more-or-less immediately.

I've used it to do realtime browser updates thanks to it's pubsub system. In my particular use case, Django post-post save signals (triggered when a database object is saved) were used to serialize the changes and publish them to a channel. A separate webserver (flask) would subscribe and listen, returning data to the client. I actually used the EventStream API that y'all wrote about here https://segment.io/blog/2014-04-03-server-sent-events-the-simplest-realtime-browser-spec

Redis is fantastic! It has such a simple yet powerful interface that reminds me of basic unix commands. You can take simple little commands and pipe them together to create something that is stronger than the sum of it's parts.

Your favorite AWS feature, and why

My favorite feature has got to be the instance metadata feature on EC2. Being able to curl http://169.254.169.254/latest/meta-data/ from a host (without the AWS API) to quickly get all kinds of information about it is really handy.

Just in case you guys and gals haven't heard about this feature it's documented here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment