[aprssig] Programming Language Advice
vk2tv at exemail.com.au
Sat Jan 17 21:40:02 CST 2009
Thanks for all the additional replies. I think the only language I'm
proficient in at the moment is profane, after all the syntax errors from
My last serious attempt at a programming language was in 1982 with
BASIC. Now you have an idea of where I stand.
However, when I get my teeth into something I'm usually determined to
win, and I now have the ugliest scripts ever written, doing what I want
to do. As I become more proficient in perl there will be a lot of
tidying up. I couldn't get my head around converting compass points to
degrees in perl - those darned syntax errors again - so I start with a
shell script to snag the data with lynx, do a bit of cut and shut to
extract the data I need, and then convert the compass points with
"case". From the shell script I call my perl script and it does all the
mathematics and output formatting. I run two scripts (two weather
stations) every ten minutes from crontab to snag the info and upload to
As I said, the scripts are ugly but I do at least have a point from
which I can make improvements.
Jeff Brenton wrote:
> 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
> 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.
More information about the aprssig