[LEAPSECS] BeiDou Numbering Presents Leap-Second Issue

Brooks Harris brooks at edlmax.com
Wed Mar 4 10:18:01 EST 2015


On 2015-03-04 07:28 AM, Steffen Nurpmeso wrote:
> "Tom Van Baak" <tvb at LeapSecond.com> wrote:
>   |http://gpsworld.com/beidou-numbering-presents-leap-second-issue/
>
> Ok, but if engineers don't even get enough time from the business
> people to read manuals before they code the software then all bets
> are off.  From a coders point of view 0-6 seems to be more logical
> than 1-7.  (I personally, e.g., get more complex awk(1) coding
> almost always wrong in the first place because of base 1 not 0.)

Me too.

I remember reading somewhere that "Off-by-one errors" are by far the 
most prevalent type of bug, no matter the language. There are lots of 
variations of it :

Off-by-one error
http://en.wikipedia.org/wiki/Off-by-one_error

One not mentioned, and I see as closely related, is getting the *sign* 
inverted. I've found that particularly easy to do in timekeeping code, 
for example, applying the Leap Seconds or the initial 10s Leap Second 
offset in the wrong direction at some point in the code. Everything can 
look just fine until you finally compare it to some known reference to 
discover you are off by 10 or the number of Leap Seconds, or something.

Programmers like zero-based because its more mathematically consistent, 
but people generally don't like to label the first thing "zero". This 
inconsistency is all over the place in society, and been a point of 
contention in calendars and timekeeping for centuries.

Programmers have to be careful, duh. And timekeeping systems present a 
particularly difficult testing challenge. Its doable, but you've got to 
roll up your sleeves and do it. Those business people that might 
allocate resources for the effort would hopefully recognize its not as 
easy as looks.

Meantime, the "manual" is not easy to read, what with the specifications 
scattered all over the place. Its really not rocket science when you get 
to the bottom of it but it takes a long time to understand it.

-Brooks

>
> --steffen
> _______________________________________________
> LEAPSECS mailing list
> LEAPSECS at leapsecond.com
> https://pairlist6.pair.net/mailman/listinfo/leapsecs
>
>



More information about the LEAPSECS mailing list