Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #18226 > unrolled thread

Recommendation for a text

Started byJohn Coleman <jcoleman@franciscan.edu>
First post2012-03-05 05:21 -0800
Last post2012-03-07 12:24 -0800
Articles 20 on this page of 42 — 25 participants

Back to article view | Back to comp.lang.c


Contents

  Recommendation for a text John Coleman <jcoleman@franciscan.edu> - 2012-03-05 05:21 -0800
    Re: Recommendation for a text jacob navia <jacob@spamsink.net> - 2012-03-05 15:27 +0100
      Re: Recommendation for a text Kleuske <kleuske@nowhere.net> - 2012-03-05 20:09 +0000
        Re: Recommendation for a text John Coleman <jcoleman@franciscan.edu> - 2012-03-05 12:29 -0800
        Re: Recommendation for a text ArifulHossain tuhin <etothepowerpi@gmail.com> - 2012-03-07 06:19 -0800
      Re: Recommendation for a text John Coleman <jcoleman@franciscan.edu> - 2012-03-05 12:37 -0800
        Re: Recommendation for a text "BartC" <bc@freeuk.com> - 2012-03-05 21:33 +0000
    Re: Recommendation for a text John Coleman <jcoleman@franciscan.edu> - 2012-03-05 06:52 -0800
      Re: Recommendation for a text Ian Collins <ian-news@hotmail.com> - 2012-03-06 10:50 +1300
        Re: Recommendation for a text jgharston <jgh@arcade.demon.co.uk> - 2012-03-06 09:43 -0800
          Re: Recommendation for a text China Blue Water Navy <chine.bleu@yahoo.com> - 2012-03-06 10:58 -0800
          Re: Recommendation for a text nick_keighley_nospam@hotmail.com - 2012-03-07 01:38 -0800
      Re: Recommendation for a text nick_keighley_nospam@hotmail.com - 2012-03-06 04:28 -0800
    Re: Recommendation for a text Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-03-05 17:37 +0000
      Re: Recommendation for a text Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-03-05 18:15 +0000
      Re: Recommendation for a text Nomen Nescio <nobody@dizum.com> - 2012-03-05 20:15 +0100
      Re: Recommendation for a text Ian Collins <ian-news@hotmail.com> - 2012-03-06 10:55 +1300
    Re: Recommendation for a text Keith Thompson <kst-u@mib.org> - 2012-03-05 09:38 -0800
    Re: Recommendation for a text Keith Thompson <kst-u@mib.org> - 2012-03-05 09:43 -0800
      Re: Recommendation for a text John Coleman <jcoleman@franciscan.edu> - 2012-03-05 12:41 -0800
    Re: Recommendation for a text ImpalerCore <jadill33@gmail.com> - 2012-03-05 14:09 -0800
    Re: Recommendation for a text Hans Vlems <hvlems@freenet.de> - 2012-03-05 15:07 -0800
      Re: Recommendation for a text Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-07 22:27 +0000
        Re: Recommendation for a text JohnF <john@please.see.sig.for.email.com> - 2012-03-08 04:06 +0000
          Re: Recommendation for a text Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-08 13:09 +0100
          Re: Recommendation for a text Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-10 08:23 +0000
    Re: Recommendation for a text Gene <gene.ressler@gmail.com> - 2012-03-05 18:53 -0800
    Re: Recommendation for a text JohnF <john@please.see.sig.for.email.com> - 2012-03-06 04:45 +0000
    Re: Recommendation for a text Luca Forlizzi <luca.forlizzi@gmail.com> - 2012-03-06 00:11 -0800
      Re: Recommendation for a text "io_x" <a@b.c.invalid> - 2012-03-13 13:09 +0100
        Re: Recommendation for a text "io_x" <a@b.c.invalid> - 2012-03-13 13:20 +0100
    Re: Recommendation for a text jgk@panix.com (Joe keane) - 2012-03-06 15:29 +0000
    Re: Recommendation for a text Kaz Kylheku <kaz@kylheku.com> - 2012-03-06 19:44 +0000
    Re: Recommendation for a text "Charles Richmond" <netnews@aquaporin4.com> - 2012-03-06 14:03 -0600
    Re: Recommendation for a text jgk@panix.com (Joe keane) - 2012-03-06 20:07 +0000
      Re: Recommendation for a text Patrick Scheible <kkt@zipcon.net> - 2012-03-06 15:53 -0800
        Re: Recommendation for a text Kaz Kylheku <kaz@kylheku.com> - 2012-03-07 05:39 +0000
          Re: Recommendation for a text Patrick Scheible <kkt@zipcon.net> - 2012-03-07 09:54 -0800
        Re: Recommendation for a text Ian Collins <ian-news@hotmail.com> - 2012-03-07 20:33 +1300
          Re: Recommendation for a text Fritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net> - 2012-03-07 10:29 +0100
            Re: Recommendation for a text Keith Thompson <kst-u@mib.org> - 2012-03-07 11:12 -0800
    Re: Recommendation for a text Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-03-07 12:24 -0800

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#18251

FromImpalerCore <jadill33@gmail.com>
Date2012-03-05 14:09 -0800
Message-ID<a8b132bb-39ef-4a49-a358-a5035ee37c40@q12g2000vbt.googlegroups.com>
In reply to#18226
On Mar 5, 8:21 am, John Coleman <jcole...@franciscan.edu> wrote:
> Greetings,

[snip]

> Also - I am open to ideas about projects for the students to work on.
> Thanks in advance for any suggestions

One project that could be interesting is to create a spell checker.
Have a dictionary of words, use the levenshtein distance to evaluate
closeness, and present a top 5 list of alternatives.  One could
incorporate file I/O to add words to a dictionary file.

Another project would be to create an email spam filter.  You could
have a students collect samples of spam email, and devise methods to
remove unwanted email.  You could use simple keyword recognition, like
if "meds" is in the subject header, send it to the spam folder.  You
could just have a file of email subject headers to evaluate, and they
can calculate a likelihood that the email is spam.  You could even
make it a student contest to design the best spam filter that
eliminates the majority of spam.  You give them a sample file, while
you run their program on your master file to determine accuracy.

You can create structures that would mimic records in a database.
Then have them be able to search, sort, or filter on given field(s).
Here is a simple example of movie database.

\code
struct movie_record_tag
{
  int id;
  char title[40];
  char rating[10];
  int year;
};
typedef struct movie_record_tag movie_record;

movie_record movie_data[] =
{
  {  1, "Avatar",                                "PG-13", 2009 },
  {  2, "Ratatouille",                           "G",     2007 },
  {  3, "The Matrix",                            "R",     1999 },
  {  4, "The Lord of the Rings: The Two Towers", "PG-13", 2002 },
  {  5, "The Dark Knight",                       "PG-13", 2008 },
  {  6, "Back to the Future",                    "PG",    1985 },
  {  7, "The Forbidden Planet",                  "PG",    1956 },
  {  8, "Iron Man",                              "PG-13", 2008 },
  {  9, "Star Trek II: The Wrath of Khan",       "PG",    1982 },
  { 10, "Terminator 2: Judgement Day",           "R",     1991 },
  { 11, "Jonah: A VeggieTales Movie",            "G",     2002 },
  { 12, "Star Wars V: The Empire Strikes Back",  "PG",    1980 },
  { 13, "Sneakers",                              "PG-13", 1992 },
  { 14, "Finding Nemo",                          "G",     2003 },
  { 15, "Aliens",                                "R",     1986 }
};
\endcode

You could have them store it in a container to be able to sort based
on the year, or filter movies appropriate for a person's age (like a 5
yr old would only be able to see G rated movies).  If you have a
linked list container API, you could have them insert these records
into a linked list, then use search and sort functions to analyze the
data.

You could incorporate some kind of date processing to categorize
people by age, like say find out who the top 10 oldest or youngest
presidents were.  They would need to do the conversions of dates in a
string format like "mm/dd/yyyy" to some kind of day count (you could
use a Gregorian calendar where a day count of 0 is Jan 1, year 1),
maybe adding some error detection to detect invalid dates, and print a
list of those presidents with their birthdate.

There are several things that you could expose them to that while they
are not directly related to C, you can still incorporate them into
"modern C programming".  For example, one could incorporate doxygen as
a tool to learn documentation generation in the project.  You give
them a partial structure for an API, they have to fill in the gaps in
the guts and documentation.  You could do this for a simple container
like a linked list or resizable array.

You could have a refactoring project.  You have a monolithic program
that you want your students to split into headers and source files,
maybe adding a makefile to the mix.  Instead of using #define to
define input values, have the students convert it to accept user input
from the command line.

You can have them learn how to use a graphing library, like gnuplot.
The assignment could be to put in a simple equation like 2*sin(x),
evaluate the data over a given domain with a certain precision, then
either write a gnuplot file to display the data or use its C API.

You would know better than me how to limit the complexity to a
project, but maybe something here will inspire you.

Best regards,
John D.

[toc] | [prev] | [next] | [standalone]


#18253

FromHans Vlems <hvlems@freenet.de>
Date2012-03-05 15:07 -0800
Message-ID<ff9bc9c3-1525-44e7-8072-214bc63b378e@f4g2000yqh.googlegroups.com>
In reply to#18226
On 5 mrt, 14:21, John Coleman <jcole...@franciscan.edu> 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

Go for C and use King's book. Your heart may tell you to use K&R but
you're teaching a math class not history, right ;-) ?
If you want datastructures that have variable length, well use linked
lists of structures.
Hans

[toc] | [prev] | [next] | [standalone]


#18307

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2012-03-07 22:27 +0000
Message-ID<slrnjlfo6r.1ls.grahn+nntp@frailea.sa.invalid>
In reply to#18253
On Mon, 2012-03-05, Hans Vlems wrote:
> On 5 mrt, 14:21, John Coleman <jcole...@franciscan.edu> wrote:
>> Greetings,
>>
>> I teach math and computer science (though mostly math) at a small liberal ...
...
> If you want datastructures that have variable length, well use linked
> lists of structures.

Yes, as long as he shows the drawbacks of that and the shortcomings of
C in that area. (It's not as if the students won't notice; they have
experience with other languages.)

I'm mostly a C++ person, and in my current C project at work, the
worst aspect related to the language is all those malloced linked
lists. In C++ I would have chosen to use a std::vector<T> for
seriously better performance and reliability.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

[toc] | [prev] | [next] | [standalone]


#18314

FromJohnF <john@please.see.sig.for.email.com>
Date2012-03-08 04:06 +0000
Message-ID<jj9b8c$8lq$1@reader1.panix.com>
In reply to#18307
Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
> I'm mostly a C++ person, and in my current C project at work, the
> worst aspect related to the language is all those malloced linked
> lists. In C++ I would have chosen to use a std::vector<T> for
> seriously better performance and reliability.
> /Jorgen

I'm mostly a C person, and I agree you have a point.
Whenever I have a nontrivial data structure, let's
call it struct bigmess, it's always accompanied by
"methods" struct bigmess *new_bigmess(), and
int delete_bigmess(), that I write myself and that
do all the ugly mallocing and freeing necessary,
hiding all that housekeeping from the rest of the
application. Lots of useful C++ ideas can be
incorporated into C design (but I don't want to
get into the naive argument, "then why use C?").
-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )

[toc] | [prev] | [next] | [standalone]


#18325

FromFritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net>
Date2012-03-08 13:09 +0100
Message-ID<34e60694059cd9a7395752b70d877891@msgid.frell.theremailer.net>
In reply to#18314
JohnF <john@please.see.sig.for.email.com> wrote:

> Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
> > I'm mostly a C++ person, and in my current C project at work, the
> > worst aspect related to the language is all those malloced linked
> > lists. In C++ I would have chosen to use a std::vector<T> for
> > seriously better performance and reliability.
> > /Jorgen
> 
> I'm mostly a C person, and I agree you have a point.
> Whenever I have a nontrivial data structure, let's
> call it struct bigmess, it's always accompanied by
> "methods" struct bigmess *new_bigmess(), and
> int delete_bigmess(), that I write myself and that
> do all the ugly mallocing and freeing necessary,
> hiding all that housekeeping from the rest of the
> application. Lots of useful C++ ideas can be
> incorporated into C design (but I don't want to
> get into the naive argument, "then why use C?").

We do that (and more) in assembler and have been doing those things since
way before there ever was a language called C++. Those ideas aren't from
C++...

[toc] | [prev] | [next] | [standalone]


#18437

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2012-03-10 08:23 +0000
Message-ID<slrnjlm3ss.1ls.grahn+nntp@frailea.sa.invalid>
In reply to#18314
On Thu, 2012-03-08, JohnF wrote:
> Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
>> I'm mostly a C++ person, and in my current C project at work, the
>> worst aspect related to the language is all those malloced linked
>> lists. In C++ I would have chosen to use a std::vector<T> for
>> seriously better performance and reliability.
>> /Jorgen
>
> I'm mostly a C person, and I agree you have a point.
> Whenever I have a nontrivial data structure, let's
> call it struct bigmess, it's always accompanied by
> "methods" struct bigmess *new_bigmess(), and
> int delete_bigmess(), that I write myself and that
> do all the ugly mallocing and freeing necessary,
> hiding all that housekeeping from the rest of the
> application. Lots of useful C++ ideas can be
> incorporated into C design

But that's partly the thing I complain about above! If all you have is
  struct bigmess *new_bigmess();
then every single struct bigmess in your program is individually
malloc()ed. Not much fun, especially if you have many small structs
and structs-within-structs rather than few big ones.

You can of course complement new_bigmess() with a
  int init_bigmess(struct bigmess*);
so you can create them on the stack, in arrays or as parts of bigger
structs. This still doesn't solve the container problem though.

> (but I don't want to
> get into the naive argument, "then why use C?").

It's not naive (it's a good question) but it's something I try not to
bring up here. People who read c.l.c presumably want to read about C,
not about how some other language is better. (Knowing the shortcomings
of C compared to other languages is useful, though.)

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

[toc] | [prev] | [next] | [standalone]


#18254

FromGene <gene.ressler@gmail.com>
Date2012-03-05 18:53 -0800
Message-ID<a61a799e-e670-45b8-befd-b424d99ea266@l16g2000vbl.googlegroups.com>
In reply to#18226
On Mar 5, 8:21 am, John Coleman <jcole...@franciscan.edu> 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

[toc] | [prev] | [next] | [standalone]


#18255

FromJohnF <john@please.see.sig.for.email.com>
Date2012-03-06 04:45 +0000
Message-ID<jj44pt$fnd$1@reader1.panix.com>
In reply to#18226
John Coleman <jcoleman@franciscan.edu> 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:  j@f.com  where j=john and f=forkosh )

[toc] | [prev] | [next] | [standalone]


#18256

FromLuca Forlizzi <luca.forlizzi@gmail.com>
Date2012-03-06 00:11 -0800
Message-ID<1cc048a4-3342-420c-8a6e-ca29e0a98d3f@gw9g2000vbb.googlegroups.com>
In reply to#18226
On 5 Mar, 14:21, John Coleman <jcole...@franciscan.edu> 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.
>

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.

[toc] | [prev] | [next] | [standalone]


#18668

From"io_x" <a@b.c.invalid>
Date2012-03-13 13:09 +0100
Message-ID<4f5f3806$0$1382$4fafbaef@reader1.news.tin.it>
In reply to#18256
"Luca Forlizzi" <luca.forlizzi@gmail.com> ha scritto nel messaggio
news:1cc048a4-3342-420c-8a6e-ca29e0a98d3f@gw9g2000vbb.googlegroups.com...
On 5 Mar, 14:21, John Coleman <jcole...@franciscan.edu> 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.
>

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.

#e importante chiedere in questo NG aiuto sugli esercizi
#così si potranno apprendere dai 'vecchi' i loro trucchi...
#il non fare esercizi di persona e il non domandare aiuto in questo NG
#per me è errore
##.e



[toc] | [prev] | [next] | [standalone]


#18670

From"io_x" <a@b.c.invalid>
Date2012-03-13 13:20 +0100
Message-ID<4f5f3a97$0$1382$4fafbaef@reader1.news.tin.it>
In reply to#18668
"io_x" <a@b.c.invalid> ha scritto nel messaggio
news:4f5f3806$0$1382$4fafbaef@reader1.news.tin.it...
> #e importante chiedere in questo NG aiuto sugli esercizi
^^^^

é
e'

> #così si potranno apprendere dai 'vecchi' i loro trucchi...
> #il non fare esercizi di persona e il non domandare aiuto in questo NG
> #per me è errore
> ##.e



[toc] | [prev] | [next] | [standalone]


#18267

Fromjgk@panix.com (Joe keane)
Date2012-03-06 15:29 +0000
Message-ID<jj5ah2$4vg$1@reader1.panix.com>
In reply to#18226
In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
John Coleman  <jcoleman@franciscan.edu> 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.

[toc] | [prev] | [next] | [standalone]


#18273

FromKaz Kylheku <kaz@kylheku.com>
Date2012-03-06 19:44 +0000
Message-ID<20120306112013.426@kylheku.com>
In reply to#18226
On 2012-03-05, John Coleman <jcoleman@franciscan.edu> 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.

[toc] | [prev] | [next] | [standalone]


#18274

From"Charles Richmond" <netnews@aquaporin4.com>
Date2012-03-06 14:03 -0600
Message-ID<jj5qia$gat$1@dont-email.me>
In reply to#18226
"John Coleman" <jcoleman@franciscan.edu> 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       numerist@aquaporin4.com     |
+<><><><><><><><><><><><><><><><><><><>+ 

[toc] | [prev] | [next] | [standalone]


#18275

Fromjgk@panix.com (Joe keane)
Date2012-03-06 20:07 +0000
Message-ID<jj5qql$8fe$1@reader1.panix.com>
In reply to#18226
In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
John Coleman  <jcoleman@franciscan.edu> 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.

[toc] | [prev] | [next] | [standalone]


#18278

FromPatrick Scheible <kkt@zipcon.net>
Date2012-03-06 15:53 -0800
Message-ID<86zkbt8exl.fsf@zipcon.net>
In reply to#18275
jgk@panix.com (Joe keane) writes:

> In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
> John Coleman  <jcoleman@franciscan.edu> 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

[toc] | [prev] | [next] | [standalone]


#18279

FromKaz Kylheku <kaz@kylheku.com>
Date2012-03-07 05:39 +0000
Message-ID<20120306213532.983@kylheku.com>
In reply to#18278
On 2012-03-06, Patrick Scheible <kkt@zipcon.net> wrote:
> jgk@panix.com (Joe keane) writes:
>
>> In article <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
>> John Coleman  <jcoleman@franciscan.edu> 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.

Note: so was BASIC.

[toc] | [prev] | [next] | [standalone]


#18296

FromPatrick Scheible <kkt@zipcon.net>
Date2012-03-07 09:54 -0800
Message-ID<86ty205mbc.fsf@zipcon.net>
In reply to#18279
Kaz Kylheku <kaz@kylheku.com> writes:

> On 2012-03-06, Patrick Scheible <kkt@zipcon.net> wrote:
>> jgk@panix.com (Joe keane) writes:
>>
>>> In article
>>> <17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
>>> John Coleman  <jcoleman@franciscan.edu> 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.
>
> Note: so was BASIC.

The original BASIC sucked for major programs even more than Pascal :)

There were versions of BASIC and Pascal that were more usable, but they
had nonportable extensions.

-- Patrick

[toc] | [prev] | [next] | [standalone]


#18280

FromIan Collins <ian-news@hotmail.com>
Date2012-03-07 20:33 +1300
Message-ID<9roha7F3nhU1@mid.individual.net>
In reply to#18278
On 03/ 7/12 12:53 PM, Patrick Scheible wrote:
> jgk@panix.com (Joe keane) writes:
>
>> In article<17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
>> John Coleman<jcoleman@franciscan.edu>  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.

The first "major program" I worked on was written in DEC 
MicroPower/Pascal on a PDP11.  A surprisingly good environment for its 
day.  So with the right support, Pascal isn't too bad.

I'm somewhat surprised how little google has on it..

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#18281

FromFritz Wuehler <fritz@spamexpire-201203.rodent.frell.theremailer.net>
Date2012-03-07 10:29 +0100
Message-ID<d8bf9f54dc658afbb3e5643afd270f6d@msgid.frell.theremailer.net>
In reply to#18280
Ian Collins <ian-news@hotmail.com> wrote:

> On 03/ 7/12 12:53 PM, Patrick Scheible wrote:
> > jgk@panix.com (Joe keane) writes:
> >
> >> In article<17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>,
> >> John Coleman<jcoleman@franciscan.edu>  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.

The Wirth Pascal sucks because it's from Wirth, it's a teaching language,
it's a one pass compiler, and it is unsuited for doing any serious work
because of critical, built-in limitations. Kernighan (or was it Ritchie?)
wrote a paper that nails the coffin shut on the original without much effort.

> The first "major program" I worked on was written in DEC 
> MicroPower/Pascal on a PDP11.  A surprisingly good environment for its 
> day.  So with the right support, Pascal isn't too bad.

Extensions to Pascal have made it perfectly usable, depending on which
version you use. You can't say "Pascal is" or "Pascal isn't" anything until
you specify which implementation of Pascal you are talking about.

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.c


csiph-web