Re: Best book on learning C++?

From: Gene Wirchenko (gwirchenkoEXCEPT_at_CAPITALSwencomine.com)
Date: 12/17/03


Date: Wed, 17 Dec 2003 17:54:16 GMT

On Wed, 17 Dec 2003 10:54:54 -0500, "jeffc" <nobody@nowhere.com>
wrote:

>"Chris ( Val )" <chrisval@bigpond.com.au> wrote in message
>news:brpgh7$5opt2$1@ID-110726.news.uni-berlin.de...
>> What I question here, is why would the newbie would even
>> need to know the sizeof(int) in the first place ?
>>
>> I say this because, even the most demanding homework
>> assignments set by the teacher(s)(that I've seen), require
>> no knowledge of such details, or even the min number of
>> bits in a char for example.
>>
>> This stuff can come at a much later stage in their learning,
>> and the newbie should not be smothered with such technical
>> details that would *most likely* affect their ability to
>> concentrate on a language that is difficult enough as it
>> is :-).

     Quite. It is worth pointing out the limits at the time though.
Handling them can come later.

>Exactly. Most of the language police here would actually make poor
>teachers. Despite their confidence that they'd be teaching "correctness",
>their students would actually learn at a very slow pace. There is a
>psychology to education that a lot of people here have very little
>conception of. There is a whole lot more to teaching than precision. I
>know - I've had some of the worst teachers in the world - guys who were
>experts (experts at their given fields of, ahem... expertise, but utter
>failures as *teachers*, per se.)

    Actually, I do just fine. I had one student I tutored who was
being given incorrect data by her teaching assistants! She would
repeat this back to me. This wasted time. Finally, it got to the
point where I had to tell her not to listen to them and just follow
what I said. It was her first programming course and she needed some
good, stable data. After that, it went much better. She ended up
making her living as a programmer.

>> As for the 'void main()' arguments - I think it is fine for
>> the participants of this group to point out that it is an
>> error(heck, I do it myself), and for other errors that are
>> found also.
>
>Sure, what I object to is someone coming here saying
>
>"This works fine
>void main()
>{
> char c = 'c';
>}
>but this doesn't
>void main()
>{
> char c = "c";
>}
>What's wrong?"
>And 6 people are climbing over each trying to be the first to answer, "Your
>problem is void main!!!!!!!!!!!!!!"

     Not usually. It is more like:

! >void main()
! ^^^^
! By the Standard, main() returns int.
!
!>{
!> char c = "c";
! ^^^
! This is a string. If you want a char, use single quotes:
! char c='c';
!
!>}

>> As for un-learning the above, it was as simple as being told
>> a couple of times that what I posted was incorrect, and I
>> immediately changed my ways.
>
>Exactly.

     Well, no. I have had people argue and argue and argue about
something wrong because they read it in a book or were told it by a
teacher. Never mind that their programs are not working.

     Some do reverse themselves, but I have also seen people stating
wrong data and others changing from the correct to the wrong.

>> What I mean by that is: It is good for them to code incorrectly,
>> and get bitten, and get corrected in groups such as this, because
>> it is this *hands on* experience / failure / humiliation, where
>> the student really learns :-).
>
>Exactly.

     Quite. There is enough opportunity to get it wrong in the
process of learning without mislearning.

Sincerely,

Gene Wirchenko



Relevant Pages

  • Re: C function prototype
    ... the existence of the CRT does not prove that the functions are particularly ... void stradd; ... And ALWAYS think of 'char' as a rare and exotic data type, never used for real programming ...
    (microsoft.public.vc.mfc)
  • Re: There are lots of things that can be done to increase the complexity of hidden data
    ... void byteshuffle(unsigned char *list,unsigned char *password, unsigned ... void BShift(unsigned char *A, bool LR, unsigned int distance,unsigned ... When I worked for DOD one of my job functions was programming material ...
    (sci.crypt)
  • Re: C++ string and char conversions???
    ... I am just a newbie at C++ programming, ... data be copied to a pointer to a char type variable? ...
    (comp.programming)
  • C++ string and char conversions???
    ... I am really stumped at how to use string and char* types together, ... I am just a newbie at C++ programming, ... data be copied to a pointer to a char type variable? ...
    (comp.programming)
  • Re: asm
    ... I'm new to programming and I have seen very little. ... int main ... #define UC unsigned char ... void free_node ...
    (alt.lang.asm)