[Israel.pm] Completion and editors (offtopic)
yuval at windax.com
Wed Jun 9 03:10:25 PDT 2004
Shlomi Fish wrote:
>Mikhael and Yuval,
>If I understand you correctly, I think both of you try to convince each other
>and the world at large in your opinions. These opinions are extreme and you
>absolutely refuse to agree with the other side. What is deceptive here is
>that there is a grain of fact to your arguments.
>What Mikhael is claiming is that features such as auto-completion or syntax
>highlighting are Evil, because they do not necessarily work correctly, and
>give way to incorrect practices. (like adapting your code for that instead of
>the other way around). As opposed to him, Yuval claims (or at least used to)
>that these features are an _absolute must_ in an editor and that every
>programmer _should use them_. (you can both correct me if I am wrong).
I just hate to see that people are forced to use hacks because of their
editor. I know I was, with some editors.
I am also trying to understand how migo stays focused on his code when
using these hacks.
Let's put aside the "must" features of editors, these are "musts" for me
when I (_personally_) look for an editor, and that's because I've been
looking for the perfect one and changed quite a lot of them in that time.
The current one isn't perfect, but it's the closest, for my criteria.
I am also trying to understand why migo thinks my auto-completion habits
aren't effecient (or worse, how they make me lose focus from my code -
which they really don't).
>My opinion on this is more rational than either. Editors can have any features
>that programmers can find useful (and even those they don't), or they can
>lack these features. Similarly, programmers can choose to use any subset of
>the features present in their editor of choice. This is as long as they
>produce well-written, well-formatted, well-structured, etc. code that
>complies with the relevant coding conventions.
And usually that means: auto indent, auto complete.
Auto indent: this is a must for editors. This time I insist an editor
must have this feature, and you should have it as easy to operate as
possible (read: it should be transparent to you - you shouldn't even
think of it, it should just happen).
I've seen a lot of code which isn't indented, or worse, semi-indented.
When you have to indent on your own, it's bad. That means you might get
into a situation when you add code in a hurry (urgent bug fixes, happens
to all of us) and forget to indent it.
Most editors make you type something to indent, and I chose one that
does it automagically.
Most of the poorly (or not at all) indented code I've seen was written
in these editors (without mentioning them - you should know if your
editor is one of them).
Auto complete - for crying out loud, mistaking variable names can cost
Copy-pasting would also take time and would also cut my line of thinking
(at least for me, _personally_, though I don't think I'm unique in that
This isn't a must, ok, but I believe (stressing it again: _personally_)
it would result in better code - so you should consider using it.
>You can use ed for this, or you can use Emacs for this, or you can use
>something in between. I don't try to tell programmers with which tools and
>their features to write their code. I just want to tell them how to write a
>high-quality code. (And naturally, do my best to practice what I preach.)
I just don't like the fact that people get used to a tool and then hack
their way into that tool.
Switching editors is painful, I know, but I wouldn't continue using an
editor where I (*cough*) have to background the window, open a new
editor, find the variable, close that editor, fg, and finally paste
At least let me split the window so I could stay in the same line in the
bottom window (for example) and find the variable in the upper one, and
then copy paste.
You will lose focus in that kind of thing, no matter how you look at it
(or maybe I'm not thinking hard enough...?).
Losing focus IS Evil (why do you capitalize evil, btw?).
Again, your editor must make you be as productive as possible, help you
generate good-looking (very well indented, which means readable) code
easily, and give you all the features and tools to program easily.
Does anyone think Migo's approach of backgrounding the editor, etc, is a
Working like I worked with pico (which is Migo's approach) is that last
thing any programmer would (or at least should) want.
Also, what features do you find in your editor that makes you produce
P.S: I find it to be only semi-offtopic because effecient programming is
really important IMHO.
Gabor, let us know if we're really offtopic.
More information about the Perl