Web lists-archives.com

Re: Recommended editor for novice programmers?




I saw (after I posted my last comments) that the OP (Tom Browder) has gently 
suggested that he has heard enough, but I feel compelled to add a few more 
comments, just to make sure things are clear.  

Not all of my comments are relevant to this post, so I'll add this here:

The survey that someone else mentioned forced the responder to choose between 
Emacs, Vim, nano, and Microsoft Notepad (iirc).  At least one other category 
should have been included, and I'd suggest it be a generic "[Linux] GUI 
editor" (where Linux is optional).

There are so many GUI editors that to mention any one would splinter the 
"vote" so much that any such editor would be lucky to get 0.1% of the vote, 
yet, as a group, there would be a significant number of votes.

PS: Various things snipped without marking all of them.

On Sunday, September 03, 2017 02:18:52 AM Erik Christiansen wrote:
> If the proposed users are dilettante programmers, then it matters little
> what they use. If they intend to become professional, then it is
> definitely worth trading up to a 17-gear bicycle, from the
> one-foot-on-the ground scooter that anything less than vim, emacs, and
> maybe nano is¹.

Just a totally irrelevant comment: a 17-gear bicycle would be "unusual".

> All those gears do provide a useful productivity improvement, as I've
> found in over 30 years of programming. Vim has useful configurable
> support for consistent 'C' indenting, and emacs doubtless does too.
> Abbreviations and key mappings allow custom shortcuts, to reduce fatigue
> in long coding sessions. Run ctags (preferably exuberant ctags) first,
> and a double keystroke will take you to the definition of the function
> name under the cursor. 

Other (GUI) editors have interfaces of one sort or another that can run ctags 
and similar shortcut mechanisms to get to the definition of the function.

Further (maybe not relevant to this particular post), there are various means 
of keeping indentation (and formatting) consistent throughout multiple files, 
including various flavors of autoindent and interfaces to various pretty 
printers and such.

> The programming task is not complete without documentation. The 420+
> page document which summarises some of the programming & sysadmin stuff
> I've mucked with over the decades, and serves as wetware backup, became
> a little hard to navigate and keep ordered as it grew. But multi-level
> folding fixed that. It is worth its weight in chocolate bars - I kid you
> not.

Multi-level folding is also available in many GUI editors.
 
> But consider also the simple stuff. To find 20 occurrences of e.g. a
> function name, and change it in some cases but not others, involves only
> an alternation of 'n' and '.' (repeat last action) after the initial
> find and cw (change-word) in vim. Emacs uses more keyboard chords, but
> but can doubtless do it too. Whatever editor is used, it should let you
> make the 20 edits in less than 15 seconds, without sweat, or going mouse
> hunting.

Similar features exist in many GUI editors.

> There is no exaggeration in that. But the bicycle analogy is apt. It
> takes a period of consistent use to gain sufficient proficiency for the
> cheat-sheet training wheels to be able to be put aside. But it's worth
> it. Promise.
> 
> And I do use vim almost everywhere. This post is being composed in vim,
> invoked within mutt as its editor. I have English, Danish, and German
> spell checking set up, invoking it only after the initial compose pass.
> There's word completion, but I've never cottoned on to that.
> 
> In short, pick a good one, so you only ever need to learn the one.
> 
> ¹ What do other programmers use? Here's a reddit survey (nano did well):
>  
> https://www.reddit.com/r/linux/comments/6ihxua/officially_settled_vim_5x_m
> ore_popular_than_emacs/

Oops, OK my comment on the survey is apropriate to this post.

One final comment: If either Emacs or Vim are really so good that all 
programmers (and users?) should be indoctrinated to use it, I would suggest 
that it be modified something like the following:

All (well at least all fairly common features) should be accessible by GUI / 
mouse methods similar to those in most GUI editors.  Then, there should be (an 
optional) function which notes whether a user is accessing a feature via the 
mouse or via a keyboard shortcut, and how often he is doing so.

Then, with the option on, on some (presumably occasional basis) messages like 
this might pop up:

"In the last two hours, you have done a multiple search and replace using the 
mouse interface 17 times.  The same thing can be done via the keyboard 
shortcut <such and such>.  In those two hours, you spent 12 minutes doing 
those 17 multiple search and replace operations.  We expect that if you had 
done that using the keyboard shortcut, you could have done the same thing in 7 
minutes."

lol, but not really--I'm serious (well, except for the part about "either  
Emacs or Vim" being "really so good that all programmers (and users?) should 
be indoctrinated to use it",

Then, if it means enough to that particular user, he might learn and start 
using that particular keyboard shortcut.

I hope I'll shut up now ;-)