[K12OSN] Teaching Programming Languages

Robert Arkiletian robark at gmail.com
Tue Mar 6 18:07:54 UTC 2007


I think this should be a new thread.

---------- Forwarded message ----------
From: Robert Arkiletian <robark at gmail.com>
Date: Mar 6, 2007 9:38 AM
Subject: Re: [K12OSN] Dropbox directory permissions
To: "Support list for open source software in schools." <k12osn at redhat.com>


On 3/6/07, Joe Korzeniewski <jkorz at mceschools.com> wrote:
> This is kind of a caveat....
>
> Robert,
>
> What grade level are you teaching them programming (I am assuming python) at? Did you find the curriculum or develop it yourself? Is this most of your students' first exposure to programming or are they introduced to it in lower grades with kturtle or something similar? I am trying to get our school to teach something other than keyboarding and office to our students and I think programming would be perfect. Anybody else having any luck with programming classes?
>
>



Yes, this is my first year teaching Python. In years past I taught
C++. I switched because Python is so much easier for kids to
understand and therefore it keeps more kids interested in continuing.
Take a look at this example which compares some languages.
http://www.cs.sfu.ca/news/events/psc/io/
I teach two courses, junior and senior. The junior course has no
prereq. and is open to grades 10-12. I assume my juniors know nothing.
The senior course has the junior course as a prereq. I developed the
curriculum myself. My courses are actually a combination of Linux
command line stuff and Python. For a Python textbook I am using "Byte
of Python" PDF by Swaroop. Command line stuff includes things like ls,
mv, cp, tar, id, chmod, vi, finger, permissions, ssh, wc, piping,
grep, find, and so on. At first my students think these two topics are
not related. Then about 2/3 of the way through the junior course I
introduce (import os and sys) So they can start making system calls
and use command line args from within a python script. Very fun! In my
senior course I get into object oriented programming and gui's. In the
past I tried teaching FLTK in C++ but found there was too much C++
overhead to teach high school kids. So next year I am planning to
teach pyFLTK. pyFLTK is basically the same as FLTK but in python and
without the overhead of pointers, dynamic memory allocation and
destructors. Look at this  simple object oriented pyFLTK program. It
shows how widgets can talk to each other.

#!/usr/bin/python
from fltk import *

class MyApp(Fl_Window):
       def __init__(self, w, h, label):
               Fl_Window.__init__(self, w, h, label)

               self.begin()

               self.button1 = Fl_Button(95, 5, 140, 50)
               self.button1.label("Not clicked yet")
               self.button1.callback(self.button1callback)
               self.button1.color(FL_BLUE)

               self.input1 = Fl_Input(95, 90, 140, 50)
               self.input1.label("Input box")

               self.end()

       def button1callback(self, widget):
               widget.label(self.input1.value())

Fl.scheme("plastic")
app = MyApp(450, 155, "Widget communication")
app.show()
Fl.run()


-- 
Robert Arkiletian
Eric Hamber Secondary, Vancouver, Canada
Fl_TeacherTool http://www3.telus.net/public/robark/Fl_TeacherTool/
C++ GUI tutorial http://www3.telus.net/public/robark/




More information about the K12OSN mailing list