john gibbons wrote:
What would be the easiest programming language to learn? Important variables: (1) my technical knowledge of Linux is limited though I love the philosophy of openness and (2) I am 80 years old, so at my age 'simple' also implies 'soon'. Not being pessimistic about my life span, but a race is on.

The answer really is "it depends". Mostly it depends on what you want to do with it. Are you learning a language to join a particular open source project? If so, then you should probably pick whatever language they're using. Likewise if you're planning to write your own code but expect to interface with existing software, it might help to pick that language too.

If you're planning on working on your own, then you have more options, but there are more considerations. For example, is there an active user group for that language in your area? Sydney is pretty lucky in this regard, it has active Perl, Python and PHP user groups. It has a Ruby group, but I'm not certain of their status at this time. I suggest you join the mailing lists of all the languages you start considering. This will help you get an idea of how the communities interoperate and should also help you decide whether you feel comfortable working with them. These groups are important, as you'll need somewhere that you can ask questions. What is the best way to do X? Which is the better library for this task: X or Y? It's also important to just listen and be involved; you might learn things that aren't immediately useful now, but make your life easier later. Or just see better ways of solving common problems. People who have to teach themselves everything, every step of the way, often miss finding out about really cool short-cuts and improvements.

Another big consideration is your prior experience.  Learning new programming
languages isn't easy.  If it was, I wouldn't have such a successful business. :)
If you have experience in using grep, sed and awk under Unix, then
theoretically you'll have a bit of a head start in Perl.  On the other hand,
most of our students haven't even heard of grep, sed or awk; so experience here
isn't essential. Perl, Ruby and PHP have a lot of similarities. Some of these are shared with C and thus with Javascript and Java; but these are fairly
superficial.  I don't know of any languages I would say are similar to Python,
it's a beautiful mix of functional programming and imperative constructs, with
meaningful whitespace and thus no braces (which makes it unlike all the other
languages I've mentioned) - if you're starting from a clean slate as far as
programming goes; this is unlikely to be significant.

Regardless of your choice of programming language you may still have
access to the huge repository that is CPAN, but even better you could have
access to the libraries of the other languages as well.  It just depends on how
much effort you want to go to.  For example, if you write in Perl you can access
Python via Inline::Python, and PHP via PHP::Interpreter.  From Python you may be
able to access Perl via PyInline and so on.

The biggest choosing point between the languages is what you intend to use it
for.  If you want to write "one-liner"s to process lists of files, or do
character substitutions; then you probably want to be using Perl.  If you
anticipate doing a lot of text processing (log parsing); you probably want to be
using Perl.  For more general purposes (medium to large scripts of any
complexity), well written programs in Perl, Python, Ruby and PHP will probably both look very similar and be equally easy to maintain. The catch is of course in the phrase "well written".

Even with my previous paragraph in mind, it's good to pick a language which has
good support for what you anticipate will be common tasks.  If you expect to be
doing a lot of socket programming or other low-level machine tasks; check that
the language supports it without too much grief.  If you're going to be doing a
lot of web or report work, look at the available templating systems so you can
separate layout from data generation.  If you anticipate writing systems where
the underlying database could change from time to time; look for a language
which provides one API regardless of the database used.

A final consideration is learning support.  There are a huge number of very good
books (and a huge number of very bad books) for each of these languages.  There
are also web based tutorials (of varying quality).  If you're happy to
self-learn then there's no issue.  If you are considering getting training, your
options are somewhat limited; I haven't heard of any general enrollment Python or PHP courses going on for some time now. (If you know any different please tell me.)

All the best,

     Jacinta

PS: All things equal, if you want an actual recommendation that doesn't take in
to account your personal needs and requirements; I'd be happy to recommend Perl. Almost all of Perl Training Australia's course notes are accessible for free from our website: http://perltraining.com.au/notes.html

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to