 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Anand Ramalingam Guest
|
Posted: Fri Aug 29, 2003 11:00 am Post subject: Please recommend a sophomore level C++ text |
|
|
Hi,
I am a graduate student at University of Texas at Austin. I am TAing
this fall
a course titled "Data Structures and C++". Dr.David Pan is teaching
the
section which I TA. Prof. Pan and myself are new to the school.
There are two other sections for this class at UT, Austin.
1) Nadeem Malik's section,
http://www.ece.utexas.edu/~nmalik/
2) Terry Wagner's section,
http://www.ece.utexas.edu/courses/fall_03/ee322c-14865/
I think we will be following Dr.Malik's syllabus closely than
Prof.Wagner.
When Prof asked for textbook suggestion, I recommended Koenig and
Moo's Accelerated C++ as a text since I studied it few years back and
found it impressive.
But the textbook proposed to be used is Deitel & Deitel: How program
C++, 4/e.
I just briefly glanced over it and was shocked to see the advocacy of
using for loop starting with 1 and going to n. I don't want the
students to pick bad
programming practices. I read the 3/e review of the book at ACCU
website,
http://www.accu.org/bookreviews/public/reviews/cp/cp003204.htm
and the comments were scathing. Unfortunately I don't have time to
read 4/e and seek the guidance of the newsgroup to answer the question
of using Deitel&Deitel as a textbook since we have to start right
after the Labor day.
I would be glad if someone can provide us with lecture notes (PPT or
PS/PDF slides) for Koenig/Moo. The PPT slides are a great attraction
to the book for the faculty!
Please do suggest a data structures book which can supplement the
Koenig/Moo text.
Sorry for a long mail and thanks for your patient reading.
Thanks
Anand
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Greg P. Guest
|
Posted: Sat Aug 30, 2003 7:48 pm Post subject: Re: Please recommend a sophomore level C++ text |
|
|
"Anand Ramalingam" <anand_ramalingam (AT) yahoo (DOT) com> wrote
<snip>
If you are wanting a book solely devoted to data structures (which usually
come with algorithm discussion), I would recommend Bob's Algorithms In C++
Parts 1-5. He studied under Don Knuth (so Bob++ =)). It is a text that most
advanced programming courses use:
http://www.amazon.com/exec/obidos/tg/detail/-/020172684X/qid=1062197321/sr=1-1/ref=sr_1_1/102-8829904-9641754?v=glance&s=books
(Note that the above is a bundle of two texts as Parts 1-4 is a single book
and part 5 is another).
My brain my have parsed your needs/questions incorrectly by presenting these
books. What constitutes "sophomore" skill at your institute? Is it beyond
Stroustrup and Meyer's books?
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Anand Ramalingam Guest
|
Posted: Sun Aug 31, 2003 8:21 am Post subject: Re: Please recommend a sophomore level C++ text |
|
|
<snip>
| Quote: |
My brain my have parsed your needs/questions incorrectly by presenting these
books. What constitutes "sophomore" skill at your institute? Is it beyond
Stroustrup and Meyer's books?
|
The sophomore class has programming experience in C. When we surveyed
the class about the topics they found difficult in their prerequisite
class,
1) Pointers
2) Recursion
were concepts the people found most difficult.
They reasoned that they had problems with pointers simply because they
didn't how to read the declaration. I am preparing few slides to help
reading C decalarations from right to left.
I am not too sure why recursion is hard.
We need to reinforce these concepts and then probably introduce core
data structures like,
Trees, Lists, Hash tables
and algorithms like
Sorting (Quicksort maybe) and Searching
and if time permits some basic stuff on Graphs.
So we need a text which addresses the above topics.
Thanks
Anand
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Sun Aug 31, 2003 1:39 pm Post subject: Re: Please recommend a sophomore level C++ text |
|
|
In article <8983074d.0308302131.6ca9dda8 (AT) posting (DOT) google.com>, Anand
Ramalingam <anand_ramalingam (AT) yahoo (DOT) com> writes
| Quote: | The sophomore class has programming experience in C.
|
Then you have 'the second language' problem. This means that those
instructing and the texts used must be very clear about how to think and
program in C++. The days have gone (IMO) when one should gently
transition programmers from C to C++ via 'C++ as a better C'. This
reinforces my belief that you should be using Accelerated C++ as the
language text. What is more worrying is that anyone who would prefer
Dietel & Dietel clearly does NOT understand how to use C++ as a modern
programming language.
For those that do not know 'The second language' problem is that
students will, unless very firmly guided, just use the second language
by translating their thinking in the first. What makes it particularly
difficult where the first language is C is that C++ puts virtually no
barriers in the way of such thinking.
IMO source code should be ruthlessly reviewed to ensure that it is not
only correct but based on an understanding of C++. That means
instructors must be confident users of C++ and have a clear
understanding of why things are done differently in the two languages.
--
Francis Glassborow ACCU
64 Southfield Rd
Oxford OX4 1PA +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Ed Avis Guest
|
Posted: Mon Sep 01, 2003 1:06 am Post subject: Re: Please recommend a sophomore level C++ text |
|
|
Francis Glassborow <francis (AT) robinton (DOT) demon.co.uk> writes:
| Quote: | IMO source code should be ruthlessly reviewed to ensure that it is
not only correct but based on an understanding of C++. That means
instructors must be confident users of C++ and have a clear
understanding of why things are done differently in the two
languages.
|
Yes. But you must be careful not to take it too far. Often, a
simple procedural program in a C-like style is the best way to solve a
problem, particularly for small college assignments.
You wouldn't want an instructor to mark down a solution containing
struct s {
int length;
int height;
};
as being 'not C++', while favouring
class s {
public:
int getLength();
void setLength(int);
...
};
or some other monstrosity because it is 'more OO' (that being
considered a reason in itself, although nobody is quite sure what it
means).
OTOH, there are many cases where C++ clearly does provide a better way
to do things, such as std::string instead of char*s.
--
Ed Avis <ed (AT) membled (DOT) com>
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Anand Ramalingam Guest
|
Posted: Tue Sep 02, 2003 6:10 am Post subject: Re: Please recommend a sophomore level C++ text |
|
|
<snip>
| Quote: | You have a real problem with the course. Is it data structures
or is it C++? The course title states that it does not know!
Which are you going to do? Data structures is a classic second
course. Do your Sophmores have two courses behind them?
|
They have two courses as prerequisites, namely EE306 (Introduction to
Computing Systems) and then followed by EE312 (Introduction to
Progrmming).
These two courses cover the entire book by Yale Patt and Sanjay Patel
"From Bits and Gates to C and Beyond". It follows the bottom-up
approach as the name suggests starting from the transistors and ending
with programming in C.
The way I understand it is, it is a Data Structures class. But the
programming would be in C++. The students would learn C++ in the first
half of the semester and then data structures in the next half.
Thanks
Anand
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Wed Sep 03, 2003 12:28 am Post subject: Re: Please recommend a sophomore level C++ text |
|
|
In article <l1llt8tf49.fsf (AT) budvar (DOT) future-i.net>, Ed Avis
<ed (AT) membled (DOT) com> writes
| Quote: | I think your post exemplifies exactly the traps that some
inexperienced instructors fall into. A C-style struct at global level
is rarely an appropriate design solution for C++ and students must be
led to understand that at a very early stage
It depends on the problem. If it is a toy problem, a simple
global-level definition may be the clearest and most maintainable
solution.
|
And that is one of the major problems with teaching, we have to set
problems with simple solutions and yet prepare students for the real
world where they have to put aside their toys. That is why a great deal
more thought often needs to go into selecting suitable tasks.
| Quote: |
If you follow the kind of marking guidelines you seem to be
advocating, then all exercises would need a disclaimer:
|
I think you have it the wrong way round. The guidelines are for those
setting the problems. Let me give an example:
When setting a problem involving points on a plane require that the
point type handles points in both Cartesian and Polar form. Now the
trivial struct consisting of a pair of doubles stops being an optimum
solution.
Indeed focusing on the design of types is a good way to bring out many
of the differences between C and C++.
| Quote: |
"Please do not try to write the simplest or most logical solution
to meet the requirements given. Instead, pretend that you are solving
some more complex (though not specified) problem and guess at what
'object-oriented' or 'software engineering' techniques you might need
to use to solve that imaginary problem."
Sadly, I found this to be good advice during my first year at
university.
|
Well I would prefer that the requirements are ones that make using C++
desirable, otherwise I would expect the Student to select a more
appropriate language. The question 'Why do I need C++ to do this?' is a
valid one and should be addressed by providing tasks for which their are
good answers. This is why teaching a second computer language is much
more demanding of the instructor. Unfortunately many instructors do not
understand that.
--
Francis Glassborow ACCU
64 Southfield Rd
Oxford OX4 1PA +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Attila Feher Guest
|
Posted: Wed Sep 03, 2003 12:31 am Post subject: Re: Please recommend a sophomore level C++ text |
|
|
Ed Avis wrote:
[SNIP]
| Quote: | If you follow the kind of marking guidelines you seem to be
advocating, then all exercises would need a disclaimer:
"Please do not try to write the simplest or most logical solution
to meet the requirements given. Instead, pretend that you are solving
some more complex (though not specified) problem and guess at what
'object-oriented' or 'software engineering' techniques you might need
to use to solve that imaginary problem."
|
IMHO you do not need a guideline like that. For toy programs to understand
how a while loop works there is no need for anything complex in thinking.
Of course teaching should be based on a series of steps, where in one step
one understands and masters one thing. IMHO only geniouses can go by leaps
of several steps.
I had once a very good math exercise book. You have learnt the theory and
(of course) you did not really understand it - you just thought so. Now
this book started up with very very simple things, like:
12 = x +3
and then it was adding more and more complexity with each new exercise. You
can imagine me (and the rest of the class) surprised when (in high school)
the teacher said: "You get a home work now. You have two weeks for it.
| Quote: | From the "frog book" you solve exercise 1 to 176." However when I have
started to do them (I was done in one afternoon) it was fun! Sometimes I |
needed to ask (around the end) but it was still fun. The more complex
exercises were repeated a few times, giving you a way to practice the same
"thinking" in a different scennario. Once you "knew thr trick" it was
really a happy time doing those exercises.
IMHO a good C++ course should be the same. Except that in this you can add
one more ugly trick: you can start to build a system and change requirements
so, that a poor-man's solution will soon be out of breath and people will
need to re-think their approach. Of course (IMHO) that requires that
teaching of the language does not stop at teaching implementation details
but also the fundamental concepts of design (along with design patterns).
Of course such a course will not be a beginners course. But even in a
beginners course you can make (OK, a genious can make) such a series of
assigments (complementing the theory taught) that will inevitably (even if
with a little help) put the student onto the right track.
In this way students will not only learn how to make Q&D solutions but they
will feel and see first hand how does it suck when the solution does not
scale well and they have to restart the design.
--
Attila aka WW
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Agent Mulder Guest
|
Posted: Wed Sep 03, 2003 7:21 am Post subject: Re: Please recommend a sophomore level C++ text |
|
|
<Ramalingam>
| Quote: | The way I understand it is, it is a Data Structures class. But the
programming would be in C++. The students would learn C++ in the first
half of the semester and then data structures in the next half.
/Ramalingam |
<Francis Glassborow>
If it is a data structures course why is it not using the language they
already know? Sedgewick's Algorithms in C is a perfectly respectable
book on the subject. It has the added advantage that you do not have to
explain why you are re-inventing the wheel (i.e. why write all these
data structures that are already provided by the language)
</Francis Glassborow>
The etymology of the word sophomore is perhaps from Greek:
sophos wise + mOros foolish
It is very useful to see something crafted by hand that
you try to understand in the language. See chapter 5 of
the book Austern; Generic Programming and the STL;
Addison-Wesley. In chapter 5 Containers, he builds the
'block' struct and rapidly extends it to something similar
to an STL-container. Very clarifying.
-X
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Wed Sep 03, 2003 3:08 pm Post subject: Re: Please recommend a sophomore level C++ text |
|
|
In article <bj2sr7$fbd$1 (AT) news2 (DOT) tilbu1.nb.home.nl>, Agent Mulder
<mbmulder_remove_this_ (AT) home (DOT) nl> writes
| Quote: | It is very useful to see something crafted by hand that
you try to understand in the language. See chapter 5 of
the book Austern; Generic Programming and the STL;
Addison-Wesley. In chapter 5 Containers, he builds the
'block' struct and rapidly extends it to something similar
to an STL-container. Very clarifying.
|
But before you look at such solutions you need more than a newcomers
understanding of the language. If the purpose is to learn about data
structures and algorithms that should be the focus and the student
should not be weighed down with another body of new knowledge and
skills.
--
Francis Glassborow ACCU
64 Southfield Rd
Oxford OX4 1PA +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|