[lug] Running a mixed Python environment

Jed S. Baer blug at jbaer.cotse.net
Wed Sep 16 09:03:08 MDT 2020


On Wed, 16 Sep 2020 07:58:19 -0600
Jeffrey S. Haemer wrote:

> The programmers (as we used to call ourselves) in the other ISC offices
> all hated it because of that.

Yeah, I was a "programmer" once. Back then, we worked in "data processing".
I recall one Java developer who took offense to my use of that term, and
said, quite pointedly, "I do NOT process data!"

> I still think they were, arguably, wrong. Some time around 1982, I read a
> study in SIGPLAN notices, a now-defunct pub of the ACM, by someone who'd
> hunted through huge bodies of code (FORTRAN? PL/1? PASCAL? I forget.) for
> cases where indentation didn't match control-flow.  In almost every case,
> the indentation was right, the bracing/keywords/whatever, wrong.
> 
> Humans are better at indenting than bracing.

I could come at that the other way, and argue that it allows
less-than-careful programmers to write working code, but then I'm biased,
since I always made it a point to have indentation and block delimiters
match up. This harkens back to the old days, when "online" code simply
matched how code would come out on Hollerith cards. Eventually, we all got
away from that, but in the mean time, editors and programmers handled tabs
and spaces differently. I went through a phase where I used tabs
exclusively, and had "set tabwidth=4" (this was a display setting) in my
editor startup file. I think that was in EDT. In maintaining others' code, I
encountered a mix of usage, even mixed tabs and spaces for indentation.
Eventually, I just got in the habit of replacing all tabs with 4 spaces,
and then fixing the whole thing. So, I ended up setting automatic tab
expansion (i.e. substitution) in all my editing environments.

The result of this is that when I first encountered Python, I wondered what
level of indentation (and therefore logic) resulted from tabs vs. spaces,
particularly if there is a mix in the leading whitespace.

And I still consider the use of block delimiters to be more precise and
robust.

And I wonder how code with incorrect block delimiting got through compile
and test?

-- 
All operating systems suck, but Linux just sucks less
 - Linus Torvalds


More information about the LUG mailing list