Lone Star Ruby Conference 2013

Why You Should Love The Command-Line And Get Rid of Your Rake Tasks Once and For All
This presentation, by Alan Skorkin , is licensed under a Creative Commons Attribution ShareAlike 3.0
80x15

Rake is ubiquitous in our community, it's in just about every project. But why is this so, it is awkward and inflexible (try passing some arguments to rake tasks), and the way we've come to use it almost encourages bad design. Interestingly we've had a better way, to handle the things that we use Rake for, since before Rake even existed - command-line apps. Apps that do one task and do it well, it's the unix philosophy.

The problem is that as far as most of us know, writing a good command-line app in Ruby is not easy. Fiddling with OptionParser to produce a hacky script is no better than Rake, if anything it is worse. But what if we had the technology to build excellent command-line apps simply and easily? Well, to some extent we already do, but most of the tools available don't go far enough and so never become a viable Rake alternative.

In this talk we'll try to figure out what features a command-line framework needs to become your go-to tool instead of Rake (and how close existing tools are to this ideal). We'll cover things like:

What exactly is so bad about Rake What makes a good command-line interface Configuring your command-line apps What are your options for parsing options Can a command-line framework encourage good code design? Writing highly testable CLI apps Etc. And as an added bonus, while we talk about all this, we'll touch on good and bad code design as well as look at some of the unexpected corners of your app where 'bad' code is hiding.

Rated: Everyone
Views: 2,653

Conference Videos


Version: 1.0 (536) by Coby Randquist on 2014-07-21