Fog Creek Software
Discussion Board




Command line vs. Guis

So the other day I went over to my coworker's house to bang out a quick little asp web application for a client. 

When I sat down at my computer, I instinctively downloaded VIM and a little bash-esque environment for windows to get up and running.  When my friend noticed, he gave me a wierd look; and he called me a nerd...!

So here's my question, what do the JoS regulars tend to perfer?  Do you use the command line for every little thing, or only for running regsvr32?  Do you use emacs or vim, or stick with only mouse-based apps?  Do you use CVS from the command line or TortoiseCVS?  etc etc etc?

Just curious.

Long-time lurker First-time poster
Friday, December 12, 2003

Nerd!  :)

I like command line...

apw
Friday, December 12, 2003

I use vim and tcsh on windows, but not to the extent that I'd set them up somewhere else to do a little job.  To be honest, I only started using them on windows because I got sick of having to perform different commands on each platform.

r1ch
Friday, December 12, 2003

I use GVIM for everything but .Net programming (where VS.NET's intellisense gets it the win).

It's GUI, not CLI :p

Richard P
Friday, December 12, 2003

Yeah, if gvim was able to match ms's intellisense, I'd never use anything else =).  I'm sure that would be no small task though.  btw, anyone ever use nmake much, or just build from the vs gui?

Long-time lurker First-time poster
Friday, December 12, 2003

"...or only for running regsvr32?"

Even for that I put a shortcut in my "Send To" context menu.  And another one with the -u option.

I guess that means I prefer GUIs.  :)

Dignified
Friday, December 12, 2003

on windows boxen, I always load cygwin...the unix environment and it's tools completes a windows box as far as I'm concerned. Being QA, I try to be agnostic, but I like having the *nix capabilities available when I want them. And since my main box is a laptop, gives me some sort of *nix capabilities I can move around with and not have to drag along a second box that's specifically *nix.

I also install gvim on the windows box -- hardly ever use the vim within cygwin, even if/when I'm editing files within cygwin's tree structure.

for ms development, though, visual studio 6 (havent' gone over to .net). intellisense is great, though the other aspects of the editor aren't anything very special, imo.

btw, it's probably not as good as "real" intellisense, but there are a couple of interesting scripts a guy is working on over at vim.sourceforge.net to emulate intellisense capability. for the record, I am not that guy.  here's a link to the author of the intellisense scripts:
  http://vim.sourceforge.net/account/profile.php?user_id=3179 

he's got two - one for jsp's and another for java, html, and xml. I haven't installed or tried them, but since some of the other 'vimmers' that posted to this thread mentioned interest in this behavior, thought you'd like to know.

overall, I spend pretty equal amounts of time in both command line and gui -- all depends what I'm doing.

anonQAguy
Friday, December 12, 2003

I detest command-line interfaces.  Although Visual Studio is mostly a GUI environment, there are a few little "helper" applications (like XSD.exe) that only work through a DOS command-line prompt.  Using DOS to navigate to the correct file (usually nested in an 8-level deep folder) is always a chore, and then I have to select the right "magic words" for the command-line attribues.  Give me a clean GUI interface any day.

Robert Jacobson
Friday, December 12, 2003

As a java programmer, I use gvim daily. However the incredible power and functionality of Eclipse is causing it to gradually oust gvim as my main environment. Aside from its amazing drag-n-drop refactoring functionality, the code assistance is way beyond intellisense.

Just an example of something I did to today:

Creating a new class, start by writing the constructor

Foo(int bar)


Now with the caret over "bar", with 2 keystrokes I can have it automatically  add:

private int bar;

Foo(int bar)
{
    this.bar = bar;
}

Nice.

rhubarb
Friday, December 12, 2003

rhubarb -

not trying to contest with you on the topic, but since you said you used gvim, have you checked out what's available on sourceforge for gvim?

one of my co-workers who routinely uses it for java programming has installed support for automatically generating getters and setters, for instance. And I've installed some automated perl support that does things for perl like what you described for java.

there's a fellow at http://vim.sourceforge.net/account/profile.php?user_id=169 who's written support for several languages for givm besides perl. and I know there's quite an active java community creating scripts for gvim.

hey - for the record - I don't care what editor anybody uses, truly I don't, and I'm not pushing gvim. just trying to let you know about some resources.

enjoy,

anonQAguy
Friday, December 12, 2003

"Using DOS to navigate to the correct file (usually nested in an 8-level deep folder) is always a chore"

Yes it is sometimes a chore, but then so is having to click so many times when you know right where the file is.

One thing that makes changing directories a little better in DOS is to enable command completion.  With Command Completion on, hit the tab key to have the DOS prompt fill in the directory or file name--just type a few characters of the one you want, then hit tab.  Hit tab again to get a different choice that starts with the same characters. Add a \ and hit tab again to go into that directory.  Shift-tab does as you would expect: It goes backwards through the choices.

Command completion is on by default in XP.  In NT go to regedit->HK_Current_user->Software->Microsoft->Command Processor and put a 9 in the CompetionChar value.  (9 is a tab)

Glade Warner
Friday, December 12, 2003

First thing I do on a new computer is to install Emacs.  That's all I need.

Programmus Interruptus
Friday, December 12, 2003

Hammer vs. Screwdriver.  DISCUSS!

Alyosha`
Friday, December 12, 2003

-  anonQAguy

Good point re the scripts for gvim. You won't hear me argue against gvim - there are too few of us left fighting the pointless-but-fun religious war against emacs.

I have many java-related scripts for gvim. Including the getter/setter one, which indeed, I have modified to suit my own getter/setter style such that it is now better than the eclipse getter/setter generator which I can't customize enough.

But eclipse has so much more. One thing I didn't mention with that 2 keystroke trick above is that after the first keystroke I see a tool tip describing what my class will look like if I make the second key stroke. It shows the new declaration in the context of the other delarations at the top of my class, then a ..., then the new assignment statement in my constructor. No vim script has a hope of matching that.

And then there's those refactoring functions. Want to relocate a package from one class to another? Well you have to
- change all your import statements that reference it
- change  any direct references that don't use imports
- add imports to classes that were in the same package and didnt need to import it before
- change any literal strings that referred to it (you might be doing a Class.forName() somewhere
- preferrably change any comments that mention its full path

In Eclipse you drag it from one package and drop it in the other. Oila! And if you don't trust Eclipse, then when the okay/cancel dialog comes up after you drop it, you can hit the Preview button and see a structured list of every change with a before-after full context 2-pane diff. (A bit like windiff or even vim -diff). 
Now you might be able to write a script that does that in gvim - it'd be tough you might, but the preview button? and the comparison pane? good luck.

rhubarb
Friday, December 12, 2003

I use Textpad, with Samba, when I can. If I'm logged directly into the UNIX box I usually use vi.

Corky
Friday, December 12, 2003

Wow, I had no idea Eclipse was so powerful.  I've never used a tool with any kind of automatic refactoring, I'll definitely have to give it a whirl.

Why do the Java programmers always get the best toys?!?? =P

Hopefully this isn't too imflamatory, but to those posters who do everything gui and/or think this is a stupid thread, I would really suggest that you try using a command-line seriously for a little while.  You'll probably find that once you get familiar with commands, you're able to do mundane things a lot faster.

For example, when you use tab completion directory navigation is FAR faster in the command line, especially if you have a slow work box like me and it takes a few seconds after you double-click on my computer.

Also, grep is such a life saver when browsing a large project you have no previous experience with.

I agree of course that a GUI is far easier to use, but when you have to use a computer for 10 hrs a day, a little investment in remembering commands can make the average workday just a little less frustrating.

Long-time lurker First-time poster
Friday, December 12, 2003

Long time -

I think you're right. In my case, I would really hate having to be limited to working only gui or only command line. I've gotten used to each for different things.

Now if I can just get over hitting the damned escape key every few strokes for the first 10 minutes I'm in ms word or ms notepad after having finished a gvim session ;-)

I may be really starting some crap by saying this, but on the whole gui-vs-command line issue, while I use winders routinely (have since it started, and dos before that), I've also used *nix for a long time (vms as well for a short while), and one of the things that always bugged me about windows since NT is that you can't NOT install the gui, and you can't NOT have the gui code running.

basically, if you want to setup a *nix box, as a server especially, there's complete separation between the OS and the GUI -- you don't have to install X or any of it's crap if you don't want to. Chances are, on a server, you won't be needing it. Set up an NT, w2k or xp box as a server, however, and you're going to both install and have gui code running, whether you need it or not.

as a QA guy and not a developer, I'm not going to claim to be anything like an expert on the topic, but it's always seemed kind of bad to me that the gui and the OS are so inseparable in windows.

of course, maybe I'm being stupid and it just doesn't really matter with the horsepower of today's machines.

anonQAguy
Friday, December 12, 2003

anonQAguy -> I definitely agree, and have often expressed the exact same sentiments... the bottom line is that on a server the gui is just dead-weight, and it bothers me significantly that the gui is running *all the time*, but used .001% of the time.

Like you I have no stats to draw any real conclusions, but I will say that an old boss of mine put together a nice little server farm using $50 boxes... Try running 2003 enterprise on a 233 MHz machine.  Everything was so IO-bound that he didn't need much memory or cpu.  I can't even imagine how much money he would have had to spend to put together a windows cluster of similar size.

Hmmm, but I don't mean to turn this into a windows vs *nix thread... oops.

Jesse Collins
Friday, December 12, 2003

GUI apps - easier to learn a GUI app.  Or apps that require a lot of visualization and/or continuous operation and feedback.

CLI app - if you're trying to accomplish a single task, the CLI will be more efficient.  Furthemore, while it's harder to learn the CLI interface to grep, you can use grep everywhere.  If you learn how to click buttons in the find dialog in MS Word, that's all you've learned.

Richard P
Friday, December 12, 2003

The DOS command line is very poor, so I avoid it.

I use the Scite text editor for everything, along with Ruby for scripting.

Its a great combination.

Ged Byrne
Friday, December 12, 2003

Ideally, the type of interface I prefer could only be described as "both". I like to have a GUI, so that I can get a good arrangment of visual panels on the screen. I have a main text window, a class browser, a list of open files, etc, etc.

Those are the types of things that you can get in a GUI that you can't get in a commandline.

But I also don't want to use an application that dictates I *must* use my mouse to interact with the GUI. In my opinion, EVERY program function MUST have a keyboard shortcut that I can use to access it. Any program function that has to be accessed using a menu or a widget is a weak point in the appliction.

I've used vim (a little bit) and emacs (a lot), and I've never run across a function that couldn't be implemented in a GUI version of the program. So why not take the commandline elements of an application, and add a really fantastic GUI to it?

Sometimes, less is not more. Sometimes more is more.

Benji Smith
Friday, December 12, 2003

I think of this sort of question as more of an input device question rather than a GUI / command line question.

I use both, although I have a heavy keyboard bias, hence I have shortcuts for everything and tend to use them where they're available (try Shift+F10ing a file in Windows Explorer some time...). Hence a heavy reliance on stuff like
cygwin/bash and emacs. I also very rarely use the mouse in something like Excel or Access.

The main thing I don't like doing is having to swap between the two, so I generally find myself either in keyboard mode (programming, shell stuff, running stuff with hotkeys) or mouse mode (web surfing, GUI design).

I actually prefer using cvs in 'gui' mode with Tortoise CVS because visually its easier to see what's changed without a lot of effort. (Although there's some tasks its not so good at).

Basically do whatever you feel most comfortable with. I've actually recently found the mouse a bit more useful than I originally thought....

Gordon Hartley
Friday, December 12, 2003

Both!  I prefer to navigate a GUI but I also want command line equivalents for scriptability.

Matt Foley
Saturday, December 13, 2003

I like ui's that have a command line options (err like xemacs?). I find typing commands faster than navigating dialog boxes.  Dialogs are good for newbies, command lines for experts.  I'm a big fan of tab completion.  The Windows open dialog has gotten much better for typing files names than it used to be though.  Gnome's certainly sucks in this regard.

christopher baus (www.baus.net)
Saturday, December 13, 2003

*  Recent Topics

*  Fog Creek Home