View Full Version : Command line v. GUI


ADB1
03-05-08, 04:24 PM
I wonder if anyone else round here prefers command lines to GUIs. Most of my colleagues find it rather odd that I tend to do things by commands.

I don't like multi level menus - do I need File>xxx or Edit>xxx and I get really annoyed when I asked to do something and a dialogue box comes up somewhere else on the screen that I have to move my eyes to.

Aratsu
03-05-08, 04:51 PM
I am the exact same way. I despise menus and use keyboard shortcuts for everything. Start menu never gets used except to access the Control Panel; Everything else in my system is either launched from a Launchy (http://www.launchy.net) popup or a PowerShell prompt.

Keyboard-based launchers such as Launchy for the PC and Quicksilver for the Mac are probably my most used applications.

Driver
03-05-08, 06:59 PM
I'm old school (I grew up with DOS 5.0 & Win 3.1). I too prefer command lines and consoles to moving a mouse around on the screen. That's why I too use Launchy and VIM etc. :cool:

Luthien
03-05-08, 10:06 PM
I prefer command line as well. But you are going to get a skewed result bc people who use only gui's probably have no clue what you are talking about .. i.e. wont even read this topic :)

ADB1
03-06-08, 04:21 AM
Good point about the bias. Maybe I should have called it "keyboard v. mouse" which is a related issue. I have an Access database at work I am meant to used that has been written so no shortcuts work and I find it really hard to navigate.

xav
03-06-08, 05:24 AM
hello,

I use both, with no clear preference. Working both with windows and Linux. While working with these O.S. i switch between command or GUI it depends of the work to be done.

As time goes by i tend to be wary of the various shell ( ksh, csh... ) and more and more working with perl ( perl -e in lines ) joined with grep, find -exec and xarg. Working this way i m making much less errors.

ADB1
03-06-08, 08:00 AM
OK - my preference is perhaps a little less strong than my first post suggests. I use GUI editors (and screen based ones if I am ssh-ed to a host). But I find a lot of GUI progs do too much and end up getting me overwhelmed by features that distract me.

Someone once suggested (in view of a statement similar to my first post) that I should eschew graphic browsers and use Lynx. I once tried to do a download using lynx - I was logged into a unix machine fron home and downloading directly to the unix box sounded like a good idea :). But I then found all I was downloading was an agreement form. I just couldn't sort out and ended up leaving the job till I was next in the office.

Is the documentation for launchy available online? My machines are full of software I have downloaded used a bit and then ended up not using. So I thought I would like to find out what it does before trying.

HighFunctioning
03-06-08, 10:32 PM
Someone once suggested (in view of a statement similar to my first post) that I should eschew graphic browsers and use Lynx. I once tried to do a download using lynx - I was logged into a unix machine fron home and downloading directly to the unix box sounded like a good idea :). But I then found all I was downloading was an agreement form. I just couldn't sort out and ended up leaving the job till I was next in the office.

I think that links/elinks tends to work better as a text-mode browser (much better layout of tables, for one). Elinks supports colors, SSL, even javascript to a degree.

I use mostly the keyboard, whether or not I'm using a GUI. All of the Windows systems that I use on a regular basis have Cygwin and/or MinGW/MSYS/GNUWin32 tools installed. I'm not too fond of using shells with poor interactive features (command.com) though. One with poor interactive features and few programming features at that.

xav
03-07-08, 09:51 AM
Sorry but command.com is not really a shell. It s more a collection of, very, poorly integrated tools. It s not really a critic, after all command.com is coming from an age almost forgotten, back in the '80 and the first wave of PC.

Today, in Windows i think there are three viable solutions for using command mode :

1 ) Using wsh ( sorry don t know )
2 ) Using cygwin ( great work )
3 ) Using Perl or Python.

Finally working easily and efficiently with command line or with GUI means being able to take notes, remember the configurations . You can't take any of these tools directly from the web or from the operating system and hope to work easily with them. You have to adapt these tools to your needs. It s a work inside your "official" work.

ADB1
03-08-08, 03:24 AM
You have to adapt these tools to your needs. It s a work inside your "official" work.

That is an interesting observation. I like the work inside your "official" work concept.

I used to get carried away creating tools (shell or perl scripts) that would help me in my work. Sometimes I would automate something that is done so rarely that it wasn't worth it. Or I would forget I had done and write another script to do the same. I still do to an extent, but I now feel guilty about it. I think it is a case of doing this in moderation and only when it is really going to be useful.

A related thing - I was getting ****ed off with outlook rules today. I have about 100 rules and you can't see them all at once on the stupidly small dialogue box. I couldnt find one of the rules I wanted to change. I would much rather edit a text file than a GUI thingy. But I had a spare 10 mins so I ended up deleting a few rules that were of historic interest (the mail they were filtering was long since past). So that made it a bit tidyer.

PS - don't like big brother rewriting p-i-s-s-e-d :mad:

xav
03-08-08, 07:20 PM
That is an interesting observation. I like the work inside your "official" work concept.

I used to get carried away creating tools (shell or perl scripts) that would help me in my work. Sometimes I would automate something that is done so rarely that it wasn't worth it. Or I would forget I had done and write another script to do the same. I still do to an extent, but I now feel guilty about it. I think it is a case of doing this in moderation and only when it is really going to be useful.



Well these days i try to read the O Reilly books about perl ( read here meaning : going slowly through it and forcing me to remember the details )
Why ? Because in work i need 2 or 3 little scripts to parse though jboss logs ;
My boss knew it and approved.

What my boss and my less experimented co workers don t understand is that for these "2 little scripts" being finished in just a week or two i need to understand and used very complex knowledge like regex or log4perl.
So i learn at home and "work" at "work" ;-) ...
This kind of extra work is never show in any book . It s shadow work . Like if every body think that if you are able to program you are able to organise and coordinate easily what you learn!
Easy no ? especially for an adder !! ( repeat after me every morning : where my perl book ? I m sure to have put it here yesterday !! .;.)

@ADB1 : don't feel guilty ! never ! Remenber that 90 % of people will never
never want ( and many less could ) understand and work seriously with computing scripting. It s like learning foreign language.
I can be proud of your work.

Luthien
03-08-08, 08:00 PM
Well these days i try to read the O Reilly books about perl ( read here meaning : going slowly through it and forcing me to remember the details )
Why ? Because in work i need 2 or 3 little scripts to parse though jboss logs ;
My boss knew it and approved.
that's funny .. I am just rewriting something at home bc it took too much time for me to figure out. Not perl (although I use that too sometimes) but bash shell .. it's a bit error prone if you are used to strongly typed languages like C or Java. (I was getting the strangest error .. it did not accept a date like 2007 12 08 or 09 as input until I found out that it interpreted the '0' as an octal modifier :p )
Those books are usually wasted on me. What I do is just learn while doing it .. build a little example and extend it. And look the answers up on the internet. I can NEVER remember all those details .. that's why I have so much trouble in interviews where they ask questions like "can you describe the 5 ways in which you can avoid thread deadlock in Java" .. or even "what privacy scope settings can a class have". In such cases I can do little but excuse myself .. and feel so stupid that I dont know these basics. Really awkward, since I know I can do the job. I just need my external memory (i.e. the internet).
But once I do have the basics and know where to find the details, I can build everything you want.

This kind of extra work is never show in any book . It s shadow work . Like if every body think that if you are able to program you are able to organise and coordinate easily what you learn!
Easy no ? especially for an adder !!
indeed .. that;s really hard for us it seems.

mijahe
03-19-08, 09:49 PM
I wonder if anyone else round here prefers command lines to GUIs. Most of my colleagues find it rather odd that I tend to do things by commands.
I used to be a solid 'CLI only' advocate. However these days I prefer to use a mix. Sometimes things are done so much better under a GUI. Basically anything where a visual context can increase the dissemination of information. Like OpenView and network topology diagrams - you can dig down into routers, switches, and servers looking for information.

On the other hand there's no way in the world a Windows person will be able to do this quicker with a GUI: (Search and replace 'bart' with 'lisa' in the contents of all files not owned by uid 10000 and modified between 10 and 30 days ago, and chown to uid 100.)

find /home ! -user 10000 -mtime +10 -mtime -30 -type f -print0 | xargs -0 -i sh -c "echo perl -p -i -e 's/bart/lisa/g' '{}'; chown 100"

So.... it depends... Mostly CLI, sometimes a GUI. I will try something under a CLI, but if I can see it can be done faster under a GUI I'll make the switch.

mijahe
03-19-08, 10:02 PM
So.... another question....

Who here who uses Windows has installed cygwin?

Driver
03-19-08, 10:24 PM
So.... another question....

Who here who uses Windows has installed cygwin?

Aye! I'm a programmer though, so it's a given.

ADB1
03-20-08, 04:48 PM
So.... another question....

Who here who uses Windows has installed cygwin?

has installed cygwin - YES
has used cygwin - Not much
has cygwin installed - NO (at least not on my main machine)
might install cygwin - MAYBE

Seriously, I never really got on with it. It took me an age to install and I got rather confused about how packages worked. When I got a new machine I ended up downloading the GNU tools built for windows.

The thing I mainly didnt like about it is that CYGWIN perl (as far as I could see) expected files to have Unix LF, whereas most native windoze programs expect CRLF.

I now use ActiveState perl 5.10 and like it. I even have the odd module that does Office automation (eg generating outlook events) which I assume you don't get with Cygwin.

HighFunctioning
03-20-08, 06:01 PM
By default, all Cygwin programs are designed to deal with Unix line endings. I believe there is an option that changes this (configurable on install, but is probably a registry setting also), but I'd imagine that this only affects programs that use the standard C and C++ libraries.

As far as automating Outlook, if you're using Win32::OLE, I don't believe that is installed by default under Cygwin, but it is available on CPAN. The ActiveState perl does come with other Win32 specific options, such as PerlScript (which allows you to run perl in Windows Scripting Host, ASP, and even as a client side scripting language inside Internet Explorer).

mijahe
03-24-08, 07:49 AM
As far as automating Outlook, if you're using Win32::OLE, I don't believe that is installed by default under Cygwin, but it is available on CPAN.
Cool! The last I looked perl had really poor OLE bindings, (many years ago). I'll definitely have to investigate that.

HighFunctioning
03-24-08, 10:25 PM
I haven't used it a whole lot, but I don't think it's too bad right now. Interfacing with COM has a tendency to be painful in languages other than VB, languages associated with .NET, and C/C++ (the only reason why I don't think it's painful in C++ is that there really isn't much hidden from you at that level, and while it's a lot of work, it's easy once it is understood). OLE automation was designed around Visual Basic, so some concepts may not translate very well (iterating through collections, for instance). Many conveniences are made possible by special language implementation details.