Framing Hammer - Wikipedia

Just use RubyMine

“When a professional software developer asks you whether they should try out a tool that is free or has a trial period the answer should always be “YES!””

- Winston Zeddemore, Ghostbuster (paraphrased)

The Real Ghostbusters Comic

On Reddit yesterday someone posted a question in the Ruby forum who wanted to know what some of the advantages of using a specific tool were. In this case they were asking about the RubyMine IDE. Several people chimed in that they use it (great, not answering the question though) so I chimed in that I use it in conjunction with my Vim development environment because of it’s powerful refactoring, formatting, and code-insight tools that can’t really be replicated in Vim. Given the nature of Reddit what ensued was a gentile and mature debate with another developer over whether we should only ever need to use command-line tools (which totally didn’t devolve into me generating Zoidberg memes or me finally asking the question “Y U DO SO MUCH WORK?”

Original post on Reddit that started this whole thing, “RubyMine“. And then it all goes downhill from there starting with my initial reply.

I use RubyMine alongside Vim (my day to day editor). Being able to use some of their advanced refactoring, formatting and code-insight tools can be incredibly handy despite me having a fairly complete Ruby/Rails development configuration for Vim. Nobody should only use one tool but should apply the best tools they can for a job. :)

Naturally, a complete replacement for the RubyMine IDE is a simple `find | xargs` command. Pffft!

Consuela get’s what I’m saying.

Somehow using find app -type f -name *.rb -print0 | xargs -L1 sed -i '' -e "s/old_method/new_method/" in conjunction with Git was supposed to be superior to using the “rename” refactoring functionality in RubyMine.

My response.

Wouldn’t run on my OS X Mavericks

find app -type f -name *.rb -print0 | xargs -L1 sed -i '' -e "s/old_method/new_method/"

This worked, also added global to the pattern

find app -type f -name "*.rb" | xargs -L1 sed -i '' -e "s/old_method/new_method/g"

Seriously, piping to xargs? Also, the find tool sucks for this kind of search and replace because EVERY FILE GETS OVERWRITTEN. Git sees that each file has been updated and they all get their permissions and descriptors f’ed up.

grep -Rl def app/**/*.rb -Z | xargs -L1 sed -i '' 's/old_method/new_method/g'

All of this ignores the simple fact of trying to rename a method named “find” is impossible using this technique. Unless you want to go and troll the the 1,000,000 files that have been modified because of the vague search pattern. Seriously, saying that you won’t use RubyMine because it’s a corporate tool or whatever is ridiculous. It has context-aware code refactoring tools. Use them, it’s like $75 bucks or free if you do F/OSS. Seriously.

Why not Zoidberg?[1]

Oh, and edited just for this….

:args app/**/*.rb
:argdo s/old_method/new_method/g


If you can’t tell I was getting a little annoyed at this point.

I was a little tired of this line of argument by this time.

Trying to shoot down a focused and powerful tool like RubyMine by saying find | xargs is a perfectly fine replacement for it’s refactoring tools isn’t going to win any points with me. But the core of their argument has some merit. Why bring in industrial equipment to hammer a nail? If you have a nail then the hammer is what you should go for. But we’re professionals, when’s the last time you saw a roofer using only a hammer to sheet a roof. Since the invention of the pneumatic hammer, probably never.

I actually rarely use RubyMine, it’s definitely not my editor of choice. I use Vim and a suite of plugins that do most everything I need on a day to day basis. RubyMine though suffers the same problem as Emacs for me though. They’re both mighty fine tools it’s just too bad they have such crap text editor capabilities though. ;D But if someone wants to try using Emacs or RubyMine or whatever then fine, great. Give them a whirl and see for yourself. Maybe still suggest that they can use a command line tool to get some specific capabilities — but never tell them they shouldn’t discover for themselves.

To me RubyMine is a Swiss Army knife of a tool. I probably wouldn’t use it to spread peanut butter on my sandwich but if I ever needed a corkscrew when I’m out in the middle of the forest I’ll sure be glad that I have it handy.

RubyMine… it’s probably got what you want.

But when I hear someone say they can use “only simple tools” to get an adequate approximation of a sophisticated and professional tool then all I can think of is…

It's actually a hammer.
I’ve already got a knife.
Neo faces off with The Architect of the Matrix

And we have become exceedingly efficient at it

The Architect: You are here because Zion is about to be destroyed. Its every living inhabitant terminated, its entire existence eradicated.

Neo: Bullshit.

The Architect: Denial is the most predictable of all human responses. But, rest assured, this will be the sixth time we have destroyed it, and we have become exceedingly efficient at it.

2005 is probably the year I started blogging in earnest. Or at least relatively earnestly. But I’m fidgety and quick to distraction, basically the opposite of a wizard. I’ve used, Blogger née Blogspot, a Rails blog, Posterous, Tumblr, and a couple others that I’ve forgotten over the years. though, has been my platform of choice for nearly a year, since I switched over from a bespoke Rails apps. It’s the easiest to manage and is under CONSTANT improvement.

Since launched their 3.7 revision they enabled automatic security updates. I think that’s a brilliant move, in part because WordPress is very popular amongst otherwise non-technical users. Having the software look out for it’s users like that can potentially save them money (from having to hire someone to do that little maintenance) as well as helping save them from the disaster of an un-patched security hole being exploited. This isn’t a complete release from all maintenance but it’s a very good move in the right direction.

Also the default styling of is excellent. They manage to attract some of the best designers to craft the default theme. As of the writing of this post I’m using the default Twenty Fourteen theme. It’s quite nice IMO.

So thanks to the WordPress team. I hope that one of these days I’ll get some or all of you for an interview on to talk about your development process and how you go about engaging your gigantic community of developers and users.