Re: A note on computing thugs and coding bums



On Jan 12, 1:55 am, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:
spinoza1111 <spinoza1...@xxxxxxxxx> writes:
Randy Howard, Richard Heathfield, and Willem, either emulate him or
leave.

If you had misrepresented and abused me in the way you have done to
Richard Heathfield, I doubt I would be able to keep my head as he has
done.

You need to do your homework. People conclude from the manly vigor of
my replies that I am making a mountain out of a molehill. You need to
have been here since 1998 to see Heathfield's modus operandi.





Here's my response including a bug fix.

On Jan 11, 1:08 pm, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:
spinoza1111<spinoza1...@xxxxxxxxx> writes:

<snip>

This was a technical post describing my concern, with references, to
code presented as Beautiful which seemed to me Ugly because it didn't
even work for modern strings [...]

Fairer to say that it is "old" code.  Your C# "modern string" version
would not have been possible at the time.  Technology marches on and

The problem here is that the publication date of the book Beautiful
Code was 2007. It is intellectually dishonest to maintain that
something as pragmatic, as applied, as code can be beautiful, at least
without an explicit statement from Kernighan that "I ignore
international characters", a statement he did not make.

The error of this logic has been pointed out already (I think by
Richard Heathfield, in fact).  The code is valid for any character set
at all.  It does not work for certain encodings, but then neither does
yours.  Most C systems have a narrow char, but that is not required.
It would handle international characters if the execution character
set included them and so you are criticising Kernighan for not making
a statement that would be false.

If you had said "I'd prefer the code to use wchar_t" then I could
agree with that, but it is a trivial change make and not a major
criticism.

There are important regex issues the relate to internationalisation
but you have not addressed these in you code.

American computer scientists and their fellow-travelers all over the
world insist on using C to talk about algorithms, and this is a
serious mistake, as exhibited by the ease in which I transliterated
the code and created thereby an out of bounds bug (immediately caught
by the runtime, as it would be in production) for the regex A*.

That is and extraordinary thing to say.  You turned the correct, clear,
and simple:

     if (regexp[1] == '*')
         return matchstar(regexp[0], regexp+2, text);

into this buggy and unclear mess:

    int index;
    if ((index = regexIndex + 1) < regex.Length && regex[index] == '*')
    {
        regexIndex += 2;
        return matchstar(regex[regexIndex], regex, ref regexIndex, text,
                         ref textIndex);
    }

and you are blaming C for this?

What you narcissitically refer to unclarity is probably a different
language. There's of course a bug in the above, as I've admitted.

However, your knee-jerk reaction showed you hate your job and, sadly,
like the other posters, you prefer psychological transference of this
hatred to content. I'd expected more, but instead I have to deal, it
seems, with the usual ***, in which programmers who don't code log on
here to hound and to scapegoat people for making interesting mistakes,
which, in a decent community, would produce collective knowledge.

It's obvious, as it should have been to me, that regexIndex can't
index when the last character of the regex is an asterisk. This wasn't
tested, but it was caught by the runtime, as it would not have been in
C. I'd say that all you need is a simple test, which is not needed in
C because of Nuls.

However, the bug illustrates not only my stupidity, but also the fact
that Kernighan is trying to "do" computer science with an inadequate
notation that imprisons the student within the "twittering world" of
C.

I realized when I so quickly posted the code that I was violating the
method I used in "Build Your Own .Net Language and Compiler". I didn't
make the C Sharp version object-oriented, I didn't use Hungarian (a
good way to avoid bugs), and I did not build-in testing with the
creation of procedures to generate random regexes, which is what I am
doing in the long-range solution.

I shall revisit the original Pike code this evening, as I've said, and
use not Visual C++ Express but a free C compiler. I shall review the C
sharp code for further bugs. Probably, this will not change the
metrics I obtained last week, which show that C Sharp is only a bit
slower, meaning that the Beauty of using value parameters as trash
work areas and counting on Nul is an illusion.

I will also continue my own OO version which will avoid blunders such
as the above with the level of testing I used on the compiler in my
book.



Pike's code is bug-free, it appears (although I have no proof of this,
and haven't seen it run bug-free according to its own charter).

Of course you have no proof, and neither do I, but the code has the
merit of being short, clear, and concise *and *of having had many eyes
on it for many years.  Unless you can show a bug, saying that you
"have not seen it run big-free" just sounds petty and somewhat snide.

It would have been petty and snide only if I happened to be share the
lower middle class anxiety about criticism. The wildgeworden
Kleinburger cannot abide criticism because it pushes him into the
proletariat nor can he give it, even in technical areas where
criticism is important for safety and progress, therefore, to the
wildegeworden Kleinburger, the mere sound of criticism, apart from
high level criticism directed at underlings, or that from the bully
who clearly speaks for the high level in the manner of the Sergeant
Major, is harsh and grating to the ear.

I set the tone of the criticism by titling the thread that was
vandalized "Brian Kernighan, maybe I'm not worthy...". But this is
something that the wildgeworden Kleinburger is physicially incapable
of doing. It's too much of a risk.



It is bad teaching practice to teach, as good computer science, in a
notation that requires the student to know and remember (1) value
parameters can be written safely in C and

Eh?  If you dislike it from a style point of view, so be it (I don't
like style arguments) but very few languages prevent it as a matter of
course.  What language do you suggest from this point of view?

Pascal, I believe, wouldn't let you assign a value parameter. Correct
me if I'm wrong.


Interesting, both C and C++, *can* enforce this discipline,
but you did not use that assistance (declaring the parameter const).
This seems so odd that I think I have missed your point.  If I have,
what is problem of these safely writable parameters?  A code snippet
will be need to know what you are talking about.

Yes, I should have used const. But more generally, the original
designers of the language should have bit the bullet and forbid the
modification of val parameters as a confusion.

The problem is that these humanistic gestures were perceived by the
language designers as having a cost, and if the compiler had forbid
the modification of val parameters, then many programs would have
added one more value to the stack at run time, representing the work
area.

Now, I've been present at meetings where these sorts of decisions were
taken, usually in the understandable engineering direction of not
"wasting" time or here, storage. While I went along with many of them,
it seemed to me then and even more now that I was wasting my spirit in
an expense of shame amongst people who basically cared more about a
technical apparatus that was evenescent even on its own terms. Moore's
law was forgotten, and the designers, who seemed to me mostly people
who preferred machinery, even its smallest and most evenescent
manifestations, to the needs of humanity.

Whoa. Who farted?

I did. Basically, what I see in this ng is a self-hatred and post-
human decadence based squarely on an American approach to technology
that put software after hardware in refusing to make sensible
distinctions.

Niklaus Wirth had the courage to question this direction in 1974, and
I saw him isolated and disrespected at ASPLOS 1987 for insisting that
safe computing, which I'd call the only human computing, is just as
important as the high speed race to doom of the sort that 14 year old
boys dig.

In other words, Kernighan to me is a big fat disappointment, because
in The Elements of Programming Style he told us programmers that we do
make mistakes, we can use good style to prevent them, and that people
are more important than things. But, Kernighan was also part of the
power structure; not once, for example, did he speak out against the
mistreatment of engineers when Bell Labs was destroyed, to my
knowledge.

But the problem was that as a result, C has always served two
masters...as a language for presenting abstract algorithms to peope
and for cranking code for mere machines. With the result that it
causes smart people, like me, to make mistakes.

Boo fucking hoo, right?

[That is: I just don't give a *** anymore. I see people here
screaming about "errors" without once questioning the way in which
high-level institutional structures generate far more errors in a
single release than I could make in a lifetime, enforcing *omerta* and
silence on those errors by using cheap bullies as technical managers
and newsgroup gurus.]


(2) no sweat if you're off by one, Nul saves you.

In particular, the latter "feature" creates a coding bum who simply
doesn't worry about such errors.

Are you saying that is why you made the indexing error above?  Has C

No. I made it because I was in a hurry, and the thread was being
vandalized, and I needed to get the results out.

turned you into a "coding bum" (whatever that is)?  My experience

I'm no longer a coder, or a coding bum. I left the field because I
don't like working for thugs who commencing in the 1980s in my
experience at Bell-Northern, used macho bullying to enforce IPO-driven
greed. But I still code. Deal with it.

My personal experience, as I have said, that with respect to any one
language, especially languages designed poorly to poorly serve both
human knowledge and the needs of things, you become after a few weeks
an idiot savant who doesn't make stupid mistakes...but unconsciously,
as did Rob, violates communicative reason by not saying "yo, check out
my use of the value parm", or "yo, there will be a Nul here", or even
"everybody be cool, this is an intellectual stickup".

(limited, I agree) is that C tends to make for very careful and
precise coders.  I find it hard to believe that C has damaged your
coding to such an extent.  If I am right about that, the error is a
simple slip-up caused by not thinking though what needs to happen at
this stage in the algorithm -- i.e. a plain old bug·

...which C programmers don't have to worry abaying "out insofar as
they can be sure that char * arguments point to things that end in
Nul. Which of course they did in 1971 when computers were more
frequently being powered up and powered down, and which had a volatile
RAM, filled by default with good old Nul characters which became a
crash barrier.

In my experience, most C hotshots are neither careful nor precise.
They don't format their code, they can't be worried about Hungarian,
and absurd picoefficiency becomes ersatz for making solutions to real
problems. They whine when passed bad data and when their unchecked
requests aren't honored. They blame the victims of their errors,
especially when those victims are subalterned females who won't sleep
with them.


<snip>

Which means that in the Princeton CS program, the students have had to
acquire as a condition for success a set of tics that they will, as
undergraduates and beyond, confuse with knowledge, making them less
than they could be.

They will believe false propositions such as "runtime bounds checks
are unmanly and inefficient, for sissies and script kiddies and
girls", "don't worry about off by one", and "all my callers will send
me strings using English-language characters properly bound by Nul",
and "if they don't, call Homeland Security".

Has anyone bere, especially the author you originally criticised, ever
stated any of these silly points of view?

My analysis is Freudian-political, so no, they don't state them
literally.

The language I synthesise is backstairs all the way down. It emerges
under pressure if at all. But it does emerge.

Kernighan's silence in Beautiful Code spoke volumes to me. He doesn't
mention the use of a value parameter as a work area, he doesn't
mention internationalization.


In all these long related threads, only two examples have appeared
that suggest a casual attitude to off-by-one errors: your C# code and
the Shildt function posted by RH.  I say "suggest" because I am sure
you do care, but you can't have missed the irony.

The casual attitude was Pike's, because with Kernighan's connivance,
he presented AS A REUSABLE ALGORITHM, as an algorithm meant as a
teaching tool, a piece of code that requires the non-C coder (or in my
case a C coder who abandoned C after realizing how bad it was, and who
returns to it to repeat at first some blunders) to hold in mind that
(1) value parameters can be or should be work areas and (2) we'll
always have Nul, like Bogey would always have Paris.

Indeed, part of the disciplinary role of technology is to make smart
people look stupid, and to give wildgeworden kleinburger the false
illusion of their intellectual superiority.


<snip polemic>

I don't think is was C++.  I don't know the details but it looked like
something else -- I suggested C++/CLI elsethread -- but you probably
know and could tell us.

Visual C++ Express to generate a command line executable.

I meant what language was it.  I does not go though a plain C++
compiler.

Whoa. Just because the box says Microsoft it's an Evil C++ Compiler,
not a Plain Honest C++ Compiler? Son, you need to get out more.

Yes, it appears I buttfucked

Let's not go there.

OK


the typing-in of the Pike code

<snip>

Thanks for your contribution. I'll discount your smart remarks.

You are welcome.  As you can see, I have discounted your polemical
remarks.  I can't help being a smart Alec and I don't think you can
help being polemical.  Let's continue to ignore the bits we don't like.

Fair enough.

At this time, I stand by my original claim: a factor of five doesn't
justify presenting code that doesn't work for real, international
strings,

I am happy to make a simple type change and pay no penalty.

Not so fast, cowboy. Each and every ++ and add one would have to be
changed to sizeof or two to work if you change the type to wide
character, would they not or am I wrong? Let's see, if the Pike
arguments were arrays of wide characters, maybe you'd get away with
it, maybe not. But they are ADDRESSES, not so?

What will happen when Pike is off by one, as he is? Will some sort of
16 bit Nul be there in the new type?

Do all available conformant and nonconformant compilers support the
change?

Including Microslop? Boo hoo with cheese: if you say it's real C, then
you need to at least be aware that there are evil C compilers, and
people are slaving away using these evil C compilers, and they need
even more help than rich kids at Princeton with the latest and
greatest. In fact, I fixed Nash's problem when I realized that the old
Microsoft C compiler was not calculating a constant value correctly,
and switched him to Borland: but now, Yuppie glamsters have highjacked
Borland after reading Lou Gerstner's lies about how he saved IBM...by
getting rid of the smart people, or bullying them for making mistakes.

See, that's the problem. The fact that a smart person like me has to
ask these stupid questions is the problem, and it's C's problem, not
mine.

Even if Heathfield favors us with his favorite simple answer du jour,
the very fact that we have to worry about such things MEANS that we're
not in a clean world of applied mathematics, but a world in which we
have to ask questions of the form "can a submarine swim?".

Indeed, and not to put too fine a point on it, there's something very
wrong in a world in which a character like Heathfield has any
authority.

Whoa.

Yup, that's the problem. Ugly presuppositions such as "we'll always
have Nul" and "value parameters are changeable" create low minds,
capable, being swept of Higher Things, of remembering details that
Beautiful Souls shrink from.

That is to be somewhat florid. But, I am serious. In the real Spinoza,
the truly superior mind simply isn't content, not with complexity (for
Spinoza, in the triumphant last words of The Ethics,says clearly
enough that the excellent is rare, and hard) but with the ugly and
nasty details that appeal to the wildgeworden.

Therefore I don't like a language which makes a character like
Heathfield an authority. If my reasoning is circular, it is benign and
self-reinforcing.

C is an expense of spirit in a waste of shame and a vandalized Algol:
for after American computer "scientists" had betrayed the European
Algol effort to show who was NATO's senior partner, and foisted
Fortran upon the folk, they turned back to the writings of the
prophets, and, after destroying them (as Trostky was destroyed, for
imagining what Gorbachev put into action), stole their cerements and
their grave honors, and pranced about like apes.

This was done by a collective, not by individuals. Brian K is a good
person and a great scientist. But the institutional mechanism has
produced a vast amount of wastage of time, has transformed
mathematicians into clerks, and clerks into Shakespeare's "great image
of authority", where the dog is obeyed in office.





and calling a grepper a regular expression processor. The
"inefficiency" of Java and .Net is an Urban Legend.

--
Ben.- Hide quoted text -

- Show quoted text -

.