by Derek Prior

My Friend Bobby

Everyone has the same Bobby Mac story.

Bobby led the weekend group rides out of Quad Cycles in Arlington. He was boisterous, self-deprecating, and always the center of attention. He’d start each ride reminding us to “be nice to everyone you meet” and “ride with love in your hearts and smiles on your faces.” If you were new to the ride you’d be forgiven for thinking, “Is this guy for real?” It was his energy that made the whole thing work – he brought together nervous newcomers in cargo shorts and weekend warriors riding bikes that cost more than your first car. Bobby made us all feel like part of the same tribe.

Word spread through cycling circles a few weeks ago that Bobby was fighting cancer, and that the prognosis was not good. We shared with him and each other our photos, memories and words of encouragement in hopes that it would brighten his final days. I sent Bobby a photo of him and I at the finish of “Harbor to the Bay”, a 130 mile single-day charity ride from Boston to Provincetown. One-hundred and thirty miles. On a bicycle. In the pouring, unyielding rain. I wrote him, “Didn’t think I could do anything remotely like this before I met you.”

That’s the commonality in so many of our stories. The challenges and circumstances are different, but the thesis is repeated. Bobby Mac helped me do something I never thought I could do. Bobby managed to make hundreds of us feel like we could do what we previously thought impossible. His genius was in making us think it was all our idea; all our doing. Isn’t that the truest measure of a coach?

Bobby Mac was my friend and my coach and I will miss him dearly.

Re-enabling Password Pasting on Annoying Web Forms

As a 1password user, I usually have very long, unique, and random passwords for every site that requires one. I use the 1Password browser extensions to fill password forms for me, but on iOS I copy and paste the values manually. Some misguided web developers have decided pasting passwords should be prohibited and have added onpaste events to prevent it. The latest culprit I have encountered is Apple.

While this is an infrequent annoyance it can be crippling. To combat it, I whipped up a bookmarklet that will run some JavaScript on the page to remove onpaste events from all password fields.

Using Rbenv With Tmuxinator

Tmuxinator allows for easy configuration of tmux sessions. Its a handy gem, but hasn’t received any major updates in quite some time. While it has support for specifying a project-level rvm version, it has not yet accepted either pull request that would add proper rbenv support. Not wanting to install a fork from GitHub, I found I could easily use the existing rvm support if I just shimmed calls to rvm into the equivalent call in rbenv.

Gemify Assets for Rails

The asset pipeline, introduced with Rails 3.1, makes it simple to include versioned external assets as application dependencies. Provided those assets are packaged as Ruby gems, the process is as simple as adding the gem to your Gemfile, running bundle install and, in the case of CSS and JavaScript, adding a require to the proper manifest file.

Many popular CSS frameworks and JavaScript libraries are already available as gems. Search RubyGems to see if the assets you’re interested in are already packaged this way. What if the JavaScript library you use isn’t yet available as a gem? Packaging and publishing asset gems is simple. Here’s your chance.

Simple Navigation in Rails

Most web applications call for at least one level of navigational structure. Many will have two or more levels and require the active node in each level to have distinct styling via an active class. I’ve seen as many navigation solutions as I’ve seen rails projects. Most look similar in that each level of navigation is represented by a partial. Some track the active node via local variables passed with the call to render, but this approach isn’t very DRY. Some track the active node via instance variables on the controller, but this is a painful violation of MVC which gets especially tedious to maintain in multilevel scenarios.

Thankfully, there’s a mature, simple, and actively maintained solution just a gem away. Simple Navigation handles just about whatever you can throw at it. I was surprised, however, by how hard it was to unearth when I was looking for the solution to my navigational troubles. It’s an elegant solution that deserves more attention.

Upgrading Vim on OS X

Mac OS X ships with a console version of Vim, but it is outdated and it was not compiled with Ruby or Python support. Command-T, for one, requires vim to be compiled with Ruby support and thus will not work with the version of Vim shipped with the operating system. You may also have configuration settings in your .vimrc that are incompatible with Vim 7.2. Thankfully, there are a few rather simple options for updating Vim.

Embracing Promiscuous Gemfiles

Bundler has been around for quite some time now, but I continue to see what I consider to be be bad advice with regards to specifying version constraints in your project Gemfile. My position is simple: Do not constrain gem versions in your Gemfile until you have a good reason to do so. I typically encounter two arguments against this position. The first is misinformed, showing a critical lack of understanding of how bundler works. The second is a defensible position, but seems to offer no advantage over my approach.

Using PeepOpen With RubyMine

I’ve been doing a lot of development in MacVim of late, but there are times when I long for the warm embrace of an IDE. For many reasons that I won’t detail here, I find RubyMine to be the best Ruby IDE out there. While its keyboard-based file navigation is functional, I much prefer the interface provided by PeepOpen that I had grown acustomed to when using MacVim and TextMate.

Fortunately, with a little work we can use the External Tools configuration in RubyMine to invoke PeepOpen.