Tuesday, 27 March 2007

Advantage: command line

I had started on a lengthy post about work, workload, and how the GUI tool user was at a disadvantage vs. the CLI operator. This is the same post, but edited for brevity (if only because a stray key stroke closed the tab I was composing the original post in).

Word problem:
Using CVS, perform the following tasks: checkout the production release branch of the web module to a directory in your local workspace named PROD_REL. Checkout the trunk of the web module to a local directory named HEAD. Both checkouts should maintain the module's default layout.

At the command line, I had both tasks running as fast as the source code management server could dump the request on the office wires to my desktop, before the GUI user had one task completed...okay, this wasn't an empirical test with myself and another user, it was me documenting some of our work processes in our wiki: first at the command line, then taking screen shots of the process using TortoiseCVS.

Still, advantage: command line.

Answer, command line:
$ cvs co -N -d PROD_REL -rPROD_REL web
$ cvs co -N -d HEAD web

Answer, TortoiseCVS...
Right-click, CVS Checkout, dialog, pick options, tab, dialog, pick options, tab, dialog, pick options, OK. Repeat.

At the command line, my fingers never left the keys. And with some fancy job control, I could have two processes working for me. The GUI just didn't provide me the control of the command line, and in fact, just masks the command line itself. Additionally, my hands went to the mouse for several options that were never necessary on the command line with the right switches.

All said, I think that knowing the command line for tools like CVS makes a better pragmatic developer when put in a GUI-only environment. This is why I have our new hire reading Pragmatic Version Control with CVS by Hunt and Thomas. Then given the GUI tools, he will instinctively understand what needs to be selected in the dialogs, because he will understand what is expected on the command line.

Posted by caffeinated at 10:22 PM in nerdery
« March »