[CentOS] OT: programming language for morons (newbie friendly language in Open Source world)

Tue Dec 14 16:46:36 UTC 2010
m.roth at 5-cent.us <m.roth at 5-cent.us>

Les Mikesell wrote:
> On 12/14/2010 4:43 AM, Natxo Asenjo wrote:
>>>  Python enforces you to be more consistent, which is not a bad thing if
>>> you want to understand better what you are doing in the very beginning.
>>>   Later on Perl, Ruby, C#, Java, C/C++ might be a good alternatives, as
>>> they probably are much stronger in a lot of fields for more complex
>>> tasks.
>> use strict;
>> use warnings;
>> if you write Perl and do not use that, you will have problems, yes.
>>> But remember each tool has its own use case.  You don't need a hammer
>>> when you have screws.  It's the same with programming languages.  And
>>> Python and Perl are often used as the "Swiss Army Knife".  Useful for a
>>> lot of ad-hoc and not too heavy routine tasks, but you won't rely on it
>>> when going hunting in the wilderness.

There was an article in Dr. Dobbs' about 10 years ago, where perl was
referred to as the Swiss Army chainsaw. <g>
> Perl is easy to write, starts up relatively quickly, and has a lot of
> available modules for specific operations.  Since it interpreted as

> yet-another-syntax for config files.   But, it is somewhat hard to scale
> and maintain because people write in different styles and things that
> start small tend to have a lot of global variables that are hard to
> remember as the code grows.  And perl is not great for GUI programs.

There is *no* excuse for lots of globals. Pass your stuff. The most
complicated programs I've ever written in perl (I guess that was the
billing system for a very small telecom, 600-700 lines or more) had less
than 10 globals, and maybe less than five (it's been 6 years since I was
there, so I don't remember). Using globals is *lousy*, *lazy* programming,
and I wouldn't trust folks that write anything more than a 20 or 30 line
script to program *anything* until they'd gone back and internalized
modular coding. And then I'd review their code for the next six months....