Annoying octal notation

Hendrik van Rooyen hendrik at microcorp.co.za
Mon Aug 24 11:22:39 EDT 2009


On Monday 24 August 2009 16:14:25 Derek Martin wrote:

> In fact, now that I think of it...
>
> I just looked at some old school papers I had tucked away in a family
> album.  I'm quite sure that in grammar school, I was tought to use a
> date format of 8/9/79, without leading zeros.  I can't prove it, of
> course, but feel fairly sure that the prevalence of leading zeros in
> dates occured only in the mid to late 1980's as computers became more
> prevalent in our society (no doubt because thousands of cobol

I was one of those COBOL programmers, and the time was around the end of the 
sixties, running into the seventies.  And the reason for leading zeroes on 
dates was the punched card, and its handmaiden, the data entry form, with a 
nice little block for every character. 

<aside>
Does anybody remember key to tape systems other than Mohawk?
</aside>

> programmers writing business apps needed a way to convert dates as
> strings to numbers that was easy and fit in small memory).
>
> Assuming I'm right about that, then the use of a leading 0 to
> represent octal actually predates the prevalence of using 0 in dates
> by almost two decades. 

Not quite - at the time I started, punch cards and data entry forms were 
already well established practice, and at least on the English machines, (ICL 
1500/1900 series) octal was prevalent, but I don't know when the leading zero 
octal notation started, and where.  I only met it much later in life, and 
learned it through hard won irritation, because it is a stupid convention, 
when viewed dispassionately.

> And while using leading zeros in other 
> contexts is "familiar" to me, I would certainly not consider it
> "common" by any means.  Thus I think it's fair to say that when this
> syntax was selected, it was a rather good choice.

I think you give it credence for far more depth of design thinking than what 
actually happened in those days - some team working on a compiler made a 
decision  (based on gut feel or experience, or precedent, or whim ) and that 
was that - lo! - a standard is born! -- We have always done it this way, here 
at company  x.  And besides, we cannot ask our main guru to spend any of his 
precious time mucking around with trivia - the man may leave us for the 
opposition if we irritate him, and systems people do not grow on trees, you 
know.

- Hendrik




More information about the Python-list mailing list