My son wants me to teach him Python

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jun 14 02:13:47 EDT 2013


On Thu, 13 Jun 2013 20:33:40 -0700, Rick Johnson wrote:

> On Thursday, June 13, 2013 3:18:57 PM UTC-5, Joshua Landau wrote:
> 
>> [...]
>> GUI is boring. I don't give a damn about that. If I had it my way, I'd
>> never write any interfaces again (although designing them is fine).
>> Console interaction is faster to do and it lets me do the stuff I
>> *want* to do quicker.
> 
> And are you willing to provide *proof* that the console is faster? Or is
> this merely just your "opinion"? I would be ready and willing to compete
> in a "Pepsi challenge" to disprove your claim if needed.  For instance,
> if i want to open a text file on my machine, i merely navigate to the
> file via my file browser interface, using clicks along the way, and then
> the final double click will open the text file using it's default
> program. Are you telling me you can type the address faster (much less
> remember the full path) than i can point and click? 

If you can remember the full path in order to point and click, then I'm 
sure Joshua can remember the full path in order to type.

And as far as speed goes, well, that depends. If you have three files in 
a directory, which in turn is next two three other subdirectories:

C:
+-- My Documents
+-- My Pictures
+-- My Videos
    +-- amazing movie.avi
    +-- amazing movie.mp4
    +-- amazing movie - the sequel.avi


then, yes, I'm sure you pointing-and-clicking will beat the command line 
to open "amazing movie - the sequal.avi". Trivial tasks like that play to 
the strengths of GUI interfaces.

But, here's a slightly more challenging one: you have to navigate down 
through ten directories, not one. Each directory you navigate through has 
a dozen different subdirectories in it. When you finally reach the bottom-
most directory, where your target video file is, there are two thousand 
other videos in the directory. (Some people's only filing system is "dump 
everything in one place".) None of the video thumbnails are cached, and 
your GUI will helpfully start loading thumbnails as you open the window 
and scroll around. Your "Pepsi Challenge", should you choose to accept 
it, it to find the target file, make a copy of the file in the same 
directory, rename the original, and then open it in an application but 
*not* the default application.

Are you still confident that point-and-click will win this race? I'm 
not... I reckon this would be neck and neck, up to the point where your 
GUI starts loading thumbnails, then the command line will leave you in 
the dust. Even a weak, underpowered command line like command.com (or is 
it cmd.exe? I always forget which is which).

On the other hand... if we don't know the name of the video, and have to 
recognise it by sight, then a GUI has the advantage.

Here's another Pepsi Challenge for you:

There is a certain directory on your system containing 50 text files, and 
50 non-text files. You know the location of the directory. You want to 
locate all the text files in this directory containing the word 
"halibut", then replace the word "halibut" with "trout", but only if the 
file name begins with a vowel.

Still confident that you can do this faster with a GUI than a command 
line interface? I reckon that a full-powered CLI like those available on 
Linux will just about have finished the entire job before you've even 
finished entering information into the GUI search dialog.

But in any case, there are certainly strengths and weaknesses of both 
GUIs and text interfaces, and one should design programs around whichever 
is best for the needs of the program and the user.


-- 
Steven



More information about the Python-list mailing list