[aprssig] Programming Language Advice

Jeff Brenton taprlist at dididahdahdidit.com
Thu Jan 15 13:27:36 EST 2009


Hello Ray,

RW> I'm seeking advice from members of the list as to which would be
RW> the best programming language to use to massage a string of data
RW> so that it's suitable to upload as aprs weather info.

From the standpoint of someone who has been programming in C for 20+
years, and PHP for about 10, my advice is... If you're comfortable
with Perl for part of it, why not use it for all of it?

This is a case where string handling is "important", but trivial, so
the strengths or weaknesses of any of the languages isn't a major
factor. The frequency that data arrives and must be processed does not
require blazing speed.

What is a factor is if the data is being processed continuously, or if
it's a "call for each string to be processed".

If the program is called for each string to be processed, the overhead
of loading an interpreter can be huge. PHP and Perl can be rather
onerous in this regard. A compiled C program has a lot less overhead.

If the program simply loops and translates each string as it is found,
the interpreter overhead is a small, one-time "expense". ProgramMER
efficiency becomes more important.

I do a lot of data transformation work. I had one task that was
originally written in C for efficiency, because it's translating
virtually every byte of the input files, which can run tens of
megabytes. A couple of years ago, an aberrant file file needed to be
processed. Half-way through modifying the C program to handle the
abberation, I realized that, for this one-time job, I'd just take the
speed hit and do it in PHP. Program was done in 2 hours, instead of
20.

That is when it struck me that the job is only run once per day, so
who really cares if it takes 3 minutes to run, instead of 1? The
normal program was replaced with a PHP version. Maintenance became
much easier. The ability to "go with the flow" when changes in the
input data occur went up.

Go with whatever language YOU are more efficient in.

-- 
Best regards,
 Jeff ka9vnv





More information about the aprssig mailing list