Sunday, April 4, 2010

comp.lang.c - 25 new messages in 10 topics - digest

comp.lang.c
http://groups.google.com/group/comp.lang.c?hl=en

comp.lang.c@googlegroups.com

Today's topics:

* In the Matter of Herb Schildt: a Detailed Analysis of "C: The Complete
Nonsense" - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/caf17fab4e7d8530?hl=en
* The RUN CHASE: A Challenge for the C Programmer in U... - 2 messages, 2
authors
http://groups.google.com/group/comp.lang.c/t/885a5c262d0b1539?hl=en
* Implementing strstr - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/a3fe05ab352d5774?hl=en
* Observations on operator overloading - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/66e596e2f1015aab?hl=en
* implement stack and queue in C or in asm - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/42b5b866d80be770?hl=en
* Personal attacks by moderators in a moderated group are unprofessional - 4
messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/fcaffc6b8db42751?hl=en
* Pausing screen? - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/8b8e7943a28d1f6c?hl=en
* Multiple function calls inside a while loop question - 4 messages, 4 authors
http://groups.google.com/group/comp.lang.c/t/05773fb4e52133e0?hl=en
* Blonde C jokes - 4 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/ad1c486bad884e91?hl=en
* C the complete nonsense - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/fee08dfa5e4cbaaa?hl=en

==============================================================================
TOPIC: In the Matter of Herb Schildt: a Detailed Analysis of "C: The Complete
Nonsense"
http://groups.google.com/group/comp.lang.c/t/caf17fab4e7d8530?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Apr 4 2010 6:13 am
From: Richard Heathfield


spinoza1111 wrote:
> On Apr 4, 6:01 pm, spinoza1111 <spinoza1...@yahoo.com> wrote:
>> On Apr 4, 4:15 pm, Seebs <usenet-nos...@seebs.net> wrote:
>
> This matter has become very time consuming, perhaps for all concerned.

Not for me. It took me a couple of hours last night to catch up with
about 400 clc articles posted over this last week or so, and a few
minutes to reply to a few of them.

> Therefore, unilaterally, I'm going to declare a temporary "cease fire"

You're not supposed to be shooting in the first place, bozo - you're
supposed to be learning.

> in order for people to have time to study my document

I don't see why anyone would want to do that. It's nonsense, and a waste
of time.

> I will stop posting and reading until Sunday 11 April China time.

I doubt that very much.

<nonsense snipped>


--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within


== 2 of 2 ==
Date: Sun, Apr 4 2010 11:04 am
From: Seebs


On 2010-04-04, Richard Heathfield <rjh@see.sig.invalid> wrote:
> spinoza1111 wrote:
>> Therefore, unilaterally, I'm going to declare a temporary "cease fire"

> You're not supposed to be shooting in the first place, bozo - you're
> supposed to be learning.

Well, yes. But since he's the only person attacking, he's the only person
who can declare a "cease fire".

>> in order for people to have time to study my document

> I don't see why anyone would want to do that. It's nonsense, and a waste
> of time.

Exactly. It's not something anyone's going to bother "studying", because
even the first casual glance reveals it to be utter nonsense. It walks a
fine line between "wrong" and "not even wrong".

>> I will stop posting and reading until Sunday 11 April China time.

> I doubt that very much.

Yeah, the guy who floods SRQ with garbage does the same thing, announces
that he's stopping for a while, then decides that he has to start posting
again anyway.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

==============================================================================
TOPIC: The RUN CHASE: A Challenge for the C Programmer in U...
http://groups.google.com/group/comp.lang.c/t/885a5c262d0b1539?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Apr 4 2010 6:36 am
From: CVS


In a game of cricket,

1. Assume you can score exactly as you want on each ball.

2. Single/Double/Triple/Four/Six are the options available to you on
each ball.(no extras)

3. RISK is defined as the square of the score on each ball.

* * * *
Write a program that accepts:-
a. Target runs to score (N)
b. No. of balls to score it in (x)

and prints the runs to score on each ball.

Remember U have to ACHIEVE the target with MINIMUM RISK possible.

For detailed problem statement and sample output plz refer
http://2600hertz.wordpress.com/2010/04/04/ipl-the-run-chase/

Lets C who comes first... ;-)
Good Luck!!


== 2 of 2 ==
Date: Sun, Apr 4 2010 10:21 am
From: Dr Malcolm McLean


On 4 Apr, 14:36, CVS <cvs...@gmail.com> wrote:
> In a game of cricket,
>
[Optimisation problem: looks like linear programming.]

Yeu need comp.programing for this. Whilst a solution can certainly be
implemented in C, the problem itself has nothing to do with the
language used to write the program to solve it.


==============================================================================
TOPIC: Implementing strstr
http://groups.google.com/group/comp.lang.c/t/a3fe05ab352d5774?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Apr 4 2010 8:39 am
From: Keith Thompson


Josh Holland <jrh@joshh.co.uk> writes:
[...]
> Firstly, saying "C should reject all-caps" is irrelevant, as there is no
> reference implementation for C, as there is for C# or Python (say). For
> that matter, the closest thing to a reference implementation on Un*x
> platforms, gcc, does reject all caps.
>
> $ cat caps.c
> #include <STDIO.H>
[...]

Of course gcc will accept it if there happens to be a file called
"STDIO.H" in the appropriate location. It will probably also accept
it if it happens to be running on a system with a case-insensitive
file system (I'll try that tomorrow if I remember).

The existence or nonexistence of a reference implementation is
irrelevant. The C standard easily *could* have required all C
compilers to reject "#include <STDIO.H>". If it had, then all
conforming C compilers would have to reject it.

I'm not entirely sure how such a requirement could be written, though.
The standard clearly permits "#include <foobar.h>" to refer to some
implementation-defined header identified by the name "foobar.h". For
compilers that support it, "#include <STDIO.H>" does exactly the same
thing. The implementation just happens to define that the name
<STDIO.H> refers to the same header that <stdio.h> refers to.

And presumably
#include "foobar.h"
and
#include "FOOBAR.H"
would refer to the same header file if and only if both names refer to
the same file in the filesystem. If double-quoted header names refer
to file names, imposing case-sensitivity would be, IMHO, absurd.

For compilers on systems with case-insensitive file systems, rejecting
"#include <STDIO.H>" would require a very small amount of extra work.
Defining the rule would require considerably more.

I suppose the simplest rule would be to require lower case for the
standard-defined headers, and leave things as they are for all other
headers. That would help to guard against the creation of
non-portable code that uses "#include <STDIO.H>", which works on some
implementations but fails on others. But I don't think it would
be worth the confusion.

I know you weren't proposing such a change to the standard. I just
wanted to point out that it would be non-trivial.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


== 2 of 2 ==
Date: Sun, Apr 4 2010 10:30 am
From: Josh Holland


On 2010-04-04, Keith Thompson <kst-u@mib.org> wrote:
[snip discussion on case-sensitivity in filesystems]
> I know you weren't proposing such a change to the standard. I just
> wanted to point out that it would be non-trivial.
>

Sure, if the standard headers are real files on a case-insensitive
filesystems, <STDIO.H> will work. My point was that as soon as someone
who picked up the habit of using caps from C:TCR moves to a filesystem
that does care about case, chances are they'll come a-cropper. Also, I
understand that there is no requirement for the standard headers to be
real files, in which case allowing caps would be extra work.


--
Josh "dutchie" Holland <jrh@joshh.co.uk>
http://www.joshh.co.uk/
http://twitter.com/jshholland
http://identi.ca/jshholland

==============================================================================
TOPIC: Observations on operator overloading
http://groups.google.com/group/comp.lang.c/t/66e596e2f1015aab?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Apr 4 2010 10:00 am
From: "io_x"

"Eric Sosman" ha scritto nel messaggio
> Any proposal to add operator overloading to C must therefore
> address the issue of catastrophic failure of operators under
> overload conditions. It turns out that at least some of C's
> operators are structurally delicate to the point of fragility, and
> cannot sustain overload as they stand.

i'm for function overloading


==============================================================================
TOPIC: implement stack and queue in C or in asm
http://groups.google.com/group/comp.lang.c/t/42b5b866d80be770?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Apr 4 2010 10:00 am
From: "io_x"


"Dr Malcolm McLean" ha scritto nel messaggio
On 4 Apr, 09:09, "io_x" <a...@b.c.invalid> wrote:
>> "Dr Malcolm McLean" ha scritto nel messaggio
>>
>> > However the details aren't really important.
>>
>> the details are important!
>>
>What usually matters is the behaviour and the big O complexity of the
>functions. Exactly how they are written is of less importance. Micro-
>optimisation can produce very significant speedups, but these vary
>from platform to platform, and only make a real difference to the
>running time of the program if embedded in a routine which itself
>accounts for a large part of the running time of the program - almost
>always you find that there is one tight inner loop which dominates
>runtime.

i not speak of "Microoptimisation" i speak of what something has to be;
it is one way of see the puzle where all piece goes in the right place;

it is one conceptual way of see the stack where all goes well.
Here i see the above with my implementation (all goes well) but it
is different from what i see in the books.

Possibly i make wrong in debugging my 3 places stack-queue? :)

==============================================================================
TOPIC: Personal attacks by moderators in a moderated group are unprofessional
http://groups.google.com/group/comp.lang.c/t/fcaffc6b8db42751?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Apr 4 2010 10:02 am
From: "io_x"

"Qwertyioup" ha scritto nel messaggio
> On Sun, 4 Apr 2010 02:23:36 -0700 (PDT), spinoza1111
> wrote:
>>There is an urban legend that I'm "crazy". Recently, at work, a
>>manager posted a surreptitious photograph on a public blog of a
>>coworker with a very demeaning comment, and I complained to her
>>manager. Her defense was that I'd been "thrown out" of a local
>>placeblog; I'd not been, I'd left in disgust at the behavior of other
>>moderators besides myself (who was a moderator). The result? She was
>>disciplined and company rules about this behavior were clarified.
>
> Just for the record, you certainly WERE thrown out of the Lamma forum.
> You may have threatened to leave, as you periodically do in this and
> every other forum or newsgroup, but as always you expected to come
> back a few days later and continue as if nothing had happened. But
> though you asked over and over to be allowed back, you were refused.
>
> I assume that you were telling people the fairy tale version, as you
> outline above, and they checked up, as the posts are still online,
> and found you were lying.
>
> I've looked at your blog, by the way.
> Sad how not only your ex-wife, but your sons and you sister all refuse
> to have anything to do with you because of your behaviour. Of course
> you've learned nothing; still sure that everyone else is wrong and
> conspiring against you.
>
> So someone made a "demeaning comment" at work and instead of working
> it out you escalated that and got her in trouble. Well done. No doubt
> in a short time you'll be railing about the fascists at your current
> workplace who forced you out for "telling the truth to power" or
> whatever self-aggrandising bullshit you make up to explain that you
> were let go for being a complete asshole. Because it is clear that
> you can't function in any work, family or social group unless everyone
> defers to you.
>
> Well, it's been great to catch up with you. Maybe I'll be back in a
> few months or next year to see you explain how you "left your job in
> disgust at your colleagues' behaviour".

is wrong not offer one escape way, one chance
i say: to live and let to live (expecially people that are in trouble)

every one of us has his side good and side not good, but appear that
even in simple code are very few who has full right.
so because we make error even in simple routine how can judge other work?

i hope that this war end; to live and let to live

is it possible always one war and never the time
or the will for a good word?


== 2 of 4 ==
Date: Sun, Apr 4 2010 11:01 am
From: Seebs


On 2010-04-04, Ian Collins <ian-news@hotmail.com> wrote:
> On 04/ 4/10 05:50 AM, Seebs wrote:
>> I will state for the record that I have no interest at all in trying
>> to "destroy" Nilges, or undermine his credibility, or anything else.

> What credibility?

Well, yeah. One of the reasons I am not trying to undermine his credibility
is that even if I wanted to, I'm not sure at all that it would be
theoretically possible.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!


== 3 of 4 ==
Date: Sun, Apr 4 2010 11:32 am
From: Dr Malcolm McLean


On 4 Apr, 18:02, "io_x" <a...@b.c.invalid> wrote:
> [Qwertyioup]
> is wrong not offer one escape way, one chance
> i say: to live and let to live (expecially people that
> are in trouble)
>
I agree.
Stick to criticisms of Spinoza1111's views on C programming. There's
no point bringing up other, off-topic issues that none of us here can
possibly be in a position judge.


== 4 of 4 ==
Date: Sun, Apr 4 2010 2:06 pm
From: Seebs


On 2010-04-04, Dr Malcolm McLean <malcolm.mclean5@btinternet.com> wrote:
> Stick to criticisms of Spinoza1111's views on C programming. There's
> no point bringing up other, off-topic issues that none of us here can
> possibly be in a position judge.

Normally, I agree, but in the case of someone with a long history of
disruption and general internet kookery, legal threats, etcetera, it
can be important to warn people about the side issues -- many people
would rather not engage someone with a history of going to employers
with defamatory claims about people he's argued with on the internet,
for instance. Similarly, knowing that someone's been impenetrably stupid
about something for a decade changes, for most people, the expected return
on time spent trying to educate that person.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

==============================================================================
TOPIC: Pausing screen?
http://groups.google.com/group/comp.lang.c/t/8b8e7943a28d1f6c?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Apr 4 2010 11:04 am
From: Kenneth Brody


On 4/2/2010 7:19 PM, Bill Reid wrote:
> On Apr 2, 12:18 pm, Kenneth Brody<kenbr...@spamcop.net> wrote:
>> On 3/28/2010 4:03 PM, Bill Reid wrote:

[... console windows closing after running a console app from IDE ...]

>>> Unless MICROSOFT provides such an option for their
>>> "CONSOLE" (which, to the very best of my knowledge,
>>> they DON'T), no IDE/compiler/whatever can change the
>>> behavior...
>>
>> Then how do you explain the fact that when I run a program in Visual Studio
>> 2005 and 2008 in non-debug mode, and I get "Press any key to continue . . ."
>> displayed in the console window? (Same thing for VS6, as I recall.)
>>
>> Although it's not an available option (AFAIK) in VS2005 and 2008, there's
>> nothing stopping the IDE from doing the same thing when debugging the program.
>>
> Yes, it would be possible for any IDE to create a
> special console for a "character mode" application,
> that just raises the question: what happens when you
> run the application outside of the IDE? Does it
> behave the way you want, or the users think it
> should?

The program behaves exactly the same, regardless of whether the console
windows disappears or not after the program exits. That behavior is not part
of the program's behavior.

And who says that a "special console" is being created in this scenario?
There is absolutely nothing "special" about this console to make it
different from any other console.

>>> This is equivalent to writing a Windows(TM) app
>>> and asking if you can make the window oval instead
>>> of rectangular, then people "advising" that the
>>> IDE/compiler will "probably" have an option to do
>>> that...
>>
>> Not quite. The IDE giveth the console window, and the IDE taketh it away.
>>
> Right. And if there is no IDE to giveth the console,
> then the operating system will giveth it, and taketh
> it away on program exit, even if there is some text
> the programmer wanted the user to read and perhaps
> study, copy, whatever...in those cases, the programmer
> will want to implement his own user-controlled exit
> routine. Simple enough, riiiiiight?

So, you're saying that the programmer should write a special version of the
program which waits for the user to do something before exiting, so he can
see the output when run from the IDE, and then make a new executable for the
end-users to use?

Why not just have the IDE cause a "press any key to continue" prompt to
appear after the program exits, and before the window goes away?

--
Kenneth Brody


== 2 of 2 ==
Date: Sun, Apr 4 2010 11:48 am
From: Bill Reid


On Apr 4, 11:04 am, Kenneth Brody <kenbr...@spamcop.net> wrote:
> On 4/2/2010 7:19 PM, Bill Reid wrote:
> > On Apr 2, 12:18 pm, Kenneth Brody<kenbr...@spamcop.net>  wrote:
> >> On 3/28/2010 4:03 PM, Bill Reid wrote:
>
> [... console windows closing after running a console app from IDE ...]
>
> >>> Unless MICROSOFT provides such an option for their
> >>> "CONSOLE" (which, to the very best of my knowledge,
> >>> they DON'T), no IDE/compiler/whatever can change the
> >>> behavior...
>
> >> Then how do you explain the fact that when I run a program in Visual Studio
> >> 2005 and 2008 in non-debug mode, and I get "Press any key to continue . . ."
> >> displayed in the console window?  (Same thing for VS6, as I recall.)
>
> >> Although it's not an available option (AFAIK) in VS2005 and 2008, there's
> >> nothing stopping the IDE from doing the same thing when debugging the program.
>
> > Yes, it would be possible for any IDE to create a
> > special console for a "character mode" application,
> > that just raises the question: what happens when you
> > run the application outside of the IDE?  Does it
> > behave the way you want, or the users think it
> > should?
>
> The program behaves exactly the same, regardless of whether the console
> windows disappears or not after the program exits. That behavior is not part
> of the program's behavior.
>
EXACTLY...so what's your point?

> And who says that a "special console" is being created in this scenario?
> There is absolutely nothing "special" about this console to make it
> different from any other console.
>
It is a very "special" console because the IDE is creating
it for it's own purposes, rather than the operating system
creating it for the program itself...

> >>> This is equivalent to writing a Windows(TM) app
> >>> and asking if you can make the window oval instead
> >>> of rectangular, then people "advising" that the
> >>> IDE/compiler will "probably" have an option to do
> >>> that...
>
> >> Not quite.  The IDE giveth the console window, and the IDE taketh it away.
>
> > Right.  And if there is no IDE to giveth the console,
> > then the operating system will giveth it, and taketh
> > it away on program exit, even if there is some text
> > the programmer wanted the user to read and perhaps
> > study, copy, whatever...in those cases, the programmer
> > will want to implement his own user-controlled exit
> > routine.  Simple enough, riiiiiight?
>
> So, you're saying that the programmer should write a special version of the
> program which waits for the user to do something before exiting, so he can
> see the output when run from the IDE, and then make a new executable for the
> end-users to use?
>
No, I'm pretty sure I was pretty clear that the programmer
should write the application the way he/she wants it to appear
to the user...to that end, the Microslop Whussual Stupido
is doing the programmer no favors by creating a "special"
console that creates a false impression of how the
program will actually work "in the field"...

> Why not just have the IDE cause a "press any key to continue" prompt to
> appear after the program exits, and before the window goes away?
>
It's fine, except to the extent it violates the above...

---
William Ernest Reid

==============================================================================
TOPIC: Multiple function calls inside a while loop question
http://groups.google.com/group/comp.lang.c/t/05773fb4e52133e0?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Apr 4 2010 11:10 am
From: Chad


Let's say I have the following...

#include <stdio.h>

void foo(void)
{
printf("I'm a function call inside of foo\n");
}

void bar(void)
{
printf("I'm a function call inside of bar\n");
}

int main(void)
{
int x = 1;

while(x) {
foo();
bar();
}

return 0;
}

What prevents bar() from executing before foo() is finished in this
while loop?

Chad


== 2 of 4 ==
Date: Sun, Apr 4 2010 1:10 pm
From: Malcolm McLean


On 4 Apr, 19:10, Chad <cdal...@gmail.com> wrote:
> Let's say I have the following...
>
> What prevents bar() from executing before foo() is
> finished in this
> while loop?
>
C is a serial language. Ater each sequence point (roughly, semicolon)
the state of the program has to be updated.
Since the functions call printf the situation is a bit more
complicated thna that on many systems, since printf() quite frequently
passes data to another process which produces the actual visible
output. However the stream is synchronised so later calls never
overtake earlier ones.


== 3 of 4 ==
Date: Sun, Apr 4 2010 12:58 pm
From: lawrence.jones@siemens.com


Chad <cdalten@gmail.com> wrote:
[...]
> int main(void)
> {
> int x = 1;
>
> while(x) {
> foo();
> bar();
> }
>
> return 0;
> }
>
> What prevents bar() from executing before foo() is finished in this
> while loop?

The definition of the C language, which says that statements are
executed in sequence, one after another.
--
Larry Jones

They say winning isn't everything, and I've decided
to take their word for it. -- Calvin


== 4 of 4 ==
Date: Sun, Apr 4 2010 1:51 pm
From: Seebs


On 2010-04-04, Chad <cdalten@gmail.com> wrote:
> What prevents bar() from executing before foo() is finished in this
> while loop?

That the compiler generates code which calls foo, and then calls bar.
Calling a function doesn't complete until the function returns.
(There's some weird exceptions, involving things like "setjmp",
but you probably never need to know.)

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

==============================================================================
TOPIC: Blonde C jokes
http://groups.google.com/group/comp.lang.c/t/ad1c486bad884e91?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Apr 4 2010 11:57 am
From: Malcolm McLean


A blonde arrives for her first day as a C programmer. She's given a
simple job, changing a few error messages in a 10,000 line program.
After about a hour she hands the code back in. The manager compiles
it, and it comes back with several thousand syntax errors - completely
unusable and irrepairable. "What've you done?" he asks, "Oh," she
says, "I spotted a few typos. So I ran it through the spell-checker."

Two blondes are pair programming. For a while all goes well, but after
a time a bitter dispute arises between them, so serious that it has to
go to senior management.
"What's wrong?" asks the manager.
"I can't work with her anymore", says one, "she's too catty".
"Can you explain further?" askes the manager.
"Yes, she's always playing with the mouse."

What's a blonde's favourite C function?
tan.

The firm gets a new big mainframe in. The blonde is given the task of
porting code to it.
She writes
ptr = (char *) malloc(10);
"Why are you casting your malloc?" asks the manager.
"That's so it compiles under a C++ compiler".
"OK" says the manager.
Then he sees her taking out '//' comments.
"Why are you doing that?" he asks.
"That's so it compiles under a strict C89 compiler"
Then she takes a routine called bubblesort" and renames it "bsort".
"Why are you doing that?" he asks.
"Identifiers need to be six characters or less so it compiles under a
Fortran linker" she says.
"Look" says the manager, "isn't this getting a bit silly? Why does it
need to compile under all these different systems?"
"Mr Mannering", she says, "the new computer is in the basement."

== 2 of 4 ==
Date: Sun, Apr 4 2010 1:45 pm
From: Alexander Bartolich


Malcolm McLean wrote:
> [...]
> "Look" says the manager, "isn't this getting a bit silly? Why does it
> need to compile under all these different systems?"
> "Mr Mannering", she says, "the new computer is in the basement."

I don't get this one.

--


== 3 of 4 ==
Date: Sun, Apr 4 2010 2:02 pm
From: Rich Webb


On Sun, 4 Apr 2010 20:45:26 +0000 (UTC), Alexander Bartolich
<alexander.bartolich@gmx.at> wrote:

>Malcolm McLean wrote:
>> [...]
>> "Look" says the manager, "isn't this getting a bit silly? Why does it
>> need to compile under all these different systems?"
>> "Mr Mannering", she says, "the new computer is in the basement."
>
>I don't get this one.

It's "in the basement" i.e., it will be "under" all of them.

--
Rich Webb Norfolk, VA


== 4 of 4 ==
Date: Sun, Apr 4 2010 2:26 pm
From: Alexander Bartolich


Rich Webb wrote:
> Alexander Bartolich <alexander.bartolich@gmx.at> wrote:
>> Malcolm McLean wrote:
>>> [...]
>>> "Look" says the manager, "isn't this getting a bit silly? Why does it
>>> need to compile under all these different systems?"
>>> "Mr Mannering", she says, "the new computer is in the basement."
>>
>>I don't get this one.
>
> It's "in the basement" i.e., it will be "under" all of them.

So the hidden assumption is that all these different systems are
located upstairs. This is not logical. Ruby coders and the like
might indeed prefer light-flooded lofts. But the story is about
C++, C89 and Fortran. And everybody knows that real programmers
are photophobic.

--

==============================================================================
TOPIC: C the complete nonsense
http://groups.google.com/group/comp.lang.c/t/fee08dfa5e4cbaaa?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Apr 4 2010 1:54 pm
From: Malcolm McLean


I've been asked by Edward Nilges to comment on this webpage.
I had kept out of it, partly because of the tone of the debate, partly
because, not having read "C the complete reference" I don't have a
qualified opinion on the book.
The webpage is too focused on errors to be considered a review, and it
is too partisan to be considered an errata document. Much mention has
been made on comp.lang.c of legal liability. I've no idea what the
legal situation would be, except that this sort of "knocking copy" is
very commonly available on the web.

I think the title of Schildt's book invites misplaced criticism.
Whilst the book is entitled a "reference" it is in fact a tutorial.
The needs of pedagogy and definition are often opposed. A beginner
needs an explanation in simple, everyday language. A reference work
requires definitions, free from all error. It's very easy to find
errata in books full of teaching code, particularly if you adopt
stringent criteria. One reason is that the code is written for
demonstrating purposes,a nd never tested in a real environment. The
errors are obviously undesireable, but seldom have much impact on the
book's effectiveness for its purpose.

The very first error in "C the complete nonsense" is:

In general, negative numbers are represented using the two's
complement approach...
This is not a C feature. It is a common implementation, but it is
specifically not required. (Binary is, but one's complement is not
unheard of.)

This is suprious, Schildt qualifes by "in general".

The next one is
The following heading occurs:

static Global Variables
No such thing. A static variable outside of a function has file scope,
which is distinct from global scope.

Whilst I haven't read the book, this is probably spurious as well. The
term "global variable" can be used either for file scope variables or
variables with external linkage.


Enough said. Two errors in two errata. I could go on, doing exactly
the same thing to "C the complete nonsense" as Seebs has done to
Schildt.


I don't like libel laws and I think threats of legal action are heavy-
handed, and not credible unless they come from the person allegedly
libelled himself. I suspect Schildt himself just regards this sort of
criticism as the inevitable concomitant of success. The books do very
well on the market, and no-one is forced to buy them. However Nilges
is actually right, "C the complete nonsense" is a bad webpage and
should be either removed or substantially revised.


== 2 of 3 ==
Date: Sun, Apr 4 2010 2:00 pm
From: Richard Heathfield


Malcolm McLean wrote:
> I've been asked by Edward Nilges to comment on this webpage.
> I had kept out of it, partly because of the tone of the debate, partly
> because, not having read "C the complete reference" I don't have a
> qualified opinion on the book.
> The webpage is too focused on errors to be considered a review, and it
> is too partisan to be considered an errata document. Much mention has
> been made on comp.lang.c of legal liability. I've no idea what the
> legal situation would be, except that this sort of "knocking copy" is
> very commonly available on the web.
>
> I think the title of Schildt's book invites misplaced criticism.
> Whilst the book is entitled a "reference" it is in fact a tutorial.

So what you're actually saying is that the first error is on the front
cover.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within


== 3 of 3 ==
Date: Sun, Apr 4 2010 2:48 pm
From: Keith Thompson


Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> I've been asked by Edward Nilges to comment on this webpage.

And you decided to do so? Ok, whatever.

> I had kept out of it, partly because of the tone of the debate, partly
> because, not having read "C the complete reference" I don't have a
> qualified opinion on the book.
> The webpage is too focused on errors to be considered a review, and it
> is too partisan to be considered an errata document. Much mention has
> been made on comp.lang.c of legal liability. I've no idea what the
> legal situation would be, except that this sort of "knocking copy" is
> very commonly available on the web.
>
> I think the title of Schildt's book invites misplaced criticism.
> Whilst the book is entitled a "reference" it is in fact a tutorial.

What is misplaced about criticizing a misleading title?

> The needs of pedagogy and definition are often opposed. A beginner
> needs an explanation in simple, everyday language.

A beginner also needs an explanation that's *correct*. Many of
Schildt's errors are just errors; there would be no pedagogical harm
in correcting them.

[...]

> The very first error in "C the complete nonsense" is:
>
> In general, negative numbers are represented using the two's
> complement approach...
> This is not a C feature. It is a common implementation, but it is
> specifically not required. (Binary is, but one's complement is not
> unheard of.)
>
> This is suprious, Schildt qualifes by "in general".

The phrase "in general" is ambiguous; it can mean either "usually" or
"always". Assuming that "in general" was meant as "usually", he could
(and IMHO should) have mentioned that other representations exist.

> The next one is
> The following heading occurs:
>
> static Global Variables
> No such thing. A static variable outside of a function has file scope,
> which is distinct from global scope.
>
> Whilst I haven't read the book, this is probably spurious as well. The
> term "global variable" can be used either for file scope variables or
> variables with external linkage.

And is therefore ambiguous, and therefore IMHO should be avoided in a
book that purports to teach C.

> Enough said. Two errors in two errata. I could go on, doing exactly
> the same thing to "C the complete nonsense" as Seebs has done to
> Schildt.

So why did you stop after just two errors? If it was inappropriate
for Seebs to list just a subset of the errors rather than covering the
entire book, is it fair (to your readers, if not to Seebs, Schildt,
or Nilges) to criticize C:TCN based on just the first two errors?

In a quick reading, it appears to me that the first two listed errors
happen to be the least substantial. Keep reading. The third error
is a use of "%f" to print an expression of type size_t (followed by
a use of "%d" for the same purpose, but that's not *quite* as bad
an error). The fourth is an application of sizeof to a parameter
of type int[6], which is really of type int*. These are just plain
wrong, and they're demonstrations that Schildt didn't even try his
code before publishing it. The printf format error *might* be a
typo, perhaps one introduced in typesetting, but the sizeof error
is just a fundamental conceptual misunderstanding on Schildt's part.

And he claims to be teaching C.

As long as I'm posting I'll mention that
The "heap" is a DOS term...
is a perfectly correct statement. It doesn't necessarily imply
that it's *only* a DOS term. It also happens to be a Unix term,
and a Windows term, and a Symbian term, and so forth (and yes,
an updated version of the web page should probably clarify that).
The point is that it isn't a C term.

(Nilges doesn't seem to understand -- or maybe he does -- that the
more he keeps pushing his agenda, the more attention will be brought
to Schildt's errors.)

> I don't like libel laws and I think threats of legal action are heavy-
> handed, and not credible unless they come from the person allegedly
> libelled himself. I suspect Schildt himself just regards this sort of
> criticism as the inevitable concomitant of success. The books do very
> well on the market, and no-one is forced to buy them. However Nilges
> is actually right, "C the complete nonsense" is a bad webpage and
> should be either removed or substantially revised.

I disagree completely. "C: The Complete Nonsense" is a valuable
warning to those who might otherwise be misled by reading Schildt's
books. It could stand some revision, particularly an update to the
latest edition of the book.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.c"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.c?hl=en

To unsubscribe from this group, send email to comp.lang.c+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate