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


Groups > comp.lang.c > #112393

Re: Help creating a C class

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Help creating a C class
Date 2017-06-17 12:03 +0100
Organization A noiseless patient Spider
Message-ID <874lve6flb.fsf@bsb.me.uk> (permalink)
References <f63da28b-5e80-4a02-bfa3-f8f68708ad8d@googlegroups.com>

Show all headers | View raw


"Rick C. Hodgin" <rick.c.hodgin@gmail.com> writes:

> I'm interested in teaching a beginning C class to a group of about ten
> students ranging in age from teenager through sixty years old.

The previous knowledge and skills are much more important than the age
range.  Without knowing that I'm going to take a punt that this is for
people with little experience of programming.

> It will be two hours, and I was wondering if any of you would like to
> contribute some ideas for an outline for a class like that?
>
> My initial thinking is:
>
>     Brief history of C
>     C's impact on computer languages

For a two-hour course I'd say all this is a waste of time but I suppose
you can cover it in a few minutes.

>     The build process (high level)
>     Basic structure of a C source file
>     Header files and the C Standard Library
>     Edit our first "Hello world" program
>     Compiling
>     Linking
>     Running

I suggest you automate all of these so as not to take up time explaining
them.  I'd present a simple web interface with a "do it" button.  If
there's a syntax error -- filter the output to show only the first one.
Compile with gcc's -fsanitize-undefined options and/or run with
valgrind, again filtering the output to highlight the first run-tome
error.

>     Debugging
>     Language basics (types, macros, flow)
>     Language features (structs, output targets)

I'd start with functions.  If you provide a good framework you can get
students doing fun things (and that's the key here -- fun) within a
couple of hours.

I did this using a very simple graphics framework.  The students then
learn how calling functions and writing simple loops enable complex and
interesting patterns to be drawn.  You can get started with only the
simplest overview of data because you are concentrating on action and
composition.  The only data in these first programs are function
arguments except for the counter that C forces on the programmer when
writing a for loop.

Graphics is not the only way to go, but providing a framework that lets
people do interesting things quickly seems to me to be the key to
avoiding boredom.  No more temperature conversion programs, please!
This is particularly important when using a low-level language like C.

> I would give them a free / open source integrated C compiler with
> built-in editor and debugger to run on Windows.  I would take them
> through the basic philosophy of "Why C?" and "How C?"

For what sounds like a "taster" course, the philosophy is maybe a bit
much.

Obviously you should know why you are using C, but it's unlikely you can
explain to people who know very little about programming how C fits into
the panoply of languages or justify why you are using it for the course.
Of course if I'm wrong about the experience level and these are all
students who've done, say, an introduction to programming course that
will change.

I wrote a conference paper out this once, but it was before the web was
a big thing I don't think it has been preserved in electronic form.

<snip>
-- 
Ben.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-16 17:36 -0700
  Re: Help creating a C class gazelle@shell.xmission.com (Kenny McCormack) - 2017-06-17 02:16 +0000
    Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-16 21:27 -0700
  Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-16 21:16 -0700
    Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-17 12:24 -0700
  Re: Help creating a C class GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-17 08:06 +0200
    Re: Help creating a C class Real Troll <real.troll@trolls.com> - 2017-06-17 13:15 -0400
      Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-17 12:27 -0700
        Re: Help creating a C class David Kleinecke <dkleinecke@gmail.com> - 2017-06-17 12:49 -0700
          Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-21 13:47 -0700
  Re: Help creating a C class Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-06-17 12:03 +0100
    Re: Help creating a C class GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-17 13:38 +0200
  Re: Help creating a C class "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-06-17 14:11 +0200
    Re: Help creating a C class Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-06-17 16:20 +0100
  Re: Help creating a C class supercat@casperkitty.com - 2017-06-17 10:39 -0700
  Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-17 17:05 -0700
    Re: Help creating a C class Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-06-18 02:31 +0100
      Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-17 21:37 -0700
      Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 11:24 -0700
  Re: Help creating a C class David Brown <david.brown@hesbynett.no> - 2017-06-18 15:15 +0200
    Re: Help creating a C class bartc <bc@freeuk.com> - 2017-06-18 15:02 +0100
      Re: Help creating a C class David Brown <david.brown@hesbynett.no> - 2017-06-18 17:18 +0200
        Re: Help creating a C class bartc <bc@freeuk.com> - 2017-06-18 17:04 +0100
          Re: Help creating a C class David Brown <david.brown@hesbynett.no> - 2017-06-18 23:06 +0200
    Re: Help creating a C class GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-19 01:05 +0200
      Re: Help creating a C class Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-06-18 19:28 -0400
        Re: Help creating a C class GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-19 01:31 +0200
        Re: Help creating a C class Jerry Stuckle <jstucklex@attglobal.net> - 2017-06-18 21:28 -0400
          Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-18 18:39 -0700
            Re: Help creating a C class Chad <cdalten@gmail.com> - 2017-06-18 23:42 -0700
              Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 01:30 -0700
                Re: Help creating a C class Chad <cdalten@gmail.com> - 2017-06-21 09:33 -0700
              Re: Help creating a C class gazelle@shell.xmission.com (Kenny McCormack) - 2017-06-19 10:48 +0000
            Re: Help creating a C class David Brown <david.brown@hesbynett.no> - 2017-06-19 11:11 +0200
              Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 02:25 -0700
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 03:17 -0700
                Re: Help creating a C class David Brown <david.brown@hesbynett.no> - 2017-06-19 12:42 +0200
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 05:35 -0700
                Re: Help creating a C class bartc <bc@freeuk.com> - 2017-06-19 14:51 +0100
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 07:03 -0700
                Re: Help creating a C class David Kleinecke <dkleinecke@gmail.com> - 2017-06-19 17:31 -0700
                Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-19 17:47 -0700
                Re: Help creating a C class bartc <bc@freeuk.com> - 2017-06-20 10:25 +0100
                Re: Help creating a C class Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-06-19 14:09 +0100
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 06:13 -0700
                Re: Help creating a C class Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-06-19 17:05 +0100
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-19 09:15 -0700
                Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-21 13:30 -0700
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 14:29 -0700
                Re: Help creating a C class Richard Damon <Richard@Damon-Family.org> - 2017-06-30 10:15 -0400
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-30 07:33 -0700
        Re: Help creating a C class David Brown <david.brown@hesbynett.no> - 2017-06-19 11:28 +0200
      Re: Help creating a C class "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-18 16:42 -0700
      Re: Help creating a C class raltbos@xs4all.nl (Richard Bos) - 2017-06-26 06:04 +0000
        Re: Help creating a C class David Kleinecke <dkleinecke@gmail.com> - 2017-06-26 09:15 -0700
  Re: Help creating a C class joel.rees@gmail.com - 2017-06-18 17:35 -0700
  Re: Help creating a C class Leon Taylor <leontaylor476@gmail.com> - 2017-06-19 05:59 -0700
  Help creating a C class asetofsymbols@gmail.com - 2017-06-19 07:53 -0700
  Re: Help creating a C class John Bode <jfbode1029@gmail.com> - 2017-06-20 07:16 -0700
    Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-20 07:45 -0700
  Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-20 23:20 +0800
    Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-20 08:40 -0700
      Re: Help creating a C class gazelle@shell.xmission.com (Kenny McCormack) - 2017-06-20 16:22 +0000
        Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 00:27 +0800
        Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-20 09:34 -0700
          Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 00:38 +0800
            Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-20 09:43 -0700
              Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 21:37 +0800
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 06:58 -0700
                Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 22:10 +0800
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 08:08 -0700
                Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 23:20 +0800
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 08:24 -0700
                Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 23:27 +0800
                Re: Help creating a C class "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 08:39 -0700
                [OT] "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 23:46 +0800
                Re: [OT] "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 09:03 -0700
                Re: [OT] "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-22 00:15 +0800
                Re: [OT] "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-25 22:59 +0800
      Re: Help creating a C class "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-21 00:25 +0800

csiph-web