Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #112377 > unrolled thread
| Started by | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| First post | 2017-06-16 17:36 -0700 |
| Last post | 2017-06-21 00:25 +0800 |
| Articles | 20 on this page of 80 — 21 participants |
Back to article view | Back to comp.lang.c
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
Page 1 of 4 [1] 2 3 4 Next page →
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2017-06-16 17:36 -0700 |
| Subject | Help creating a C class |
| Message-ID | <f63da28b-5e80-4a02-bfa3-f8f68708ad8d@googlegroups.com> |
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.
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
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
Debugging
Language basics (types, macros, flow)
Language features (structs, output targets)
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?"
I would appreciate any input or guidance.
Thank you,
Rick C. Hodgin
[toc] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2017-06-17 02:16 +0000 |
| Message-ID | <oi23dh$ch2$2@news.xmission.com> |
| In reply to | #112377 |
In article <f63da28b-5e80-4a02-bfa3-f8f68708ad8d@googlegroups.com>,
Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote:
>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.
>
>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?
Prototyping main()
Not casting the return value of malloc()
--
Atheism:
It's like being the only sober person in the car, and nobody will let you drive.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-16 21:27 -0700 |
| Message-ID | <oi2asm$u70$1@dont-email.me> |
| In reply to | #112379 |
On 6/16/2017 7:16 PM, Kenny McCormack wrote: > In article <f63da28b-5e80-4a02-bfa3-f8f68708ad8d@googlegroups.com>, > Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote: >> 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. >> >> 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? > > Prototyping main() > > Not casting the return value of malloc() > Indeed! :^)
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-16 21:16 -0700 |
| Message-ID | <oi2a8u$t50$1@dont-email.me> |
| In reply to | #112377 |
On 6/16/2017 5:36 PM, Rick C. Hodgin wrote: > 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. > > 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 > 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 > Debugging > Language basics (types, macros, flow) > Language features (structs, output targets) > > 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?" > > I would appreciate any input or guidance. Just me two cents: Perhaps set a master goal for the class that ends in creating some sort of game. It tends to make the students excited and more eager to learn.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-17 12:24 -0700 |
| Message-ID | <oi3vek$v3m$1@dont-email.me> |
| In reply to | #112381 |
On 6/16/2017 9:16 PM, Chris M. Thomasson wrote: > On 6/16/2017 5:36 PM, Rick C. Hodgin wrote: >> 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. >> >> 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 >> 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 >> Debugging >> Language basics (types, macros, flow) >> Language features (structs, output targets) >> >> 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?" >> >> I would appreciate any input or guidance. > > Just me two cents: Perhaps set a master goal for the class that ends in > creating some sort of game. It tends to make the students excited and > more eager to learn. Oh my. I did not realize that you want to teach a one time, two hour class! Well, if so, Ben's advise to use a little graphics lib is most likely going to create a lot of interest. So, Rick, create a library for graphics and have the students plot some interesting things. Perhaps, Fractals? Not only would it get them interested, it would expose them to complex numbers and math. Imvvho, that's always a good thing! :^) Although, imvvho, two hours is just "not enough" time. You really need to hold multiple classes at two hours a piece.
[toc] | [prev] | [next] | [standalone]
| From | GOTHIER Nathan <nathan.gothier@gmail.com> |
|---|---|
| Date | 2017-06-17 08:06 +0200 |
| Message-ID | <20170617080636.fa7d5e0df9142d5212244b1e@gmail.com> |
| In reply to | #112377 |
On Fri, 16 Jun 2017 17:36:42 -0700 (PDT) "Rick C. Hodgin" <rick.c.hodgin@gmail.com> wrote: > I would appreciate any input or guidance. Do you really expect anybody would learn C in 2 hours? Actually I would only introduce the computer architecture and the binary algebra to be able to process data with any programming languages.
[toc] | [prev] | [next] | [standalone]
| From | Real Troll <real.troll@trolls.com> |
|---|---|
| Date | 2017-06-17 13:15 -0400 |
| Message-ID | <oi3o0e$1189$1@gioia.aioe.org> |
| In reply to | #112385 |
On 17/06/2017 07:06, GOTHIER Nathan wrote: > Do you really expect anybody would learn C in 2 hours? > > Actually I would only introduce the computer architecture and the binary > algebra Yes this is the surest way to put them off from learning programming!!!! > to be able to process data with any programming languages. One should start with writing "This is a test text" and then students can change the text to get them used to writing something different. Then teach them basic variables and how to scan from keyboard inputs and doing some simple Math (addition, subtraction, multiplication and division) and formatting the output. Teach them the difference between / and % and the result it could produce with ints. This is all you can learn in 2 hours. You also need to teach them "Visual" forms - buttons, text boxes etc to give them hope that they can create professional looking programs with Visual Studio or Embarcadero C++.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-17 12:27 -0700 |
| Message-ID | <oi3vjg$v3m$2@dont-email.me> |
| In reply to | #112400 |
On 6/17/2017 10:15 AM, Real Troll wrote: > On 17/06/2017 07:06, GOTHIER Nathan wrote: >> Do you really expect anybody would learn C in 2 hours? >> >> Actually I would only introduce the computer architecture and the binary >> algebra > Yes this is the surest way to put them off from learning programming!!!! > >> to be able to process data with any programming languages. > > One should start with writing "This is a test text" and then students > can change the text to get them used to writing something different. > > Then teach them basic variables and how to scan from keyboard inputs > and doing some simple Math (addition, subtraction, multiplication and > division) and formatting the output. Teach them the difference between > / and % and the result it could produce with ints. > > This is all you can learn in 2 hours. > > You also need to teach them "Visual" forms - buttons, text boxes etc to > give them hope that they can create professional looking programs with > Visual Studio or Embarcadero C++. Perhaps teach them how to write a little text adventure, with a map of a couple of locations. However, two hours is just not enough time.
[toc] | [prev] | [next] | [standalone]
| From | David Kleinecke <dkleinecke@gmail.com> |
|---|---|
| Date | 2017-06-17 12:49 -0700 |
| Message-ID | <3e9fad82-139d-495b-a8c4-d60c1d2cec0e@googlegroups.com> |
| In reply to | #112411 |
On Saturday, June 17, 2017 at 12:27:13 PM UTC-7, Chris M. Thomasson wrote: > On 6/17/2017 10:15 AM, Real Troll wrote: > > On 17/06/2017 07:06, GOTHIER Nathan wrote: > >> Do you really expect anybody would learn C in 2 hours? > >> > >> Actually I would only introduce the computer architecture and the binary > >> algebra > > Yes this is the surest way to put them off from learning programming!!!! > > > >> to be able to process data with any programming languages. > > > > One should start with writing "This is a test text" and then students > > can change the text to get them used to writing something different. > > > > Then teach them basic variables and how to scan from keyboard inputs > > and doing some simple Math (addition, subtraction, multiplication and > > division) and formatting the output. Teach them the difference between > > / and % and the result it could produce with ints. > > > > This is all you can learn in 2 hours. > > > > You also need to teach them "Visual" forms - buttons, text boxes etc to > > give them hope that they can create professional looking programs with > > Visual Studio or Embarcadero C++. > > Perhaps teach them how to write a little text adventure, with a map of a > couple of locations. However, two hours is just not enough time. It depends a lot on what you can assume the students already know. Some people need to be introduced to the idea of giving a series of instructions to follow. Given the idea of an algorithm IMO the next had nut is the idea of functions. Not everybody understands about them. Now you are ready to introduce actual coding.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-06-21 13:47 -0700 |
| Message-ID | <oielqr$53a$1@dont-email.me> |
| In reply to | #112412 |
On 6/17/2017 12:49 PM, David Kleinecke wrote: > On Saturday, June 17, 2017 at 12:27:13 PM UTC-7, Chris M. Thomasson wrote: >> On 6/17/2017 10:15 AM, Real Troll wrote: >>> On 17/06/2017 07:06, GOTHIER Nathan wrote: >>>> Do you really expect anybody would learn C in 2 hours? >>>> >>>> Actually I would only introduce the computer architecture and the binary >>>> algebra >>> Yes this is the surest way to put them off from learning programming!!!! >>> >>>> to be able to process data with any programming languages. >>> >>> One should start with writing "This is a test text" and then students >>> can change the text to get them used to writing something different. >>> >>> Then teach them basic variables and how to scan from keyboard inputs >>> and doing some simple Math (addition, subtraction, multiplication and >>> division) and formatting the output. Teach them the difference between >>> / and % and the result it could produce with ints. >>> >>> This is all you can learn in 2 hours. >>> >>> You also need to teach them "Visual" forms - buttons, text boxes etc to >>> give them hope that they can create professional looking programs with >>> Visual Studio or Embarcadero C++. >> >> Perhaps teach them how to write a little text adventure, with a map of a >> couple of locations. However, two hours is just not enough time. > > It depends a lot on what you can assume the students already > know. Some people need to be introduced to the idea of giving > a series of instructions to follow. Agreed. > Given the idea of an algorithm IMO the next had nut is the idea > of functions. Not everybody understands about them. > > Now you are ready to introduce actual coding. Right. I cannot see how this can be accomplished in a one time, two hour talk.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-06-17 12:03 +0100 |
| Message-ID | <874lve6flb.fsf@bsb.me.uk> |
| In reply to | #112377 |
"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.
[toc] | [prev] | [next] | [standalone]
| From | GOTHIER Nathan <nathan.gothier@gmail.com> |
|---|---|
| Date | 2017-06-17 13:38 +0200 |
| Message-ID | <20170617133801.2d2a916d795bb8b9ac01bd72@gmail.com> |
| In reply to | #112393 |
On Sat, 17 Jun 2017 12:03:44 +0100 Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: > 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. In less than a minute with K&R which could enable students to delve key features of the C language after the course. It's like a catechism with a Bible at hand. :-)
[toc] | [prev] | [next] | [standalone]
| From | "Pascal J. Bourguignon" <pjb@informatimago.com> |
|---|---|
| Date | 2017-06-17 14:11 +0200 |
| Message-ID | <m2mv96hl00.fsf@despina.home> |
| In reply to | #112377 |
"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.
>
> 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
> 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
> Debugging
> Language basics (types, macros, flow)
> Language features (structs, output targets)
>
> 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?"
>
> I would appreciate any input or guidance.
Yes, as mentionned by Ben, two hours is very short. You can already
discount half an hour for people to sit down, unpack, boot the
computers, for you to talk about stuff and tidbits, for the latecomers
to arrive, etc.
Since it's a beginner's course, basically, in two hours, you have barely
the time to have them write a single-function program such as:
#include <stdio.h>
int main(void){
char name[81];
printf("Hi, what's your name? ");
fflush(stdout);
scanf("%80s",&name);
printf("Hello, %s!\n",name);
int a=1;
int b=2;
int c=1;
int x=10;
int y=(a*x+b)*x+c;
printf("%dx^2+%dx+%d = %d for x=%d\n",a,b,c,y,x);
return 0;
}
Imagine the explaining you have to do here!
- explain preprocessor and include headers.
- explain no string and array of octets, with the nul-termination
convention.
- explain buffered I/O on terminals (fflush).
- explain printf and scanf simple format specifiers %s and %d.
- explain other integer types beside char.
If you've been lied to and you actually have people who have already
programmed, you could tell them about functions and trying to implement
a quadratic equation solver functions, and to punish them, ask them to
provide 0, 1, or 2 real solutions.
Oh, and you want to do that with MS-Windows? Forget it…
--
__Pascal J. Bourguignon
http://www.informatimago.com
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-06-17 16:20 +0100 |
| Message-ID | <87vanu4p5b.fsf@bsb.me.uk> |
| In reply to | #112395 |
"Pascal J. Bourguignon" <pjb@informatimago.com> writes:
> "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.
>>
>> 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
>> 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
>> Debugging
>> Language basics (types, macros, flow)
>> Language features (structs, output targets)
>>
>> 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?"
>>
>> I would appreciate any input or guidance.
>
> Yes, as mentionned by Ben, two hours is very short. You can already
> discount half an hour for people to sit down, unpack, boot the
> computers, for you to talk about stuff and tidbits, for the latecomers
> to arrive, etc.
>
>
> Since it's a beginner's course, basically, in two hours, you have barely
> the time to have them write a single-function program such as:
>
> #include <stdio.h>
> int main(void){
>
> char name[81];
> printf("Hi, what's your name? ");
> fflush(stdout);
> scanf("%80s",&name);
> printf("Hello, %s!\n",name);
>
> int a=1;
> int b=2;
> int c=1;
> int x=10;
> int y=(a*x+b)*x+c;
> printf("%dx^2+%dx+%d = %d for x=%d\n",a,b,c,y,x);
>
> return 0;
> }
>
>
> Imagine the explaining you have to do here!
I think that's the wrong objective. You just can't explain anything
worth explaining it two hours. The objective should be to show that
anyone can write programs that do interesting things in two hours. That
way they may be inspired. Explaining the C preprpcessor is pointless
and dull!
But we're somewhat blind here. It maybe that this is a two hour
introduction to a longer course in which case explaining things may well
be worth the time, but it seems that's not the case. Or maybe it's a C
taster being given alongside other two-hours taters for Python and
Haskell. It could be I am giving completely the wrong advice.
The important thing about functions is you can motivate them so
easily -- they are the key to what makes a program a program.
If you give the students:
#include <drawing>
int main()
{
paper_size(10, 10);
move_to(5, 5);
draw_by( 1, 0);
draw_by( 0, 1);
draw_by(-1, 0);
draw_by( 0, -1);
}
and have them /run it/ before explaining anything, you'll find you can
get away with very little explanation.
The have them write a program to draw four squares. Once they have don
that they ill understand this very quickly:
#include <drawing>
void draw_a_square()
{
draw_by( 1, 0);
draw_by( 0, 1);
draw_by(-1, 0);
draw_by( 0, -1);
}
int main()
{
paper_size(10, 10);
move_to(3, 3);
draw_a_square();
move_to(5, 5);
draw_a_square();
move_to(5, 5);
draw_a_square();
move_to(3, 5);
draw_a_square();
}
You may even have time to explain and motivate
void draw_a_square(int size)
{
draw_by( size, 0);
draw_by( 0, size);
draw_by(-size, 0);
draw_by( 0, -size);
}
If you also allow angles (draw_towards), closed curve filling and colour
setting with the simplest possible API, you can have some pretty amazing
drawings out of the first couple of classes (mine were 55 minutes so it
took a couple to get going).
<snip>
> Oh, and you want to do that with MS-Windows? Forget it…
Nowadays, I'd use a web interface so I could control everything about
the student environment, but originally this method had to be portable
between Unix (two versions) and Windows since students wanted to work at
home and no one had a Sun or HP workstation at home (in those days).
--
Ben.
[toc] | [prev] | [next] | [standalone]
| From | supercat@casperkitty.com |
|---|---|
| Date | 2017-06-17 10:39 -0700 |
| Message-ID | <7127170b-0c91-447d-8062-7671baa777a1@googlegroups.com> |
| In reply to | #112377 |
On Friday, June 16, 2017 at 7:36:50 PM UTC-5, Rick C. Hodgin wrote: > 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. First of all, it's necessary to decide what "C" means. Is it the low-level language that emerged for programming microcomputers in the 1990s, or the high-level language which emerged for programming high-end computers? The refusal of many people to acknowledge the existence of both languages has caused them to diverge quite substantially. Modern PCs share traits of both microcomputers and high-end computers, but unfortunately there seems to be little interest in unifying the two divergent strains of C into a dialect that combines the best features of both.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2017-06-17 17:05 -0700 |
| Message-ID | <21605b9b-f320-4598-94ab-d0725ef16f73@googlegroups.com> |
| In reply to | #112377 |
On Friday, June 16, 2017 at 8:36:50 PM UTC-4, Rick C. Hodgin wrote:
> 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.
>
> 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
> 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
> Debugging
> Language basics (types, macros, flow)
> Language features (structs, output targets)
>
> 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?"
>
> I would appreciate any input or guidance.
Here's what I've decided on for an outline:
-----[ Begin ]-----
Overview
For those with some programming experience, but a total C newbie, or
very limited C experience.
Learn the most powerful general purpose computer programming language
ever created: C
Invented in the early 1970s by Dennis Ritchie as a formal step above
early language chaos, and above the rigors of assembly language, C
quickly became popular as a way to easily translate human thought into
powerful machine expression. With major revisions in 1989, 1999, and
2011, most of the same code created at every point throughout C’s
existence can still be compiled today as is, with very little change.
During this class students will learn:
A brief history of C and its impact on the software world
How to create and run a program
The key parts of a C program
The key types of C data
Where to go to learn more
Requirements: Students will need to bring a computer* or have access
to one in the lab. * Note: Please contact Cyberia in advance if you
don’t have one and need to use theirs.
Material: Every student will receive an open source C compiler and
IDE they can take home and use to create their own C programs.
See: https://sourceforge.net/projects/openwatcom/files/current-build/
-----
Class Materials
The instructor's course material is available for download from:
http://www.visual-freepro.org/classes/c_101.html
-----
Points to Cover
Open Watcom IDE (Integrated Developer Environment)
- An all-in-one C coding tool
General concept of the compiler
General concept of the linker
C Headers and the C Standard Library
Writing your own "Hello, world!" program
Simple program to ask user their name, receive keyboard input, and
display it backwards.
Simple program to input two numbers, do some math, and display the
results.
-----
Class Outline
Introduction (10 min)
Overview of programming languages in general
Computer history and quickly evolving tools inearly days
Hardware
Software
Why have programming languages? Why not just machine assembly?
Why so many different programming languages?
Early programming languages, and the B programming language
Why a change was needed (and inevitable)
Download or install / copy the software (10 min)
Install tools from class CD (copy entire folder, or download
ZIP and unzip)
Make sure everyone can launch the Open Watcom IDE
Make sure everyone can load the HelloWorld project
Instructor walks through this example, plus steps of writing and
running a C program
Edit source code
Compile
Link
Run and debug
Philosophy of "Why C and not something else?" (10 min)
Instructor asks why are you here?
C is such a low level language.
It takes a lot of effort to write code, so:
Why would anyone ever want to use it?
What are the rewards?
Instructor answers, because C is:
Close to the machine's native language, and human speak
Very powerful expression of thought on data (you can do
anything in C)
Very fast (fastest compiled programming language --
except assembly)
The Key Parts of a C Program (75 min)
Examine our HelloWorld project
Explain int main(int argc, char* argv[])
Explain printf(), scanf(), and other functions
Instructor goes through the C language
Explains general programming forms:
Code and data
Variables and runtime memory
Functions and main
Parameters and local variables
Flow control
Explains edit and compile cycle
Explains why we link, and how to do it
Explains not just running software, but debugging it
C's relationship to data and data types
char, int, float, and double
signed and unsigned
limits on sizes, and why those limits exist
storage model used in memory, compared with a perceived
use in code
Runtime data
Addresses and pointers
Memory allocation with malloc() and free()
Arrays
Header files and the C Standard Library
Why header files?
ANSI C and cross-platform compatibility
Wrap up (15 min)
Review of C's history and impact
Review general parts of a C program
Some info about what can be expected in the next class
Intermediate - Intro to C -- Session 1 of 2, time: 2 hours
Basic debugging
Detailed tour through C language features
syntax variations
struct, enums, unions, bit structs
variadic parameters
advanced flow control
structured and unstructured
Intermediate - Intro to C -- Session 2 of 2, time: 2 hours
Advanced development
Advanced debugging
Overall philosophy of C as a language
Understanding by conceptualizing how C works
Understanding by thinking C through its features
Understanding by going at C front-to-back, back-to-front
Questions and Answers
Overtime (as needed)
Instructor will go over or extend any concepts students may
have missed
Instructor will answer any specific questions unrelated to
class material
Students receive a CD with an open source C compiler and integrated
developer environment, with all examples and material used in the
class, plus additional examples they can try on their own.
-----[ End ]-----
Any notes are appreciated.
Thank you,
Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2017-06-18 02:31 +0100 |
| Message-ID | <87o9tm3wu5.fsf@bsb.me.uk> |
| In reply to | #112417 |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com> writes: <snip> > Here's what I've decided on for an outline: > > -----[ Begin ]----- > Overview > > For those with some programming experience, but a total C newbie, or > very limited C experience. > > Learn the most powerful general purpose computer programming language > ever created: C Is that an interesting claim? It's probably irrefutable since no one but you will know what you mean by "powerful", but that also makes it a hermetic claim of little value to anyone but you. It sounds good, but will anyone know what it really means? There are lots of way to promote C, but that claim isn't one of them. > Invented in the early 1970s by Dennis Ritchie as a formal step above > early language chaos, and above the rigors of assembly language, C > quickly became popular as a way to easily translate human thought into > powerful machine expression. Obviously you will think I'm just being mean, but the first part of that is technically wrong and the second is mumbo-jumbo. C was invented to provide a simple systems programming language for small byte-addressed machines. It was a step up from B (and by implication BCPL), not from language chaos. The "rigors of assembly" were nothing to do with it. Assembly was rejected because they wanted a portable systems programming language. All this is documented in DMR's own writings. It did indeed become popular, but as a way of writing programs, not as a way to translate human though into powerful machine expression. (I can't even imagine what that means.) If you want to say something substantive you could say that it became popular because it was the right size at the right time. It rode both the wave that was the growth microprocessors and the wave that was growth if Unix (and successors). <snip> > to one in the lab. * Note: Please contact Cyberia in advance if you > don’t have one and need to use theirs. Is that anything to do with http://www.cyberiaeducation.org/ ? <snip> > Simple program to ask user their name, receive keyboard input, and > display it backwards. > Simple program to input two numbers, do some math, and display the > results. I abandoned input-based first exercises because C is not good in this area (for beginners). You end up with bad examples that you (or someone else) then has to un-teach, or you end up writing way more code than a simple example should have. There may be a "sweet spot" that is useful for beginners, but I never found it. It would be interesting to see what you suggest the students do here. > ----- > Class Outline > > Introduction (10 min) > Overview of programming languages in general > Computer history and quickly evolving tools inearly days > Hardware > Software > Why have programming languages? Why not just machine assembly? > Why so many different programming languages? > Early programming languages, and the B programming language > Why a change was needed (and inevitable) Now that's much closer to the actual history of C (if the questions you pose are answered with historical accuracy). <snip> > Philosophy of "Why C and not something else?" (10 min) > Instructor asks why are you here? > C is such a low level language. > It takes a lot of effort to write code, so: > Why would anyone ever want to use it? > What are the rewards? > Instructor answers, because C is: > Close to the machine's native language, and human speak > Very powerful expression of thought on data (you can do > anything in C) I think you know that I disagree with that. <snip> > The Key Parts of a C Program (75 min) > Examine our HelloWorld project > Explain int main(int argc, char* argv[]) Can't you omit argc and argv in the first examples? <snip> > Header files and the C Standard Library > Why header files? > ANSI C and cross-platform compatibility Is ANSI really relevant anymore? I'd call is ISO C. Even the first ANSI C is and ISO standard. <snip> > Any notes are appreciated. I thought you might be addressing programming, but it's clearly a language course. Nothing wrong with that, but not my preferred emphasis for people with little experience. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2017-06-17 21:37 -0700 |
| Message-ID | <9b963224-4bd1-419b-bd77-ad2d58804e9e@googlegroups.com> |
| In reply to | #112421 |
On Saturday, June 17, 2017 at 9:32:05 PM UTC-4, Ben Bacarisse wrote: > Is that anything to do with http://www.cyberiaeducation.org/ ? No. Thank you, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2017-06-19 11:24 -0700 |
| Message-ID | <794cc19b-7889-469d-ac24-28d2012db5d3@googlegroups.com> |
| In reply to | #112421 |
On Saturday, June 17, 2017 at 9:32:05 PM UTC-4, Ben Bacarisse wrote:
> "Rick C. Hodgin" <rick.c.hodgin@gmail.com> writes:
> > to one in the lab. * Note: Please contact Cyberia in advance if you
> > don’t have one and need to use theirs.
>
> Is that anything to do with http://www.cyberiaeducation.org/ ?
It is Cyberia Makerspace. They are a local Indianapolis, IN group
that has construction facilities for makers of all kinds. There are
hardware product makers working on prototypes, model train people,
3D printing, local coders, artists, comic book designers, etc.
It's basically a place where creative people can gather together,
express themselves, and help one another on their projects.
http://www.clubcyberia.com
I met them through an event they had at their location:
https://www.meetup.com/Hackster-Hardware-Meetup-Indianapolis/
They have woodworking, metalworking, machining, laser cutting, 3D
printing, miscellaneous hardware diagnostic equipment for Arduino
/ FPGA developers, a large plotter, individual rooms for temporary
rent during project development, overhead projector for presentations,
even a large stage for full productions for about 100 people.
Full membership is $60 per month with 24/7/365 access.
Thank you,
Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2017-06-18 15:15 +0200 |
| Message-ID | <oi5u72$7t3$1@dont-email.me> |
| In reply to | #112377 |
On 17/06/17 02:36, Rick C. Hodgin wrote: > 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. > > 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 > 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 > Debugging > Language basics (types, macros, flow) > Language features (structs, output targets) > > 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?" > > I would appreciate any input or guidance. > > Thank you, > Rick C. Hodgin > My first thought is are you introducing C to programmers, or are you introducing non-programmers to programming? If these folks are already familiar with programming, then what is they background? And if they are not programmers, then C is almost certainly the wrong programming language to be using for newbies - and /absolutely/ the wrong choice if you want to teach it in 2 hours while leaving anyone with an impression other than "that's way too complicated for me". My first choice would be Python (though there are alternatives that would do an equally good job). With C, you'll be an hour and a half before they've got a "Hello world" program running with any feeling for what the code actually means. With Python, you'll be at that stage in a few minutes. And by the end of the class you'll have then drawing turtle graphics with simple variables, functions and loops.
[toc] | [prev] | [next] | [standalone]
Page 1 of 4 [1] 2 3 4 Next page →
Back to top | Article view | comp.lang.c
csiph-web