[CentOS] which programming language for server-side admin tasks

Tue Jun 16 04:00:23 UTC 2009
Filipe Brandenburger <filbranden at gmail.com>

At the risk of adding more wood to this fire...

On Mon, Jun 15, 2009 at 11:04, Les Mikesell<lesmikesell at gmail.com> wrote:
> Yes but it has been obvious for a long time that python does not
> consider backwards compatibility to be important.

Not true. There is a 2to3 program bundled with Python 3 that will take
care of most issues in the migration of Python 2 to Python 3. It's
true that some changes will affect scripts in a way that 2to3 can't
help, but those are mainly issues with the introduction of the
distinctions of "bytes" and "characters" in Python 3, which IMO are a
much needed feature.

Python 1 to 2 also introduced many changes, but AFAIR there were only
new (more OO-like) ways to do things, the old ones (not so OO) became
"deprecated" but scripts continued to work. But this was ages ago and
I don't think it's that relevant to this discussion...

> By comparison, perl has been around longer and
> through more changes and yet about the only thing you might have to
> check on a program written for perl 1.x to run under 5.x would be
> whether you have @ in double-quoted strings that you wanted to remain
> literal.

Excuse me? Have you heard about Perl 6? It's a complete rewrite of the
grammar of the language. They even want to change "." as the
concatenation operator. If not by the fact that they started working
on it about 7 or 8 years ago and it is complete vaporware, it would be
have been a *major* compatibility breaking change.

Now, talking about Java, that's a nightmare... I, as a sysadmin, have
to maintain three or four JVM versions around in my machines, because
each developer needs a different one of them. Some say their code must
run in 1.5 and is not compatible with 1.6, some use GWT and need a
32-bit JVM, I also need another 32-bit 1.6 JRE for Firefox which is
more stable, now there is OpenJDK (which does not have browser
plug-in) to complete the mess. One of the developers said he needed
jdk_1.5.0_06 and he would not use jdk_1.5.0_15jpp because he was not
sure that the results would be the same. Not to mention that they have
very specific constraints on the versions of Tomcat and all the other
components... And while it is possible (though I doubt it) that a Java
program written in JDK 1.0.2 would still run in OpenJDK 1.6, the
language is completely changed, most methods were deprecated, there
are new ways to do *everything* from strings to basic I/O
(Input/Output Streams -> Readers/Writers) to Class Templates (whatever
they call them) to Graphic UI (AWT -> Swing -> whatever they're using
today) to Databases and threading/networking. I learned Java 10 years
ago and did not keep up... my knowledge of it is worth almost zero
today.

I won't say one is better than the other. Each one has its advantages
and its own problems. You should choose one based on your personal
choice, and learn how to switch to another one for a specific project
if it seems it could be the right tool for the job.



On different e-mails, Rudi Ahlers<rudiahlers at gmail.com> wrote:
> I can do most of this in PHP, but I do think PHP is a bit slow for this,
> being a scripting language, and not a compiled language.
> [...]
> I'm not very fond of JAVA, since it's rather slow.
> [...]
> Well, it's my understanding that compiled languages perform much
> better than scripting languages for this kind of operating
> [...]
> I had a look at it, and other control panels as well, but really don't
> like it, and don't really want to "interfere" with the GNU stuff. The
> CP I have in mind will most probably be for in-house use, but also
> for client's use.
> [...]
> CentOS would be my primary OS of choice, but I suppose it would be
> good to make the code more portable, and accommodate other Linux
> distro's, and probably OS's
> [...]
> But would PHP be able to perform all tasks that PERL / C++ can?
> [...]
> I have done some PERL coding on websites before, but very little, yet
> it was very easy to pickup with my PHP skills.
> As a front-end, I would consider Ruby, and / or AJAX. Could these
> inteface well with PERL?
> [...]
> AJAX is quicker to the end user than Ruby
> [...]
> So, from what I've gathered here, it could be a good idea to work with
> PERL + Ruby, and then add AJAX for the interface.

Rudy,

It's clear by now that you don't know what you want.

Worse, you want something that is flexible and portable enough, and
yet you want to use 4 or 5 different languages (that you haven't
learned yet!) to build it and handle the complex interactions between
them.

And yet you believe you won't fall into the security pitfalls of
writing not only a web application, but one that interacts with the
core components of the OS.

Do yourself (and us all!) a favor and just "hack" one of the existing
control panels to do what you need on your setup. And if you'll do
extensive programming (meaning more than one line fixes) on it, choose
one written in PHP which is the language you already know and master.

On the other hand, if what you want is to learn new languages, choose
one and learn it well, but choose something simple (and not a flexible
portable control panel) as your test application. Expect it not to be
so good on the first try, but then try again and again (or try other
kinds of applications) until you master it. Don't mix languages until
you really master both of them.

I hope you don't see this as a discouragement, but as an advice of
someone who has seen many projects like the one you outlined flunk...

Cheers,
Filipe