Efficency and the standard library

S

spinoza1111

spinoza1111wrote:


You want me to post C code to show how you make yourself look
incompetent? Well, yes, okay, I suppose that could work, in a way. But
it doesn't seem to me to be the best way to explain things to you. After
all, I have posted many thousands of lines of code to this newsgroup,
and that doesn't seem to have helped you at all.


But if I had no credibility, you would have had no need to attempt to
push me out of this newsgroup, as you have tried to do on many occasions.

I need you out of here because you damage reputations when people
don't look at patterns, and because you waste my time.
I was one of the first to point out an obvious bug that prevented
compilation on some systems. By the time you'd got around to fixing it
(really hard fix, that - delete one line; no wonder it took so long),

**** you, asshole. It wasn't a bug at all; in fact, it was due
diligence because on some platforms as we have seen it is needed. And
I do NOT work for you. I NEVER will. Nor will I ever hire you for any
job.
I'd more or less lost interest in your code.


In comp.lang.c it's a bug. We don't all use Visual Studio, you know, and
even those of us who do use it don't necessarily do so exclusively.

For a dismal fool, you have a rather pretentious notion of what
constitutes a bug. Most code isn't written to run anywhere. We who are
minimally competent use Java for that.
Like the man said, you're doing that all by yourself. If you want to
know how, read my earlier reply.


I have not attacked his person. I *have*, however, criticised him in the
past for treating this newsgroup as a commercial outlet instead of a
technical discussion group. He has improved a lot in recent times,
although he still needs to learn that "disagrees with JN" and "lies" are
not necessarily synonymous.

Translation: you harassed him incessantly out of envy.
He has, in the past, frequently tried to answer general C questions in
an lcc-win32-specific way, which certainly does seem as if he was trying
to attract custom rather than provide an independent C-based answer to
the question. He's not as bad at that as he was.

I don't give a rat's ass. He's got something of value to offer, which
is partly free, so his pro bono ass is covered.
No doubt you can name at least six such people who have done so on at
least two occasions each?

Give me a break: when you're shit out of things to say, you put on
your QC wig.
More precisely, Jacob Navia has bought the rights to the source code to
a compiler, and has maintained it. That is not to diminish his
achievement - to keep lcc-win32 current is no easy task.

It IS. Practically everything that comes out of your filthy mouth is
meant to diminish achievement, and this is because you're a failure.
Whether he can write is not something I feel I can comment on right now,
since I rarely see his source code. Rarely isn't never, though; it is
quite likely that I have commented on his code in the past - and
probably critically, since that's par for the course in Usenet. Feel
free to dig out some examples.


Cite.



You don't get to dictate my behaviour. You can hardly even dictate your own.

Bite me, creep. And get out.
 
J

Julienne Walker

You give me more credit than I think I deserve.  Julienne Walker,
now -- *she* seems able to focus on technical matters and avoid
being pulled into pointless wrangling.  Well, whatever.

While I try to remain focused on Usenet, failure is more common than
success. ;-) It's especially difficult to ignore the interesting
tangents that are introduced in any thread longer than a few posts.
However, if we reach some sort of result where good information is
exchanged, I call it a win regardless of the tangents.
 
W

Walter Banks

spinoza1111 said:
I solved the problem, which was to avoid string.h,

I clearly deserve A+ if you ask me.

Where you did not deserve the A+ in your project.

- The coding project did not have clear design and testing
objectives. Feature sets were being debated after you
first released your code.

- Relevant algorithms for coding and testing your code
were not investigated. There are several replace test
suites on line that would have provided independent
validation of your code and more import probably
test cases that you may not have thought of.

- You did incorporate ideas of others in your code but
the source of those ideas were not reflected in your
comments.

- A plus for logical variable names a minus for not making
them intuitively readable.

- You did not define what successful completion was
including performance benchmarks. The thread subject
"Efficency and the standard library" was not addressed
in your results. A minus for not spelling "Efficiency"
correctly


Results are in the middle of the pack not the stuff of a A+.

w..
 
N

Nick Keighley

I'm sure he's right on this. I've learned plenty of C here and I
probably fall into his "for-profit corporate job" box. On the other
hand I don't think being paid to write programs is fundamentally
wrong. For instance Jacob has been attacked in this ng for not giving
his compiler away for free, I don't agree with such attacks. He has as
much right to earn his daily bread as anyone else.
 
S

spinoza1111

spinoza1111wrote:



Where you did not deserve the A+ in your project.

- The coding project did not have clear design and testing
   objectives. Feature sets were being debated after you
   first released your code.

No, I made it clear what I was doing in week one, BEFORE any one else
had started on their project. The bums here proceeded to ignore the
requirement, because they didn't know how to not use the library!
- Relevant algorithms for coding and testing your code
   were not investigated. There are several replace test
   suites on line that would have provided independent
   validation of your code and more import probably
   test cases that you may not have thought of.

That's not true. I reviewed the literature including articles on Boyer
Moore from CACM and on Knuth Morris Pratt. I have long refused to
equate some garbage code on the Web and peer-reviewed academic work,
because few programmers are as qualified as I am (for let us not speak
falsely now the hour is much too late)
- You did incorporate ideas of others in your code but
   the source of those ideas were not reflected in your
   comments.

That is also not true,
And my opinion of you,
Is taking a bit of a dive.
Surely you jive,
For in fact I was the one and only
Coder to credit by name.
Look in the change record
I need this canard...corrected.
- A plus for logical variable names a minus for not making
   them intuitively readable.

What on EARTH do you mean by intuitively readable? It's called
English, plus a not exactly secret code. This egregious misuse of
"intuitively readable" results from a debasement of the very phrase
that arose when incompetent programmers entered the field in the
1980s, and used an absurdly vague interpretation of "structured"
programming to mean "I understand it".
- You did not define what successful completion was
   including performance benchmarks. The thread subject
  "Efficency and the standard library" was not addressed
   in your results. A minus for not spelling "Efficiency"
   correctly

That misspelling was Peter Seebach's. I kan spel gude.

The meta-problem statement said zip about "performance benchmarks". My
problem statement was "do it without string.h. I set myself to this
problem alone simply to mess with Seebach's head, since I think he's a
cheap little office bully. Who kant spel gude.
 
S

spinoza1111

spinoza1111wrote:



Where you did not deserve the A+ in your project.

- The coding project did not have clear design and testing
   objectives. Feature sets were being debated after you
   first released your code.

- Relevant algorithms for coding and testing your code
   were not investigated. There are several replace test
   suites on line that would have provided independent
   validation of your code and more import probably
   test cases that you may not have thought of.

- You did incorporate ideas of others in your code but
   the source of those ideas were not reflected in your
   comments.

- A plus for logical variable names a minus for not making
   them intuitively readable.

- You did not define what successful completion was
   including performance benchmarks. The thread subject
  "Efficency and the standard library" was not addressed
   in your results. A minus for not spelling "Efficiency"
   correctly

Results are in the middle of the pack not the stuff of a A+.

w..

Oh gee, this was Walter. If anything I said (including my poem)
implies that my opinion of blm is lower, I withdraw it. I already had
a low opinion of Walter.
 
W

Walter Banks

spinoza1111 said:
That's not true. I reviewed the literature including articles on Boyer
Moore from CACM and on Knuth Morris Pratt. I have long refused to
equate some garbage code on the Web and peer-reviewed academic work,
because few programmers are as qualified as I am (for let us not speak
falsely now the hour is much too late)

The web has many peer-reviewed academic works.
I assume that you did check CiteSeer for example and
most academic publications that have an online presence.

Your demonstrated lack of understanding of Boyer
Moore says you probably should have read the paper
in greater detail.

w..
 
S

Seebs

"fag movement"? How is that *not* gay-bashing ....

I'm just wondering what he's talking about. I'm not even particularly sure
I count as "homosexual", let alone that I've "benefited from the fag
movement".

Morbid curiousity wars with a sense of topicality. I think curiousity wins,
this time -- that's just too crazy.

ObC:

There's been a recurring theme in spinoza1111's posts about how he wants
to avoid <string.h>, but I haven't really seen a plausible technical reason.
Is there some reason for which this problem would be improved by omitting
<string.h>?

(And, BTW, <malloc.h> is not needed on the MS compiler, their documentation
is just pants.)

-s
 
S

Seebs

Well, in all fairness, the default warning level for gcc is pretty
low also, no? I don't have experience with commercial C compilers;
are they in general better?

I don't know. My experience has been that most compilers inexplicably
default to low warning levels.
Speaking of gcc and warnings .... One of my semi-crusades as
someone who teaches C to undergraduates is to convince them
to always, always compile with at least -Wall. Some of them
are surprisingly resistant, which I find baffling. I guess I
should ask, but -- I wonder whether it's the extra keystrokes,
or the fact that they get more messages they don't know what to
do about, or what. Maybe I just need to come up with compelling
examples of warnings that really do help point out problems that
would otherwise show up at runtime and be difficult to debug?

That could be a lot of fun. Come up with a list of subtle (or at least
subtle-ish) bugs which are flagged in some way by gcc -Wall, but not without
it, and have the kids try to find the bug, timed. What you do is something
like:

* Hand out assignment sheets with instructions for obtaining and testing the
test program.
* Half of the students get a Makefile with "-Wall" in it, half get one without
it.
* After the students report how long it took them, point out the pattern.

I know it's not portable C, but here's an example that leapt to mind:

#include <unistd.h>
#include <fcntl.h>

int
main(void) {
int fd;
if (fd = open("testprog.out", O_RDWR | O_CREAT) != -1) {
write(fd, "hello, world!\n", 14);
}
return 0;
}

On a typical POSIXY system, this will create a new file, named testprog.out,
then print "hello, world\n!" on the screen.

Without -Wall, no hint is given. With -Wall:

t.c:7: warning: suggest parentheses around assignment used as truth value

may be just enough of a hint for the user to realize that this is parsed
the same as:
if (fd = (open("testprog.out, O_RDWR | O_CREAT) != -1)) {

It's harder to do a comparable example for stdio, because 1 isn't a valid
FILE *, but I'm sure you could come up with something comparable. (If all
else fails, write a little "wrapper" that allocates FILE *s, so that you
can do mywrite(0) or mywrite(1), and so on...)

-s
 
B

BruceS

I'm sure he's right on this. I've learned plenty of C here and I
probably fall into his "for-profit corporate job" box.  On the other
hand I don't think being paid to write programs is fundamentally
wrong. For instance Jacob has been attacked in this ng for not giving
his compiler away for free, I don't agree with such attacks. He has as
much right to earn his daily bread as anyone else.

Same here. In fact, I'd been away from clc for quite a while, and
came back this time for work. I ran into code that I was very
confident was invoking UB, but not trusting my memory or my reading of
the Standard, searched clc for confirmation, which I got. I didn't
even have to ask, as others had. I have no shame over making money
coding, or working for clients who make profits. I chose CS because
(1) I really like it and (2) I'm very good at it, but the money is
*great*. So that makes at least two of us. I'll leave it to Mr.
Nilges to find four more, if he wishes.

FWIW, this is also not the first time I've disagreed with Mr.
Heathfield. That does not make either of us a liar, or any of the
other names thrown around here.
 
B

BruceS

On Feb 25, 3:48 am, BruceS <[email protected]> wrote:

Yes, you are too lazy to research it.

That's right. That's pretty much what I said, and I'm pleased and
impressed that you understood it. I'll now amend my statement. I've
since read through more of Mr. Navia's posts, and it confirms my
opinion. That isn't to say I'm any less lazy, just that I saw his
posts in other threads and read through them in context.
You don't give a **** about
reputations because you have none of your own, and you'd like to drag
others down.

There you've misunderstood, or misconstrued. I do care about
reputations, and try to be careful to put my opinions in terms that
make it clear they are my opinions and not indisputable facts. I
probably fail at this sometimes, but I do try.

How would you know?

I worked with them. I thought that was clear. To be more specific,
these are people who wrote code in the same organization as I wrote
code, at the same time. We had ample time to evaluate each other's
abilities. This is part of being on a team doing software
development.
This usually means "unqualified to write code in the way that an
unqualified and sometimes criminal management commands".

Oddly, some of my management *was* criminal, but they didn't dictate
how we coded. YMMV.
It's not all about money. The fact you think it is is part of the
problem.

You misunderstand (or misconstrue) again. I didn't say that it's all
about money. I was indicating that the money serves as a measure of
how clients appreciate my work. Note that I also mentioned the
compliments, in the very same sentence.

<snip>

I hope this helped you better understand what I was saying.
 
B

BruceS

constitutes a bug. Most code isn't written to run anywhere. We who are
minimally competent use Java for that.

Now this is just too funny. You say that your code isn't meant to run
anywhere? Mine certainly is. Very little of it is written to run
"everywhere", but all of it is written to run *somewhere*.
Next, you describe yourself as "minimally competent"; there's really
not a lot more that needs to be said about that.
FWIW, I've run into plenty of portability problems with Java. I'll
leave it to those who understand the reality of programming to see
why.
<snip>
 
W

Willem

blmblm myrealbox.com wrote:
) Have you looked at the code posted by others here? On a quick
) skim of your code and that of the others I've been benchmarking
) (Harter, Bacarisse, Thomasson, and willem), all of them seem to be
) roughly comparable with respect to solving the problem correctly
) and efficiently, and the only one that's not at least as readable
) as yours (in my opinion anyway) is willem's -- and he probably
) wasn't trying for readable.

Indeed. I was going for compact and concise on the first go, and the
second was even worse. Note that I imagine the recursive solution would
even be hard to follow, had I used more descriptive variable names and
comments.

I was going for the unofficial 'easier to understand by a mathematician
than by a programmer' award on that second one.
(And, as we all know, mathematicians prefer single-letter variables).


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
S

Seebs

Now this is just too funny. You say that your code isn't meant to run
anywhere? Mine certainly is. Very little of it is written to run
"everywhere", but all of it is written to run *somewhere*.

The word "anywhere" is ambiguous in English; it can refer either to a
specific place (but we don't know which one) or to an unspecific place.
You're interpreting "run anywhere" as "there is at least one place it will
run", but I'm pretty sure he meant "it will run in any arbitrary place".

("place" being in this case shorthand for "platform", but "where" is
more easily described in terms of location.)

I actually think his meaning is reasonably clear here. The way that
the ambiguity is usually resolved is that:
Doesn't run anywhere => there exists no place p where it runs
Runs anywhere => for all places p, it runs in p

"Isn't written to run anywhere" is more reasonably, I think, understood
to mean "isn't written such that, for all places p, it runs in p".

.... That said, I am obliged to grant that your interpretation is more
reasonable considering the actual code samples we've seen from the esteemed
spinoza1111, whose code does indeed appear not to be written to run
anywhere at all.
Next, you describe yourself as "minimally competent"; there's really
not a lot more that needs to be said about that.

I think he probably *meant* "at least minimally competent, by contrast
with people who are not even that good". There is almost certainly a
reason for which this is not the first interpretation people would see
when reading the comment in question.

-s
 
S

spinoza1111

I'm just wondering what he's talking about.  I'm not even particularly sure
I count as "homosexual", let alone that I've "benefited from the fag
movement".

Sure, you don't even know your own history: it's all just now. The
fact is that in bragging about your neuroses, ADD, and lack of
academic preparation, you don't realize that in the early 1970s, when
I started out, you wouldn't have been employable as a programmer. It
was the fact that people were for a while to extend charity to the
Other, the stranger, and "as a stranger give it welcome", in the form
of a racial and difference tolerance that is being slowly withdrawn,
that you're employable. That, in addition to the fact that you step on
people.

You've in fact benefited from the fag movement, directly or
indirectly, I don't know. As an unfortunate result, people put up with
your behavior, which manifests as I have said, some humility but no
charity.
Morbid curiousity wars with a sense of topicality.  I think curiousity wins,
this time -- that's just too crazy.

It's spelled curiosity. If you want to argue starting with quirks and
minor errors, I'm game.
ObC:

There's been a recurring theme inspinoza1111'sposts about how he wants
to avoid <string.h>, but I haven't really seen a plausible technical reason.
Is there some reason for which this problem would be improved by omitting
<string.h>?

I told you. It gives us insight into a basic ability to start a search
to the right of the next character on a partial match, not at i++. One
of your quirks is that you don't pay attention.
(And, BTW, <malloc.h> is not needed on the MS compiler, their documentation
is just pants.)

However, its use diligently documents the intention to use malloc.h.
If you want to play justification-by-trivia, I can play that silly
game.
 
S

spinoza1111

blmblm  myrealbox.com wrote:

) Have you looked at the code posted by others here?  On a quick
) skim of your code and that of the others I've been benchmarking
) (Harter, Bacarisse, Thomasson, and willem), all of them seem to be
) roughly comparable with respect to solving the problem correctly
) and efficiently, and the only one that's not at least as readable
) as yours (in my opinion anyway) is willem's -- and he probably
) wasn't trying for readable.

Indeed.  I was going for compact and concise on the first go, and the
second was even worse.  Note that I imagine the recursive solution would
even be hard to follow, had I used more descriptive variable names and
comments.

I was going for the unofficial 'easier to understand by a mathematician
 than by a programmer' award on that second one.
(And, as we all know, mathematicians prefer single-letter variables).

I understood it after you corrected me, saying that the first version
was not really recursive. And I'm not a mathematician.
 
S

spinoza1111

The word "anywhere" is ambiguous in English; it can refer either to a
specific place (but we don't know which one) or to an unspecific place.
You're interpreting "run anywhere" as "there is at least one place it will
run", but I'm pretty sure he meant "it will run in any arbitrary place".

("place" being in this case shorthand for "platform", but "where" is
more easily described in terms of location.)

I actually think his meaning is reasonably clear here.  The way that
the ambiguity is usually resolved is that:
        Doesn't run anywhere => there exists no place p where it runs
        Runs anywhere => for all places p, it runs in p

"Isn't written to run anywhere" is more reasonably, I think, understood
to mean "isn't written such that, for all places p, it runs in p".

... That said, I am obliged to grant that your interpretation is more
reasonable considering the actual code samples we've seen from the esteemedspinoza1111, whose code does indeed appear not to be written to run
anywhere at all.

One important precondition for any exhibition of Wit
Is that your humour neatly fit the facts, elsewise it's Shit.
If you're going have a laff at another's expense,
Make sure that you have more than just presumption and pretense.
My code ran on my box, and that of several other folks here
Whilst you were playing with your dingus, I fear.
You didn't even try, I must say with a sigh
To find an actual, genuine, bonafide and gnarly Bug,
The finding of which would have proved some competence in a manner
quite snug.
But instead of that, which would have taken some sitzfleisch,
intestinal fortitude, intellectual curiosity, flannel, and plain old
American git up and go, and True Grit
And covered you in some glory, and given you some credibility, and
increased by a quantum or two the rather low opinion I have of your
overall brainpower, intellect, work ethic and Wit,
You preferred to sit
On your Ass and mouth nothing more than saws, sayings, wheezy proverbs
and grave admonitions
Which form the stock in trade of the programmer whose knowledge is
only his superstitions.
 
N

Nick

Richard Heathfield said:
Ah, a genuine technical point. And you *do* have a point. Personally,
however, if I have to choose between having too much diagnostic
information and too little, I'd rather have too much. It's easy to
filter out stuff I know is spurious, but impossible to make a decision
about something for which I don't have the data.

It would be nice to have some consistent way of saying "yes, I know
about this, don't bug me" for - for example - functions that don't use a
parameter (because they are one of a group called from a table of
pointers, say). Most compilers have their own ways of doing it - and
that's the problem.
 
N

Nick

Branimir Maksimovic said:
I think that Microsoft has obligation because of DWORD which is
typedef as 32 bit unigned long. Perhaps because of portability
reasons, they had to stick to 32 bits, as ms code is inherently
unportable even from 32 bit to 64 bit windows(ugly api's).

Surely, though, the point of using typedefs like DWORD is to avoid
having any problems in changing what size the standard ints, longs, char
*s etc are? You just change the typedef.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,104
Messages
2,570,643
Members
47,247
Latest member
youngcoin

Latest Threads

Top