[Israel.pm] Editors as Power Tools [was Re: Variable Naming]

Shlomi Fish shlomif at iglu.org.il
Tue Jun 8 01:21:20 PDT 2004


On Tuesday 08 June 2004 10:15, Jason Elbaum wrote:
> I'm gonna regret this, but I'll just weigh in briefly:
> >>>auto-completion is a nice-to-have feature, which is useful, but still
> >>>not a  must.
>
> I find auto-completion annoying. The editor interferes with the flow of
> my typing by assuming it knows what I mean. If you're a lousy typist,
> use auto-completion. I can finish typing the variable name faster than I
> can select the editor's auto-completed suggestion.
>

Well, I don't know which editor or IDE you're using, but I think vim and 
emacs, don't present you with this cute (or annoying - YMMV) drop-down menu 
of options that recent versions of MS Developer Studio do. What you do there 
is type the beginning of the variable and then press a key combination to 
complete it. So if you have a very long variable name with a unique short 
prefix, you can type it very quickly this way. (regardless of how fast a 
typist you are).

It reminds me that my lecturer for "Structure and Interpretation of Computer 
Programs" (http://mitpress.mit.edu/sicp/), protected the fact that Scheme 
constructs can become very verbose, by saying that Americans learn how to 
type at a very early age, and so type very quickly to not notice it. But 
then, I read the essay "Being Popular" by Paul Graham 
(http://www.paulgraham.com/popular.html) which explains what makes languages 
popular and how he intends to develop Arc, a new dialect of LISP he's 
preparing accordingly. And one of the things he says there is that a good 
language is brief or even very brief.

Now, I've been to this professor's room a couple of times, and watched him 
type. It is possible that it is because he is quite old, but he types very 
slowly. You could think he would frown upon languages that require him to 
type too much. (BTW, he is being acknowledged of helping the authors in the 
second edition of the book).

My favourite lengthy Scheme expression is:

(vector-set! myarray i (+ (vector-ref myarray i) 1))

Which in Perl would be:

$myarray[$i]++;

Or at most:

$myarray->[$i]++;

It's more than 3 times shorter.

> >>>I happen to like command line debuggers.
>
> I gave up on graphical debuggers a long time ago. They generally just
> make the debugging process slower, heavier and more buggy!
>

:-)

Well, I don't use them too much either. Usually, it doesn't even cross my mind 
to use them.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]



More information about the Perl mailing list