Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Recommendation for a text

Reply
Thread Tools

Recommendation for a text

 
 
Gene
Guest
Posts: n/a
 
      03-06-2012
On Mar 5, 8:21*am, John Coleman <(E-Mail Removed)> wrote:
> Also - I am open to ideas about projects for the students to work on.
> One idea that I had was to concentrate on the Mandelbrot Set. Towards
> the beginning of the semester they could have a program which just
> prints to the command line e.g. with '*' for points in the set. Later
> on they could write it to a portable bit map text file. Even later they
> could write it to a .bmp file in which they have to get the header and
> the byte-alignment correct. Finally, I could have them rewrite it in
> C99 with e.g. the complex-number type and *variable-length arrays so
> they don't have to hard-wire in the size of the bitmap. This topic of
> course reflects my interest as a mathematician.


This is nice. You have the right idea. The projects that will
inspire the best efforts are never the ones that can be done as well
or better with everyday tools. Other possibilities
* A* search to solve a tough puzzle. A favorite of mine is the
8-bishops problem from 7th Guest.
* Sudoku solver and/or generator
* Crossword puzzle generator
* Big integer arithmetic good enough to implement RSA encryption
* Queueing or Monte Carlo simulation of a local business or process
 
Reply With Quote
 
 
 
 
JohnF
Guest
Posts: n/a
 
      03-06-2012
John Coleman <(E-Mail Removed)> wrote:
> Greetings,
>
> I teach math and computer science (though mostly math)
> at a small liberal arts college. Because of our smallness
> we don't have a huge course offering. To compensate,
> we have a grab-bag "special topics course" where we cover
> different topics each semester based on student's and/or
> professor's interests.
>
> Next fall I will be running a special topics course with
> the title "Modern C Programming". The motivation for the
> course is that currently our CS students are exposed to C++,
> Java and a smattering of other languages (e.g. Lisp in an
> elective AI course) but no C per se. While in principle
> they learn some C naturally in the course of learning C++
> they really don't learn all that much about things like
> pointers, malloc, and the safe handling of C-style strings
> and they definitely don't learn anything about C99.
> The proposed class is intended to give a serious introduction
> to C to students who have a working knowledge of either C++
> or Java. This will allow me to blow through the basic syntax
> of expressions, loops, etc. in a couple of weeks and to spend
> the bulk of the semester on aspects of C which are different
> from Java and even C++.
>
> My question is - what would a good text be? My first tentative
> choice was King's "C programming: a modern approach", but I have
> also been looking at Kochan's book "Programming in C". More
> recently I have been toying with the idea of using K&R.
> On the one hand that seems on the face of it like a poor choice
> for a course called *Modern* C programming. On the other hand -
> it *is* a classic and seems to hit the right level of difficulty
> (a course for students who already know at least one programming
> language). My main question is - does the merits of K&R outweigh
> the disadvantages of the lack of coverage of C99? I could of
> course supplement K&R by e.g. O'Reilly's "C Pocket Reference"
> which covers the C99 material. Where I'm at right now is that
> my heart says to go with K&R but my head says go with King
> (or Kochan). The bookstore wants a decision on my part sooner
> rather than later.
>
> Also - I am open to ideas about projects for the students to work on.
> One idea that I had was to concentrate on the Mandelbrot Set.
> Towards the beginning of the semester they could have a program
> which just prints to the command line e.g. with '*' for points
> in the set. Later on they could write it to a portable bit map
> text file. Even later they could write it to a .bmp file in which
> they have to get the header and the byte-alignment correct.
> Finally, I could have them rewrite it in C99 with e.g. the
> complex-number type and variable-length arrays so they don't
> have to hard-wire in the size of the bitmap. This topic of course
> reflects my interest as a mathematician. I have less ideas when
> it comes to straight computer-science applications (although
> Jacob Navia's idea about a hex-dump utility for pedagogical
> purposes caught my eye).
>
> Thanks in advance for any suggestions
> -John Coleman


Not really sure about what book might be better. Where are
these students going next? I take it they're cs students
learning (if you have your way a little math, rather than
math students learning cs. Of course, real cs requires lots
of math, but lots of cs curricula teach future programmers
how to program, not cs per se. I think real cs students
might gravitate more towards k&r; otherwise, maybe not.
But you're the one who's there and knows them and knows
the curriculum and available books. So you're the best
(if not only) one to make the right call.

As for Mandelbrot, that's a nice idea. But have them
construct a memory-resident raster structure, nrowsxncols,
along with a layer of output routines, the first being
your printf, and later maybe bmp, etc. That way the underlying
raster bitmap (or 3 bytemaps if you want color) structure is
flexible for any future purpose. Plus, it teaches them
a little more about structs. A straight printf program
is a dead end vis-a-vis future output option enhancements.
During a little recent downtime between contracts,
I wrote http://www.forkosh.com/lineart.html based on that idea
(see example=6 and =7 when they happen to scroll by for fractals),
and also based on earlier http://www.forkosh.com/onedwaveeq.html
which is an exercise trying to use gif animation as a visual
teaching aid (I still haven't figured out how to use it
really well, but am convinced there's a way, if I can find it).
These programs use existing libraries to drive gif creation from
the bytemap raster, and animated gifs using ImageMagick's convert
via a system() call. So once they have a memory-resident raster,
there's really lots of "cute" places they can go from there (e.g.,
besides the gifs, note the postscript output option on lineart).
Plus, using library routines to get to some of those places helps
teach them how to interface their own stuff with canned code,
an important skill.
--
John Forkosh ( mailto: http://www.velocityreviews.com/forums/(E-Mail Removed) where j=john and f=forkosh )
 
Reply With Quote
 
 
 
 
Luca Forlizzi
Guest
Posts: n/a
 
      03-06-2012
On 5 Mar, 14:21, John Coleman <(E-Mail Removed)> wrote:
> Greetings,
>
> I teach math and computer science (though mostly math) at a small liberalarts college. Because of our smallness we don't have a huge course offering. To compensate, we have a grab-bag "special topics course" where we coverdifferent topics each semester based on student's and/or professor's interests.
>


Hello, I teach C programming at University of L'Aquila (in Italy), in
the first year of our BS program since 2004. I changed several times
the "official textbook" for the course. Our students, on the average,
do not have any programming background and are not used to spend much
time with books. So learning C, for them is rather hard. (I have to
point out that to teach C in the first year s not a decision of mine).
I have tried to use K&R but results were not good. K&R it's a superb
introduction to the language but it is not, in my opinion, an
introductory text to programming in general, at least not for students
with rather week scientific and cultural background.
K&R assumes the reader already manages many concepts.
Then I switched to Deitel&Deitel, at the time the italian edition was
based on the 5th USA edition. Results were better in terms of general
programming ability, but C's peculiarities were not well understood.
Since 2009 I switched to King, and I am very happy with such choice.
It succeed rather well in explaing at the same time general
programming concepts and C's peculiarities. Students perform
statistically much better.
 
Reply With Quote
 
nick_keighley_nospam@hotmail.com
Guest
Posts: n/a
 
      03-06-2012
On Monday, March 5, 2012 3:36:39 PM UTC, Stefan Ram wrote:
> John Coleman <(E-Mail Removed)> writes:


> >I wanted to emphasize to prospective students that
> >C is not some language that was replaced by C++

>
> You might show them
>
> http://www.tiobe.com/content/paperinfo/tpci/index.html
>
> . C++ now even has been exceeded by C# in popularity.


C# is a tad non-portable for many purposes. It don't think the real-time/embedded people will be rushing to convert either

> C++ is dying.
>
> C++ is still taught today, not because students believe it
> replaced C, but because teachers and division chairs believe
> it replaced C.


C++ is still heavily used

> Another source
>
> http://lang-index.sourceforge.net/
>
> gives similar results. See also
>
> http://en.wikipedia.org/wiki/Measuri...age_popularity
>
> .


 
Reply With Quote
 
Joe keane
Guest
Posts: n/a
 
      03-06-2012
In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
John Coleman <(E-Mail Removed)> wrote:
>More recently I have been toying with the idea of using K&R.


I'd make that the first book.

The weakness is that it's not great for someone who does not know
programming at all [confer someone who is fluent in BASIC and wants to
learn C].

IIRC, i learned programming from the book with the TI-57.
 
Reply With Quote
 
jgharston
Guest
Posts: n/a
 
      03-06-2012
Ian Collins wrote:
> C and C++ still dominate the embedded and non-windows system programming
> space, neither is dying and one hasn't replaced the other.


Just wait, I'm sure Vista will be shipping on washing machines
soon.

JGH
 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      03-06-2012
On 2012-03-05, John Coleman <(E-Mail Removed)> wrote:
> Next fall I will be running a special topics course with the title "Modern C
> Programming".


This course title is a gaping oxymoron. But titles are just labels
of no consquence. Or are they?

> Kochan's book "Programming in C". More recently I have been toying with the
> idea of using K&R. On the one hand that seems on the face of it like a poor
> choice for a course called *Modern* C programming.


Oops! Now you're constraining what books to use because of a weasel word in the
course title.
 
Reply With Quote
 
Charles Richmond
Guest
Posts: n/a
 
      03-06-2012
"John Coleman" <(E-Mail Removed)> wrote in message
news:17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15...
>
> [... what textbook should I use for C++ students to learn plain C
> programming ...]
>


K&R explains the basics of C programming. C++ people should be familiar
with the basics already. So choose a book that skips over all the
explanations of looping constructs and such... and goes right to using the
"advanced" features of C.

Also, just for fun, think about adding _Expert C Programming: Deep C
Secrets", by Peter van der Linden (ISBN: 978-0131774292). It goes into
several topics in C *not* usually covered, and has some funny anecdotes
thrown in to hold a student's interest.

>
> [... what projects should the students work on ...]
>


Anything that produces some sort of computer graphic display is always
interesting to students. But I like projects that emphasize some advanced
data structures, like AVL or red-black trees. Learning to build AVL trees
and maintain the AVL property while adding and deleting nodes... can be
challenging. For me, just creating code in C is a thrill! I just enjoy
programming.

--
+<><><><><><><><><><><><><><><><><><><>+
| Charles Richmond (E-Mail Removed) |
+<><><><><><><><><><><><><><><><><><><>+

 
Reply With Quote
 
Joe keane
Guest
Posts: n/a
 
      03-06-2012
In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
John Coleman <(E-Mail Removed)> wrote:
>Also - I am open to ideas about projects for the students to work on.


The first 'major' programs i wrote for both BASIC and Pascal were
adventure games. This is how i learned that Pascal sucks.
 
Reply With Quote
 
Patrick Scheible
Guest
Posts: n/a
 
      03-06-2012
(E-Mail Removed) (Joe keane) writes:

> In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
> John Coleman <(E-Mail Removed)> wrote:
>>Also - I am open to ideas about projects for the students to work on.

>
> The first 'major' programs i wrote for both BASIC and Pascal were
> adventure games. This is how i learned that Pascal sucks.


Pascal sucks for major programs because it was designed for teaching,
not for major programs.

-- Patrick
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling text in a Text Area or Text leo ASP General 1 12-05-2005 01:13 AM
Looking for a WPA bridge recommendation msnews.microsoft.com Wireless Networking 0 05-28-2005 03:11 PM
Wireless router recommendation... Fritz Wireless Networking 0 09-23-2004 07:50 PM
Product recommendation please. -keevill- Wireless Networking 1 09-03-2004 04:37 AM
Re: Need NAS recommendation =?Utf-8?B?TmV0d3Jrd29tYW4=?= Wireless Networking 0 07-24-2004 05:39 PM



Advertisments