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 1 of 3  [1] 2 3  Next page →


#18226 — Recommendation for a text

FromJohn Coleman <jcoleman@franciscan.edu>
Date2012-03-05 05:21 -0800
SubjectRecommendation for a text
Message-ID<17597176.384.1330953683846.JavaMail.geo-discussion-forums@ynca15>
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

[toc] | [next] | [standalone]


#18227

Fromjacob navia <jacob@spamsink.net>
Date2012-03-05 15:27 +0100
Message-ID<jj2igs$8f0$2@speranza.aioe.org>
In reply to#18226
Le 05/03/12 14:21, John Coleman a écrit :
>
You can use my compiler system and its associated text book:
"An introduction to C programming using lcc-win".

It has several advantages:

o It is free of charge (the compiler AND the introduction)
o It starts from the ground up, but covers sophisticated topics
   like in-depth floating point analysis, memory allocation strategies
   and many others.

o It is geared to lcc-win but all extensions of lcc-win are clearly 
marked as extensions.

I am sure many people in this group will start complaining about it
and propose you gcc or some variant. Just ignore them :-)

You can judge yourself by downloading it from

http://www.cs.virginia.edu/~lcc-win32

To download the introduction only, click on the "Tutorial" button.

Jacob

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


#18240

FromKleuske <kleuske@nowhere.net>
Date2012-03-05 20:09 +0000
Message-ID<jj36hf$em2$1@dont-email.me>
In reply to#18227
On Mon, 05 Mar 2012 15:27:43 +0100, jacob navia saw fit to publish the
following:

> Le 05/03/12 14:21, John Coleman a écrit :
>>
> You can use my compiler system and its associated text book: "An
> introduction to C programming using lcc-win".
> 
> It has several advantages:
> 
> o It is free of charge (the compiler AND the introduction) o It starts
> from the ground up, but covers sophisticated topics
>    like in-depth floating point analysis, memory allocation strategies
>    and many others.
> 
> o It is geared to lcc-win but all extensions of lcc-win are clearly
> marked as extensions.
> 
> I am sure many people in this group will start complaining about it and
> propose you gcc or some variant. Just ignore them :-)
> 
> You can judge yourself by downloading it from
> 
> http://www.cs.virginia.edu/~lcc-win32
> 
> To download the introduction only, click on the "Tutorial" button.
> 
> Jacob


Shamelessly promoting your own stuff isn't exactly "advice".


-- 
Fascinating is a word I use for the unexpected.
		-- Spock, "The Squire of Gothos", stardate 2124.5

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


#18244

FromJohn Coleman <jcoleman@franciscan.edu>
Date2012-03-05 12:29 -0800
Message-ID<5073919.1216.1330979348060.JavaMail.geo-discussion-forums@ynbq18>
In reply to#18240
On Monday, March 5, 2012 3:09:19 PM UTC-5, Kleuske wrote:
> On Mon, 05 Mar 2012 15:27:43 +0100, jacob navia saw fit to publish the
> following:
> 
> > Le 05/03/12 14:21, John Coleman a écrit :
> >>
> > You can use my compiler system and its associated text book: "An
> > introduction to C programming using lcc-win".
> > 
> > It has several advantages:
> > 
> > o It is free of charge (the compiler AND the introduction) o It starts
> > from the ground up, but covers sophisticated topics
> >    like in-depth floating point analysis, memory allocation strategies
> >    and many others.
> > 
> > o It is geared to lcc-win but all extensions of lcc-win are clearly
> > marked as extensions.
> > 
> > I am sure many people in this group will start complaining about it and
> > propose you gcc or some variant. Just ignore them :-)
> > 
> > You can judge yourself by downloading it from
> > 
> > http://www.cs.virginia.edu/~lcc-win32
> > 
> > To download the introduction only, click on the "Tutorial" button.
> > 
> > Jacob
> 
> 
> Shamelessly promoting your own stuff isn't exactly "advice".
> 
> 
> -- 
> Fascinating is a word I use for the unexpected.
> 		-- Spock, "The Squire of Gothos", stardate 2124.5

What is "shameless" about promoting something that you are justly proud of,
especially when it is on-topic? Also - note that I specifically mentioned Jacob
by name in my original post since I thought an idea he had discussed (last fall?) was a promising idea for teaching. That made the mention of his text
quite natural in his reply.

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


#18286

FromArifulHossain tuhin <etothepowerpi@gmail.com>
Date2012-03-07 06:19 -0800
Message-ID<27602202.4568.1331129945105.JavaMail.geo-discussion-forums@pbcr5>
In reply to#18240
On Tuesday, March 6, 2012 2:09:19 AM UTC+6, Kleuske wrote:
> On Mon, 05 Mar 2012 15:27:43 +0100, jacob navia saw fit to publish the
> following:
> 
> > Le 05/03/12 14:21, John Coleman a écrit :
> >>
> > You can use my compiler system and its associated text book: "An
> > introduction to C programming using lcc-win".
> > 
> > It has several advantages:
> > 
> > o It is free of charge (the compiler AND the introduction) o It starts
> > from the ground up, but covers sophisticated topics
> >    like in-depth floating point analysis, memory allocation strategies
> >    and many others.
> > 
> > o It is geared to lcc-win but all extensions of lcc-win are clearly
> > marked as extensions.
> > 
> > I am sure many people in this group will start complaining about it and
> > propose you gcc or some variant. Just ignore them :-)
> > 
> > You can judge yourself by downloading it from
> > 
> > http://www.cs.virginia.edu/~lcc-win32
> > 
> > To download the introduction only, click on the "Tutorial" button.
> > 
> > Jacob
> 
> 
> Shamelessly promoting your own stuff isn't exactly "advice".
> 
> 
> --
> Fascinating is a word I use for the unexpected.
> 		-- Spock, "The Squire of Gothos", stardate 2124.5


Right now i'm trying to install his lcc-win through wine. and i've downloaded the pdf already. It seems logical to promote it because both of the guys are interested in "using c" in

On Tuesday, March 6, 2012 2:09:19 AM UTC+6, Kleuske wrote:
> On Mon, 05 Mar 2012 15:27:43 +0100, jacob navia saw fit to publish the
> following:
> 
> > Le 05/03/12 14:21, John Coleman a écrit :
> >>
> > You can use my compiler system and its associated text book: "An
> > introduction to C programming using lcc-win".
> > 
> > It has several advantages:
> > 
> > o It is free of charge (the compiler AND the introduction) o It starts
> > from the ground up, but covers sophisticated topics
> >    like in-depth floating point analysis, memory allocation strategies
> >    and many others.
> > 
> > o It is geared to lcc-win but all extensions of lcc-win are clearly
> > marked as extensions.
> > 
> > I am sure many people in this group will start complaining about it and
> > propose you gcc or some variant. Just ignore them :-)
> > 
> > You can judge yourself by downloading it from
> > 
> > http://www.cs.virginia.edu/~lcc-win32
> > 
> > To download the introduction only, click on the "Tutorial" button.
> > 
> > Jacob
> 
> 
> Shamelessly promoting your own stuff isn't exactly "advice".
> 
> 
> -- 
> Fascinating is a word I use for the unexpected.
> 		-- Spock, "The Squire of Gothos", stardate 2124.5

the tools jacob mentioned seems built for using c in educational environment. original author of the post also has the same motive. so mentioning it seems quite logical. it may hurt hard core programmers who despise source level debuggers does hex arithmetic by hand. 

although jacob's compiler has a commercial license which is not making it easy for me to make the point for jacob. :)

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


#18241

FromJohn Coleman <jcoleman@franciscan.edu>
Date2012-03-05 12:37 -0800
Message-ID<19481535.945.1330979870599.JavaMail.geo-discussion-forums@yner4>
In reply to#18227
On Monday, March 5, 2012 9:27:43 AM UTC-5, jacob navia wrote:
> Le 05/03/12 14:21, John Coleman a écrit :
> >
> You can use my compiler system and its associated text book:
> "An introduction to C programming using lcc-win".
> 
> It has several advantages:
> 
> o It is free of charge (the compiler AND the introduction)
> o It starts from the ground up, but covers sophisticated topics
>    like in-depth floating point analysis, memory allocation strategies
>    and many others.
> 
> o It is geared to lcc-win but all extensions of lcc-win are clearly 
> marked as extensions.
> 
> I am sure many people in this group will start complaining about it
> and propose you gcc or some variant. Just ignore them :-)
> 
> You can judge yourself by downloading it from
> 
> http://www.cs.virginia.edu/~lcc-win32
> 
> To download the introduction only, click on the "Tutorial" button.
> 
> Jacob

Thanks for the offer but I tend to use Textpad + gcc (via MinGW) for my
own programming and don't want to spend time learning a different environment
between now and then. Also - the fact that lcc-win32 has an IDE is a bit of a
drawback from my perspective since as a side-purpose of the class I think that
it is good that the students get more exposure to command-line tools.

-John

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


#18247

From"BartC" <bc@freeuk.com>
Date2012-03-05 21:33 +0000
Message-ID<jj3bf8$fps$1@dont-email.me>
In reply to#18241
"John Coleman" <jcoleman@franciscan.edu> wrote in message 
news:19481535.945.1330979870599.JavaMail.geo-discussion-forums@yner4...

> Thanks for the offer but I tend to use Textpad + gcc (via MinGW) for my
> own programming and don't want to spend time learning a different 
> environment
> between now and then. Also - the fact that lcc-win32 has an IDE is a bit 
> of a
> drawback from my perspective since as a side-purpose of the class I think 
> that
> it is good that the students get more exposure to command-line tools.

I've been using lccwin32 for at least ten years, and I've never used it's 
IDE. Although I also use mingw/gcc for a 'second opinion' (as my C work is 
mostly experimental).

-- 
Bartc 

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


#18229

FromJohn Coleman <jcoleman@franciscan.edu>
Date2012-03-05 06:52 -0800
Message-ID<14394840.524.1330959178998.JavaMail.geo-discussion-forums@ynca15>
In reply to#18226
On Monday, March 5, 2012 9:35:34 AM UTC-5, Stefan Ram wrote:
> John Coleman <jcoleman@franciscan.edu> writes:
> >I will be running a special topics course with the title
> >"Modern C Programming"
> 
>   What does »modern« suggest in this context?
> 
> >pointers, malloc, and the safe handling of C-style strings
> 
>   This is classic, traditional C.
> 
> >C99
> 
>   This is obsolete (canceled and replaced by ISO/IEC 9899:2011).
> 
> >One idea that I had was to concentrate on the Mandelbrot Set.
> 
>   That was the height of fashion some decades ago. There is nothing
>   wrong with that. But why then, of all things, you choose »modern«
>   to title your class?

The choice of the word "modern"

1) The subtitle to King's text.
2) "Advanced" sounded too pretentious
3) I wanted to emphasize to prospective students that C is not some language that was replaced by C++ in the 80s but is rather still heavily used and is furthermore a language which has (incrementally) evolved from the language which was (more-or-less) a subset of C++. Finally, I have as one of my course goals the teaching of methods to prevent buffer overflows, which is more of a concern now than when K&R was written.
4) As I indicated in my post, I was aware that my Mandelbrot set example should either be supplemented or even replaced by other projects which have a more computer-science flavor.

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


#18249

FromIan Collins <ian-news@hotmail.com>
Date2012-03-06 10:50 +1300
Message-ID<9rkqomFg0kU2@mid.individual.net>
In reply to#18229
On 03/ 6/12 04:36 AM, Stefan Ram wrote:
> John Coleman<jcoleman@franciscan.edu>  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 dying.

C and C++ still dominate the embedded and non-windows system programming 
space, neither is dying and one hasn't replaced the other.

-- 
Ian Collins

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


#18271

Fromjgharston <jgh@arcade.demon.co.uk>
Date2012-03-06 09:43 -0800
Message-ID<1374c9ea-e0f3-4dfd-b9c0-99b45fa0cf7a@gi10g2000vbb.googlegroups.com>
In reply to#18249
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

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


#18272

FromChina Blue Water Navy <chine.bleu@yahoo.com>
Date2012-03-06 10:58 -0800
Message-ID<chine.bleu-5EEC69.10583906032012@news.eternal-september.org>
In reply to#18271
In article 
<1374c9ea-e0f3-4dfd-b9c0-99b45fa0cf7a@gi10g2000vbb.googlegroups.com>,
 jgharston <jgh@arcade.demon.co.uk> wrote:

> 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. ;)

If I was teaching non-CS students who don't plan to become programmers, I would 
concentrate on something like Wirth, Gries, or Dijkstra and how to think 
algorithmickally rather than on the trivialities of one language.

-- 
My name Indigo Montoya.      |    R'lyeh 38o57'6.5''S 102o51'16''E.
You flamed my father.        |       I'm whoever you want me to be.
Prepare to be spanked.       |  Annoying Usenet one post at a time.
Stop posting that!           |    At least I can stay in character.

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


#18282

Fromnick_keighley_nospam@hotmail.com
Date2012-03-07 01:38 -0800
Message-ID<7551117.1780.1331113133760.JavaMail.geo-discussion-forums@vbw15>
In reply to#18271
On Tuesday, March 6, 2012 5:43:27 PM UTC, jgharston wrote:
> 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. ;)

I've programmed semi-embedded on Windows. In C++.

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


#18260

Fromnick_keighley_nospam@hotmail.com
Date2012-03-06 04:28 -0800
Message-ID<6916282.5362.1331036905694.JavaMail.geo-discussion-forums@vbkl3>
In reply to#18229
On Monday, March 5, 2012 3:36:39 PM UTC, Stefan Ram wrote:
> John Coleman <jcoleman@franciscan.edu> 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/Measuring_programming_language_popularity
> 
>   .

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


#18232

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2012-03-05 17:37 +0000
Message-ID<0.174f4868fe134def357c.20120305173710GMT.87d38r54qh.fsf@bsb.me.uk>
In reply to#18226
John Coleman <jcoleman@franciscan.edu> writes:
<snip>
> 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++.

Be careful to point out why one would use C.  Far too often, C is seen
as the "hard stuff" to get hooked on when the C++ high has worn off, but
that does a disservice to the students.  C has niche uses: it's small so
there are environments where other languages won't work, and it's a sort
of lowest common denominator that can be useful for writing libraries to
link with almost any other language, but it is rarely the right choice
for a "normal" application.  (These are not the only use-cases but the
point should be made that C is hard to use correctly and that must
be justified when choosing it.)

> 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.

I can't help much here, but do you have to pick only one?  The bookshop
might be able to stock both on a sale-or-return basis and you can then
explain the merits of each and the students can decide.

> 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).

So many...  Regexp matching is fun and can be posed as a simple exercise
with lots of optional extras for those who like to do more.  I.e. write
Unix's grep command.

I've had fun with poker hand exercises:

  $ choose-winner 2h4s5c7d8d kskh3c3d3s 4h5h6h7h8h
  4h5h6h7h8h

You can make it harder by using a "hold 'em" format and/or getting into
probabilities with partial hands.

A small language interpreter can also be good fun.  Two very simple ones
are SKI combinators and a cut down lambda calculus (essentially a micro
Lisp).  Depending on the student's background you can sometimes get as
far as a very simple compiler for a C subset.  You pretty much have to
provide an interpreter for an invented machine to which they must
compile the code, so there's quite a setup cost for you.

Image processing can also be very enjoyable.  I like to pick an easy to
read and write format like PPM (at least to start with).  You can then
have a whole range of exercises like contrast enhancement, rotation or
even steganography.  There a very rich vein there.

One of the key determining factors will be the students.  If they are
all art majors, SKI combinators will just bomb!

-- 
Ben.

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


#18237

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2012-03-05 18:15 +0000
Message-ID<0.bbe8cd5f541f5672fa63.20120305181555GMT.877gyy6hic.fsf@bsb.me.uk>
In reply to#18232
ram@zedat.fu-berlin.de (Stefan Ram) writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>link with almost any other language, but it is rarely the right choice
>>for a "normal" application.  (These are not the only use-cases but the
>>point should be made that C is hard to use correctly and that must
>>be justified when choosing it.)
>
>   But what do you use for a »normal application«?

That would depend on the context.  A GTK Linux application?  I'd use
Vala.  A .NET application in Windows?  C# probably.  Something that must
run on all sorts of systems?  C++ would be a starting point worth
considering.

>   I would like to say »Java«, but the Java people say that Java is
>   disappearing from the desktops and has moved on to web servers.
>
>   (Also, I am not sure what defines a »normal application«.
>   To a young student, it's an »app«? So learn Objective-C for iOS?)

I agree that definitions are a problem and that I could have been
clearer.  Maybe this is better: too many people struggle to write some
program or other in C, simply because of a misconception that C is what
the really advanced people use.

-- 
Ben.

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


#18238

FromNomen Nescio <nobody@dizum.com>
Date2012-03-05 20:15 +0100
Message-ID<ebcd3c8dd3431de8ec422556f7d58824@dizum.com>
In reply to#18232
I've been noticing the English is reprehensible in K&R II. The first edition
wasn't great but the errors in the 2nd edition are indeed egregious and now
I find it difficult to read because of the glaring errors. Has anyone else
noticed this or did somebody butcher the copy I ripped off from the 'net
(serves me right for not paying?) I do have a paid copy of the first
edition, well worn btw. Was just too lazy to go looking for the 2nd so
ripped one off from the comfort of my easy chair.

> but it is rarely the right choice for a "normal" application.

This should be at the front of every C textbook but it's far, far too late
for that...

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


#18250

FromIan Collins <ian-news@hotmail.com>
Date2012-03-06 10:55 +1300
Message-ID<9rkr2eFg0kU3@mid.individual.net>
In reply to#18232
On 03/ 6/12 06:44 AM, Stefan Ram wrote:
> Ben Bacarisse<ben.usenet@bsb.me.uk>  writes:
>> link with almost any other language, but it is rarely the right choice
>> for a "normal" application.  (These are not the only use-cases but the
>> point should be made that C is hard to use correctly and that must
>> be justified when choosing it.)
>
>    But what do you use for a »normal application«?
>
>    I would like to say »Java«, but the Java people say that Java is
>    disappearing from the desktops and has moved on to web servers.

Common sense does prevail sometimes!

>    (Also, I am not sure what defines a »normal application«.
>    To a young student, it's an »app«? So learn Objective-C for iOS?)

That really depends on the environment.  In the Unix world, Python is 
becoming increasingly popular for utilities that used to be written in C.

-- 
Ian Collins

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


#18233

FromKeith Thompson <kst-u@mib.org>
Date2012-03-05 09:38 -0800
Message-ID<lnsjhn54ow.fsf@nuthaus.mib.org>
In reply to#18226
ram@zedat.fu-berlin.de (Stefan Ram) writes:
> John Coleman <jcoleman@franciscan.edu> writes:
>>I will be running a special topics course with the title
>>"Modern C Programming"
>
>   What does »modern« suggest in this context?
>
>>pointers, malloc, and the safe handling of C-style strings
>
>   This is classic, traditional C.
>
>>C99
>
>   This is obsolete (canceled and replaced by ISO/IEC 9899:2011).

Officially, yes, but if you have a C11 compiler lying around I'd like to
know about it.

C99 is as modern as you can get these days -- and even that is *too*
modern if you want to compile your code with Microsoft's compiler.

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

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


#18234

FromKeith Thompson <kst-u@mib.org>
Date2012-03-05 09:43 -0800
Message-ID<lnobsb54fx.fsf@nuthaus.mib.org>
In reply to#18226
John Coleman <jcoleman@franciscan.edu> writes:
> 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. 
[...]

It's helpful to add line breaks so your lines are no longer than
80 columns, preferably 72.  Some Usenet clients deal with very long
lines just fine, but others don't.  (Mine, for example, wraps long
lines, but not at word boundaries.

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

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


#18242

FromJohn Coleman <jcoleman@franciscan.edu>
Date2012-03-05 12:41 -0800
Message-ID<33541862.861.1330980094847.JavaMail.geo-discussion-forums@ynee13>
In reply to#18234
Than

On Monday, March 5, 2012 12:43:30 PM UTC-5, Keith Thompson wrote:
> John Coleman <jcoleman@franciscan.edu> writes:
> > 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. 
> [...]
> 
> It's helpful to add line breaks so your lines are no longer than
> 80 columns, preferably 72.  Some Usenet clients deal with very long
> lines just fine, but others don't.  (Mine, for example, wraps long
> lines, but not at word boundaries.
> 
> -- 
> Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
>     Will write code for food.
> "We must do something.  This is something.  Therefore, we must do this."
>     -- Antony Jay and Jonathan Lynn, "Yes Minister"

Thanks for the tip - I'll try to keep it in mind, though it might be somewhat
hard when posting via an editor that has a small window size and automatic 
word wrap. Hard - but not that hard I guess.

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


Page 1 of 3  [1] 2 3  Next page →

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


csiph-web