I'm a vim lover, but I'd take that first bit about "what editor to use on *nix" completely out (or else, do a real survey). You do not have to pick between emacs and vim, and I would not necessarily recommend either of them to people both new to programming and the *nix environment. Why not tell them how to sit in the chair as well -- and that the chair must be on a pedestal with wheels, not four legs? And that you must have a wheel on the mouse? Etc...
There must be close to a dozen GUI editors with syntax highlighting for perl available under linux, and most systems will have one, eg, gedit, available. Those tools are very simple to begin using at once, especially for windows users who will be comfortable with their mouse and menu driven interface. Vim and emacs are great, of course, and no doubt later on you may want to explore the real tish, but gedit is totally sufficient at first and requires no attention, leaving you to focus your mind on perl and not contemplating bells and whistles like "code completion", key macros, six different ways to cut n' paste, etc. Or having to read a tutorial in order to type a script, save it, and load it again without problems. Type. Save. Load. Syntax highlighting. Cut n' paste. Maybe print. That's it. All the common linux desktop environments (gnome = gedit, kde = kate, xfce = mousepad, et. al.) have something standard integrated into them that will do those things via some nice iconic toolbar. Point and click. No installation or tutorial required.
Other than that diversion, this looks like a nice, succinct set of beginning tips. WRT use strict, etc:
use warnings FATAL => qw(all);
Is a great thing to know about. Beginning programmers easily ignore warnings "because they aren't real errors" and miss the significance of, eg, mistakenly using uninitialized variables in the wrong place. Generally when developing something, I don't want it to "keep going anyway" if I get warnings -- it's much easier to stop right there and fix the first problem that arises. And, just like there is no good reason for a program to be unable to run strict, there is no good reason for it to produce any warnings. Start with the good habits and best practices right away and you will never find them a hassle later on. | [reply] [d/l] [select] |
I find that gvim works quite nicely native under Windows. And I agree that the instructor might well insist on the student solving it on their own. Sometimes we learn more from a re-invented wheel than from simply 'remounting' one.
My best professors made us learn what useful tools did by writing one before they allowed us to use them. Of course that was back in the stone table an dbear skin days
Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance
| [reply] |