Re: Question: What makes Perl _better_ than Python ?

2007-02-17 חוט guy keren

Jonathan Orlev wrote:

Hello everybody,


I don't have knowledge of Perl nor do I know Python.


I have experience with Bash scripting, Windows Batch ("Eichs") and VBScript.


My question is this:


I need to learn some scripting language for mostly, but not only, 
administrative tasks and other automation programs.



Perl, Python, (and Ruby?) are the obvious candidates.


I think I know what makes Python better than Perl.


But what really want to know is this:


In what things/aspects does Perl better than Python?


Does it have some advantages over Python? When should I choose Perl over 
Python? (language-wize, ignore any "external" issues such as 
availability, previous familiarity with the langs, performance, the need 
to maintain existing code, etc').



Do you think Python is better than Perl in every aspect, so one should 
always learn Python and not Perl?



I am asking it here because many of you probably have knowledge and 
experience with both languages, and since you prefer Python, you are 
probably more aware to Perl 's advantages and strengths over Python (and 
not only vice versa).



ThanQ,


Jonathan Orlev



why do you think "you all preffer python"? i don't - i'm the perl troll 
who joined here because i started using python as a hobby.


from the little i managed to play with python - it is far easier to use 
it to develop general applications - because the objects in python make 
sense, while in perl they are designed as a kludge. writing a checkers 
game in python felt quite intuitive - i wouldn't have tried doing the 
same thing in perl.


however, for automating programs, for parsing texts and for 
administrative tasks - perl has the edge. the code just almost "writes 
itself", and there are many CPAN modules (read: standard library of 
modules) to add support for many features that are needed during such 
tasks - i found myself using many such CPAN modules in various 
situations - sometimes those that came with the operating system's perl 
distribution - and sometimes using others, for more specific tasks.


--guy


Re: wiki page hacked?

2006-09-09 חוט guy keren

well, be reasonable. when the key is hanging right outside the
front-door, no thief will try to break in through the back.

that's the price for an open wiki.

--guy

On Sat, 2006-09-09 at 07:45 -0700, Ido Abramovich wrote:
> the main wiki page was changed to this:
> 
> http://www.python.org.il/mediawiki/index.php?title=Main_Page&oldid=2913
> 
> now, I don't know if they only changed the page as any normal user can
> do, but I think that it's worth investigating.
> 
> Ido.
> 



Re: Plone

2006-05-28 חוט guy keren

by the way, just a question: i installed plone on some host a few weeks
ago, and found that when moving an item from one position in the hierarchy
to another, a link to in in another page is broken. i wonder if this is a
configuration issue, or a "feature" of plone.

if it's something that can be fixed via configuration, i guess it'll be a
good idea to do that in advance.

--guy

On Sun, 28 May 2006, Eli Golovinsky wrote:

> Date: Sun, 28 May 2006 11:05:19 +0200
> From: Eli Golovinsky <[EMAIL PROTECTED]>
> Reply-To: python@linux.org.il, Eli Golovinsky <[EMAIL PROTECTED]>
> Cc: python@linux.org.il
> Subject: Re: Plone
>
> We've installed it, but there are some configuration issues.
>
> I'll have more tomorrow at which point we would be able to make an
> informed decision which way is best.
>
>
> Amit Aronovitch wrote:
>
> >As I said earlier, if it's few more days, no worries.>
> >If it's a few months (maybe even if it's few weeks - say, more than 3?)
> >we should probably start working on Mikhail's server in Russia (no need
> >to point the DNS - we could use a link from our current site for the
> >transition period). Then, when the new host will be available we can
> >simply move the contents, as Ofer had explained.
> >
> >  Amit
> >
>

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy



python course - progress report (5th meeting)

2005-12-12 חוט guy keren

below is a summary of the yesterday's lesson, followed by my conclusions.

yesterday we were supposed to teach about ifs and about strings. amit
pointed out that in the ifs part i rely on some strings knowledge and i
should reverse the order, so i did that.

in the class, i found that teaching about strings took longer then i
thought. the use of 'for' loops got the kids confused - they didn't find
it easy to grasp the idea that the for variable points to a different item
in each loop. i only realized this when i explained how to use such a for
loop in order to reverse a string (by which point they had to understand
two things - how the for loop works, how string concatenation can be
performed from a variable into itself (revstr = letter + revstr), and how
the reversal happens at all.

we had to draw it step by step over the blackboard for things to be clear,
and even then it wsn't clear for everyone (at least according to the
puzzled looks on their faces).

the rest of the lesson was spent on doing the exersize (they didn't get at
first what i wanted them to do. only when they realized what i did to
limit them, did they start understanding what i want them to do).
eventually some of them managed to draw some interesting things.

some lessons i learned form this:

1. every thing should be dry-runned with the kids (i already did that with
   them last week, but this week emphasied that it has to cover
   _everything_).

2. in the dry run of a loop, i should perform a dry-run for 2-3
   iterations, and then i need to pick up specific kids and ask them to
   describe the next iteration. this makes sure they indeed understand
   what is going on (and just so you'l know - they had problems even after
   this - it's not as if they pulled out the description too easily).

3. i need to teach the kids to talk in precise terms (i.e. not "the word
   is concatenated to the letter and then you get 'eh'". rather "the
   character named 'letter' is concatenated from the left to the word
   named 'revstr', and then you get 'eh' - and you call that 'revstr'
   now").

4. the empty string realy confused them. since i didn't think about it in
   advance, i was puzzled about how to explain what an empty string is.
   need to prepare a good analogy for such abstract things next time (and
   lets face it - there are no intuitive "empty strings" in real life.
   no - a blank note is not exactly the same as an "empty string").

5. the material in what i thought to be a "mini-lesson" can be sufficient
   for a whole session (the class begun at 17:11, and ended at 18:57).
   this. this was not the case last week (int variables alone are not
   sufficient for a whole session - together with the while loops they
   were sufficient).

6. lesson from last week's exercise class (which got messed up due to
   other reasons) - i should not expect the kids to write a program with
   nested while loops, before they had good practice of single while
   loops, and before i showed meaningful examples of nested wihle loops in
   class. thus, i will write a mini-lesson to cover nested while-loops -
   it won't teach new python keywords - but it will teach new programming
   concepts - nested while-loops and two-dimentional drawings.

7. another lesson from last week's exercise class - for each exercise, i
   should write an explanation how to do it (breaking it into parts,
   explaining what each part should do, and which constructs that we
   learned it should use). as we make progress, i will try to make these
   descriptions less detailed, and see if the kids manage to close the
   gaps properly.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


RE: teaching python variables

2005-12-04 חוט guy keren

On Sun, 4 Dec 2005, RaeNye wrote:

> Nir wrote:
> >Why use "thing"? simply talk about "list1"
> >Set the first item of list1 to the number 1
>
> This is where you bluntly mislead the students.
> "list1" is /nothing/ but the object it's currently binded to, and it's ultra
> important that they understand this.

oh... now i need to explain the word "bind"? :)

i hate this word - it sounds too bombastic. it also does not come from
normal life - in normal life, you dont bind names - you just call your
bear "teddy". and binding is not exactly the same as "calling by name":

if i call my bear teddy, and then i go and tear its head, and its legs and
arms and stomach - is it still teddy? in python, if i name a list object
'teddy' and then i delete most of the list's items, it is still called
'a', regardless of any emotions i have towards this list.

please understand that "intuitive" is an illusion - any analogy that
you'll bring will have some exceptions, which you'll have to explain
eventually. which is why i'd rather explain things explicity, then count
on the intuition of the pupils. and since i cannot explain everything,
eventually i have to tell them "try it out and see how it works".

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: mutability

2005-12-04 חוט guy keren

On Sun, 4 Dec 2005, Amit Aronovitch wrote:

> Rereading my essay, I think I begin to understand where the "mutable -
> immutable" comments come from
> (You see - it was even useful to ME ;-) )

if you simply let the link i sent you sink in - you'll see part of the
light.

i will still insist on using the name variables, because i want my pupils
to be able to quickly switch to new programming languages in the future,
and not have a fixation about "how things were in python, and why it
doesn't work in C". by not telling them there are other things, i will
only create confusion in the long-run.

eventually, they have to realize that what is important is not how you
call something, but rather what it does.

>  If we stick to "examples should only use code that does useful things"
> (one of the best tips I recently learned from you :-) ), you'll only be
> able to see any difference between the two variable models if your
> objects are mutable. List is the first multable type in this course, so
> nowyour comments make more sense to me.

if you judge what i write without looking at the entire course, then
you'll miss the point. unlike my pupils, i expect you to see the big
picture all the time ;)

and by the way, i am going to teach about about changing lists -
programming is very limited if you don't change objects. i can show you my
checkers game, in which i take advantage of this feature (and which is
what led me to figure out this references issue in python, in the first
place).

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: teaching python variables

2005-12-04 חוט guy keren

good, good. i think we have a candidate for writing the slides for meeting
11 (even thought i already spoke with amit about doing it - he might agree
to switch ;)  ).

what sais you?

--guy

On Sun, 4 Dec 2005, Nir Soffer wrote:

>
> On 4 Dec, 2005, at 2:09, RaeNye wrote:
>
> >> Why use this strange name "mlist_a"? Instead use:
> >> multiple_lists = [list1, list2]
> >
> > I don't see a problem with Guy's name selection. I consider your
> > suggestion
> > worse, as the object called "multiple_lists" is, in fact, a single
> > list that
> > contains two other lists. You might call the outer list "nested_list"
> > or
> > "outer_list", but "multiple_lists" has nothing to do with the object
> > itself.
>
> "lists" will be a better name. But why the names in this code are so
> lousy? because its not a concrete example, its too abstract. Using real
> life examples can make everything more clear.
>
> For example, bart simpson downloaded our first game, and lisa created a
> list of scores for each family member:
>
>  >>> lisa_scores = [90, 85, 80]
>  >>> bart_scores = [50, 65]
>  >>> homer_scores = [] # too stupid to play
>  >>> marge_scores = [] # too busy
>
> # Lets keep all the scores in one list
>  >>> simpsons_scores[lisa_scores, bart_scores, homer_scores,
> marge_scores]
>
> Now we can ask questions about it:
>
> What were lisa scores?
>  >>> simpsons_scores[0]
> [90, 85, 80]
>  >>> lisa_scores
> [90, 85, 80]
>
> they look equal...
>  >>> simpsons_scores[0] == lisa_scores
> True
>
> They are.
>
> Is it the samelist of a copy?
>  >>> simpsons_scores[0] is lisa_scores
> True
>
> This answer the question, what happens when you do list = [foo, bar] -
> you create reference to the objects.
>
> homer and marge have both empty list. They must be equal:
>  >>> homer_scores== marge_scores
> True
>
> But they are not the same list:
>  >>> homer_scores is marge_scores
> False
>
> lisa teach homer to play, and add some scores:
>  >>> homer_scores.append(10)
>
> the simpsons_scores list updated:
>  >>> simpsons_scores
> [[90, 85, 80], [50, 65], [10], []]
>
> homer_scores and simpsons_scores[2] reference the same list object
> (which Python manage for us somewhere in the memory)
>
> homer tries again, made some improvement:
>  >>> homer_scores.append(11)
>  >>> simpsons_scores
> [[90, 85, 80], [50, 65], [10, 11], []]
>
> bart is not happy with lisa results:
>  >>> del lisa_scores
>  >>> lisa_scores
> Traceback (most recent call last):
>  File "", line 1, in ?
> NameError: name 'lisa_scores' is not defined
>
> That was evil!
>
>  >>> simpsons_scores
> [[90, 85, 80], [50, 65], [10, 11], []]
>
> F**k! they are still there!? hmm, lisa_scores was not the list, its
> only a name, the list is still there. This is exactly what Python told
> us just now: "NameError: name 'lisa_scores' is not defined".
>
> lisa fixes the situation
>  >>> lisa_scores = simpsons_scores[0]
>  >>> lisa_scores
> [90, 85, 80]
>
> Now [[90, 85, 80], [50, 65], [10, 11], []] is a lousy way to keep this
> kind of data, because we have to remember the order of the family
> members. This leads naturally to dicts - because we need it NOW to
> write simpler and more readable code.
>
>
> I hope it helps, It was fun to write :-)
>
>
> Best Regards,
>
> Nir Soffer
>

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


RE: teaching python variables

2005-12-04 חוט guy keren

On Sun, 4 Dec 2005, RaeNye wrote:

> Alas, the *concept* of reference is common to the human mind and human
> language!

so your initial claim of being able to explain the examples without using
references, is false.

so we now agree that we need to teach two concepts: names and references.

now comes the next issue:

you can change a list.
you can't change a number.
you can't change a string.
you can't change a tuple.

in order to explain this, i will use the 'mutable' Vs. 'immutable' issue.

do you have a way to aovid that?

the rest of what you write is not realy important, except for one point
that i will emphasize:

> Why don't you complain about the following line of code?
> >>> a = [1, 1]
> It shows the exact same "problem" - how can the number 1 appear twice in the
> same list?

when a person thinks about the number '1', they do NOT think of it as an
object. thus, they are not surprised to see it used twice in a list. the
concept that even a single number is an object is not something natural -
you don't think of "1+2" as "1.add(2)" (i.e. as an operation of 'add 2' on
the object '1'). you just think of the operationg of adding `1 and 2
together. you only consider it when you learn about languages such as
smalltalk (which started this "everything is an object" concept. in
smalltalk there are no operators. in order to perform addition, you write
something like:

[1 add: 2]

(i.e. send the message 'add:' to the object '1', supplying the object '2'
as a parameter).

since python is not pure about the syntax, we don't need to be pure about
explaining things.

> Surely you wouldn't even consider the thought that these are different
> "instances" of the number 1 (although this might be true in other
> programming languages);

actually - this is exactly what i wold have thought before being taught
programming - that you can use the number 1 here, and there, and i'd not
even bother thinking that they are the same '1'.

> Your concept of what a list /is/ should be ready to accept an object
> appearing as multiple elements in it.

in other words - references. that's what i wanted to show in the first
place - thanks for helping ;)

> I don't say the concept of reference is avoidable. I only refuse to present
> it as a special thing.

when you teach programming - everything must be explicit. what you think
is intuitive - is intuitive in a different way to different people.
avoiding talking about something does not make it clear.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


RE: teaching python variables

2005-12-03 חוט guy keren

On Sun, 4 Dec 2005, RaeNye wrote:

> Please verify that I use the same explanation for each syntactic form (list
> constructor, __setitem__, assignment operator).
> Also, please see that I refrain from mentioning variables and references.

ok, no references, you say. now let us go directly to the 3rd example:

> Scenario 3:
> 
>  >>> list1 = [1, 2]
>  >>> list2 = [3, 4]
> We create two lists, named "list1"and "list2" respectively (with the
> obvious content: the number 1 ...)
>
>  >>> mlist_a = [list1, list2]
> We create a list built of the object named "list1" and the object named
> "list2" (which are the same two lists created above). We call it "mlist_a".
>
>  >>> print mlist_a
>  [[1, 2], [3, 4]]
> Obvious.
>
>  >>> mlist_a[1] = list1
> We change the thing called "mlist_a" (which happens to be the object we
> created two sentences ago) by replacing its first element to the object
> named "list1".
> Note that now the object named "mlist_a" contains the same object as both
> the first and the seconds element: a list that consists of the number 1 and
> the number 2.

ok. an object containing the same element twice. you're using the concept
of reference, without using the word reference. to me this sounds like
breaking the rules. otherwise, how can an object contain the same object
twice? does it contain two copies of this object? or perhaps it contains 2
references to the same object?

and then what happens if i go and change list1[0] to be '3'? it changed
twice, didn't it? so the object named mlist_a actually references the
object named list1, right?

can you explain this thing without mentioning the word "reference", as
well as without using the concept "reference"?

note that i didn't even mention things like iterators, slices (which
create a new list containing references to some of the members of an
existing list), etc.

i don't see how references can be avoided (as a concept, not just by not
using the name).

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: teaching python variables

2005-12-03 חוט guy keren

On Fri, 2 Dec 2005, Amit Aronovitch wrote:

> Meta
> 
> In this essay I'll try to clearly state some of my ideas about variables in
> python and how to teach the subject to students new to programming.

lets cut the long talks. in order for me to understand what you're trying
to do, i would like you to explain the following scenarios using the
terms you're suggesting:

Scenario 1:
   >>> list1 = [2, 3]
   >>> list1[0] = 1
   >>> print list1
   [1, 3]

Scenario 2:
   >>> a = 1; b = 2; c = 3
   >>> list1 = [a, b, c]
   >>> list2 = [b, c]
   >>> print list1
   [1, 2, 3]
   >>> print list2
   [2, 3]

Scenario 3:
   >>> list1 = [1, 2]
   >>> list2 = [3, 4]
   >>> mlist_a = [list1, list2]
   >>> print mlist_a
   [[1, 2], [3, 4]]
   >>> mlist_a[1] = list1
   >>> print mlist_a
   [[1, 2], [1, 2]]


-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


update on course at hatzor

2005-12-02 חוט guy keren

last time on "[EMAIL PROTECTED]":

we had meeting 1 done, it went ok, with ~20 pupils. there were too many
slides, and the 2nd "live demonstration" was found to be a bit
over-complicated to perform.

today's episode "2 for the money, 3 for the flaw":

on the 2nd meeting (which was a tools learning one, with linux file
commands and jed), there were 10 pupils (9 kids and one teacher). there
were more dropouts then i expected, but it's ok. they managed to cover the
tools, and the 2 teachers (our two tel-hai college students) found that it
was very tirying going among the kids. eventually, it was summarized as
"ok". they had to cut off on a few things due to lack of time. slides are
not yet on the web site - i'll put them after i edit them.

on the 3rd meeting (which was the first one to actually touch python), we
only had 4 pupils. after waiting we found the rest didn't drop - they just
had a big math exam the next day, were kept for extra lessons in school
without prior warning... so we went ahead with 4 kids.

we managed to teach the material as written in the slides, but had to skip
the 'nested while loops' exaple (i think it's too early to introduce it
here - a single while loop proved hard enough).

what i found was that asking the kids to make mental leaps at this stage
was a bad idea. i also saw that showing examples that don't do anything
useful puzzles the kids. finally, having an endless loop in putty via
windows XP got the putty window completely stuck, and windows working
slowly, and forced me to kill putty via the task-manager - a wasted 30
seconds, which is _a lot_ in our time frame, and which distracts the kids
attention completely.

i should update the slides so that we'll demo doing a simple while loop
that counts from 1 to 5, and then ask the kids to do variations on this
loop - count to 10, count in reverse, count only even numbers (2, 4,
6...). these variations proved mentally-challenging enough for the kids.

this sunday, ariella and asaf (our tel-hai students) will give the 4th
meeting, together with a re-run of meeting 3 for the kids that missed it -
so i hope we'll be back in sync for the 5th meeting.

notes about mini-slides - help with writing them is still needed. amit
aronovich has written the slides for meeting 3 and is working on another
meeting now, and i'm doing the rest so far. note that if you vulanteer for
this, you must:

1. use the same format and formatting program we arleady use.
2. be prepared to be commented to death - i have no mercy, and i emphasize
   very specific points that might seem trivial or not important to you.
   i do this, since eventually i'll have to face the results of badly
   written slides. patience is required, as well as christian
   forgiveness ;)

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


slides for python-in-school meeting5 are ready

2005-11-17 חוט guy keren

at http://users.actcom.co.il/~choo/python/, under the 'slides and material
for lectures', 3nd entry.

comments are welcome.

one note: it is the first meeting in which we use the python library
(time.sleep()). i do NOT want to explain what the library is here, since
we didn't yet teach about functions and objects. i just want the minimum
that will allow the pupils to feel ok with using the function - talking
about the standard python library should be delayed to 9th meeting, or
later.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


first lesson summary

2005-11-14 חוט guy keren

we gave the first lesson yesterday in the afternoon in hatzor.

we begun about 12 minutes late - partially because we waited for the late
kids, partly because of me. the lesson ended about 15 minutes too late -
so it all fit in the time expected, just begun too late. i did skip one of
the slides - should have skiped more.

the first part went ok, including the robot exercise. it wasn't as funny
as i hoped, because the kids are brave when they sit in their chairs, but
very shy when they need to get up.

in the second part, the 'live while loop' exercise proved a bit too
complicated - i almost gave up on it, but decided to see it through. after
doing it once for them, they managed to get it (more or less) done on the
2nd round. one caveat - the kids were chosen because they came to the
class after the break too late - 3 late kids just when i looked for 3
kids. the knight who sais "Ni!" refused to say "Ni!" - so instead he said
"yes" (in a very shy voice...). conclusions:

  1. next time, just make it "the one who sais 'yes'".
  2. next time, it'd be better that the teacher gives them the condition,
 and make it wrong (off by 1) - and then let the class find how it
 should have be fixed - and then make a 2nd round with the fix.

more conclusions:

1. a few slides should be removed from this lecture in order to make it
   more 'at ease' - and be able to finish on time even when starting too
   late.

2. the objects part can be safely removed - the example i gave was indeed
   a bit weak, and the issue is too subtle to explain at this point.

i'll get the slides updated on the site, for anyone that needs it for the
future.

p.s. we have around 20 kids in the class - some of them seem unfit (with
regards to their seriousness) - i assume we'll start seeing drop-outs when
they see that we came to learn, not to play.

p.p.s we're still trying to recruite more pupils from another school - i
hope it'll work out.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-11-13 חוט guy keren

On Sun, 13 Nov 2005, Beni Cherniavsky wrote:

> Date: Sun, 13 Nov 2005 11:18:11 +0200
> From: Beni Cherniavsky <[EMAIL PROTECTED]>
> To: guy keren <[EMAIL PROTECTED]>
> Cc: Beni Cherniavsky <[EMAIL PROTECTED]>, python@linux.org.il
> Subject: Re: updated python material - start of python reference
>
> On Sun, 2005-11-13 at 09:14 +0200, guy keren wrote:
> > On Sun, 13 Nov 2005, Beni Cherniavsky wrote:
> >
> > > * I'm introducing modules quite early - I had to, to allow them to
> > > write the small games you mentioned.Should we perhaps say
> > > something general about them before they are casually used?
> >
> > modules? i didn't say anything about modules. the plan sais nothing about
> > modules. i don't want them to write modules at all.
> >
> > all the programs to be written this year will be in a singlefile, no
> > 'module'.
> >
> > the only thing we need to teach them is 'import', since they are required
> > to use 'sys', 'time' and perhaps a few others...
> >
> That's what I meant - I'm introducing ``import`` briefly in order for
> them to access random.randrange() and time.sleep().My question was,
> should I explain the ``import`` statement not so in-passing?

you're writing a reference - not a user manual. as such, you should
emphasize on syntax and usage examples - not on explaining how commands
work.

i'll consider this issue when writing the slides of the first lecture that
deals with import. i do not intend to delve into the issue of modules too
deeply...

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy



Re: updated python material - start of python reference

2005-11-12 חוט guy keren

On Sun, 13 Nov 2005, Beni Cherniavsky wrote:

> On Sun, 2005-11-13 at 04:40 +0200, guy keren wrote:
> > i made another small update to the lessons plan. i also took benny's
> > current 'reference document' and placed on the site (after bumping the
> > version number to 0.4.0).
>
> It's not going as fast as I would want but I mostly merged the new plan
> into the reference.As usual,
>
> http://opensvn.csie.org/hazor_python/cben-reference/

i'll check this later today.

> Made the lessons chapters (getting docutils' TOC for free), fixed some
> small things.Small points that made me wonder:
>
> * Is jed the editor you settled on?

yes. that'll be the editor.

i think we'll need to hand out a printed reference of a 'quick card' of it
to users - thought the important things can be done via the menus (which
is why i went for jed).

> * I'm introducing modules quite early - I had to, to allow them to
> write the small games you mentioned.  Should we perhaps say
> something general about them before they are casually used?

modules? i didn't say anything about modules. the plan sais nothing about
modules. i don't want them to write modules at all.

all the programs to be written this year will be in a single file, no
'module'.

the only thing we need to teach them is 'import', since they are required
to use 'sys', 'time' and perhaps a few others...

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy



Re: moving the python course material to python.org.il

2005-11-12 חוט guy keren

On Sun, 13 Nov 2005, Arik Baratz wrote:

> On 11/13/05, guy keren <[EMAIL PROTECTED]> wrote:

> > 1. i'd want to have a simply link leading to it (e.g.
> >  www.python.org.il/school/ or something similar).
>
> Hi Guy
>
> I control the python.org.il zone - perhaps you'd like to have
> school.python.org.il or something similar.

a sub-domain alone won't help me - i disk space to put the material
itself, and a reliable way to have the material updated - it is still all
work-in-progress, and will be that way for the next few month...

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


moving the python course material to python.org.il

2005-11-12 חוט guy keren

hi,

i'd like to move the python course material to python.org.il. however, in
order for this to be feasible:

1. i'd want to have a simply link leading to it (e.g.
   www.python.org.il/school/ or something similar).

2. i'd need to either be able to update the contents directly myself, or
   have someone _responsive_ to update it there (responsive = can
   usually perform updates within 24 hours of a request, if provided the
   updated pages).

what do y'all say?

please note that my current site has a limited quota, and i'll soon run
out of it - so i need to move the material to some other place - and i
think python.org.il is the best place for such a thing (it's python, and
it's for israel due to usage of hebrew).

any comments/suggestions/objections?

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


license question + another small lessons-plan update

2005-11-12 חוט guy keren

i made another small update to the lessons plan. i also took benny's
current 'reference document' and placed on the site (after bumping the
version number to 0.4.0).

we still have not figured out which license to use for the documents,
which is bad ofcourse, it is my fault for not making up my mind.

i think that at least for now, i will stick to a creative-commons
attribution/share-alike license, unless anyone here as any objection (note
that this license allows commercial use of the material. this is
important, in order to allow people to sell printed versions of the
material - if we get there one day :0  ).

in particular, i would like to get benny's permission to use this license
for the 'reference document', and the various slides.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-11-06 חוט guy keren

On Sun, 6 Nov 2005, Beni Cherniavsky wrote:

> On Sun, 2005-11-06 at 05:20 +0200, guy keren wrote:
> > if only you spent your time on working on contents - that'd be a time well
> > spent... i'm still waiting for your promised document - time is running
> > out - we start officially on november 13th (a week and a day from now),
> > and i'd want to have the material of the beginning of the course (at
> > least) ready for the pupils to look at (it doesn't have to be complete -
> > but it has to be enough for them to see what we're planning for them).
>
> You are right.OTOH, with these tools writing is *so much* more fun for
> me.Only the need to sleep stops me now at point 8.

well, whatever works for you - as long as it _works_.

> Committed my work so far at
> http://opensvn.csie.org/hazor_python/cben-reference/

it looks good. with a table of contents at the top, it'll be quite
complete.

there are a few typos here and there - i'll send you a list tomorrow.

> > since you're going to be in the army until next weekend,
>
> I will finish the reference this week.I'll probably come home on some
> evening to do part of it - and the rest on Friday.

ok - no need to press yourself too much though - as long as we have the
material for the first 8 meetings ready by next weekend - that'll be a
good start.

if you do continue the work, however, please see the changes made to the
study plan and apply them here. i still need to fix the meeting that deals
with string operations - since i've moved 'len' and 'for' over strings to
an earlier meeting (meeting 5, i think) - i'll replace them with more
advanced string operations on the 2nd strings meeting (meeting 11).

> > i'd like to have
> > the material you already have _now_ - so i can work through it, and adapt
> > to the final changes in the study plan (i just placed an updated edition,
> > which contains 'for', 'range' and "the _simple_ interactive prompt" in it,
> > plus 1-2 more exercises).
> >
> https://opensvn.csie.org/viewcvs.cgi/upstream/html/rst/
> python-for-school.txt?r1=15&r2=20&rev=20&root=hazor_python
>
> (UTF-8)Nice.  Didn't have time to merge it.  I will merge when I come
> back.

it looks like you did merge it - or it's just my imagination?

> The conversion is still flaky (your new text didn't convert perfectly).
> Don't waste your time on it (unless you really want to) - leave it to
> me...

i realy _don't_ want to ;)

> > 1. html is passed as plain-text, so it's annoying to browse through this
> >  repository.
> >
> I believe I fixed the svn:mime-type tags now.Not so annoying now.

it's better, indeed. the only annoying thing left is the encoding for the
text "source" files - which has to be set manually when viewing it - but i
guess you cannot fully fix that.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-11-05 חוט guy keren

On Sun, 6 Nov 2005, Beni Cherniavsky wrote:

> On Sun, 2005-11-06 at 05:20 +0200, guy keren wrote:
> > On Sun, 6 Nov 2005, Beni Cherniavsky wrote:
>
> > 2. your copy of the reference (which looks like my html with the html
> >  striped, and no new content) comes as gibberish. in plain text you
> >  cannot specify an encoding type... obviously you're trying to make some
> >  people's life harder
> >
> Oh, sorry, forgot to say: I converted everything but your html to UTF-8.
> It's the only encoding which (one day) won't require specifying an
> encoding type.rst2html does specify the encoding of course.  [BTW,
> your html didn't specify any encoding.]

i have used the ancient "meta http-equiv" tag, to supply the encoding. is
it non-standard by now? i forgot adding the DOCTYPE tag with its own
encoding when i first created this page...

> > > So far I've created an upstream/ directory with Guy's html and scripts
> > > to import it, convert it to rst_ text and back to html.The conversion
> > > works OK on the small top pages and the reference but is too bad for the
> > > book - I'll tackle that later (not too hard to fix by hand if anybody
> > > wants it now).
> >
> > *shrug* and here we go from working on content, to working on tools to
> >manage it. that's what i call constructive procrastination :P~~
> >
> Well, I did learn some OCaml hacking the html2rst tool ;-P.
>
> Don't worry, I will not go to sleep before I send what I've got.I just
> want to work some more tonight...

if this was a program, and today was delivery day, i'd tell you "work done
on the last few hours before delivery is buggy and crappy". luckily, this
isn't source code, and this isn't (yet) the delivery day

and i did ask you to send something already yesterday - it would have
taken you 30 secodns to send me the file - and it wouldn't have hurt your
ability to continue working on it and send a newer version later on. in
the current method, if there's something terribly wrong with what you're
doing - i'll only find about it after you're gone - so you are leaving no
place for any interaction...

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-11-05 חוט guy keren

On Sun, 6 Nov 2005, Amit Aronovitch wrote:

> guy keren wrote:
>
> >thanks. i'm glad i finally managed to do something you actually aprove of
> >whole heartedly ;)
>
> Sorry for not making it clear - in fact I approve of most of the stuff
> I've seen (e.g. the whole Hazor project, this course, the fun attitude,
> most of the contents, including what I've read so far from your essays
> in LUPG).

what does the LUPG got to do with this? :0

> I purposefully try to read critically and comment about stuff I don't
> understand or disagree with - this is a kind of feedback I'd consider
> helpful if I was in your place (compliments are fine, but theyr'e not
> contents and are not what drives me to produce/fix some).

then you're as bad as my mom. what you achieve by this is that i get the
impression you don't like anything - and i scratch my head in order to
find out what i'm supposed to do. you also place me into a defensive
position - it's one thing when people tell you "this is good - here are a
few comments". it's another thing when you think people tell you "what the
hell are you doing? change it up-side-down!".

> <--- snip snip --->
>
> >>to eat it or anything, just appreciating a good idea), and will update
> >>the wiki sometime soon.
> >
> >like i was saying - i don't think a wiki is a convinient place to hold
> >discussions.
>
> Any form of communication is only useful if all sides involved use it.
> It's a chicken and egg thing: if *you* prefer mail - mail is the most
> convenient. I could say alot to try to convince you otherwise, but
> that's stuff for another thread.

and for another time.

> I keep the wiki contents mainly for readers who are not subscribed to
> this list.

what do you with the wiki is your concern. i wouldn't tell you not to use
it, after all.

> >how about, instead, taking upon yourself the writing of the slides for
> >other mini-lectures, in the same style? i'll send you the program i use
> >(which i "stole" from [EMAIL PROTECTED]) so all lecture slides will have the
> >same format (even if not necessarily the same spirit)?
>
> I know you prefer contents than proofing, but I was not able to write
> the slides because I did not know your plans (my ideas for solving the
> problems I'd mentioned involved major reorganization of the first 3
> meetings, which I knew you would not like).

obviously, the 2nd meeting's contents cannot be changed - they need to
know how to work in the linux environment - i assume we have no argument
about that.

the 1st meeting - you eventually seem to accept (most) of the slides - so
i'm not going to change it further, other then a small thing here and
there.

as for the 3rd meeting - i'll use the interactive prompt to demonstrate
everything. yet, i will insist on them typing things in an editor and
saving script files - because i think in the long run this is better. note
that during this lesson they don't need execfile or the tab-completion, so
there's no point in introducing it there.

i still have to think whether i will introduce this during meeting 5 or
not (or perhaps during the functions meeting - it seems like execfile
makes sense with functions - not without them).

> Please do give a link to the program -I might make use of it next time.

which program? the meetings plan? it's on the web site i mentioned,
users.actcom.co.il/~choo/python/, 2nd link from the top.

or are you reffering to some other program?

> <--- snip snip --->
>
> >as you see, i chose the 10-minutes method. i'll probably use a shorter
> >version of http://nadav.harel.org.il/essays/chofesh/lecture.html - after
> >adopting it to high-school kids, and for my taste. as such, i'm going o
> >talk - not show slides.
>
> maybe put this link in the plan?

added it to the index page, in the 'slides' section.

> <--- snip snip --->
>
> >[... example snipped - it is far far far too advanced for people hwo've
> >never thought of a program. don't know about you, but i remember how i
> >felt when i learned programming for the first time - i had a problem
> >writing a simple program to solve the "twice the rice on each chessboard
> >square" problem :0 and you're talking about implementing algorithms of
> >this length in pseudo-code? not to mention, having to solve a maze with
> >pen and paper? i'm trying to attract them - not to push them away ;)
>
> Supplying the algorithm and dry-running it as an exercise might be easy
> enough, yet useful and instructive (gives you a good idea of what an
> algorithm is). Then you could be guided i

Re: updated python material - start of python reference

2005-11-05 חוט guy keren

On Sun, 6 Nov 2005, Beni Cherniavsky wrote:

> I do have time for it (or so I think ;-).No time to learn Arch (which
> didn't strike me as friendly enough) but to use Subversion which I
> already know.

if only you spent your time on working on contents - that'd be a time well
spent... i'm still waiting for your promised document - time is running
out - we start officially on november 13th (a week and a day from now),
and i'd want to have the material of the beginning of the course (at
least) ready for the pupils to look at (it doesn't have to be complete -
but it has to be enough for them to see what we're planning for them).

since you're going to be in the army until next weekend, i'd like to have
the material you already have _now_ - so i can work through it, and adapt
to the final changes in the study plan (i just placed an updated edition,
which contains 'for', 'range' and "the _simple_ interactive prompt" in it,
plus 1-2 more exercises).

> Project Location:
> http://OpenSVN.csie.org/hazor_python or
> https://OpenSVN.csie.org/hazor_python
> ViewCVS:
> https://OpenSVN.csie.org/viewcvs.cgi/?root=hazor_python
>
> Anybody else is invited to work there.I'm not reading mail every day
> to give logins on request, so anybody is invited to use username 'hazor'
> and password 'hazor' ;-).

1. html is passed as plain-text, so it's annoying to browse through this
   repository.

2. your copy of the reference (which looks like my html with the html
   striped, and no new content) comes as gibberish. in plain text you
   cannot specify an encoding type... obviously you're trying to make some
   people's life harder

> So far I've created an upstream/ directory with Guy's html and scripts
> to import it, convert it to rst_ text and back to html.The conversion
> works OK on the small top pages and the reference but is too bad for the
> book - I'll tackle that later (not too hard to fix by hand if anybody
> wants it now).

*shrug* and here we go from working on content, to working on tools to
manage it. that's what i call constructive procrastination :P~~

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-11-04 חוט guy keren

On Thu, 3 Nov 2005, Amit Aronovitch wrote:

> Guy, I've read the first lesson slides, and I must say this is very good :-)
> The best of all is the "human computing" demos.

thanks. i'm glad i finally managed to do something you actually aprove of
whole heartedly ;)

>  As I explained in the wiki, I've been worried that it might become a
> long, boring, slideshowing session (due to lack of practical exercises).
> The two little demos fully answer that, and are much better than my
> ideas for solving this problem. I take off my hat (no - I didn't promise
> to eat it or anything, just appreciating a good idea), and will update
> the wiki sometime soon.

like i was saying - i don't think a wiki is a convinient place to hold
discussions.

by the wa, take it from me - hats are not tasty, not at all...

> To make myself useful, I'll add some comments.

you made yourself useful until this paragraph. this is where you give me
more work to do - which makes you un-useful :P~~

how about, instead, taking upon yourself the writing of the slides for
other mini-lectures, in the same style? i'll send you the program i use
(which i "stole" from [EMAIL PROTECTED]) so all lecture slides will have the
same format (even if not necessarily the same spirit)?

> * The slides cover material from point 3 and on in the plan
> (python-for-school.html). Point 1 seems straightforward, but point 2
> (about free software) seems to contain issues that trigger long essays
> and discussions on the net.

point 2 can be explained in 1 minute, 5minutes, 1 hours, a full day, a
complete course or an entire lifetime.

as you see, i chose the 10-minutes method. i'll probably use a shorter
version of http://nadav.harel.org.il/essays/chofesh/lecture.html - after
adopting it to high-school kids, and for my taste. as such, i'm going o
talk - not show slides.

> I'm sure the subject is important, and that
> you'll make it short, informative and representative. However,it would
> be nice if you put a few words about it in first slide (some people will
> be curious about what you said,and some extra propaganda for the cause
> can't hurt).

i'll think about it

ok, i thought about it. no. i'll leave the slides to talk about
programming. the free software stuff will be a monologue... this is a very
personal issue, after all.

> * Do you have some ideas for self reading/self exercising for the week
> between the first and second lesson? Maybe some pen & paper experiments,
> extending the "robot" demo?

i didn't think about it - i'm not sure how many of the kids will actually
want to do "homework" in this course - many of them area already
pre-occupied with school and other afternoon activities - so adding
homework is not something i'd want to do - at least not until i get the
impression that they want this. the only thing i'll do is tell them about
how to install python on their home computers (ActivePython from
www.activestate.com) - i'll see how many instaleld it after 2 weeks, and
it'll give me an impression of whether homework is a good thing or not.

mind you - i don't even know how many of them have good computers at home
anyway...

[... example snipped - it is far far far too advanced for people hwo've
never thought of a program. don't know about you, but i remember how i
felt when i learned programming for the first time - i had a problem
writing a simple program to solve the "twice the rice on each chessboard
square" problem :0 and you're talking about implementing algorithms of
this length in pseudo-code? not to mention, having to solve a maze with
pen and paper? i'm trying to attract them - not to push them away ;)

> * nodes 7-13 describe elements of computer language. The problem is that
> some of them describe complex concepts (at least they seam complex to
> me),

the concepts are not complex. the explanations often given are complex.
did you see the salad exersize in the learning program, in the lesson
about objects? that's the kind of explanatoin i'm aming for.

> which are not demonstrated in this lesson, and will only be
> encountered (if at all) far later in this course's plan.

why not demonstrated? demonstrating doesn't mean "showing a python
program". the can be given analogues from other areas (didn't i do that in
the slides? if not - i'll add some).

the idea here is to give them a more thorough understanding of the tools
we'll learn during the year. they don't have to fully understand
everything - just get familiar with part of the vocabulary. this way, when
we get to actually teaching the stuff - it'll look less foreign, less
intimidating.

also, when you teach the same thing 2 or 3 times - it sinks better.

> These will be
> probably forgotten by the time they get to them, so I'm not sure about
> the effectiveness of these nodes (also, as you might guess, I'm
> uncomfortable about node8 - variables).

i'll consider using http://www.effbot.org/zone/python-objects.htm to
modify the variables slide.

however! since this intro 

Re: updated python material - start of python reference

2005-10-31 חוט guy keren

On Mon, 31 Oct 2005, Amit Aronovitch wrote:

> guy keren wrote:
>
> >i think you're forgetting what it was like when you first learned how to
> >write programs - using 3rd-party libraries is something you do after you
> >master the basics of the language. and you have to begin with learning to
> >use simple things first.
>
> I'm sure I am - that was more than 20 years ago. And I don't think there
> were any libraries to speak of...

actually, there were third-party libraries even in the old BASIC days -
they were just not called by that name.

> You are probably right - probably better to do manual processing than a
> new lib. Just keep it short and simple - tedious manual argparsing might
> be even more boring.

the args parsing i used in the book so far complies with your
int(sys.argv[1]) example.

>  Also, as other people had been saying, you can completely avoid the
> subject by using the interpreter, at least for the cases where a script
> would require tedious parsing (I mean anything more than
> n=int(sys.argv[1]) ).

i'm not going to use the interpreter for writing actual things. only for
testing very simple expressions. we're not in BASIC days any longer - and
thanks goodness for that ;)

> >no, i will not tell them this is the way to go - i don't want to spoil
> >them to a level that they'll require re-adapting in order to learn C (or
> >other compiled langauges) next year.
>
>  That's what I ment by saying that writing a script is an important
> skill (goal).
>  If we stick to the idea of "simpler first", it might be good to start
> with demonstrating inside the interpreter,running longer code with
> 'execfile', then (one of the first lessons) show how to make it a
> script, with the motivation of wanting others to be able to run it "as a
> normal program" from the shell.

i don't think i'll even mention execfile - i'll just show how to do simple
stuff in the interpreter, and the rest using scripts.

> >i want them to learn the concept of a program - not of an interactive
> >programming environment. python is a tools - not a means. thus, i don't
> >want to teach them everything that can be done in python - it's not real
> >interesting. those that will want that, will learn all the bits in the
> >future on their own.
> >
> >you should remember that what you achieve here is efficiency. this is not
> >relevant for a first programming course - there are more important skills
> >to learn first. it's like teaching touch-typing before teaching
> >programming, so they'll spend less time typing their programs - it's nice,
> >but realy not what they should learn first.
> >
> >
> No - not efficiency - instructive power and ease of use (my specific
> efficiency-related comment (keystrokes...) was clearly marked as
> directed to argumentative list readers).

instructive power - probably. ease of use? that's a matter of taste, no
more.

> When you have an interpreter open during lecture (/exercise/demo/...)
> , and someone asks "why can't we just do x", or "what object does y
> refer to at this stage", you just type x or y (possibly pause to ask
> what do you think would happen now), then press enter...This is one
> *powerful* instructive tool.

ok. i'll see if i can work with it fluently enough.

> I don't think many poeple would bother to demonstrate these small
> things, if it means editing a new file (or "spoiling" the nice'n clean
> program they've been editing at the moment with debug messages), saving
> it, going back to the shell, and running it.

actually, i don't see why. i usually have one terminal with an editor, and
another terminal in which i run the script. the work it takes in this
setup is no more (sometimes even less) then using a single interactive
interpreter session. the editor is much more convenient for editing then
the interactive prompt, for me.

> Later, when they will be experimenting on their own, you'd want the
> interpreter to behave like the shell, so they would not have to learn
> two different environments.

this is the problem - the interpreter will never behave like the shell. it
canbe "close" - but it's still a seperate environment. i don't want to
concentrate on this.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-31 חוט guy keren

On Mon, 31 Oct 2005, Amit Aronovitch wrote:

>  And speaking of wiki pages - guy, did you read my comments on the wiki
> pages (refs in prev post)? I got the impression that you prefer it all
> bein done by mail - if you have trouble with that media I can post them
> here.

i read them - but i don't find a wiki to be a convenient method to manage
such discussion (even if it's better then a mailing list archieve for
people to find historic discussions about specific areas and joining in).

i hope i'll have more energy to respond and incorporate changes during the
weekend.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-30 חוט guy keren

On Sun, 30 Oct 2005, Amit Aronovitch wrote:

> On 10/29/05, RaeNye <[EMAIL PROTECTED]> wrote:
>
> > Had this not been clear, I hereby join the do-it-with-the-interpreter
> > lobby.
> > Explaining them scripts will get you sys.argv parsing, which is prolly out
> > of scope.
>
> Writing scripts is an important target skill, and argv parsing is part of
> it. Still, with the interpreterapproach we have the *option* to avoid it,
> or leave it as an extra "home lesson".
> There's also optparse. It's a fairly complicated module, but code using it
> might be more readable than "manual" parsing. It might be out of scope for
> the lessons, but if we choose the "homework" approach it might be
> appropriate (also a nice demonstration of using standard libraries - yet
> another target skill).

i think you're forgetting what it was like when you first learned how to
write programs - using 3rd-party libraries is something you do after you
master the basics of the language. and you have to begin with learning to
use simple things first.

i don't think we'll realy be getting there. if we do - i'd put the effort
on something like PyGame (fun), not something like parsing command line
options (b-o-r-i-n-g).

regarding the interpreter issue - i don't think it realy matters for now.
this is something you learn to appreciate after you have been programming
for a while, and tried several methods. this is not the case here.

yes, i will show them the interpreter as a means for quick checking of
commands.

no, i will not tell them this is the way to go - i don't want to spoil
them to a level that they'll require re-adapting in order to learn C (or
other compiled langauges) next year.

i want them to learn the concept of a program - not of an interactive
programming environment. python is a tools - not a means. thus, i don't
want to teach them everything that can be done in python - it's not real
interesting. those that will want that, will learn all the bits in the
future on their own.

you should remember that what you achieve here is efficiency. this is not
relevant for a first programming course - there are more important skills
to learn first. it's like teaching touch-typing before teaching
programming, so they'll spend less time typing their programs - it's nice,
but realy not what they should learn first.

remember the focus - teaching them how a computer works (very strict,
very low-level relative to the human mind), teach them how to think like
programmers, teach them how to approach writing programs, how to test and
debug programs. these are the main issues. scripts Vs. interactive is not
the goal here - and learning scripts is more general then learning about
interactive programming - if you think of the years ahead.

-- guy


"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: python reference

2005-10-26 חוט guy keren

On Wed, 26 Oct 2005, Beni Cherniavsky wrote:

> On Sun, 2005-10-23 at 00:03 +0200, guy keren wrote:
> > i started writing a reference manual for the python course (not that
> > anyone here seems to care,
>
> I do.Never attribute to malice what can be explained by being
> busy :-).

since the time is pressing now - "busy" and "no interest" look the same to
me :P~~

> > but i felt like giving it a last try), and
> > added it on my quite-temporary page. just to give a basic idea of how i
> > want it to look.
> >
> > http://users.actcom.co.il/~choo/python/python-for-school-reference.htm

[i cannot quote your unicode, so i'll answer without quoting]

regarding use of 'for' instead of 'while':
consider:   for i in range(1,10):
this construct uses two seperate notions - ranges for for loops.

while i < 10:

this construct uses one notion - while loops.

when you teach new things, you should teach them one at a time.
so i'd rather teach them while loops, let them get the hang of loops, and
only then teach about for loops and xrange.

this looks better to me, from a teaching point of view.

regarding counting from 0-9: it's too early to start confusing them with
this - let them first grasp the issue of loops.

regarding teaching lists - i think i missed this issue in the course plan
- i will add a mini-lesson about lists, range/xrange and 'for' loops.

regarding teaching lists before loops - i want them to be able to write
something "useful" already on the first practice lesson. just writing
serial commands would be boring - and i don't want to teach about
variables, expressions, lists and loops all at once.

regarding input() vs. raw_input() - firefox shows me your text quite
confused - so i didn't understand what you favor - input() or raw_input().

thanks,
-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-26 חוט guy keren

On Wed, 26 Oct 2005, Beni Cherniavsky wrote:

> On Sun, 2005-10-23 at 04:33 +0200, guy keren wrote:
> > the current things i could be helped with are:
> >
> First, how do we work?

you say "i am going to work on this thing". you take what is found
currently, you write it, then you post it.

> * Is the HTML hand-written or is it generated from something else?
> What do we send patches against?

i concentrated on the material, rather then on formatting. i just wrote
HTML (ofcourse it is hand-written - i never use HTML editors, and i didn't
use any pre-processor in this case).

please note that this is not software - it's documentation for a teaching
course. as such, it should have a very strict style, and be very coherent.

thus, i don't want each item to be edited by several people. there should
be one, single editor for each item, and comments may be sent to that
person.

e.g. i am writing the mini-book, and i don't expect anyone else to _write_
it. i will take comments i am given here about it, and edit them into the
book, and update it on my temp. site. someone will take the reference
document, and work on it from start to finish, taking small chunks form
people who want to contribute them and edit them so it all looks as if it
was written by a single person. this is crucial - this is not software,
where what people see is the output of the program - here, the source _is_
the output.

> * I think working with plain text source is most convenient for
>   discussions & patches over mail.  http://docutils.sf.net or
>   similar can convert it to nice HTML.

if you want to learn those systems and use them - go ahead. i don't have
time to start evaluating such systems right now.

> * Could you put it on some public version control?It will simplify
> keeping updated and managing changes.

sorry - no time to mess with such a system and manage it. since i expect a
single editor for each item - then i assume the editor will publish the
"most updated copy" on a web page, and people will send them
comments/document snippets for hand-editing. you can't patch it like you
patch software - at least that's what i think.

> * If not, please use this mailing list as a changelog and bump the
>   version numbers on every change.

i bump the versoin numbers on the documents i place on the web site. i do
not publish the material here directly - i only send links here, and run
comments and discussions here.

> * Alternatively, you could answer the above two points by putting it on
> a wiki.  Up to you -- depends whether you like wiki style of work...

a wiki is not good for publishing coherent documents, in my opinion. it is
useful when you want to write a knowledge-base.

> I can hack an html2wiki for the transfer; it can be converted back
> when we are done if needed.
>
> * The Python-IL mediawiki is not quite hebrew-friendly at present.
>   Putting up a small moinmoin sounds like best approach to me.
>   Nir, what's your advice?
>
> * Licensing: you still haven't decided, right?

if someone can find a good license that will cover what i originaly talked
about - i'll be happy to use it.

i'll repeat - the study plan (along with its reference material) should be
very open - for everyone to do anything with it. BSD-tyle license? is
there something like this that suites documentation? i don't know.

the mini-book should be free for use in any way - i don't know yet about
free for editing. unlike the study plan, which i expect to be very fluid
and adapted to suite the teacher of such a course, the mini-book is a more
"closed" and complete work - and it is very easy to ruin such work by
non-coherent editing. also, because this mini-book represents much more
work, i'd rather have it under a GPL-like license - i.e. the source must
be given together with the thing, even if it is a printed book that's
being sold for a hefty price, and any changes made to it must be published
to anyone who's given the "binary" (printed book, pdf, whatever) file.

i understood the GFDL has some problems - is there some license that
overcomes these problems? what license do the debian people use for
mini-books? what license is used by the guides of the LDP?

> > 1. taking the "reference book" i wrote and finish writing it.
> >
> I can do that, or at least a big part of it (I'll raise a red flag next
> week if I need help).

ok. i'll await your input (including re-formatting it to use the
interactive prompt style you suggested in a previous email ;)  ).

> > 2. suggesting a better layout for the reference book, so it can be:
> >   1. easily browsable on the net.
> >   2. easy to print.
> >  and then implementing this layout.
> >
> Layout depends on tools we work with.I can take this.  

Re: updated python material - start of python reference

2005-10-26 חוט guy keren

On Wed, 26 Oct 2005, Beni Cherniavsky wrote:

> On Sun, 2005-10-23 at 01:23 +0200, guy keren wrote:
>
> > this course focuses about methodologies and good practices, and a lot of
> > actual programming, about extra self-studying, and personal pace. i skip
> > all the technicalities of C, and go directly to the fun stuff. thus, we
> > learn only what's needed to write specific games. if the kids will want to
> > learn more later in order to write more things - i'll encourage them to do
> >so.
> >
> The plan & reference adhere to this "only what's needed" philosophy.
> But the book seems to deviate.Will they use packed arrays?  Linked lists?
> Undirected trees?Balanced trees?  I'm afraid that the book transmits a
> bit of "professor stuff, I don't see how it can help me" feeling.
> I'll write detailed comments on it later.

ok, i see i didn't explain this.

the course is split into two parallel tracks.

one track is the frontal lessons, as detailed in the "study plan"
document. in this, we have a bi-weekly "lecture+practice" meeting followed
by a bi-weekly practice-only meeting.

the 2nd track, is this data structures book, which is a self-study book,
meant to be used by pupils who _want_ to learn more things. those who
choose to read it, will read chapters 1 and 2, and then follow whicever
chapters they will want, in whichever order they will want (except where
there's some internal ordering - you need to learn about trees before you
learn about mini-max trees - but you can learn about graphs before you
learn about trees.

for each chapter, i am trying to show how it can be used in writing a
game.

mini-max trees go for checkers, reversy and the like.

graphs are useful for writing labyrinth-like games (think of the anceint
"hobbit" game, if you ever played it. think of an LP MUD if you want).

and so on.

so there's nothing professoral there - each chapter is immediately
followed by a practical (game) example of the use of the material in it.

finally, i assume that pupils will start reading this mini-book only 2-3
month
after we begin the 1st track - because by then they'll have enough basic
knowledge in order to understand this mini-book.

>  <> * למה בחרת דווקא בנושאים האלו לקורס הזה?
>  <
> > because i wanted the course to be fun, and kids love games - so writing
> > games is the theme of the course. it is much better then writing programs
> > for the sake of learning a programming language and for the sake of
> > learning programming abstractions with no meaninig and no motivation,
> > that's the general rule in programming courses.
> >
> But writing effecient code is not fun -- not until you have been exposed
> to computer internals for a lot of time ;-)

not realy. when you write a game in which the computer needs several
minutes to play a move - this is when you have no fun. you write the game
in order to play it - and you want playing it to be as quick as possible.

>.If I were beginning kid,
> an astract notion of "memory/CPU complexity" would completely fail to
> impress me.

can you explain why? can you think how i can pass the message of why they
want to understand this, in a clearer manner?

> I think that all talk of performance must be delayed until
> they actually run something too heavy -- than you can teach them "this
> is how you make it fast" and they will *feel* the improvement.

but see, you can't just "make it fast" - replacing the data structures and
the algorithms is not about "a small optimization". it's not like when you
have a 10,000K lines program, and only 200 of it form the bottle-neck and
you re-write them. on the first year, a 500 lines program is considered
huge, and having to rewrite can take the wind out of people.

> http://users.actcom.co.il/~choo/python/what.html
>
> This answers most questions but I still have one:
>
> Where does the book come in?It's obviously unsuitable for reading
> right from the beginning.It skips the question what are sequences /
> mappings / trees *good for*, assumes basic Python knowledge and plunges
> into advanced data structures.

it does NOT skip the question of what things are good for - did you
actually read it? please remember that this book is only half-written.
each chapter concludes by an example of a game that uses the material in
this example.

regarding lists and arrays - after 2-3 month of the frontal course,
they'll know what these are good for.

regarding the other structures - there are/will be examples for each of
them.

> So what is your plan -- at what point do you wantstudents to start
> reading it andhow should it relate to the lessons outlined in the plan?

it does not relate to the les

Re: updated python material - start of python reference

2005-10-26 חוט guy keren

On Tue, 25 Oct 2005, Beni Cherniavsky wrote:

> On Tue, 2005-10-25 at 18:52 +0200, Noam Raphael wrote:
>
>  <אני מציע להשתמש בסביבת הפיתון האינטראקטיבית. כך אין צורך להתעסק עם
>  <ארגומנטים לתוכנית, אלא אפשר לקרוא מיד לפונקציות. חוץ מזה, זה מאפשר
>  <כשלומדים עוד דברים פשוט להוסיף פונקציות למודול (יעני, קובץ עם
>  <פונקציות) שכבר קיים, ואז לא צריך לכתוב את הפונקציות שוב.
>  <חוץ מזה, הסביבה האינטראקטיבית היא טובה מאוד ללימוד סתם ככה - אפשר
>  <לכתוב משהו וישר לראות מה הוא עושה, ואפשרלנסות את מה שכתבנו בצורות
>  <שונות מאוד בקלות.
>
> I heartly agree with Noam.If you want to teach them script-writing and
> command-line argument parsing as an end in itself, then writing scripts
> is a good idea.But as along as your goal is writing parametrised code
> focused on the topic at hand, don't write scripts at all -- write
> functions!Functions take parameters (no need to parse anything) and
> return values (no need to format results).And they are trivial to
> re-use.

the problem with writing things via the interactive prompt, is that they
"go away" when you log out. you can't look at a listing of your code (or
can you?) - you cannot re-edit a function (or can you?).

> If you don't have enough experience with Python's interactive prompt,
> you might not realise its power yet.When experimenting with Python
> code it's much more convenient than the shell.Heavily relying on
> interactive work calls all the stronger for an IDE (like IDLE).If you
> are really limited to a textual terminal, there are still some nice
> environments (e.g. ipython).I'll study the offerings and give a
> reccomendation soon.Perhaps I will even adjust the editor/prompt
> keybindings to match one another.

please check them and see if they fit the bill. i have some personal
disliking for IDEs generally - but if the IDE does not hide the program's
structure, and does not require too much teaching, i'll consider using it
for the course.

> BTW, I suggest that code examples in the reference document be written
> with outputs from the interactive prompt.E.g. don't just write::
>
>   "hello " * 3
>
> but write::
>
>   >>> "hello " * 3
>   'hello hello hello '

are you interested in updating the current document and completing it in
this format? i'm in favor ;)

> (It's also good policy to run all examples to make sure they are
> correct.)

i write them in a script and run the script.  that's how i like to do
things - much easier to edit and repeat the tests this way (and you don't
always test things in a FIFO order).

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-26 חוט guy keren

i took a look on this book, and it does look interesting. i have to see
how easy it would be to install the software - i didn't yet manage to get
PyGame installed on my ancient redhat 7.3 ;)

it does look like it makes things simpler then using PyGame directly.

thanks for this interesting link.

--guy

On Tue, 25 Oct 2005, Noam Raphael wrote:

אני מציע להשתמש בסביבת הפיתון האינטראקטיבית. כך אין צורך להתעסק עם
ארגומנטים לתוכנית, אלא אפשר לקרוא מיד לפונקציות. חוץ מזה, זה מאפשר
כשלומדים עוד דברים פשוט להוסיף פונקציות למודול (יעני, קובץ עם
פונקציות) שכבר קיים, ואז לא צריך לכתוב את הפונקציות שוב.
חוץ מזה, הסביבה האינטראקטיבית היא טובה מאוד ללימוד סתם ככה - אפשר
לכתוב משהו וישר לראות מה הוא עושה, ואפשר לנסות את מה שכתבנו בצורות
שונות מאוד בקלות.

דרך אגב, אני מצטער אם זה כבר הוזכר (לא עקבתי בפירוט אחרי ההתכתבות),
אבלראיתי אתר של קורס תכנות בפיתון לילדים מבוסס משחקים. אולי זה יעזור
במשהו. הכתובת היא זו:
http://www.livewires.org.uk/python/

וחוץ מזה, אני רוצה לומר שאני חושב שללמד תכנות דרך משחקים זה דבר טוב ומגניב.

שנה טובה,
נעם


-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-26 חוט guy keren

On Tue, 25 Oct 2005, Nir Soffer wrote:

> On 24 Oct, 2005, at 20:18, guy keren wrote:
>
> >
> > On Sun, 23 Oct 2005, Nir Soffer wrote:
> >
> >> While reading
> >> <http://users.actcom.co.il/~choo/python/data-structs-python-and-the-
> >> wardrobe/data-structures-and-python.html>, I noticed that the example
> >> code is not really in Python, I would call this code C in Python :-)
> >
> > no wonder, as i didn't learn python in order to learn python - i
> > wanted to
> > write something, and i went to look in the documentation
> > (http://docs.python.org/) in order to find a way to do it.
> >
> >> I tried to make the first 3 programs comparing list, array and deque
> >> more pythonic
> >> <http://faassen.n--tree.net/blog/view/weblog/2005/08/06/0> and example
> >> of best practice in general:
> >> * Don't repeat the same code more then once
> >
> > i think you're confusing 2 things here. i was demonstrating 3
> > _seperate_
> > programs - so this is not code-repetition per-ce.
>
> Which are the same except one or two lines...

again, you're missing the point of how _new_ programmers grasp material.
remember - i'm not talking to people with experience in programming - this
is the first programming language. what to you might look like a "nice and
clean and easy abstraction" - would look confusing to them.

what i could do, perhaps, is write the 3 seperate programs, and _then_
show that they can be combined in this manner. you can't show people just
the end result and hope they figure how you got there - you need to make
the whole path explicit. otherwise, they won't learn how to make the whole
path on similar occasions.

> >> * Avoid non relevant command line parsing code
> >
> > i had that in order to allow running the program with different
> > parameters, without altering the code. it is true, however, that in a
> > script, "changing the code" is not something that should be feared, as
> > with compiled languages.
> >
> > i do have, however, a problem with code that requires changing in
> > order to
> > change parameters - this is often the difference between scripts that
> > get
> > used, and scripts that get neglected. once you realise that there's a
> > differencebetween the writer of the script and the user of the script
> > -
> > you tend to favor using command-line arguments.
> >
> > in this specific case, your approach might be better.
> >> * Use Python idioms
> >
> > once i get used to them, and only those i agreewith ;)
>
> Experience tell that once you write code that other use and use code
> that other write, you tend to agree with most idioms, because it makes
> like easier for everyone.

not my experience - but lets leave this argument - it's irrelevant for
teaching purposes.

> > plus, since some of the programs i demonstrate (e.g. playing checkers)
> > are
> > computationaly heavy, i have to sacrifice cleanliness in favor of
> > speed.
>
> I think that the correct way it to write a very clear code thats easy
> to understand - nobody cares abut performance in this course. If you
> want to talk aboutperformance, add a chapter about profiling, and then
> make the slow parts faster.

look at the chapter about mini-max trees (after which readers will
be able to write a checkers game) - performance is crucial to make a
checkers game that is debugable and play-able.

this time, it is my turn to say "if you teach people how to write slow
programs, they'll get habbits of writing slow programs" ;)

please note that the code i wrote was not un-clear.

i will probably use xrange and the matching 'for' - if i find that it
makes the concept of lists/arrays easier to understand.

> Speeding Python code is usually by using better algorithms, caching or
> using C extension modules :-)

and choosing the appropriate data structures, which is what this mini-book
is all about.

> >
> > what i could do is point these places out, and then show the
> > alternatives.
> > i'll see how much time i have to do that.
>
> Because you don't have time in this course to talk about this, you can
> simply show only the shorter and nicer pythonic code, without talking
> about the alternatives.

no no no. you're confusing the course given in lessons, and this
self-reading mini-book. the idea is to teach lessons in class according to
the meetings plan found on my temporary site. then, in order to allow the
faster/more-motivated pupils to learn more, they'll be given a mini-book,
to learn in parallel with the python course (the

Re: updated python material - start of python reference

2005-10-24 חוט guy keren

On Sun, 23 Oct 2005, Nir Soffer wrote:

> While reading
>  wardrobe/data-structures-and-python.html>, I noticed that the example
> code is not really in Python, I would call this code C in Python :-)

no wonder, as i didn't learn python in order to learn python - i wanted to
write something, and i went to look in the documentation
(http://docs.python.org/) in order to find a way to do it.

> I tried to make the first 3 programs comparing list, array and deque
> more pythonic
>  and example
> of best practice in general:
> * Don't repeat the same code more then once

i think you're confusing 2 things here. i was demonstrating 3 _seperate_
programs - so this is not code-repetition per-ce.

> * Avoid non relevant command line parsing code

i had that in order to allow running the program with different
parameters, without altering the code. it is true, however, that in a
script, "changing the code" is not something that should be feared, as
with compiled languages.

i do have, however, a problem with code that requires changing in order to
change parameters - this is often the difference between scripts that get
used, and scripts that get neglected. once you realise that there's a
difference between the writer of the script and the user of the script -
you tend to favor using command-line arguments.

in this specific case, your approach might be better.

> * Use Python idioms

once i get used to them, and only those i agree with ;)

plus, since some of the programs i demonstrate (e.g. playing checkers) are
computationaly heavy, i have to sacrifice cleanliness in favor of speed.

what i could do is point these places out, and then show the alternatives.
i'll see how much time i have to do that.

> * Avoid timing Python startup time which is not the issue here

you're right. i timed the code using tools i knew, and since the program
startup time is negligible once you get to very large objects, i didn't
bother finding out how to time things inside python.

besides, the 'time' urility gives me more data then the 'time' function in
python - because it also shows me user time and system time, and i wanted
to make sure i'm not becoming slow due to swapping.

> * More useful, a student can run the program once instead of 15 times

ok.

> * Show usage of module and function docstings

i could do that with the original code, too.

> * Show how to format output

which means that i'm losing focus...

> * Use only nice readable names

you're again losing the focus. in a very small program, a short variable
name is easier to read. you made the program long - so ofcourse you need
to "work harder" on variable names.

> * Show how different collections conform to the same protocol, e.g.
> append, del

ok - thought what you're concentrating on here is polymorphism.

> The next 3 programs can be another function in the same program,
> reusing the formating code.
>
> I attach the code here so people can discuss these changes and improve.

please keep in mind, when you offer changes, the focus of the book, and
the intended audiance. this book comes into play once the pupils already
learned some python and some programming (but are very far from being
python experts). it should focus on the new issues, which are data
structures - not how to format strings and how to write comments.

thus, please try to make sure your enhancements don't make us lose focus.

i think that i will add a seperte program that shows how to time code
(using your timing functions) - it is generaly a very bad practice to
introduce too many new things together in a single program. instead, it
should be broken down into smaller things.

so i might add a new chapter (between chapters 2 and 3) that discusses
issues such as timing code, "objects are references" (or mutable Vs.
immutable objects), and other general python issues that i'll find to be
repetitive in this mini-book.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-24 חוט guy keren

On Mon, 24 Oct 2005, Nir Soffer wrote:

> On 22 Oct, 2005, at 23:05, Omer Zak wrote:
>
> > How about something having to do with robots?With robots you still
> > can
> > do pretty cool things after a short course.
>
> Here is an interesting example of a book called "Squeak: Learn
> Programming with Robots" . The book
> use of the rich multimedia environment of Squeak to create robots
> simulations.

this is exactly like logo - instead of turtle graphics, you get bot
graphics.

i think omer was talking about real, mechanical robots.

i asked a friend of mine, and he sais there are robots that were meant for
similar purposes. the cheaper ones would cost several 10s of dollors per
robot - and they are an arm-robot (i.e. you can program them to move
things, e.g. play towers of hanoi). in the cheap robots, you have to do
the programming on a low level (e.g. you can't just say "move from
X1,Y1,Z1 to X2,Y2,Z2) - you probably need to take into account rotor
start/speedup and stop/slowdown times, etc.

he sais the lego robots normaly cost more. i'm not sure how up-to-date his
information is.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-22 חוט guy keren

On Sun, 23 Oct 2005, Omer Zak wrote:

> On Sun, 2005-10-23 at 04:42 +0200, guy keren wrote:
>
> > 2. if this year will go well, next year we'll teach them C.
>
> Why?If they are the same pupils, then teach them advanced topics in
> Python programming.
> C should be taught to those, who want/need exposure to assembly
> language.

not teaching them C will mean they'll be cripled. i have some good reasons
to teach them C - one of them being that the army can offer interesting
roles for high-school kids with background and experience in Linux and
C/assembly programming.

> > 4. the kids have no time to yet another course - they have hard time
> > keeping up with school work, plus quite a few seem to have various other
> > afternoon activities ("Hoogim", cisco's "Neta" program, etc.).
>
> They do not have to be the same kids.

it's not as if we have hundreads of kids waiting in line to learn it all.
it is also not as if we have tens of volunteers standing in line to give
courses for free (or even not for free, i imagine). the same kids that
want to learn programming, will most likely want to learn about robotics.

> I do not know of any reason why not to have two groups of kids (even
> from different schools), one group builds robots and the other group
> writes the control software for those robots.

if you can find someone _else_ (not me) that will manage the robotics
course and give it - give me their names. note that in hatzor i already
had the beaurocratic work done for me by yael (getting the school into the
thing, recruiting the first children, recruiting people to prepare the
linux infrastructure in the school, getting tel-hai college to give
perach scolarships to 2 students that'll help us with the activities
in the school all year long...). this leaves me free to concentrate on the
programming course.

there is one school that's now passing through a lot of work for a more
ambitous project - which is the shevach school in tel-aviv. they, however,
seem to have enough funding to hire people, instead of relying on
volunteers work.

> > for example - can you check what options exist in this direction, where
> > they can be purchased in israel, for how much? and how to get info about
> >controlling them via a PC?
>
> At the moment I feel too committed to promise to do anything in this
> direction.But I'll keep an eye open in case I stumble upon relevant
> information.

then until you come up with more concrete ideas, or manage to convince
someone else to do this, i guess this direction is dead-end.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-22 חוט guy keren

On Sun, 23 Oct 2005, Omer Zak wrote:

> On Sun, 2005-10-23 at 04:13 +0200, guy keren wrote:
> > On Sat, 22 Oct 2005, Omer Zak wrote:
> > > I would like to point out that the current state of art in computer
> > > games is that it is not possible to write a cool (according to present
> > > standards of coolness) game in an introductory programming course.
> > > You'll then promise those children that they'll be able to write
> > > computer games substantially like the ones they play at home.Then
> > > they'll be disappointed.
> >
> > not necessarily. you are forgetting one major point - when you write
> > something on your own, it looks way cooler then a game that is much more
> > sophisticated, that you got for free, or for 200 shekels.
>
> OK.I still have an issue with this, but this is issue of shades of
> grey, not of black&white.

the question is not whether _you_ have an issue. the question is whether
you think _they_ will have an issue with this. if you do - speak now, or
remain silent until the post-mortem we'll hold next summer ;)

> > the course layout will be unveiled to the pupils already when we begin the
> > course - they'll not be surprised.
>
> I am not sure they can set realistic expectations at the course's
> beginning.Maybe at beginning, you can demonstrate to them games the
> like of which they'll be able to write by themselves at course's end.
> If they like the demos, the demos will whet their appetites.
> If they dislike the demos, you can adjust the course appropriately.

i already have some of the games written (how do you think i learned
python ;)  i won't teach something i don't like to do - how could i tell
them it's fun, and mean it, otherwise?). i will consider which of them to
demonstrate (don't want to spoil everything).

> > > How about something having to do with robots?With robots you still can
> > > do pretty cool things after a short course.
> >
> > and who will buy me those robots? this is an almost zero-budget project -
> > do you have an idea how i'm going to get robots for free? withthe
> > equipment used to control them via the parallel/serial port? can you help
> > with getting them?
>
> Lego kits?
> Other robot kits?
> Look for someone who will start an electronics club to run in parallel
> with your Python course?
> Does the school already have an electronics club (or even robotics club)
> which can cooperate on robot projects?
> Is there another school with robotics club which agrees to collaborate
> with you?

1. it'll take too long to look for such cooperation, so i don't see how
we'll be doing it _this_ year.

2. if this year will go well, next year we'll teach them C. it'll be
possible to introduce robotics next year, then, if we manage to get robots
from somewhere.

3. you still did not solve the issue with funding. you have an estimate on
how much it'll cost buying, say, 15 kits? including having to buy spare
parts, because in such situations, things tend to break during the year.

4. the kids have no time to yet another course - they have hard time
keeping up with school work, plus quite a few seem to have various other
afternoon activities ("Hoogim", cisco's "Neta" program, etc.).

> The time is too short to do it this year, but please add the above ideas
> to the TODO list for next year.
>
> (I hope this time I made some constructive and easy-to-implement
> suggestions.)

easy to implement? will you help us actually _implement_ them? we're a bit
short of manpower to do this.

for example - can you check what options exist in this direction, where
they can be purchased in israel, for how much? and how to get info about
controlling them via a PC?

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-22 חוט guy keren

On Sun, 23 Oct 2005, Nir Soffer wrote:

> On 23 Oct, 2005, at 1:23, guy keren wrote:
> >
> > well, state what you want and can do in advance, so i'll concentrate on
> > something else.
>
> יהיה יותר יעיל אם תעשה רשימה מטלות כדי שמי שרוצה לעזור יוכל לקחת על
> עצמו.

the current things i could be helped with are:

1. taking the "reference book" i wrote and finish writing it.

2. suggesting a better layout for the reference book, so it can be:
1. easily browsable on the net.
2. easy to print.
   and then implementing this layout.

3. checking the existing part of the mini-book for correctness, from a
programming point of view (not proof-reading the english and clarity -
that will come once the material is there).

4. coming up with ideas for exersizes during the practice meetings, that
are still marked as "TODO" in the meetings plan.

5. writing slides for the first lecture - it is the only lecture that'll
actually require slides.

6. writing mini-slides for the rest of the lectures (showing each item to
be taught, and 1-2 examples per item).

7. thinking of other things that might be useful.


-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-22 חוט guy keren

On Sun, 23 Oct 2005, Nir Soffer wrote:

> On 22 Oct, 2005, at 23:05, Omer Zak wrote:
>
> > I would like to point out that the current state of art in computer
> > games is that it is notpossible to write a cool (according to present
> > standards of coolness) game in an introductory programming course.
> > You'll then promise those children that they'll be able to write
> > computer games substantially like the ones they play at home.Then
> > they'll be disappointed.
> >
> > How about something having to do with robots?With robots you still
> > can
> > do pretty cool things after a short course.
>
> זו באמת שאלה טובה, אולי כדאי לנסות את החומר הקיים על תלמידים אמיתיים,
> לפני שמשקיעים זמן נוסף בכיוון הזה.
>
> לי החומר נראה מעניין, אבל אני לא מתעניין במשחקים…

what "existing material"? if you're referring to what i wrote - give me a
year (actually, a little less then a year), and i'll come back with
results.

it would not be very productive if i am given responses of "dump it all,
and do something completely different" without an explanation of how the
hell i am going to do that. i need help with the given direction, not with
changing it 360 degrees (pun intended). if you don't want to help - don't
help. if you think i'm doing it all wrong - don't help either. if you have
an idea for _small_ tweaks that will make the existing direction better -
show me those.

we are starting the course at the beginning of november (around the
2nd week) - so please try to focus your ideas on what can be done in a
relatively short period - beause once i start the course, and i show the
entire program to the kids - i'm not going to do any significant changes.

thanks,
-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-22 חוט guy keren

On Sat, 22 Oct 2005, Omer Zak wrote:

> On Sun, 2005-10-23 at 01:23 +0200, guy keren wrote:
> > because i wanted the course to be fun, and kids love games - so writing
> > games is the theme of the course. it is much better then writing programs
> > for the sake of learning a programming languageand for the sake of
> > learning programming abstractions with no meaninig and no motivation,
> > that's the general rule in programming courses.
>
> I would like to point out that the current state of art in computer
> games is that it is not possible to write a cool (according to present
> standards of coolness) game in an introductory programming course.
> You'll then promise those children that they'll be able to write
> computer games substantially like the ones they play at home.Then
> they'll be disappointed.

not necessarily. you are forgetting one major point - when you write
something on your own, it looks way cooler then a game that is much more
sophisticated, that you got for free, or for 200 shekels.

the course layout will be unveiled to the pupils already when we begin the
course - they'll not be surprised.

> How about something having to do with robots?With robots you still can
> do pretty cool things after a short course.

and who will buy me those robots? this is an almost zero-budget project -
do you have an idea how i'm going to get robots for free? with the
equipment used to control them via the parallel/serial port? can you help
with getting them?

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: updated python material - start of python reference

2005-10-22 חוט guy keren
On Sat, 22 Oct 2005, Nir Soffer wrote:

> On 23 Oct, 2005, at 0:03, guy keren wrote:
>
> > i started writing a reference manual for the python course (not that
> > anyone here seems to care, but i felt like giving it a last try), and
> > added it on my quite-temporary page. just to give a basic idea of how i
> > want it to look.
> >
> > http://users.actcom.co.il/~choo/python/
> > 2nd link.
>
> לי אכפת :-)
>
> תמשיך לעדכן אותנו, אני אשמח לעזור במידת האפשר.

well, state what you want and can do in advance, so i'll concentrate on
something else.

> קראתי קריאה מהירה את החומר שפרסמת פעם שעברה, לא מצאתי תשובות לשאלות
> בסיסיות כמו אלו (אבל אוליזה אשמתי):

indeed - this is because i set up the material itself. what you ask are
meta-questions. i'll add answers to them on the web page later, but here
they are, basically:

> * מה מטרות הקורס - מה אתה מצפה שתלמיד יוכל לעשות לאחר הקורס?

the goal of the course is to teach kids, with no former programming
background, how to write programs in a methodological manner, and how to
think like programmers.

as such, you'll notice i didn't write anything about
"programming/debugging methodologies" issues, except for the meeting
regarding "preparation for a project" (meeting 23) - i intend to throw in
words about this here and there, if/when i have time to make the program
contain more then a "dots plan" (i don't see myself having time to do so
in the next couple of month - perhaps i'll add it as an after-thought,
during the year, so it can be used by others).

> * במה הקורס שונה מתוכנית הלימודים של משרד החינוך?

this course focuses about methodologies and good practices, and a lot of
actual programming, about extra self-studying, and personal pace. i skip
all the technicalities of C, and go directly to the fun stuff. thus, we
learn only what's needed to write specific games. if the kids will want to
learn more later in order to write more things - i'll encourage them to do
so.

> * מה הרקע של התלמידים, האם זה המפגש הראשון שלהם עם תכנות?

yes. they never programmed before. i assume only knowledge with using a
computer in general.

> * למה בחרת דווקא בנושאים האלו לקורס הזה?

because i wanted the course to be fun, and kids love games - so writing
games is the theme of the course. it is much better then writing programs
for the sake of learning a programming language and for the sake of
learning programming abstractions with no meaninig and no motivation,
that's the general rule in programming courses.

> אם התשובות לא נמצאות באתר, כדאי להכניס אותן לשם.

i will, after i phrase them better.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


updated python material - start of python reference

2005-10-22 חוט guy keren

i started writing a reference manual for the python course (not that
anyone here seems to care, but i felt like giving it a last try), and
added it on my quite-temporary page. just to give a basic idea of how i
want it to look.

http://users.actcom.co.il/~choo/python/
2nd link.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


material for 'programming for school' course

2005-10-19 חוט guy keren

i placed the current material (note: work-in-progress) temporarily on my
home page, at:

http://users.actcom.co.il/~choo/python/

there are the study schedule, and the data structures mini-book
(half-written, not yet edited).

comments about the study-plan are welcome. regarding the mini-book, i
won't mind comments, but i imagine it is too "rough" right now (it will
undergo editing soon, and the other half of the material will be
written, too, plus i intend to add a chapter about PyGame).

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


Re: [OT?] looking for python teaching volunteers for hatzor

2005-10-02 חוט guy keren

On Sun, 2 Oct 2005, Beni Cherniavksy wrote:

> Not OT at all.And it would be a good idea to the list's address to the
> pupils and encourage them to ask.

patience, patience... we haven't started it yet - it'll start after the
holidays, and it'll be a long time before they get to the level of needing
to ask questions on this mailing list.

> guy keren wrote:
> > hi,
> >
> > as part of the hatzor project that's being ran recently by various
> > volunteers (see http://www.vaya.org.il/schools/ for details, if you need),
> > we decided to try and teach programming in the school.
> >
> > the language to be taught this year will by python, with an accent on
> > writing ascii-art-based games.
> >
> Hooray!I'm so excited!  Python in school, in Israel!

please note that this is not any official school program - we're going to
run it as an afternoon operation. if it was an official school program, i
wouldn't be asking for vulanteers - instead, they'd be offering a teaching
job ;)

> > since am going to give the lessons, and i live in haifa (about 1.5 hours
> > drive from the school there), i won't be able to get there more then once
> > every 2 weeks (or even 3). thus, the idea is to have part of the lessons
> > done remotely - and this is where y'all could help (if you're willing).
> > since it is hard to conduct online classes with one teacher and several
> > students, i was wondering if some of you would like ot participate in
> > these "classes".
>
> I live at Qiryat Motzkin.Sun-Thu I serve in the army around Tel-Aviv,
> so I can only get anywhere on Fridays.But getting there every Friday
> is not out of the question.Every 2 weeks is surely possible.

i'm afraid that fridays are out of the question, because most of the
pupils study on fridays. perhaps when the dovrat reform finally catches
on, they'll not study on friday.

> About online classes - Friday is again perfect, other days are tricky.

i'm afraid we're in tricky-land ;)

> What is the schedule of lessons you were thinking about?

it's still in the works - we'll know in a week or so. my guess is it'll be
on sunday or thursday in the afternoon (i.e. leave them enough time to go
home, eat lunch, rest and then come to school for this).

> > note that in addition to the normal classes, we are going to hold
> > "practice lessons" that will be conducted by two students from tel-hai
> > college, who are doing this as a "perach" project (for those who don't
> > know, "perach" gives scolarships to students that perform various types of
> > community work during the semester). these two students already were
> > involved when we gave an "intro to linux" course to a few pupils from ort
> > hatzor during the summer.
> >
> > note that this is a school that doesn't have many resources, and as far as
> > i understood, is not teaching programming as part of its normal teaching
> > program (at least that is what the pupils told me) - which is what
> > prompted the idea of teaching lessons.
> >
> Hmm, that's actually better than a school which does teach programming
> because we are less bound by the MoE's silly ways of teaching
> programming :-).What is the status of this course from the school's
> point of view?

it is unofficial. the whole linux project is not done as a formal project
there, althought the school did buy the linux server on which the various
donated workstations work in an LTS (linux terminal server) mode.

> > we are going to recruite pupils during the next few weeks, and start the
> > lesons after the holidays (i.e. beginning of november).
> >
> > if someone wants to help, please let me know. i devised a basic study
> > plan, that should suffice for the first few month, and the idea is that
> > afterwards each pair of pupils will choose a project for themselves to
> > implement - and then the studing will become more a one-on-one issue.
> >
> Do you have the plan online?

not yet, as it is not yet finalized. if anyone wants to help with the
planning, let me know, and i'll send what we currently have.

> > thanks,
>
> Another question: how is their English?I promised to translate the
> Python tutorial but didn't start yet.Are translations of anything
> desired as helper materials here?

i didn't check their english level, but i want all the written material to
be in hebrew. as such, i am going to write part of it myself (a mini-book
about data structures and python). i am not sure how much time i'll have
to also write the python classes material as well. i am not going to use
the

[OT?] looking for python teaching volunteers for hatzor

2005-09-27 חוט guy keren

hi,

as part of the hatzor project that's being ran recently by various
volunteers (see http://www.vaya.org.il/schools/ for details, if you need),
we decided to try and teach programming in the school.

the language to be taught this year will by python, with an accent on
writing ascii-art-based games.

since am going to give the lessons, and i live in haifa (about 1.5 hours
drive from the school there), i won't be able to get there more then once
every 2 weeks (or even 3). thus, the idea is to have part of the lessons
done remotely - and this is where y'all could help (if you're willing).
since it is hard to conduct online classes with one teacher and several
students, i was wondering if some of you would like ot participate in
these "classes".

note that in addition to the normal classes, we are going to hold
"practice lessons" that will be conducted by two students from tel-hai
college, who are doing this as a "perach" project (for those who don't
know, "perach" gives scolarships to students that perform various types of
community work during the semester). these two students already were
involved when we gave an "intro to linux" course to a few pupils from ort
hatzor during the summer.

note that this is a school that doesn't have many resources, and as far as
i understood, is not teaching programming as part of its normal teaching
program (at least that is what the pupils told me) - which is what
prompted the idea of teaching lessons.

we are going to recruite pupils during the next few weeks, and start the
lesons after the holidays (i.e. beginning of november).

if someone wants to help, please let me know. i devised a basic study
plan, that should suffice for the first few month, and the idea is that
afterwards each pair of pupils will choose a project for themselves to
implement - and then the studing will become more a one-on-one issue.

thanks,
-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy