I think I've discovered one reason. Here's a scrap of text from a recent METAR file:
PK WND 02053/0412 LTG DSNT ALQDS RAB09 TSB02 OCNL LTCICCG N TS N MOV SE
My parsing code didn't seem to recognize the "Occasional Lightning North" part. It should have displayed as: "Occasional Lightning Intra Cloud, Cloud to Ground North."
The code that handles this string of text first tests for the
length of the piece that starts with "LTG". It should have 'seen' seven characters. It was
passing that test.
But there is a second test in the same line of code that double-checks that the first thee letters are "LTG". It was
failing that test!
I wasted at least 30 minutes trying to figure out what the problem was. Have any of you noticed the difference in the two instances of 'LTG' in the Code section above? The font you use helps. I'm using one that is recommended for use in BBEdit, but it was not helping me in this case. The problem was not with my code, except I was not checking for typos! The METAR is manually typed my a humanoid, sometimes with fat fingers? This time it used a "
C" instead of a "
G".
This 74 y.o. just couldn't see the difference at my normal distance from the monitor.
That's why I think there are few
old programmers!