Web lists-archives.com

Re: Recommended editor for novice programmers?




On 03.09.17 03:17, Dejan Jocic wrote:
> On 02-09-17, rhkramer@xxxxxxxxx wrote:
> > On Saturday, September 02, 2017 06:46:33 PM davidson@xxxxxxxxxxxx wrote:
> > > 
> > > When, many years later, I developed a greater interest in computers, I
> > > was happy to discover that
> > > 
> > >    1. I hadn't been taught only how to ride a tricycle, but had been
> > >    riding a full-fledged bicycle all along, and
> > > 
> > >    2. I would never need to learn to use another text-editor again, if
> > >    I didn't want to do so.
...

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¹.

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. That's gold when you're herding a hundred
functions to get the job done.

GUI mavens speak of GUI IDEs, but there is no need for a constraining
Point_n_Grunt menu maze when "*nix is the IDE" once you have vim or
emacs and ctags.

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.

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.

> Best downside of Vim I've found would be this:
> 
> "Once you're used to it, you won't like other editors
> 
> When your fingers have learned Vim's keyboard commands, you'll find
> yourself reaching for them even when using other text editors. You'll
> get frustrated every time you have to reach for the mouse or move your
> cursor letter by letter with the arrow keys. You'll notice every time a
> Vim feature would save you time and tedium, and you'll wish the editor
> you're actually using had it. You'll wish the editor was Vim. You'll
> wish everything was Vim. You'll wish this imperfect world we live in
> could somehow become just a little bit more graceful, a little bit more
> elegant, by adopting modal text editing as a common paradigm. You'll
> wish desperately that this world was that better one. But it isn't. It
> isn't. And it never will be.:wq"

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_more_popular_than_emacs/

Erik