J.Wo

Ruby DevBlog by Jesse Wolgamott

Reminder to Hand-craft Your Whenever Files

Day 5: crash. Day 6: crash. Each day, we were receiving notifications from Rackspace that the server had exceeded its memory allocation and was thrashing too hard; it rebooted our server for us.

My initial reaction: Increase the memories!

I looked deeper into the problem, and along with some colleagues, discovered that at midnight our server was kicking off 9 different processes at the same time. 9x Rails is just about 8x too many.

RailsBerry Rejected My Talk and I Am Happy About It

I received the greatest email this weekend: RailsBerry had rejected my talk for their 2013 conference. Normally: another “oh well, they must have found really great talks to reject mine” and a sigh. Why did I like this rejection email?

RailsBerry gave me personalized, actionable feedback on making my future submissions better.

Easy, Light Weight, and Magical Parallel Processing in Ruby

Ever had a set of tasks in Ruby take too long?

We’ve all been there – you have code that needs to be run, and it’s taking forever. You wish there was a way to speed things along, but you can’t tweak the algorithm. You read about multi-threading but hear tales of dragons, pirates, and warnings of people who have ventured before you never to return.

Worry Not, Celluloid is here! (And celluloid-pmap is an easy way to get started)

But fear not! Celluloid exists, and is awesome. It’s an actor based implementation, but all you need to know is that it’s awesome. You can process an array of things in parallel, and continue when it’s complete.

The One Where I Have to Explain Why I Want Diversity in Our Field

@RellyAB tweeted:

If you are a guy and you want to help fight the good fight, tell people why you want diversity and not dickery, from your point of view.

This comes after:

And this is in the last week.

So. Why do I want diversity (and not dickery) in our field? a) it makes economic sense, b) we need to create better software and more of the same probably isn’t going to help, and c) it’s the human thing to do.

Why I Built Ruby Off Rails

I built Ruby off Rails because ruby is awesome, and there are too many developers who don’t realize it. And the more I trained people, the more I found that: Developers who learn ruby first learn Rails Best.

Announcing: Ruby Off Rails

That means, they pick up on concepts about instance variables, validations, how to create non-ActiveRecord classes, and most importantly: testing.

The One Where We DRY Up Mongoid and Rspec Using Shared Examples and Modules

The Situation: You’re adding Addresses to seemingly every document you have. Doctors, Patients, Insurance Agents. Even the Delivery Man – everybody has a contact.

The Problem: You’re tempted to copy/paste the field and validations, but your spidy-senses tell you not to.

Let’s DRY this up using modules and rspec shared examples. We’ll end up with a way you could enable fast rails tests on your Mongoid models.