Specify Your API

Much of the past 6 years of my professional life has been spent designing, implementing and maintaining APIs. I've learned many things to avoid as well as a handful of good techniques. However, it wasn't until 3 months ago that I was exposed to a practice I consider the most…

Understanding gen_server with Elixir and Ruby

Recently, I've been spending some time working in Erlang and Elixir. I had tried to break into Erlang in the past but I was always stymied by the steep learning curve of OTP. gen_server in particular always seemed like black magic to me. However, after attending an Erlang workshop…

Rails Mass Assignment Protection in the Controller

Github recently had a rails mass assignment bug that caused quite a stir. In the aftermath, several people proposed new ways of handling mass assignment protection in rails. One of the proposals, authored by Yehuda Katz, advocated for protecting against mass assignment in the controller rather than the model. I…

Make Your Cucumber Step Definitions Time Aware

If you’re like me, you’ve found yourself with a cucumber step definition like this: Given /^I recieved an invitation$/ do # ... end And you want to write a step definition like this: Given /^I recieved an invitation 2 days ago$/ do # ... end Instead of doing all that extra work,…