Re: Brian Kernighan, maybe I'm not worthy, maybe I'm scum



On Jan 1, 5:12 am, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:

An incredible example of poor sportsmanship and continued cyber-
bullying after scoring 80% on the C++ test at Sparknotes as a self-
proclaimed C and C++ specialist, beating a computer author on other
languages, who has never coded in C++, by only 4 points.

spinoza1111said:



On Dec 31 2007, 10:00 pm, Richard Heathfield <r...@xxxxxxxxxxxxxxx>
wrote:
<snip>

Question 5 is broken. None of the specified types guarantees the
necessary precision for dealing with twenty decimal digits. The long
double type only guarantees ten. One could reasonably argue that any of
the integer types mentioned gives an adequate basis for developing a
bignum library that could give the required precision.

Bad flaw, I agree. Still, life's unfair. Do you suggest abandoning the
challenge or finding new tests? I can search for better tests if you
like.

Do what you like. I've already shown that you picked a lousy test, and that
a competent C++ programmer would have chosen a better one.

Excuse me, Mr. Heathfield. Real programmers, competent or incompetent,
don't get to choose their tests or their problems. They don't get to
come in here and create their own reality by bullying people. You got
80% although you use C++ professionally, and I have never used C++
except for occasional maintenance, and got 76% by reasoning about what
compilers do and my experience in other languages. It shows very poor
sportsmanship to continue your bullying at this time.



I'd say your analyses exhibit fairly good qualifications were it
not for your analysis of question 6, which I do not accept.

What you choose to accept or not accept is neither here nor there. The
rules of C++ are not defined by me or you but by ISO.

They are defined only in part by ISO. They are also defined in praxis.
The poor workman blames his tools and the test.



<snip>

You may be right. This question may be trash.

It is. It's complete bunk.

Still, to be fair to
all, we need to all accept these tests as final

No, we don't need to do any such thing. The test is broken. It is
inadequate for measuring knowledge of C++, let alone skill in using C++.

I don't know about that. But what is more significant is that in your
disappointment at your results, you blame everyone but yourself and
continue cyberbullying.


<snip>

Question 8 is broken. All of the suggested answers except A exhibit
undefined behviour, and answer A modifies the value of x. There is no
correct answer.

(A) x++;
(B) x += x--;
(C) x = x++;
(D) x = --x + 1;

The correct answer is D, and neither it nor any question exhibits
undefined behavior in C++, or in usable C compilers.

Wrong. See ISO/IEC 14882:1998 5(4): "Except where noted, the order of
evaluation of operands of individual operators and subexpressions of
individual expressions, and the order in which side effects take place, is
unspecified.53) Between the previous and next sequence point a scalar
object shall have its stored value modified at most once by the evaluation
of an expression.  Furthermore, the prior value shall be accessed only to
determine the value to be stored. The requirements of this paragraph shall
be met for each allowable ordering of the subexpressions of a full
expression; otherwise the behavior is undefined."

Bull***. This accomodates certain types of optimized and pipelined
operations so that they can be coded in C++. In the test, as should
have been aware, the designers assumed as the interpretation model a
simple stack machine, which is also used as the base of reasoning
about out-of-order pipelined operations.

It is true that both optimization and pipelining transform order of
operations. However, they PRESERVE SEMANTICS, and the semantics taught
regards an introductory (or advanced) class continue to be defined by
a simple stack machine.

It is nonsense to realize that because in some advanced application
the standards may allow a different physical order of execution we
cannot know about the non-optimized and non-pipelined semantics.

Furthermore, even if this is false, you're still wrong. The ISO
standard allows non-standard orders of execution to make C++ viable
for novel platforms, but the EFFECT of the expressions HAS TO REMAIN
THE SAME.




Richard, am I missing something?

Yes - you are missing a basic understanding of C++.

A reply from someone who only scored 80% in a beginner's test in an
area in which he claims advanced competence, and who uses words he
does not understand from the standard to cover-up his self-perception
of failure.



Question 9 is trivial.

Question 10 fails to account for pointer comparison, but is otherwise
trivial.

In C and C++, pointers are integers and as such compareable

No, in neither C nor C++ are pointers integers. They can be converted to
integers, but this conversion is not guaranteed to be lossless.

Your images of C and C++ are intentionally blurred because, I believe,
this allows you to mystify and confuse clients, and get business
thereby. Ever hear of a try catch block?

As a professional programmer who abandoned C after assisting a Nobel
prize winner with C but realizing its flaws, who knows about 10
languages, with 32 years of experience, who's published, I hereby call
upon you to admit that you do so and above all stop bullying people on
this newsgroup. You took the test, and to your surprise you only got 4
points more than someone who programs in C sharp, not C++. Had you
scored higher, you would not challenge the test.

Be a man for a change, and stop this nonsense.

<snip>

Question 14 is ambiguous - it depends on whether you consider 'between'
to be inclusive. I don't, so I might disagree with the marker over which
answer should be considered correct.

Question 14 does NOT depend on whether the English word "between" is
inclusive.

Yes, it does.

In ordinary speech it is used both ways!

That is why the question is ambiguous, which is what I said.

The fact remains that you didn't choose the best answer, realizing
that tests like code can have bugs.


But the competing
answer uses an OR (hope you noticed)

No, in all honesty I missed that. Had I noticed, I would have said that
there was no answer that I could consider correct.

Thank you for your honesty: but in my book a professional programmer
sees immediately the difference between && and || in multiple
languages, Or, And, OrElse, and AndAlso in modern VB, & and | in some
languages. He or she can also tell you the semantics in which they are
implemented in each language she uses.

You failed to see the difference between && and ||.

I suppose its now time, given the rotten, stinking standards of
conduct set in this newsgroup by you, Programmer Dude, and Randy
Howard, to create a Web page announcing this error, this recruit
error, this boot error, this baby error, by someone who has bullied
several people, including Herb Schildt, all over some corner of the
Net.

You know something? I'm not going to. I don't have the time, as I
scarcely had the time, in 2003, to reply to the multiple assaults you
enabled. I am rewriting the compiler for Build Your Own .Net Language
and Compiler in C Sharp. I am writing my own XML parser. I have a full
time, six day week teaching load. I am a figurative artist represented
on the Saatchi Galleries Web site.

Above all, I lack your bullying instinct.



and the best answer is A. The
ONLY answer is the BEST answer.

Even if, by my lights, it's wrong? I don't think so.

Yes, because for thousands of years in China, and hundreds of years in
the West, flawed tests have been the ONLY way for the poor to avoid
spending their lives being ground into the dirty by town bullies. The
flawed test exposes that you failed to see the difference between &&
and ||, a far more basic error than the stylistic and pico-efficiency
quibbles you and your mates "exposed" in the code I posted in 2003.




<snip>

Question 22 is incorrect. sqrt is declared in <math.h> but only a
complete bozo would define it there.

If we MUST use terms like "bozo", only a complete bozo would use
"define" when he means use, dear Richard. The correct answer, I
believe, is #include. Do inform me why the question is "incorrect".

The question is incorrect because it claims that sqrt is defined in math.h,
which is false. Only a very broken implementation would put a definition
of the sqrt function in math.h. If it were not made static, only one
source file in the program would be able to include math.h! And if it were
made static (and I'm not certain whether that's legal in a conforming
implementation), it would in any case be unnecessarily bloating the
program by creating one instance of the function for each source file in
which the header is included.

You obviously learned programming on your own, and never troubled to
inform yourself about CS 101 whether at uni or by checking a book out
of the library.

Why on EARTH should a simple, usable implementation of sqrt not be
static? Are you confusing a local variable holding the partial result
with a class level variable?

A simple square root in an h file can be compiled conformant to the
standard to inline code, or to a library call. In either case,
multiple places can call the sqrt.

It appears to me that your ersatz for professionalism and
understanding are references to a standard you don't understand. That
would be fine, but the problem is that you have used your ersatz
professionalism to conduct libelous campaigns against two computer
book authors in order to build sales for your book, these authors
being Herb Schildt and myself.




<snip>

Question 29 has no correct answer. Arrays don't hold types. They *have*
types, but they are aggregate types that can store multiple *objects* of
a given type. If we agree that that's kinda what the guy meant only he
didn't say it very well, we must discount (A) as being incorrect
(because they can hold complicated types such as user-defined types). We
must also discount (B) because arrays can't hold function types
(although they /can/ hold function pointer types). And we must discount
(C) for the same reason as (B).

Gee, is a function a type?

No. A function *has* a type, and the type that it has is called a function
type.

Question 32 has no correct answer.

No, creating a struct is similar to creating a class.

That wasn't one of the available answers. They were:

(A) is similar to creating a class without member functions

But C++ structs can indeed have member functions, so this answer is wrong.

OK, I didn't know that (C Sharp structs can declare member functions).
I believe that the teacher who created the Spark Notes material is a
better C++ programmer than you, and that he understands that functions
are not usually declared as a matter of sensible practice and style in
structs. Class implementations are probably to him more expandible and
modifiable. I agree that the question, like life and real programming
challenges, sucks.


(B) requires the keyword static

This is not the case. C++ structs do not require the keyword static.

Right.

(C) requires the keyword public

This is not the case. C++ structs do not require the keyword public.

Absolutely.

(D) is exactly like creating a class, except there must be at least one
member function.

This is not the case. C++ structs can have member functions, but do not
require them

absolutely.

C sucked because

I do not find your opinion on C particularly valuable. It is now apparent
that your opinion on C++ isn't particularly valuable either.

I honestly expected you, as someone who did not do well on a test in
an area in which he claims professional competence, to cease so
globally and without evidence trashing the professionalism of people
in this newsgroup, not only mine, but, over time, countless others
including Herbert Schildt. I hoped that this ng could become an Open
University in which people were able to mentor others without being
harassed by thugs, who claim professional qualifications, while
trashing others' claims, and while not, under minimal pressure, being
able to disambiguate an And from an Or.

I now see I was wrong. Very well: perhaps the courts shall decide this
after all.


<snip>

Excellent score, and thanks for your comments.

A better score would have been "did not compete", because the test was not
worth the time it took to do.

I think that IF you have used C++ professionally in the past for any
significant length of time, and scored only 4 points more than a
person who's only occasionally maintained C++, and who now only uses C
rarely, you might want to apologize at this time for the many comments
you have made about my professional qualifications.

You don't understand, do you? I Did Not Answer the questions that had no
correct answer. There were many of these, so the scores are meaningless.

You may see some value in giving incorrect answers just to please a test
marker, but I don't.

There's no one to please. There is only a basic decency and
sportsmanship, a love of the game, which has clearly disappeared from
the lives of many English men, who when they have gotten beat by wogs
at their own game, howl racist imprecations at third world players, as
you, here, continue bullying people...after displaying your lack of
qualifications, not only on a rather simple, if flawed, test, but also
by not seeing the basics...from the execution semantics of a C or C++
program as defined by a virtual machine, to the difference between
And, and Or.


When I posted in
2003, you took a vanishingly small number of data points and blew them
out of proportion.

You have now increased the number of data points available to me. My
analysis looks spot on, and I see no reason to change it - the new data
confirms it.

I'm not going to do that with the questions you got wrong.

Let's do a little test, with just one question.

1. In sociology, "alienation" means:
(a) a rabbit
(b) a ball-point pen
(c) seventeen
(d) the Aegean Sea

What would you answer? And how much weight would you give the results? If
you didn't get the same answer as the tester, what do you think that would
say about your knowledge of sociology?

Only one or two questions were like this, and you did not get a score
above 80%. You were wrong about execution semantics and you displayed
an inability to see the difference between And and Or which would have
been a hazard to life and limb in a mission-critical application.




Clearly, the test is broken and stupid, and no reliance can be placed upon
its results. The same applies to that C++ test.

<snip>

I ask you in future to emulate my style in my comment on your comment
on question 6. I believe that the prefix and postfix increment and
decrement operators have, or damned well better have, an order of
execution relative to the precedence of assignment.

Your beliefs do not affect the reality of C++ language rules.

I don't think, based on your discussion of ISO indeterminacy, that you
understand the rules. I think you need to go back to the basics, and
read Kernighan and Ritchie on C, and Bjarne Stroustrup on C++.


<snip>

But, you're not an idiot.

I wish I could say the same about you.

To the bitter end, you are a yob. Your whole approach to programming
has created massive disasters. I'll have to ask you to leave this
discussion.


--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999

.