[colug-432] Great moments in computer science

R P Herrold herrold at owlriver.com
Wed Jun 3 11:51:48 EDT 2015


On Wed, 3 Jun 2015, Rick Troth wrote:

> On 06/02/2015 03:38 PM, R P Herrold wrote:
> > http://www.safetyresearch.net/blog/articles/toyota-unintended-acceleration-and-big-bowl-%E2%80%9Cspaghetti%E2%80%9D-code
> >
> > Toyota had more than 10,000 global variables.

> I've seen global variable abuse in commercial code. (not just embedded)

Obviously I don't know the specifics of the Toyota code, but 
the temptation to 'keep everything global' in scope may be a 
response to many things:

	1. avoid garbage collection, and into / out of scope 
memory management delays

	2. tactically solving (by use of the Big Hammer, how 
to 'marry' several sub-systems without stable or well defined 
specifications (include here melding several 'architect' 
visions, not designed to be compatible -- solving a many to 
many inter-connect problem without a common 'Rosetta stone')

	3. the traditional small stack and writable memory has 
been easier to get a C compiler up and running on, compared to 
a well-behaved C++ environment, and all the 'memory games' 
that naiive C implies

... each of which may seem reasonable when a tactical problem 
presents itself, and one is being pressured to 'meet a 
deadline'

Stir in a culture of hesitation to criticise, here 'smelly' 
code; a culture where 'the nail which sticks up is the first 
to be hammered down';  and a culture which has a National Debt 
service running about 50 pct of its GDP (implying it NEEDS to 
keep an export economy alive to get the hard currency it needs 
for foreign trade / exchange operations), and a temptation to 
'just stay quiet' and hope the retribution falls on someone 
else in the future seems appealing.  Not right, or ethical, 
but ...

My strong criticism is reserved for US bureaucrats NOT pushing 
for clear NHSTA guidelines on the matter (one assumes at the 
behest of regulatory capture, lobbying, and political 
log-rolling).  reading the trial transcripts, it is clear that 
we as a coding society know HOW to do better, but lacked the 
strong requirement or incentive to do so

-- Russ herrold


More information about the colug-432 mailing list