My talk on scaling Rails from RailsConf 2016

May 31, 2016

I gave a talk at RailsConf ‘16 called “Can Time-Travel Keep You From Blowing Up the Enterprise”. The talk is really about scaling Rails on a growing team, and attempts to stop the discussion around “monolith vs microservices” by showing how a team can take hold of its destiny.

It’s also the exact way Stitch Fix engineering evolved, and while we have some large Rails apps, none are the monstrosities I’ve seen elsewhere.


Test Behavior, not Configuration

May 23, 2016

I’ve become re-acquainted with the pattern of testing ActiveRecord classes using stuff like expect(parent).to belong_to(:child) and I just don’t understand why anyone would ever write a test like that. It provides no value, and the implementation provided by shoulda isn’t actually testing the behavior. It’s testing configuration.

Announcing Rails 6: An Imagined Keynote

May 17, 2016

Just got back from RailsConf. It was a great Ruby & Rails conference, but I was struck by the dearth of talks about new features of Rails 5—because there just aren’t many. I thought back to what excited me about Rails in the first place—the baked-in conventions, convenience, encouragement of good practices.

Justin Searls gave a talk not about RSpec but about how Rails is losing mindshare, losing favor. Is Rails losing relevance? I hope not, but it’s easy to see how someone less emotionally invested than me might see it that way.

I’m trying to write about this without complaining. This is my fifth attempt. It’s hard not to just rant about Rails’ failings, so I’m going to try to be constructive by outline a fantasy roadmap for Rails 6.

I tried very much to think about this without going against the “Rails Doctrine”, and have written this as if it were an Apple-style keynote. The theme is Progress.

The 'Type Wars' Are Far From Over

May 03, 2016

Uncle Bob penned an interesting piece called Type Wars. It’s ostensibly a history of the fashion around how types are handled in programming languages. It, unfortunately, comes to the conclusion that “TDD and unit tests means you don’t need statically-enforced types”. This is not true.

He initially describes how C had types, but they weren’t enforced at compile- or run-time. This is bad (he says and I agree) and then talks about two ways to enforce type safety (i.e. require that the you are using the correct types). In Java, the compiler requires it or the code won’t even run. In Smalltalk, the runtime requires it only at runtime. And, according to Uncle Bob, the latter is preferable because you have unit tests. This is not true (he also overstates the burden required in having types enforced at compile time—just because Java is terrible doesn’t mean the concept is).

In particular, he creates a false equivalence between unit testing and static type checking:

You don’t need static type checking if you have 100% unit test coverage.

Not true.

Technology is Terrible

April 10, 2016

I get into my hotel at around 8:30pm. I want to watch NXT Takeover on the WWE network and then go to bed. I unpack and then put my Amazon Fire Stick in the HDMI port on the TV.

I start looking for an outlet to plug it in. Nothing close. The armoire weighs a ton and both of the plugs behind it are used up anyway.

Ok, I can just watch on my laptop. Open it up. Keyboard and trackpad not responding. Reboot. No Mac Startup Chime. Keyboard still not working. Reboot. Same. Reboot and hold down Option. Nothin. Repeat with Shift. Repeat with Command Option P M. Wait. Reboot into recovery mode. Computer insists I turn on my Bluetooth keyboard and mouse. Which I don’t have. Fuck.

I just want to watch an hour of pro wrestling.

Pour myself a drink.

Plug the Amazon Fire Stick into my USB battery. Turn on Tv and it works.

Connect to hotel wi-fi. Amazon browser not compatible with the OMNI’s interstitial. Go into “cursor mode” and I’m literally surfing the web with up/down/left/right/submit.

Select premium Internet. Fuck it, I want this to work. Enter my name and room number. I’m in!

Navigate passed about 20 apps that I could download, but have not. WWE is at the end and it’s already downloaded.

OF COURSE I have to sign in! Otherwise, someone might have stolen my Fire stick and started watching 1990’s WCW repeats on my dime!

Open phone, launch 1Password to get my login details. Sometime in the past my phone rebooted so I can’t use TouchID to get in. Enter my very long and easy to mistype pass phrase. Thankfully I get it right the first time.

Back to the Fire stick, I log in to the WWE network. It’s really. really. slow.

Find NXT Takeover and start it up. Stuttering and buffering would be an understatement. I let it ride. After about 10 minutes, I’ve seen 2 minutes of the event, doled out in 5 second bursts. Fuck.

Second drink is poured.

Ok, I’ll watch something else. Maybe it’s WWE. The tech behind their network is not very robust.

Hulu! I can catch up on the terrible superhero shows I like. Or Netflix! Can watch Walking Dead. Both require downloading an app and surely logging in. I’m done logging into things for the night.

Oh, I’m still in season 1 of Veronica Mars! And it’s only on Amazon Prime!

Amazingly, it remembers the last episode I watched (God knows I don’t). Start it up.

“Previously on Veronica Mars…” and then the screen turns solid green and does nothing but glitch.

Ok, maybe it’s this episode. I’ll skip it and not worry about missing too much. Start the next episode.

“Previously on Veronica Mars…” and then the screen turns solid green and does nothing but glitch.

I just want to watch TV and go to bed.

Ok, what else is there? The Wire season 1. Haven’t watched it in ages and could honestly settle for Idris Elba reading he phone book for 2 hours. You know what would be awesome? A sitcom around all the time Stringer Bell spent in community college. I mean, they had to have group projects so I can see hours of fun watching him and three 19 year olds try to make business plans for video stores or whatever.

Anyway, this finally works. I watch a couple episodes without incident. Finally. It’s bleaker than I remember.

It’s 11pm and I still want to watch wrestling. Flip back to WWE and now it’s working. But I’m tired. Fast forward to Baylee vs Asuka for the women’s title. Baylee loses. Fucking hell.