Re: [Lit.] Buffer overruns

From: BRG (brg_at_nowhere.org)
Date: 02/02/05


Date: Wed, 02 Feb 2005 15:16:55 +0000

infobahn wrote:

> BRG wrote:
>
>>infobahn wrote:
>>
>>>BRG wrote:
>>>
>>>>If its written in C there is a high probability it will be a load of crap.
>>>I believe 90% is the canonical probability. Cf Sturgeon's Law.
>>
>>I wouldn't dare put a figure on it - especially so as I am trying to
>>take the edge of your scalpal :-)
>
> How unkind! I don't care what you do with /your/ scalpel, but
> I'm keeping my own scalpel sharp, thank you very much. :-)
>
>>But I have been wondering if the cultural dispositions of the C and C++
>>communities are different. At first sight it seems plausible to assume
>>that the C culture would be preserved largely intact in the move from C
>>to C++.
>
> Possibly because, at first, it was indeed preserved largely intact.
> In fact, many so-called C++ programmers still write, basically, in
> C. I remain undecided as to whether this is a good or a bad thing.
>
>>On the other hand C++ adds much higher level abstactions to C and I
>>personally find that I quite quickly change my habits when I shift from
>>C to C++. And the STL might also make a contribution to design
>>thinking. All of which makes me think that the culture within the C++
>>community might diverge from that of the C community much quicker than I
>>might at first expect.
>
> I think the STL makes a huge difference. Once you've grokked the
> basic idea[1], you can hurl together some quite sophisticated stuff
> relatively easily. Whether that's good or bad depends on who is
> doing it. (Cf much of the rest of the thread!)
>
>>Since I am interested in the way the cultures associated with
>>programming languages impact on the quality of the result produced, this
>>set me wondering if there is any macroscopic evidence of differences in
>>the reliability of systems written in C and C++?
>
> Whilst such evidence might be interesting to read, I'm not sure that
> the language makes as much difference in reliability as you seem to
> think.

Actually, that's not my position in the sense I think you might intend.
  This way of putting it suggests that there is a obvious and direct
causal relationship between the language and the observed reliability -
that is if you took C without the people onto another planet and
repeated the experiment you would get the same result.

That's not what I think.

In my view its the culture and not the language that is the driver. The
culture comes first and this leads to a language and the latter is then
the vehicle whereby the attitudes and values embodied within this
culture are spread far and wide and perhaps into places where they are
no longer right for the job that needs to be done.

The culture associated with C is an 'build an OS for a mini" culture
because these were the cultural values from which the language sprang.
In contrast the culture that produced Ada was the "large real time
systems" culture.

So I see the language as a 'marker' for a culture much more than the
other way round.

> It's possible, and indeed commonplace, to write programs
> of poor quality in *any* language. If 90.03% of C programs are crap,
> and 89.97% of C++ programs are crap, is that significant? And if the
> numbers are the other way around, is /that/ significant? Personally,
> I don't think so. I think it's far more likely that the reliability
> of the systems depends on the skills of the people who designed
> and constructed those systems.

My first thought was that it would be 89.79% and 90.43% with the Ada
figure being 10%. But I then wondered if I was being unfair on C++ :-)

I am full up with analogies so I'll go for a thought experiment instead :-)

I arrive from another planet and I find these things called computer
systems that do all sorts of things for earthlings. I want some to take
back home. I notice that some work well but others keep falling over.

I also notice that earthlings seem to have 'magic dust' of various sorts
that they sprinkle on these systems and further that I don't see many
bad systems when they have sprinkled 'A dust' on them but I see more bad
systems when they sprinkle 'C dust' on them. I have no idea what's in
this dust but there is a definite correlation.

But then I find that someone has added something to the 'C dust' and it
is now called 'C++ dust' but I don't know much about systems on which
'C++ dust' has been sprinkled. At first sight 'C++ dust' seems to be
about the same as 'C dust' but maybe there is a secret ingredient that
produces radically different results.

It was only in this sense that I was asking the question :-)

   Brian Gladman



Relevant Pages

  • Re: [Lit.] Buffer overruns
    ... this is a long rant about the links between language ... Both to some extent but definitely worse within the C community than in, ... >> culture (I am contrasting Ada and C only because I have a lot of first ... culture of low level design that it has unwittingly fostered. ...
    (sci.crypt)
  • Re: [Lit.] Buffer overruns
    ... Point is that forcing all of those organizations to another language, ... So neither of the above observations about the systems engineering ... culture are suitable for generalization. ... The community may not have consciously fostered this ...
    (sci.crypt)
  • Re: Time Out for Time City Biel(D)-Bienne(F)
    ... community. ... language thru religious zeal (and unlike some other zealots, the Amish are ... most of that culture has been lost. ... for the survival or our multi cultural / language State is also IMHO ...
    (alt.horology)
  • Re: Beers almost the same strentgth as Whisky
    ... Their so called culture is dust. ... They looked after this country better than we seem to ... warming here, we've got a local problem and have had for a while. ...
    (uk.rec.motorcycles)
  • Re: Beers almost the same strentgth as Whisky
    ... Kevin Gleeson wrote: ... Their so called culture is dust. ... Let the tardy cunts come up into ...
    (uk.rec.motorcycles)

Loading