Re: Code Review - is this code ***
- From: spinoza1111 <spinoza1111@xxxxxxxxx>
- Date: Sat, 8 Aug 2009 21:11:02 -0700 (PDT)
On Aug 9, 2:54 am, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
spinoza1111said:
On Aug 4, 6:18 pm, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
spinoza1111said:
On Aug 2, 11:09 pm, "Dennis" <nojunkm...@xxxxxxxxxxxx> wrote:
<snip>
Or usefgets.
Looks like you just did, cowboy: you seem to have lost a space
between "use" and "fgets".
The original <4a75ae5...@xxxxxxxxxxxxxx> has the space there. Looks
like you made an unjustified accusation again.
I don't see it, and I am the user. This is evidence of your contempt
for users.
No, it's evidence that he put the space there. I gave you the message
ID, for crying out loud. All you have to do is look at it in a real
newsreader. Here's the message ID again:<4a75ae5...@xxxxxxxxxxxxxx>
Here's a direct dump of the relevant part of the message source,
copied and pasted, not typed:
+++++
Or use fgets.
+++++
Clue: if your newsreader (presumably the Google Groups interface)
isn't displaying the space, your newsreader is *broken*.
From wikipedia:
Here we prefer to rely on facts, not wikipedia.
Unless it supports your case right?
No, I prefer to base my case on facts, not Wikipedia.
<snip>
To do so I would shitcan fgets. I'd read the entire file into
memory up to a bound, and use a simple blocking scheme for bigger
files. I'd scan for runs of nongraphic characters and assume that
these were meant to be line separators.
In other words, you'd re-invent strings(1).
I'd rather do so if I were to be foolish enough to work in The
Infantile Disorder.
Then you'd better get on with it.
I'd rather not use some clown's "library". Who
knows what evil, and sheer incompetence covered up with a big mouth,
lurks in the hearts of men? The Shadow knows.
I'd wind up with a tool that could be used to recover the data in
Word files when Word is unavailable. Thousand and one uses. Hours
of fun.
Yes, that's why it was written in the first place. And, for its
purpose, it works just fine. And if that is all you want to do with
text files, that's fine too.
How strange. If you like the library function or you wrote it,
No, it's not a library function. I said strings(1) and I meant
strings(1). I did not say strings(3). Sheesh.
it's
Good even though it's not in the Holy Standard. Everything else is
Evil, unless it's in the Standard. The Gospel according to Richard.
That's a great man of straw you have there. Have fun knocking it down.
But you are quite wrong about my attitude to non-standard code.
Writing non-standard code has advantages and disadvantages, and these
vary in emphasis on a case-by-case basis. Where the advantages
outweigh the disadvantages, I am perfectly content to use
non-standard code myself. Where they don't, I'm not.
But this means that the Standard is recreational. If you need to step
outside the Standard, what good is the Standard?
<snip>
One might argue (and some people do argue) that there is no such
thing as a disparity between "text file" and "binary file", and
that what we really have is two different ways of looking at the
same data, and that it's our job to decide which is most
appropriate, based on our knowledge of the data. (Having said that,
IIRC there are some genuine systems out there that do distinguish,
in the filesystem, between text files and binary files. But on most
systems, the point stands.)
This is true.
Yes.
For a change.
No.
This is how best to use a crappy language for this purpose.
If, as you claim, you want to invade my turf, burn my huts, and
carry off my women (your words, not mine), you're not going to
achieve that objective by stepping gingerly across the border,
putting your hands over your head, and yelling "this place sucks".
You're going to have to conquer the land, and that means learning
all about it.
That's absurd. The Mongols didn't study China. They conquered the
place.
Yes, and they needed weapons to do that. On Usenet, the only weapons
you have (should you choose to view them as such) are your words, and
words are only effective weapons if people pay attention to them. If
you want people to pay attention to your views on C, you're going to
have to learn C. Until you do, you will find it difficult to persuade
anyone worth persuading.
Doesn't seem to be necessary, Buckwheat. You pay an extraordinary
amount of attention to me despite the fact that I haven't re-learned
C.
BTW, "learning" a programming language is not quite the same as other
forms of learning, being a clerkish accomplishment. One of the reasons
I taught C at Princeton was that the Computer Science department would
not offer classes in specific programming languages. This is
considered sub-uni, and I agree.
"Learning" a programming language is not learning how to program,
because the learned programmer does NOT, as you have, cling
pathetically to an outdated programming language.
I for one am tired of having to treat the ravings of some
long dead programmer as holy writ.
To which long dead programmer are you referring, and what evidence do
you have for your "ravings" slur?
I don't want to drink the Kool Ade, Mister Jones.
That's not a cultural reference with which I am overly familiar but,
IIRC, it's something to do with self-poisoning, and I don't see its
relevant in this context.
Jim Jones forced his followers to drink cyanide laced Kool Ade in a
mass cult murder suicide in Guyana in 1979.
The psychology of C is quite simple.
It's a programming language, FCOL. If you don't like it, fine, go use
something else.
No, it's an infantile disorder. It is a language devised to assert
American hegemony over computer science. CIA funds helped to found
Oracle. I wouldn't be surprised to learn that the CIA promoted C. Oh,
excuse me, am I "conspiracy theorising"? Or is that what people who
speak the simple truth do? Your government deliberately underestimated
the cost of your nation's participation in the Iraq war and the result
is the destruction of Britain's economy; people who scream about
"conspiracy theorizing" sometimes don't want to face the truth.
<nonsense snipped>
Likefgets?
Gee you must be using it right as we speak. You lost another
blank, cowboy.
The original <4a75ae5...@xxxxxxxxxxxxxx> has the space there. Looks
like you made yet another unjustified accusation.
No, it looks like all errors, to you, are someone else's fault.
He didn't *make* an error. You *wrongly* accused him of making an
error. The original message has the space there. Anyone who looks at
the original message source will see it. This is verifiably not a
mistake he has made. It is an absence of typo. The only reason it's
quoted as a typo above is because you misquoted it like that. It is a
non-typo. It is not pining for the correction fluid, or resting, and
it does not have lovely plumage. It is a NON-ERROR. The only error
was yours, in that you falsely reported an error that does not exist.
Ultimately, unprofessional and incompetent programmers WILL deny other
people's reality in the abusive register of the lower middle class.
You blamed the Sparknotes test, for example, for your less than
stellar performance.
I pointed out several significant flaws in the test that demonstrate
that its author doesn't (or at least didn't, at the time he wrote the
test) know C++ very well. I made this crystal clear at the time. When
I announced my score, I pointed out that it was meaningless, because
the test is broken. A number of C++ programmers, some of whom scored
higher than I did, also pointed out that the test was meaningless.
That would be Your Gang: Buckwheat, Spanky, and Alfalfa. These people
are numerically insignificant as well as insignificant in many other
ways.
The *only* person to ascribe meaning to the test was you - and you
were just about the lowest scorer out of those who took the test. So
Yes! I was! I had never used C++ at all and had stopped using C when
Visual Basic came out, the latter being a better tool! And you will
never attain to this level of humility, creep!
*if* you are right and the test is meaningful, you know less about
C++ than anyone else who took part in that discussion and posted a
I had in fact no reason to believe that the Sparknotes authors were
any more competent than you, Buckwheat, Alfalfa and Spanky. As a
person who's read Shakespeare's works and who now teaches English in
preference to having to work with people like you, I did think the
corresponding Shakespeare tests competent. But as soon as you and Your
Gang started whining, I knew that you were incompetent to judge the
test, because you are from the lower middle class, and sharing their
anarchism, you will game tests in an unbounded fashion. You will cheat
and whine if you lose. Therefore I do not accept your judgement of the
test.
You cannot express yourselves with any elegance or correctness, but
you think it's cute to find flaws in what people write, be they tests
or computer books, because your ideal is some rotten little fucked-up
business office in which you are treated like a guru.
result, in which case you are less well-placed to judge the
meaningfulness of the test than those who scored higher than you. And
they all said it was meaningless. Reductio ad absurdum - the test was
meaningless.
<snip>
There are excellet introductory texts to the language availabe.
You may want to consider reading them.
I'd rather read My Pet Goat.
The problem is that, like you, your pet goat doesn't know C.
This is a fundamental insanity. Expertise can and must be judged
from the outside without having to be a C expert,
Rubbish. If you don't know C, you are in no position to judge the C
knowledge of those who do.
There's two levels of knowledge. Because C is a bad language (it was
intended as a stop-gap owing to delays in Multics and PL/I), a deep
knowledge corrupts the programmer. I have more than enough knowledge
about and around this language (including supporting Nash, etc) to
condemn it from outside as your manager, let's say (please no).
because being a C
expert is being brain damaged and corrupted to think in certain
ways,
Rubbish. By the way, learn what "because" means.
<Nonsense snipped>
Likewise, C creates sociological bugs that are "sociological" since
they can never be solved. Text files have hard-coded limits.
Such as?
They can't contain global data. Etc.
Huh? Care to explain what you mean?
<nonsense snipped>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
This line unintentionally left unblank- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: Code Review - is this code ***
- From: Moi
- Re: Code Review - is this code ***
- From: Richard Heathfield
- Re: Code Review - is this code ***
- References:
- Re: Code Review - is this code ***
- From: pete
- Re: Code Review - is this code ***
- From: spinoza1111
- Re: Code Review - is this code ***
- From: pete
- Re: Code Review - is this code ***
- From: spinoza1111
- Re: Code Review - is this code ***
- From: Dennis
- Re: Code Review - is this code ***
- From: spinoza1111
- Re: Code Review - is this code ***
- From: Richard Heathfield
- Re: Code Review - is this code ***
- From: spinoza1111
- Re: Code Review - is this code ***
- From: Richard Heathfield
- Re: Code Review - is this code ***
- Prev by Date: Re: Private functions
- Next by Date: Re: Code Review - is this code ***
- Previous by thread: Re: Code Review - is this code ***
- Next by thread: Re: Code Review - is this code ***
- Index(es):