Defending the Python lanuage...

Quinn Dunkan quinn at
Fri Feb 1 16:42:30 EST 2002

On Fri, 1 Feb 2002 15:02:18 +1100, Peter Milliken <peter.milliken at>
wrote: >
>> Usually the problem with these sort of tools is that it takes too much
>> to set up and use them, and further, I suspect that the benefits are
>> somewhat negated by consistently having to "hit key sequence to generate
>> template, go back and edit template" versus occasionally "make a typo that
>> I have to fix".  Then again, I suppose taking the time to become
>> with these tools would probably make a difference, so I won't disagree.
>You've tried the wrong ones there mate. I agree, if the tool gets in the way
>then it isn't worth the effort. The one I am refering to is fairly
>unobtrusive to the programmer i.e. if<fn key of your choice> generates
>  if {expression}:
>    {statement}...
>  [elif_part]...
>  [else_part]
>The cursor is position within the "{expression}" placeholder automatically
>and when you start typing it is automatically deleted by the editor as you
>type the first character. Navigate backwards and forwards to the other
>"placeholders" with a couple of other function keys and select from menu
>choices when you attempt to "expand" a placeholder (such as "statement")
>i.e. while, for etc etc. Don't want a placeholder (such as the "elif_part"
>above) then hit another function key and the editor moves everything around
>(reasonably :-)) correctly :-). Of course, you only get this with Emacs
>though...... :-) But that was one of my points - select the tools with the
>most productivity features or perhaps graft the features into your tool of
>choice :-).

In my case at least, after memorizing all the various FKeys (never mind being
stuck if you like keyboards without all the extra gunk) to the point where I
could hit them without thinking (the way I can hit alphabetic keys), I'd have
spent rather more time than it would have taken to type 'elif:' and 'else:'.
And I can't even reliably hit numbers or #$%^&* characters without looking, let
alone go all the way up to wherever the FKeys happen to live on this keyboard.

When using vim, I do have one macro that I think I find useful: ';di' writes
out 'def __init__(self,):' and positions the cursor after the comma, which
occaisionally saves a microscopic amount of time, but I'm not even sure if that
really saves any time worth writing and memorizing the macro for.  I spend a
vastly greater amount of time staring at the screen muttering "hmm... no,
wait... oh, gross...".

Of course, vi itself requires loads of memorization, and I'm not convinced
it's really worth it.  For example, to move a word two words back to the end of
the line, is it really quicker to type '^[2Bhdt $pa ', or is it quicker to
select the word with the mouse, cut, click, and paste?

>I mean, you have a good point about familiarity etc but assuming a "level
>playing field" in that area, the programmer *should* be better off with the
>tool that offers the most features. I view programming tools just like any
>other trade i.e. use the one best fitted for the job. Many programmers take
>the approach of "well, I'm good with a hammer, so that's what I'll use with
>this job" - even when the job requires the use of a jigsaw! :-) I know this
>is a far fetched analogy but not too far off the mark :-).

Well, say it took a few months to really learn how to use a hammer.  And
suppose that a hammer could put in screws, not as well as a screwdriver, but
pretty well.  If you needed to put in a lot of screws, you could write a script
for the hammer for putting in screws.  Still not as easily as a screwdriver,
though.  Then your analogy would be closer to the mark, and the attitude of
many programmers easier to understand :)

Also, the first sentence in the quoted paragraph seems to contradict the rest.
I'd think that the tool with the most features is meant for *everything* (i.e.
not the "best tool for the job" but the "one tool to rule them all"
philosophy).  Is a carpenter best served by a swiss army hammer with a philips
head on one end, and a jigsaw blade in the handle?  It does offer the most

Ok, I think the metaphor has been abused enough by now :)

More information about the Python-list mailing list