Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How do I Teach Programming

  1. Aug 15, 2014 #1

    TheDemx27

    User Avatar
    Gold Member

    Hello,

    I have been one of the founders of a new after school tech club (god I wish there was a physics club), and have been told by the advising teacher that they would like it if I taught some programming language as part of the program. I'm choosing Python of course.

    The main trouble here is that I am afraid I will go too fast, or use indecipherable terminology, or otherwise discourage what will probably be a rather meager turnout in the first place. I have never taught completely new material like this to anyone before. How do I go about it? Should I prepare lectures and demonstrations or have people follow along with me as I project my screen on a whiteboard?

    tldr:

    Is there good material you know of that teaches people how to teach programming?
    Any recommendations on how to attract people to the class (other than the usual flyers)?
    What would you consider the best method of teaching?

    One thing I know I have on my side is that I would be a teacher who is passionate about the subject. So that's a plus.
     
  2. jcsd
  3. Aug 15, 2014 #2
    What's the age of the target audience?

    Anyway, you could follow an existing book, for example "Python for Kids" or, if you want a book that you can get for free and every student can get for free, you could go for "Dive into Python".
     
  4. Aug 15, 2014 #3

    TheDemx27

    User Avatar
    Gold Member

    High school students, probably sophomore to senior.
     
  5. Aug 15, 2014 #4

    chiro

    User Avatar
    Science Advisor

    My suggestion is to focus on state space and flow control. Build each up slowly adding more complexity and variability with every new lesson and project.

    With state-space you are looking at your variables, data structures, access of variables within the code and
    how they are laid out within the code and also within functions and interfaces. Focus on how information is
    accessed, partitioned, and ultimately how it is actually used.

    With flow-control you look at the flow of execution of code. Again start simple and add more and more
    complexity with every lesson or assignment.

    You will have to tailor the above to the language of choice. You can do the above with any language but obviously different languages deal with complexity and actual programming in their own way.

    I would also suggest you use some tools to help people understand state-space and flow control. Some stuff from the field of software engineering may help with this (like UML diagrams and structures). Understanding
    how data flows, how execution flows, how data is built on simpler structures, and how it's accessed is
    easily recognizable with simple UML type structures.

    In addition to this I would also look at the potential values of each variable/structure and how that contributes to affecting the execution of the program which includes not only intended functioning but also unintended functioning. This includes initializing variables and making sure that one checks for all errors and values that
    should be and should not be set.

    The kind of examples are up to you and obviously should depend on the class and students themselves.
     
  6. Aug 15, 2014 #5

    jtbell

    User Avatar

    Staff: Mentor

    Spend some time at the beginning, demonstrating the development environment that you're using, and watching over their shoulders as they enter and run a simple "hello world" type program. When I taught C++, one of the first course sessions was a lab devoted to this. We used a plain Unix-type command line interface (tcsh shell, as I recall), so they had to learn how to log in, create source files with a simple text editor (pico), invoke the g++ compiler, and run the compiled executable file. Also basic housekeeping stuff: how to create directories (folders), navigate between them, list their contents, and delete files.
     
  7. Aug 16, 2014 #6

    rcgldr

    User Avatar
    Homework Helper

    Link to an old thread with a programming puzzle that only has 4 types of instructions. It should help with the basic concepts of programmming, although dealing with a limitation (in this case only 10 addressable locations) isn't a common aspect of programming anymore.

    https://www.physicsforums.com/showthread.php?t=561124
     
    Last edited: Aug 16, 2014
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook