Re: [Edu-sig] PyGeo

2013-01-25 Thread kirby urner
These are excellent questions Kevin.

Arthur was an extraordinarily bright and committed guy and took his
winnings in financial services to fund a long sabbatical studying what
really most interested him:  projective geometry.  He really admired
Klein.

Those mining the archives may think Arthur and I were enemies but we
were actually sparring partners and liked testing each other.  I met
him a few times, twice in New York City and I think once at a Pycon.

Anyway, given he was largely self taught in a lot of ways, I expect
his quirky genius is manifest in the code.  He wanted people to study
his source and wrote it with that in mind.  He felt that precisely
because he'd clawed his way through this knowledge on his own, that he
had valuable perspectives and people might get some value following in
his footsteps, if only to see where he might have gone wrong (and I'm
suggesting this is likely true).

In the years since Arthur's death yours is the first email across my
radar with anything close to this high a level of curiosity about
Pygeo.  In other words, I am aware of no developments since he left
off working on it himself.  If you wanted to make that a niche and try
to recruit more talent to continuing this work, I have no reason to
think you'd have competition at this point.

Both Python and Visual Python have continued to evolve.  In particular
I'm away that VPython is now working better with wxPython than ever
before, at least on Windows.  Arthur always thought highly of Visual
(which meant he was confrontational with its developers), and thought
everyone under-appreciated its great worth to Python.  Blender is so
difficult, relatively speaking.

Those are my initial thoughts.  Arthur would be delighted, I think, to
have his code carried forward in some way.

Kirby


On Fri, Jan 25, 2013 at 5:54 PM, Kevin  wrote:
> Hi folks,
>
> I'm new to python and super-excited about using it for all sorts of
> reasons including education (especially math education). I've been
> reading a great deal on the subject, and I discovered some of Kirby's
> resources at http://4dsolutions.net/ocn/cp4e.html which have been very
> helpful. I was especially intrigued by the very simple Euclid's
> algorithm that he showed in the python for math teachers videos at
> http://showmedo.com/videotutorials/series?name=JkD78HdCD
>
> I'm also very interested in VPython and PyGeo. I read a fair amount of
> background on PyGeo including the sad news of Arthur's passing in 2007.
> And I've searched the web for news on the current status of PyGeo since
> Arthur passed, and have found very little
> .
>
> Can anyone give me any better insights on the state of the PyGeo code
> base? From http://pygeo.sourceforge.net/ it looks like the last revision
> to the PyGeo code base was 7 years ago, but perhaps someone here knows
> of more recent developments with PyGeo?
>
> With all the changes that have taken place since 2007, does anyone know
> if I should expect that PyGeo will still work ok with Python 2.7 or
> Python 3.2?
>
> Also, has anyone shown any interest in continuing to develop PyGeo?
> Although I'm very new and still have a lot to learn, Arthur sounds like
> he was a man after my own heart, and I suspect that I would enjoy trying
> to pick up his PyGeo work where he left off if nobody else has done so.
> I probably will not be able (skill-wise) to improve upon his work in the
> next year or so, but I can't help thinking it might be feasible for me
> after that.
>
> I'd welcome reading any thoughts on these or related issues via private
> email or public list follow-up.
>
> Thanks everyone.
>
> -Kevin
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] ApacheCon: it's about a lot more than Apache webserver

2013-01-24 Thread kirby urner
http://projects.apache.org/  (FYI)


-- Forwarded message --
From: Steve Holden 
Date: Wed, Jan 23, 2013 at 3:03 PM
Subject: Time to make a noise ...



We'd appreciate your help in creating a little more buzz about ApacheCon NA.

It turns out that another major West coast big data/cloud conference
has been scheduled on exactly the same days as ApacheCon, reducing the
anticipated effects of our marketing and PR efforts. On the plus side,
this other conference is highly likely to sell out, and when it does
the Apache community can be standing by with a welcoming smile on its
face. So we may pick up late registrations. At the moment, however,
numbers are lower than anticipated, which is where you come in.

The really effective way to get the word out is via community
channels. The life blood of any conference is the people who pay to go
through the doors. The existing community members get a chance to meet
old friends and work together. There will also be people who maybe
work with your code every day but would not think of themselves as
committer material (they probably think of existing committers are
rock stars). So the people who know you by your professional
reputation are exactly the people who might attend ApacheCon. If they
know you are going, they are more likely to go.

If you have blogs or other web presences and want to help publicize
the conference, banner graphics are available at

  http://holdenweb.com/acna13gfx/

Please remind any relevant mailing lists you belong to that ApacheCon
is coming (33 days to go at the time of writing) and that if they
don't register soon they run the risk of losing the 30% discount we
negotiated on the hotel room rate.

Steve Holden st...@holdenweb.com +1 571 484 6266  @holdenweb
--
Python classes (and much more) through the web http://oreillyschool.com/
Conferences and technical event management at http://theopenbastion.com/

Next event:ApacheCon NA 2013: Feb 26-28 http://na.apachecon.com/
Community events: Barcamp Feb 24  Hackathon Feb 25   Development Mar 1/2
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Drs. Fotis Georgatos's MSc thesis

2013-01-23 Thread Kirby Urner
On Wed, Jan 23, 2013 at 4:38 PM, Andre Roberge wrote:

<< snip >>


> I took that as a joke; very few people invent new words, so we are all
> plagiarizing in that sense.
>
>
Yes, I see it that way too.  The individual words we use do not originate
with us.

Plagiarism is less about the individual words than their lengthier
permutations in the form of sentences and paragraphs.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] this room is occupied (multi-threading metaphor)

2013-01-12 Thread kirby urner
On Sat, Jan 12, 2013 at 12:56 PM, Nicholas H.Tollervey  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> There are lots of ways this analogy could be extended with amusing
> consequences (just remembering back to when I used to regularly teach
> teenagers - they would have had a field day with it). :-)
>
> "It's like there's just one loo (but make sure you don't block)."
>
> (Sorry). :-P
>
> N.
>

Funny you should mention as I'm just reviewing an old presentation
where I get into the scatological / demented humor layer endemic at
various levels, starting in fairly early childhood.

Why not tap into that?

"Mad libs" were my point-in-common, i.e. wacky stories with missing
user-supplied elements, a way to get into the whole topic of string
substitution, important to STEM even if current math standards don't
see where it goes.

Excepts from the slide show mentioned below:

http://www.flickr.com/photos/kirbyurner/8373804657/in/photostream/lightbox/

http://www.flickr.com/photos/kirbyurner/8373804285/in/photostream/lightbox/

What I do in some courses is show how a Python class itself looks like
a many-ribbed snake:

class Python:
def __rib__(self):  pass
def __rib__(self):  pass
def __rib__(self):  pass
def __rib__(self):  pass
def __rib__(self):  pass
def __rib__(self):  pass

(legal but useless except for diagramming purposes i.e. shows the "rib cage").

This begets the view of classes as organisms (perhaps genetically
modified) with bowel functions, a metabolism.

Hence the need for a self.stomach and snake.eat( ) and snake.poop()
methods -- self.stomach a FIFO column.

Kirby



-- Forwarded message --
From: kirby urner 
Date: Sat, Jan 12, 2013 at 12:59 PM
Subject: Re: thoughts about your paper
To: David B Koski


Yeah, I replied.

I've done lots of conferences.  Sometimes I just have to prepare
slides and talk, other times a paper too.

For EuroPython (Vilnius, Lithuania) I was asked to do a paper.  It was
not at all just a script for the slides.

Paper:  http://4dsolutions.net/presentations/urner_europython_2007.pdf

Slides:http://4dsolutions.net/presentations/connectingthedots.pdf

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] this room is occupied (multi-threading metaphor)

2013-01-11 Thread kirby urner
I think an obvious way to describe the use of locks when
multi-threading is to use the coffee shop model (same as airplane
model), where there's only one bathroom / toilet.  Or maybe there are
two but each takes its own key.  Or mulitple unisex (still for one
passenger only) like portable ones at the fair.

boyz = threading.Lock()
girlz = threading.Lock()

Only one customer per bathroom at any one time, so there's a queue for
the keys (we call them locks but they're like keys that unlock your
access to the facilities, then you release it back at the counter so
another customer might go).

Kirby

Speaking of airplanes

Snakes on a plane:
http://gawker.com/5974780/snake-on-a-plane-qantas-passenger-spots-python-on-wing-during-flight
http://xkcd.com/107/
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Fwd: [Chicago] Dr Chuck MOOC

2012-12-25 Thread kirby urner
On my radar...

-- Forwarded message --
From: Randy Baxley 
Date: Sat, Dec 22, 2012 at 12:49 PM
Subject: [Chicago] Dr Chuck MOOC
To: chic...@python.org


http://online.dr-chuck.com/index.php

Dr. Chuck is a fun professor and I have already worked through his
pythonlearn.com basics so this should be fun.

Randy

___
Chicago mailing list
chic...@python.org
http://mail.python.org/mailman/listinfo/chicago
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] generate digits of pi

2012-12-23 Thread kirby urner
Right, there's like a "stutter" in the inner while loop where it sometimes
spits out more digits before getting back to the outer loop, so sometimes
you get one or two more digits than requested.

That doesn't mean I understand the algorithm, i.e. why d == d1 is critical.

Kirby


On Sun, Dec 23, 2012 at 3:49 PM, michel paul wrote:

> I realized something. This was the original version:
>
> def pi_digits():
> k, a, b, a1, b1 = 2, 4, 1, 12, 4
> while True:
> p, q, k = k*k, 2*k+1, k+1
> a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
> d, d1 = a/b, a1/b1
> while d == d1:
> yield int(d)
> a, a1 = 10*(a%b), 10*(a1%b1)
> d, d1 = a/b, a1/b1
>
>
> I forget where it came from. Like I had mentioned, I had a really bright
> student awhile back who was really intrigued by this, and he at one point
> edited it to produce the digits in binary. In the original form the
> generator never terminates. Somewhere along the line an edit was made to
> try to get it to terminate at n digits. Probably to make calling it easy to
> call as in list(pi_digits(n)).
>
> - Michel
>
>
> On Sat, Dec 22, 2012 at 5:34 PM, Kirby Urner wrote:
>
>> Got it, no wrong digits just not always exactly the number you asked for.
>>
>> This happens often in 3.2 as well:
>>
>> >>> exp = ((n,len(list(pi_digits(n for n in range(1))  # (number
>> asked, number got)
>> >>> exp2 = ((a,b) for a,b in exp if a != b)  # filter on "not same"
>> >>> for i in range(10): print(next(exp2), end=", ")
>> (2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31), (29,
>> 31), (30, 31), (34, 36),
>>
>> Kirby
>>
>>
>>
>> On Sat, Dec 22, 2012 at 4:40 PM,  wrote:
>>
>>> In each case I asked for only 79 digits, but got 79, 82, and 83 digits
>>> depending on whether I was using python 3.2, python 2.6, or python 2.6 with
>>> -Qnew, respectively. The digits all seem to be correct, but the algorithm
>>> for stopping at digit n seems to be very sensitive.
>>>
>>>
>>>
>>> David H
>>>
>>>
>>>
>>
>> ___
>> Edu-sig mailing list
>> Edu-sig@python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
>>
>>
>
>
> --
> ==
> "What I cannot create, I do not understand."
>
> - Richard Feynman
> ==
> "Computer science is the new mathematics."
>
> - Dr. Christos Papadimitriou
> ==
>
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] generate digits of pi

2012-12-22 Thread Kirby Urner
Got it, no wrong digits just not always exactly the number you asked for.

This happens often in 3.2 as well:

>>> exp = ((n,len(list(pi_digits(n for n in range(1))  # (number
asked, number got)
>>> exp2 = ((a,b) for a,b in exp if a != b)  # filter on "not same"
>>> for i in range(10): print(next(exp2), end=", ")
(2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31), (29, 31),
(30, 31), (34, 36),

Kirby


On Sat, Dec 22, 2012 at 4:40 PM,  wrote:

> In each case I asked for only 79 digits, but got 79, 82, and 83 digits
> depending on whether I was using python 3.2, python 2.6, or python 2.6 with
> -Qnew, respectively. The digits all seem to be correct, but the algorithm
> for stopping at digit n seems to be very sensitive.
>
>
>
> David H
>
>
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] generate digits of pi

2012-12-22 Thread Kirby Urner
'3141592653589793238462643383279502884197169399375105820974944592307816406286208'

Yeah, I see (that was using 3.2).  Different frazzle at the end of the
rope, but if you ask for more digits, they continue to agree out to the
last bit and so on.  Is that it?

Kirby


On Sat, Dec 22, 2012 at 3:25 PM,  wrote:

> Thanks for posting this.
>
>
>
> I had to try it out. I found it behaves differently depending on the
> version of Python you use.
>
>
>
> Python 3.2.2: pi_digits(79) generates 79 digits:
>
>
>
>
> 3141592653589793238462643383279502884197169399375105820974944592307816406286208
>
>
>
> Python 2.6.5: pi_digits(79) generates 81 digits:
>
>
>
>
> 314159265358979323846264338327950288419716939937510582097494459230781640628620899
>
>
>
> The 80th and 81st digits generated by Python 2.6.5 are correct, but
> unasked for. Assuming that the difference in behavior was due to the
> difference in the behavior of the division operator (what else could it
> be?) I ran it again using "python -Qnew" and this time got 82 digits:
>
>
>
>
> 3141592653589793238462643383279502884197169399375105820974944592307816406286208998
>
>
>
> Bizarre. Tricky. On which version of Python was this generator intended to
> run, I wonder?
>
>
>
> David H
>
>
>
> -Original Message-
> From: "Kirby Urner" 
> Sent: Saturday, December 22, 2012 5:33pm
> To: edu-sig@python.org
> Subject: [Edu-sig] generate digits of pi
>
>  I'm taking the liberty of reposting this generator supplied by
> Pythonista michel paul on Math Future.  He's not the author though.
>
>   def pi_digits(n):
>k, a, b, a1, b1 = 2, 4, 1, 12, 4
>while n>0:
>p, q, k = k*k, 2*k+1, k+1
>a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
>d, d1 = a/b, a1/b1
>while d == d1:
>yield int(d)
>n -= 1
>a, a1 = 10*(a%b), 10*(a1%b1)
>d, d1 = a/b, a1/b1
>
>
>
> More context:
>
> https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ
>
> Kirby
>
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] generate digits of pi

2012-12-22 Thread Kirby Urner
I'm taking the liberty of reposting this generator supplied by Pythonista
michel paul on Math Future.  He's not the author though.

def pi_digits(n):
k, a, b, a1, b1 = 2, 4, 1, 12, 4
while n>0:
 p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
yield int(d)
n -= 1
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1



More context:

https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] docs.tutorial function example - too complicated

2012-12-16 Thread kirby urner
The official docs for Python are not really designed for people new to
programming but for people who have already experienced programming and now
want to add Python as an additional language.  The tutorial does not take
the time to slow down and start from the beginning.

John Zelle's book (and many others) are closer to what you would want to
teach people who are new to programming.  'Mathematics for the Digital Age
and Programming in Python' is another good example.

Today's average / standard mathematics courses are not all that good at
prepping students for computer programming.  They don't feature many of the
concepts we would like.  This has led to much discussion, on many lists,
about with a 21st century curriculum might look like.  We've had a lot of
these discussions on edu-sig over the years.

I've done some pioneering of alternative "futuristic" math / STEM curricula
over the years such as this one:

http://www.4dsolutions.net/ocn/numerarcy0.html

Here's an old outline that shows more what a digital / computational math
might look like (one of any number possible):

http://4dsolutions.net/ocn/mainoutline.html

I have had many opportunities to put my ideas into practice, including with
teenagers.  Many of them realize that what they're getting from me is of
far far higher quality than anything they're getting currently in their
high schools.  I'm the best high school level math teacher in Portland bar
none, I might claim and defend.  But I don't waste my time on such claims.
What matters more is they realize it's an uphill battle to keep themselves
from being dumbed down by their 1900s style math courses.

Kirby


On Sun, Dec 16, 2012 at 2:47 PM, Jurgis Pralgauskis <
jurgis.pralgaus...@gmail.com> wrote:

>
>
> > currently more and more schools are trying Py,
>> > so studens read tutorial docs from time to time...
>> > and one of main programming (architecture) subjects starts with quite
>> > a mathematical and unpractical example..
>> >
>> > http://docs.python.org/3/tutorial/controlflow.html#defining-functions
>> > It's like teaching to pilot airplane, prior to bicycle and car :)
>>
>> Depends who you are teaching. There is a fine line between dumbing
>> down and just right...
>>
>> If it is in elementary schools, I agree that is too advanced. However,
>> Fibonacci numbers were taught in junior high when i was in school.
>> When is it introduced nowadays?
>>
>
>
> Well, I teach in College for future sysadmins...
> and most of them  are quite poor at math... :/
>
> and I also teach in high school - in math they have just arithmetic and
> geometric progressions - but only next year after I have programming :/
> and Fibonacci is not easy somehow... especially for some girls..
>
> so, if we'd like to position Python as good language for learning
> programming,
> I'd propose to give simpler examples of functions first :)
>
> one more point - one guy localized documentation to my native language,
> and I could use this as good source for students, but functions part
> wouldn't work...
> I mean - official tutorial is probably most used - so it's important to be
> understandable :)
>
>
> --
> Jurgis Pralgauskis
> tel: 8-616 77613;
> Don't worry, be happy and make things better ;)
> http://galvosukykla.lt
>
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Thoughts about upgrading our python.org page

2012-12-02 Thread kirby urner
Proposal to upgrade:

http://www.python.org/community/sigs/current/edu-sig/

Probably it's time to mention some new projects.  Examples:

http://www.pythontutor.com/

http://www.skulpt.org/

http://www.raspberrypi.org/

http://arduino.cc/playground/Interfacing/Python

That's not meant to be an exhaustive list.  I notice there's no
mention of Sugar, which is old news by now:

http://wiki.laptop.org/go/Sugar

Note that all of these are on the same level.

Ipython

http://ivory.idyll.org/blog/teaching-with-ipynb-2.html

Fitting all these into a new narrative might take awhile.

I think edu-sig would be a great page on which to exercise diplomacy
in the sense of linking to similar pages devoted to other languages.

We are sympathetic to Mathematica, not averse.  Also to J and Haskell,
no question.  These are great projects, open or no.

We do advertise the advantages of open without apology, but that
doesn't require withholding admiration for some closed source
projects.  We're not bigots.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] more in the "Rich Data Structure" series

2012-12-02 Thread kirby urner
"""
Quantum Field Theory:
Skeletal draft of objects

Rich Data Series

To help with studies, students learning Python might bend its
notation to help them wrap their heads around this and that.
Here's a module I've been working on after listening to
Sean Carroll's ISEPP lecture in Portland last night (isepp.org).

Write-up:
http://worldgame.blogspot.com/2012/11/isepp-physics-lecture.html

I haven't double checked everything as the primary idea is
to get across the idea.  People will role their own.  These are
more in the way of doodles at this point, minus much of
anything to hold it together.  Slapping it out there as open
source.

If you fix a broken bit, fork a new version,
take it as inspiration to start from scratch, feel free to
add your name to the list of contributors.  Many of you have
already.  My thanks to the Wikipedia articles and other
authors I read and/or listened to or otherwise appreciated.

Other Rich Data Structure stuff

http://mail.python.org/pipermail/edu-sig/2005-November/005533.html
http://www.mail-archive.com/edu-sig@python.org/msg02457.html
http://mybizmo.blogspot.com/2008/01/rich-data-structures.html

K. Urner
edu-sig

"""

ANTI = True

class Fermion():
"""fractional spin, Fermi-Dirac statistics"""
spin = 1/2  # J

class Boson():
"""whole number spin, Bose-Einstein statistics"""
spin = 0  # may override in subclass to 1 or 2 (Higgs)

class Field:
pass

class Strong(Field):
"""
quantum chromodynamics
"""
def __init__(self, anti=False):
self.anti = anti
if anti:
self.color = "anti-" + self.color  # reverse color if anti-particle

class ElectroWeak(Field):
"""
quantum electrodynamics
"""
def __init__(self, anti=False):
self.anti = anti
if anti:
self.charge = -self.charge  # reverse charge if anti-particle


# Quarks: 6 with oppositely charged pairs = 12, each with 3 colors =
36 permutations
class Quark(Fermion, Strong, ElectroWeak):
"""
Meson = Quark + Quark
Baryon = Quark + Quark + Quark (e.g. proton, neutron)
"""
def __init__(self, color, anti=False):
color = color.lower()
if color not in ["blue", "red", "green"]:
raise ValueError
Strong.__init__(self, anti)
ElectroWeak.__init__(self, anti)  # reverse charge if anti

class Up(Quark):
mass = 2.4# m  Mev/c2
charge = 2/3  # Q

class Down(Quark):
mass = 4.4
charge = -1/3

class Charm(Quark):
mass = 1320
charge = 2/3

class Strange(Quark):
mass = 87
charge = -1/3

class Top(Quark):
mass = 172700
charge = 2/3

class Bottom(Quark):
mass = 4240
charge = -1/3

# Gauge Bosons
class W(Boson, ElectroWeak):
mass = 80387
charge = 1
spin = 1

class Z(Boson, ElectroWeak):
mass = 91187.6
charge = 0
spin = 1

class Photon(Boson, ElectroWeak):
mass = 0
charge = 0

class Gluon(Boson, Strong):
spin = 1  # overrides attribute of Boson
mass = 0
charge = 0
def __init__(self, color, anticolor):
self.color = coler
self.anticolor = anticolor

# Higgs Boson
class Higgs(Boson):
spin = 2 # overrides attribute of Boson
mass = 125000
charge = 0

# Leptons  (6 + 6 anti = 12)
class Electron(Fermion, ElectroWeak):
mass = 0.511
charge = -1

class Tau(Fermion, ElectroWeak):
mass = 1776.82
charge = -1

class Muon(Fermion, ElectroWeak):
mass = 105.7
charge = -1

# masses are superpositional
class Neutrino_E(Electron):
mass = .0022
charge = 0

class Neutrino_T(Tau):
mass = 0.17
charge = 0

class Neutrino_M(Muon):
mass = 15.5
charge = 0

# Hadrons  (composed of 2 or 3 quarks, or "exotic" if more (not confirmed)

class Baryon(Fermion, Strong, ElectroWeak):
pass

class Nucleon(Baryon):
"""Baryon -- one of two kinds of Hadron"""

class Proton(Nucleon):
"""
Up("blue") + Up("red") + Down("green")
Proton() + Electron() -> Neutron() + Neutrino_E()
"""
mass = 938.27
charge = 1

class Neutron(Nucleon):
"""
Down("green") + Down("red") + Up("blue")
Neutron() -> Proton() + Electron() + Neutrino_E(ANTI)
"""
mass = 939.57
charge = 0

class Sigma(Baryon):
"""
Have two Ups or two Downs, and one something else (charm, strange,
bottom, top -- tops are too fast)
"""
pass

class Omega(Baryon):
"""
Have no Up or Down quarks
"""

class Lambda(Baryon):
"""
One Up, One Down, and one something else
"""

class Xi(Baryon):
"""
One up or down + two heavier quarks
"""

class Delta(Baryon):
"""
up and down quarks only, spin 3/2 vs. nucleon 1/2
Decay into nucleon + pion in short order
"""
mass = 1232

class Meson(Boson, Strong, ElectroWeak):
""" Meson -- the other kind of Hadron besides Baryon
Unstable.  Charged -> electrons + neutrinos, Uncharged -> photons
Flavorless (quarkonium):  quark + anti-quark of same type
Fl

Re: [Edu-sig] Problem with Python in Windows

2012-11-15 Thread kirby urner
Jackie's problem was fixed with the -n switch.

I've used Python 3.x extensively with Win7 since 3.x became available, also XP.

Python is used with Windows all over the place.  Windows is a flagship
platform for Python.

There can be confusions these days over whether one should run a "64
bit" or "32 bit" Python.

Not saying it's always a piece of cake (though it often is and can be).

I'm almost exclusively on Lion 10.7.5 with both Python 2.7 and 3.2
with Visual Python, other add ons.

My editor is PyCharm.

I'm also using Haskell with Xcode but I have done anything with the
gonads (strike that), with the monads yet.

Kirby


On Thu, Nov 15, 2012 at 1:20 PM, Medina, Patricia  wrote:
> We are having a problem running python 3.x with windows 7 also. It says it
> can’t (no processor or something), then it can. Seems like python and
> windows don’t play well together.
>
>
>
> From: Edu-sig [mailto:edu-sig-bounces+pmedina=ccisd@python.org] On
> Behalf Of JACKIE MASLOFF
> Sent: Thursday, November 15, 2012 2:58 PM
> To: edu-sig@python.org
> Subject: [Edu-sig] Problem with Python in Windows
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Problem with Python in Windows

2012-11-15 Thread kirby urner
Greeting Jackie:

Python's IDLE talks to itself over 127.0.0.1 and sometimes antivirus
software can police that circuit.

http://stackoverflow.com/questions/8588025/unable-to-load-idle-python-gui

I do suggest an experiment where you shut off any antivirus / policing
software you can think of, just temporarily.

If that does prove to be the problem, must antivirus software has ways
to allow exceptions.

http://stackoverflow.com/questions/3277946/no-idle-subprocess-connection

Also try booting Python with the -n switch per advice in the above post.

Kirby


On Thu, Nov 15, 2012 at 12:58 PM, JACKIE MASLOFF
 wrote:
> Yesterday I was running the Windows version of the Python 2.7.3 shell with
> IDLE as my editor. I saved a file and ran it and got some error message
> which unfortunately I don't remember. I then closed Python and when I tried
> to re-open it, I got the following error message:
>
> IDLE's subprocess didn't make a connection. Either IDLE can't start a
> subprocess or personal firewall software is blocking the connection.
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] more news 'n views

2012-11-15 Thread Kirby Urner
In related news (noting RurPL is continuing its advance)...

the Visual Python group (VPython.org) have been tackling in earnest
the challenge of seamlessly integrating their 3D mini-API to an OpenGL
experience within wxPython, the Python adapter for the wx GUI toolkit.

I simply subscribe to that list, I'm not in a dev role on that so
won't have answers to nitty gritty questions.  I'm not up to date on
wxPython either.

https://github.com/BruceSherwood/vpython-wx  (here's the source code)

Congratulations to Python for having so many signature educational products.

I do not count Blender, which although "educational" is more
professional and hard to master without skills unrelated to writing
code (more like an ESRI product in that regard, also using Python).

Other news:

Our user group meeting was packed as usual.

The woman who spoke after me had been teaching herself the whole LAMP
stack from quasi-zero, with Python her P language.

She was living in China when she started, coming from the USA (hazy on
the details) and so was already in a mode to want to learn new
language / customs / culture.

She had come a long way in a relatively short time.  She bravely spoke
of setbacks and disappointments as well as victories.   The audience
was empathetic.

Here's a link to an editable copy of her talk (shared by Portia):

https://docs.google.com/presentation/d/1IgeLis250VcbF-zdwmBlrHOqodB3PNoXU_m1piCZuCM/edit#slide=id.p

That talk followed nicely after mine (the first talk) about 'Pythonic
Andragogy'.

http://4dsolutions.net/presentations/pycon2013.pdf  (my slides)

I have this slide near the beginning listing various meanings /
connotations of Adult, gets wheels turning, and then the next slide is
titled 'Trendy / Spoofy' and I call out to the audience for a similar
word I'm looking for.

"Like 'Breaking Bad' I said, alluding to a popular TV show".
"Popular" one guy called out.  "Edgy" I said.  "For Adults" (as in
'Python for Adults') can be "edgy".

Then Portia's talk had some URLs with off color words in them.  Some
of the best teaching sites use profanity, even right in the URLs.

She underlined the word "edgy" as well, alluding to what we had just
heard in my talk.

Portia has that DIY love-to-make-things-that-work attitude that's so
celebrated around O'Reilly (my talk was somewhat a company talk i.e.
an ad for OST).

We enjoyed the new venue, Idealist, a company on the top floor of what
used to be a police headquarters for Portland but the police have long
since moved.

Urban Airship continues to be our regular host I'm pretty sure.

Although I'm listed as an organizer and helped start the meetup
presence (on meetup.com), PSF member Michelle Rowley is the chief
organizer who makes it all happen in this chapter.

Pictures:

http://www.flickr.com/photos/kirbyurner/8187740417/in/photostream
(police station, see adjacent slides for more meetup)

Portland is looking forward to the return of Holden Web (Steve Holden)
this Friday from ApacheCon / Europe.

He's producing ApacheCon / USA (also an international event) -- in
Portland this year (Hilton -- also a former Djangocon venue, great
reviews)).

(Steve Holden is the author of the Python courses I teach)

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] upcoming presentation...

2012-11-13 Thread kirby urner
I'm shortly to give a 20 min talk, one of two, at our monthly Python
Users Group this evening.

Usually we meet at Urban Airship but today we've moved to a new
location, I think maybe just for this month but I'm not sure.

Michelle Rowley, PSF member, is our most visible / public leader and
she does an excellent job.

Steve Holden, former PSF chairman and still director, would likely be
there tonight but he's still out of town as is typical for him.

Gary Litvin if you're out there:  I just noticed one of our members at
this other meetup I attend (not the Python User Group) was a former
acting headmaster at Phillips, one Simeon Hyde.

You probably don't go back that far (he was in his 90s, I was reading
his biography).

The presentation features my Tractor Graphics / Art, which moves the
turtle (ala LOGO) to a plain ASCII 2x2 list of lists, a Farm class /
instance.

The idea is not to write advanced code or to replace turtle.py but to
sketch an accessible curriculum that alludes to much of the lore.
High bandwidth stuff.

Tractor subclasses create the Mandelbrot Set in one module, successive
generations in Conway's Life in another.   We also do the Wolfram
patterns.

These are all "Systems Science" topics (our Portland State U has a program).

http://www.flickr.com/photos/kirbyurner/5583591181/in/set-72157625646071793
 (by PSU faculty member, connects the dots)

I'll show some source code in PyCharm and my slides if all goes as
planned, ya never know.

On the Math Forum front I've been using Haskell more.

It's somewhat easy to figure out how far along I've gotten in the
famous tutorial:

http://learnyouahaskell.com/chapters

Here's what Haskell looks like (not that different from Python in some
of its constructs, but not as imperative or dynamically typed of
course):

Module (baby.hs):

totatives :: (Integral n) => n -> [n]
totatives n
| n <= 0 = [ ]
| n > 1 = filter (\x -> (gcd n x) == 1) [1..n]

totient :: Integer -> Int
totient = length . totatives

Shell:

GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :l baby
[1 of 1] Compiling Main ( baby.hs, interpreted )
Ok, modules loaded: Main.
*Main> totatives 50
[1,3,7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49]
*Main> totient 50
20

More context:

http://mathforum.org/kb/message.jspa?messageID=7921700  (about half
way down -- not news to all of us I realize)

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] python vs processing for introducing programming?

2012-10-31 Thread kirby urner
I hope you stick around Thomas.  I'm one of the old timers here but
not a list owner or moderator.

My initial recruitment into Python was through my search for ways to
do 3D (spatial) geometry in cool ways + Guido's on-line CP4E essay.
The web was just getting going and there was a paucity of polyhedrons
out there in jpeg or gif format.  I used to count how many.

Later when it looked like I was using the term "CP4E" in new ways I
changed it to "P4E" (dropping C) to distinguish it from Guido's, and
"HP4E" which is kinda technical (hexapent is a way of dividing the
surface of a sphere, new book called Divided Spheres, a primer to Ed
Popko, has me in the biblio).

As far as Processing goes, my ears perked up at a party recently, some
young and cool dudes chatting, one of them raving about Processing.  I
wanted to but in but wasn't sure how, so I just listened.  I've
admired how Ruby may be used to program Google Sketchup.  "What might
Processing do *for me*" I wonder, greedily rubbing my hands.

My general sense is we don't need to shield students from nasty
aspects of whatever languages as they'll initially / naturally want to
try many, and we should encourage that adventuresome impulse that says
"I'll trying anything once".  They'll inevitably encounter VBA, old
(even new) FoxPro code, lots of Java in the course of bouncing around
in our worlds.

We hope also Scheme, maybe even some J who knows.  I've got Haskell
running on my Mac finally, and find lots of similarities with Python,
even though they're across the "static typing" divide from one another
(their both typed, just Python's type system is more open to duck
types).

New languages are coming along.  At the latest OSCON, it was all about
Go for me (the new language).  I'm mostly just dabbling, as my
training has encouraged me to do.

Python brings some gravitas to the classroom in that we already see it
as "world dominating" in the sense of having lots of real jobs doing
important stuff in many walks of life.

Python is a masterful invention, used with appreciation by code
wranglers around the world.

There's an analogy with English:  would as many people attempt this
difficult language if it was only the great poetry and Shakespeare at
the end of the tunnel.  No.  It's worthwhile to learn because it's so
widely used for everyday communications.  Otherwise why put up with
all that crazy spelling with idioms galore.  English is like the Perl
of human languages, concise to the point of cryptic mixed with verbose
and out of control (the skill of the coder matters so much -- in Java
they tried to make the boilerplate stronger).

My own freshman course in programming (engineering department) was a
wild ride through a whole bunch of languages:  FORTRAN, APL (my
favorite of the bunch), PL/1, SNOBOL, LISP, Assembler (simulated).
Not much OO because this was 1970s and Smalltalk was not running on
our IBM 360/370 I don't think.  I had to pay visits to PDPs and other
labs to try other tools, such as Tektronix graphics terminals (with
and extended version of APL as I recall), really rad.

However this was just me being "well rounded" as a liberal arts kinda guy.

I was anchoring in the philo department (Princeton had a good one, but
the engineering was good too).

Anyway, to make a long story short, POV-Ray was the free renderer of
choice, available on CompuServ with its own kind of Open License.

To write scripts for it, though, was tedious, so the job was to use
scripting languages to spew out "scene description language" (plugging
values in to boilerplate).

That became a back end for VRML output as well.

The kind of coding I was doing anticipated a way more mature project
called AntiPrism by Adrian Rossiter, which I believe was used for many
of the pictures in the Popko book cited above.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] "dot notation" (in favor of sharing it)

2012-10-29 Thread kirby urner
I really like the traffic on edu-sig as I sense the whirl-winds from
here.  Nice overlook.

True story:  this summer I did another Martian Math class, a short fun
experience for self selected mid-teens with a penchant for math and
things academic, so there by choice, on a bright summer's day, but
only for five days, the last one with the guardians/parents coming in
and see what's been happening.

University of Portland let me use its very best facility,
semi-circular desks, up to date PCs, switches to open and close the
blinds, a projector, great sound, adapters for external laptops as
well as the instructor version...  wow, what a great setup!

However, here's the thing:  I'm working through a nonprofit agency
that piggy-packs on willing colleges and university (Oregon Graduate
Institute, Portland State, Reed College...) and so has to communicate
as aliens, non-campus in some ways.  Martian Math needed VPython if I
were to run all my prepared demos (which the students could fiddle
with).  I have my heart set on Vpython, yet the IDLE for it wouldn't
work, not at all.  No one had tested it.  It was added last minute,
when I sent around my memo "you remembered about VPython right?"

Bottom line:  we could import it in a terminal window version of
Python, if we added the path to sys.path to a remote subdirectory.  A
major pain and I spent quite a few minutes (spread out) apologizing
for the awkward setup and saying how, if they did this at home,
everything would be smoother.  Because that's what I hoped, that
they'd do this at home.

Which brings me to the moral of my story:  if your organizational
setup is just a little too complicated, then chances are it's just too
impractical to get all the pieces in place.  You'll spend energy and
get some of it working, but the lingering frustrations will remain
significant.

What you start to approximate is that "ideal home environment" that
you hope each student will be cocooning in for real studying.  School
is just a place to get ideas to then go off with and learn about.
It's too distracting and frustrating to really expect to get much
studying done, not in a classroom surely.

"Just give us stuff to study and let us come to your for help."
That's the flipped classroom and perhaps the developing model more
generally.  We'll give you stuff to chew on at the school, but you're
expected to do a lot of studying on your own somewhere else, like in
your "dorm" (wherever you go to sleep and relax).

That's the college model though, and with younger kids I think the
feeling has been it doesn't really work that way.

I will end with two responses to that objection:

(1) although I've cast this as a generational picture, there's nothing
to stop adults from learning more Python / Sage / Mathematics were
they to have the time and motivation, and that might happen to a
greater degree in this shifting sands picture, i.e. our primary
clients for all this content are / will be adults in many situations,
and just because one works with kids (say 21 and under) today, doesn't
mean one's only contribution is to the kid-ed biz in the long run.

(2) The virtual classroom you get at home is not necessarily an
entirely solo environment, removed from peer pressure to perform and
to do team work.  A buzzing coffee shop is a less formal setting, like
a student center.  The smartphones are coming along quickly but the
tablets even faster (still more innovation happening).  So we have
that moving target to aim for.  I have a scientific calculator on my
Razr / M.  As an adult, I wouldn't be bullied into exchanging it for a
TI.

We showed a lot of Youtubes with good sound quality.  Mandelbrots and
Mandelbulbs especially.  We got VPython working well enough.  Great
class.  The guardians/parents were impressed.  Thank you University of
Portland and Saturday Academy.  Blog writeup is here:

http://worldgame.blogspot.com/2012/08/adventures-in-teaching-and-driving.html
(tedious geographic details about driving, suggest skipping, only gets
into Python towards the bottom, but the pictures are good).

Kirby

On Mon, Oct 29, 2012 at 8:31 AM, A. Jorge Garcia  wrote:
> (Apologies if you've read this already. I posted it from my cell last week
> but I don't see it in the edu-sig forum archives.)
>
> It is such a battle at both the High School and College levels of Math to
> try anything new. All the traditional Algebraic and Graphing Calculator
> techniques are so ingrained that it's nearly impossible to change anything
> from what is taught to how it is taught! This inertia is most evident from
> the resistance you see from other teachers, professors and administrators.
> Perhaps, I have only myself to blame, as I was one of the first adopters of
> Graphing Calculators in the 1990s in my schools and now I'm trying to get
> everyone to use python/SAGE on PCs instead.
>
> So, imagine my surprise when said resistance came from my students this
> year! I have successfully incorporated python/SAGE into my CS cu

Re: [Edu-sig] "dot notation" (in favor of sharing it)

2012-10-26 Thread kirby urner
On Fri, Oct 26, 2012 at 11:18 AM, michel paul  wrote:
> Beautiful!
>

Many functions are irreversible, tiz true.

digested (chewed (toasted ( m ) ) ) -->  encrypted

Good luck getting the plaintext back out again.  Talk about lossy compression.

Kirby


>> Then eating a piece of toast is an example of function composition? :)
>> And what would be the inverse function? :)
>>
>> Gary
>>
>> ___
>> Edu-sig mailing list
>> Edu-sig@python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
>>
>
>
>
> --
> ==
> "What I cannot create, I do not understand."
>
> - Richard Feynman
> ==
> "Computer science is the new mathematics."
>
> - Dr. Christos Papadimitriou
> ==
>
>
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] "dot notation" (in favor of sharing it)

2012-10-26 Thread kirby urner
On Fri, Oct 26, 2012 at 7:08 AM, michel paul  wrote:

> Hey Kirby,
>
> I've enjoyed the discussion, and of course I completely agree that dot
> notation deserves attention in current math education. However, getting
> that discussion going? Wow, from what I've seen ... it would be nearly
> impossible. It would pretty much just get ignored.
>
>
Well, at least we're talking here.

My mom's theory is you can't get anyone's attention about anything anymore
because we're all high on sugar.

She grew up overseas a lot where they don't have so much sugar in
everything.  She thinks US kids might as well be on meth, that's how far
gone.  No wonder they're out there shooting it up like no other culture.
Sugar Pops!


> Yesterday I was involved in a math education group at my school where an
> example suggested for introducing 'function' was 'toast'. Basically, you
> put bread into the toaster, and  out comes toast!
> So 'toasting' is a function. Seems to make sense, right?
>
>
Hah.  "Toast" is interesting as in English it's both a verb and a noun.
"To toast", "make toast", "was toasted".

I do like linking "functions" to "verb things that do stuff" i.e. they're
active, though another picture of a function is "a map", which is more
static, like a dict.

What might confuse some students is how Python in particular uses builtin
"range" to create what we would typically call a "domain" in Algebra 1.

f = lambda x:  x * x + 2
mapping = dict ((x, f(x)) for x in range(10))

One could toggle the namespace and just go:

domain = range  # assignment of a synonym i.e. mapping = dict ((x, f(x))
for x in domain(10))



> Well, sure, so long as you're allowing for mutation!  A slice of bread is
> an object, and, like most objects, it can change its state. Makes total
> sense.
>
> However, is that really what they're thinking about? in traditional
> mathematics, the kind they think they want to teach in school, variables
> aren't supposed to change their values once assigned. That's a huge deal. The
> discussion went on from the toaster to use an example like f(x) = x + 2,
> let's say. You put in x, and out comes y. OK ... however, x is still x. x
> did not become y. If you say x=5 then a little while later say x=7, well,
> it sounds like you're running for office! So the analogy actually breaks
> down. A math teacher would not want their students to develop the
> misunderstanding that x turned into y. If you actually want to say that,
> that's OK, we have developed ways to express that.
>
>
Probably where you'll get a lot of overlap is in geometry.  A tetrahedron
of vertexes P,Q,R,S rotating in space, will have changing (x,y,z)
coordinates for each of its vertexes.  We can speak of P.x, P.y, P.z
without too much fear of ridicule by the snoots (math heads -- they tend to
be snooty, whereas engineers are maybe more snarky).


> So it seems to me there are unrecognized conflicts in schoolish
> mathematical thinking, and I believe discussion of dot notation and other
> aspects of computational thinking could help shed light on them, could make
> the unconscious conscious.
>
> -- Michel
>
>
I support these deep dives into what might be cognitive dissonance issues.

Right off the bat, the Python types.FunctionType is not some classic
Dolciani type thing, guaranteed not not be a relation.

It's a related namespace (Python's is, to Dolciani's) but not identical.

However, contrast is information, which is why the Lex Institute for
teaching languages (of 'Who is Fourier?' fame) recommends learning more
than one language at once.  The brain learns from differences, contrasts,
and having these little deltas all over the place, separating namespaces
that are clearly close on some level (like the Latin-based languages) is
highly informative and conducive to learning.  So goes the theory.

Ergo:  teaching schoolish math in tandem with something a little different,
call it industrial math, or aerospace math, or STEM math, could be just the
ticket.

Unless of course your high on sugar (e.g. had Sugar Pops for breakfast),
then just forgeddaboutit.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] "dot notation" (in favor of sharing it)

2012-10-25 Thread kirby urner
On Thu, Oct 25, 2012 at 3:00 AM, gerry lowry +1 705 429-7550 wasaga
beach ontario canada 
wrote:
> Hello Kirby, i took a very brief look at your 
> http://worldgame.blogspot.com/2012/10/dot-notation-again.html.
>
> There does not appear to be any way to comment at the above link.
>

Right, I've repurposed the blog format to serve my needs.  It's more a
journal and gives me brownie points within my "church" (Quakers are
expected to keep journals).

Turning on comments would mean an endless fight against bots (includes
humans who don't pass the Turning test) saying "wanna buy an iPod?"
all over my journal.  I always have ad words turned off too.

> there, i noticed your "More SQL too while we're at it" ..
>
> imho, i think the time has come for less SQL via more LINQ.
>
> Lions and tigers and bears, oh my!
> Lions and tigers and bears, oh my!
> Lions and tigers and bears, oh my!
>
> LINQ is from the house that Bill built, however, see 
> http://www.linqpad.net/WhyLINQBeatsSQL.aspx
>
> GOTO http://www.linqpad.net/ for a FREE awesome tool that also does SQL, 
> including
> LINQ <==> SQL translation in some cases.
>

There's always they "gotta understand what the ancestors" wrote argument.

I have no problem with the "this is SQL, this was the tabulation
system of choice for several generations, still used today, but now we
also have..." approach.

Hollerith machines also of interest, "keeping tabs" more generally.

> PL/I died because it came from IBM and people hated IBM ...
> ergo, the PL/I baby was tossed out with the bath water.
>

We do study about IBM's business machines' utility in Nazi Germany,
per my Pycon presentation of 2009 ("we" being my brand of STEM teacher
-- we study population genetics and the pseudo-sciences that adhere to
to this kind of study).

> LINQ in spite of coming from "the evil empire" will not die
> imho because LINQ has too much inertia and is also too good.
>
> -
>
> i've mentioned this long time ago in one of the python forums
> with regards to OLPC ...
>
> Kirby, your http://worldgame.blogspot.com/2012/10/dot-notation-again.html
> brings to mind iverson's "Notation as a Tool of Thought" wherein he quotes 
> Whitehead:
>
> "By relieving the brain of all unnecessary work,
>  a good notation sets it free to concentrate on more advanced problems, 
> and
>  in effect increases the mental power of the race."
>

Yes, APL was the first language I loved, and was interactive in a
console, whereas FORTRAN and PL/1 were more easily hated for not
having an REPL.

Later I went to dBase (dBase II... dBase IV, FoxPro, Visual FoxPro) --
always with an REPL.

Yes, Iverson's notion that a mathematical notation could (should) be
"machine executable" helped break down the prejudice that sees "math"
on the one hand and "computer languages" on the other (a dumb cultural
blindness).

I jumped into J pretty early, even before I got into Python.  I wrote
an article, 'Jiving in J' in which Kenneth Iverson himself helped
catch some typos:

http://www.4dsolutions.net/ocn/Jlang.html

> i suggest that the tool for the notation be iverson's J 
> (http://www.jsoftware.com/);
>
> i suggest also that J can be taught K-12 (assuming we can teach teachers to 
> teach, period*).
>
>   * a period is also a dot.
>

We need students who can learn, period, is what we seemed to come to
at the Shuttleworth meeting.

http://mathforum.org/kb/message.jspa?messageID=7909704

This strategy doesn't hinge on getting the adult teachers up to speed.
 That's not likely to happen in most cases (teachers have no spare
time and in the US especially are not expected to innovate).

With a safe space to study, bandwidth, motivation, you don't need
anyone in your immediate radius to "know J" (or anything much of about
anything for that matter).

> -
>
> BTW  FREE event: APL@50  2012.11.01
>
>  York University, Ontario, Canada:  
> http://www.cse.yorku.ca/museum/apl50/index.html
>

APL is wonderful.

However a lot of people who use it are just financial sector snobs who
want to be "indispensable" working for whatever investment house.
They love that it's cryptic and a barrier to mere mortals.  Perl
culture gets that way too.

Some coders want to write "precious" code that only they can read and
interpret at the end of the day.

I'm not a big fan of "cleverness for the sake of cleverness" although
I do like our bagpipe-playing unicyclist (a guy in the neighborhood).

Thanks for posting, sounds like we're on the same page to some degree.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] "dot notation" (in favor of sharing it)

2012-10-24 Thread kirby urner
Capping the Math Forum thread with a blog post entry point:

http://worldgame.blogspot.com/2012/10/dot-notation-again.html  (I may
link back the other way -- not sure yet)

Also X-Ref:  Math 2.0:

https://groups.google.com/d/msg/mathfuture/bw7UfqqNk9w/oRRsA5YaY3IJ
(reply to a Pythonic Math teacher)

Kirby


On Fri, Oct 19, 2012 at 6:21 PM, kirby urner  wrote:
> Still going.
>
> http://mathforum.org/kb/message.jspa?messageID=7909175
>
> Ada Day posting:
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] "dot notation" (in favor of sharing it)

2012-10-19 Thread kirby urner
Still going.

http://mathforum.org/kb/message.jspa?messageID=7909175

Ada Day posting:


-- Forwarded message --
From: kirby urner 
Date: Wed, Oct 17, 2012 at 10:07 AM
Subject: Re: [Diversity] " How will [] free software be improved by being
developed by a bl ack transsexual woman ?"
To: Kÿra 
Cc: wo...@lists.fedoraproject.org, ubuntu-wo...@lists.ubuntu.com,
wo...@lists.womoz.org, iss...@linuxchix.org, divers...@python.org,
womeninfreesoftw...@gnu.org


On Wed, Oct 17, 2012 at 12:14 AM, Kÿra  wrote:
> Yesterday was Ada Lovelace Day, and I wanted to bring up the types of
> views that we are up against right now. The quote in the subject line is
> one among many critical responses on Reddit to the Free Software
> Foundations post for Ada Lovelace Day.
>

FYI.

I wrote 'In Defense of Ada' some years ago, when a New Yorker article
(the cover article as I recall), tried to take back her "first
computer programmer" title / reputation and give it to someone else (a
guy).

http://www.grunch.net/synergetics/adaessay.html

The kind of diversity I work on most is attracting more non-English
speakers to open source / free software.  This includes many women of
course.

Kirby

On Wed, Oct 17, 2012 at 11:51 AM, kirby urner  wrote:

>
>
> http://mathforum.org/kb/thread.jspa?threadID=2407414
>
> Interesting thread IMO.
>
> Kirby
>
>
> PS: also enjoying that Ada Day threads on Diversity (python.org)
>
>
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] "dot notation" (in favor of sharing it)

2012-10-17 Thread kirby urner
http://mathforum.org/kb/thread.jspa?threadID=2407414

Interesting thread IMO.

Kirby


PS: also enjoying that Ada Day threads on Diversity (python.org)
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Education Summit and a personal note

2012-09-30 Thread Kirby Urner
I've accepted the e-Vite already and put it through to my boss to ask the
dean if there might be budget to send me as a rep from my school, vs. me
digging into after taxes earnings.  We shall see (big wheels turns slowly).

I just hope we get it sorted out soon enough to not miss a seat.  I know
Pycon fills quickly.


Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] python vs processing for introducing programming?

2012-09-27 Thread kirby urner
On Wed, Sep 26, 2012 at 9:48 AM, kirby urner  wrote:

>
>> I'd be interested in hearing from anyone with experience in teaching
>> Processing to this age group, and anyone with any thoughts on the topic.
>>
>> Thanks,
>> Andy Judkis
>> Academy of Allied Health and Science
>> Neptune, NJ
>>
>>
> I probably shouldn't be answering this as I don't have the Processing
> experience, though would gladly attend a work shop at one of those
> "cultural literacy for STEM teachers" events in the planning.
>
>
When I wrote the above, I was all wound up from writing this essay, kinda
long, so just a link, but a good overview of my outlook, oft re-stated.

http://mathforum.org/kb/message.jspa?messageID=7896983

I would expect these views to be unpopular on math-thinking-l, another list
I've haunted, as it's so colored by the "object oriented outlook" (OOO or
O3).  :-)

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] python vs processing for introducing programming?

2012-09-26 Thread kirby urner
>
>
> I'd be interested in hearing from anyone with experience in teaching
> Processing to this age group, and anyone with any thoughts on the topic.
>
> Thanks,
> Andy Judkis
> Academy of Allied Health and Science
> Neptune, NJ
>
>
I probably shouldn't be answering this as I don't have the Processing
experience, though would gladly attend a work shop at one of those
"cultural literacy for STEM teachers" events in the planning.

I've always advocating a mix of languages and it sounds like you get that
with Scratch, its own language.  I usually think of JavaScript as the other
language, in conjunction with learning about the DOM.  But then I also
think of J from jsoftware.com, in part because it's so exotic and different
from Python, the one I teach the most.

I wouldn't see replacing Python at this point.  The fact that it's so used
in everyday science and industry makes it more than ready for prime time,
both as a gateway (door opening) language and as an end in itself.

My colleagues and I believe in more fusion among the STEM tracks and topics
to where the lines between "mathematics" and "computer science" and
"engineering" and "chemistry" and "physics" have all been blurred.  One
brings all one's knowledge to bear when solving problems.  Individuals may
specialize in their skills and haunt some workshops more than others, but
the curriculum itself is more meandering.  Students are encouraged to
wander (the liberal arts ideal).

What used to be called "vocational education" (where you use equipment,
tools) has not disappeared.  3D printers are just starting to revamp that
area.  CAD is a bridge, and for that you need geometry / trig.  GIS / GPS
is likewise a core area where Python gets used (thinking of Esri products
in particular).

Against this backdrop, I'm sure Processing has a brilliant role to play,
along with other classics.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] PyCon Education Summit Update

2012-09-05 Thread kirby urner
On Wed, Sep 5, 2012 at 11:52 AM, Nicholas H.Tollervey  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi Folks,
>
> If you're interested, there's a video of yesterday evening's Google
> "hangout" meeting where I get to talk to a bunch of teachers (and even
> a couple of students) about what we're up to at this year's PyconUK in
> a few week's time. Many thanks to Alan 'teknoteacher' O'Donohoe for
> organising and hosting it:
>
> https://www.youtube.com/watch?v=PAqQklpZXGc

Quite an interesting video I'd say.  I'm about half way through.
Google Hangout is new in 2012.  Growing up, we envisioned these
talking head meetings (all the science fiction movies have them) but
now that we really do, it's interesting to see the nuances.

There's a sense of a movie director and editor, even through it's just
software that detects who is making the most noise.  That doesn't
always work, so you'll hear one speaker will you're looking at
another.  That gives the sense of a director making editing choices,
making POV shots and so on.  It's also interesting to have all these
talking heads lined up but not really looking into the camera, as
they're looking at their own screens -- a different aesthetic from
television, which wants to get the anchor person looking straight at
the audience.  To have the one guy ironing -- that's fantastic.  Nice
touch.

Good ethnography, right at the interface between a teaching /
classroom youth-focused group, and software developers, with basic
namespace exchange going on, i.e. meanings of basic terms.  What's a
"Dojo"?  What's a "sprint".  When the word "fork" is casually used, as
in "we forked the dojo pattern" (paraphrase) I wonder how many
non-geeks miss the meaning i.e. "to fork" is said without 2nd thought
by those who use version control, whereas in many walks of life it's
like "what's version control?".

Bravo in any case.  Good video.  Google Hangout is a great resource,
I'm persuaded.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] PyCon Education Summit Update

2012-08-22 Thread kirby urner
> The way I articulate my own position these days is that to learn
> mathematics the way it's needed in STEM, you need at least one
> computer language.**
>

Oops, forgot my little footnote:

http://mathforum.org/kb/message.jspa?messageID=7872776

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] PyCon Education Summit Update

2012-08-22 Thread kirby urner
On Wed, Aug 22, 2012 at 8:06 AM, Vern Ceder  wrote:

<< snip >>

> Also, I've developed a basic statement of the topics we'll be covering:
>
> "As I see it there are the three core issues that most impact Python
> education today: engagement, curriculum and teaching. So I'm proposing that
> we frame the topics for the summit accordingly.
>
> Engagement -  By "engagement" I mean getting people involved - attracting
> learners and letting them know why they should be eager to learn Python,
> recruiting teachers, sponsors and supporters with the skills needed to
> facilitate that learning, and then keeping everyone involved in the
> community. You could also call this "outreach" or even "marketing". Whatever
> you call it, we need to attract people who want to learn Python and the
> people and the people to help satisfy that need.
>

Wow Vern, you've come a long way with this, good to see it's evolving
into an event with a definite shape, size still unknown.

I hope we might have a similar summit at OSCON with all interactive
languages (those with an REPL) invited (if already in the OSCON subset
which I'm well aware is Open Source only e.g. no Mathematica).

The way I articulate my own position these days is that to learn
mathematics the way it's needed in STEM, you need at least one
computer language.**

That computer language may well be Python but I'm in no way expecting
or wanting some convergence to a single choice, as I think diversity
is the only healthy response to complexity and "one language fits all"
is of course a distopian ideology that must be countered wherever it
surfaces.

That being said, Python seems to be in high demand at my school and
that's without much direct advertising or recruitment.  Our logo (a
Red Leaf) was nowhere at OSCON (somewhat ironically).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] teaching in a classroom again...

2012-08-06 Thread kirby urner
On Mon, Aug 6, 2012 at 11:10 AM, Henrique Bastos  wrote:
> Hello, Kirby!
>
> I really liked your use of VPython to teach. I didn't knew this tool.
>

Yes VPython is such a fantastic tool.  We've had a proponent argue
vehemently it should be considered part of Python's standard library,
if it hopes to stay relevant...

A counter-argument is "standard library" is not about "most important"
or "most critical" just more a matter of jurisdiction in that the PSF
takes explicit responsibility for upkeep of the former.

Visual Python is developed / maintained independently of any PSF work
to assemble the various Python distros via python.org

Anyway, like Numpy, the VPython option could be mission critical to
some schools (such as mine, for that week anyway).

> I'm already organizing a learning activity with a friend who is a physics 
> teacher to see how the students feel about this visualization tool.
>

It takes only two lines of code to make something pop up that's visual:

>>> from visual import *
>>> sphere(radius = 1, pos=(0,0,0), color=color.red)

and that's already more arguments than really necessary.

However, to get things moving, which is what physics is usually
wanting, you have to keep updating pos in a loop, but then you don't
want things to go too fast, so there's controlling the frame rate.

In other words, to get things to actually move in screen takes more
doing.  My movingballs2.py provides an example.

> Thank you very much for sharing.
>

Best wishes with your experiments.  I've seen some really amazing
talks showing off Python's capabilities talking directly to OpenGL.
Like this guy's:

http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-algorithmic-generation-of-opengl-geometry-4900884

In other words, VPython is not by itself Python's only grip on 3D
visualizations.  However, it's one of the sleekest with one of the
fastest learning curves.  Definitely worth a close look.

Kirby

> []'s,
> --
> Henrique Bastos
> +55 21 9618-6180
> http://henriquebastos.net
> Twitter: henriquebastos
> Gtalk: henri...@bastos.net
> Skype: henriquebastos.net
>
> On 06/08/2012, at 14:13, kirby urner  wrote:
>
>> On Thu, Aug 2, 2012 at 7:31 AM, kirby urner  wrote:
>>> I've again been teaching teens, no my usual practice these days, but a
>>> fun variation on the theme.
>>>
>>
>> OK, I finished this one week gig.  Here's a write-up, though mixed
>> with the flotsam and jetsam of life:
>>
>> http://worldgame.blogspot.com/2012/08/adventures-in-teaching-and-driving.html
>>
>> Back to regularly scheduled programming (for me that is),
>>
>> Kirby

>> Edu-sig mailing list
>> Edu-sig@python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] teaching in a classroom again...

2012-08-06 Thread kirby urner
On Thu, Aug 2, 2012 at 7:31 AM, kirby urner  wrote:
> I've again been teaching teens, no my usual practice these days, but a
> fun variation on the theme.
>

OK, I finished this one week gig.  Here's a write-up, though mixed
with the flotsam and jetsam of life:

http://worldgame.blogspot.com/2012/08/adventures-in-teaching-and-driving.html

Back to regularly scheduled programming (for me that is),

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] teaching in a classroom again...

2012-08-02 Thread kirby urner
I've again been teaching teens, no my usual practice these days, but a
fun variation on the theme.

Saturday Academy kids are self selected and tend not to have ego
problems around whether they're "smart enough" or whatever it takes.
The all believe they have the "right stuff" ultimately.

The classroom is probably the best I've had, in terms of being able to
project content on the big screen.  I have a button to lower the
blinds.

I used to think Hewlett-Packard would go into the classroom design
business as there's more one could do.  Once could have a button to
project each student's console to the front, for example, perhaps
under the teacher's control.

That takes software, not just hardware.  You'd need to work it out
from the ground up.  Ideally, the school is build like a theater or
holodeck, to accommodate all sorts of classroom configurations.  Of
course we don't really have such schools today, unless you count
Universal Studios.

I've uploaded some pix to Flickr:

http://www.flickr.com/photos/kirbyurner/7680435316/in/photostream

http://www.flickr.com/photos/kirbyurner/7680433664/in/photostream/

(etc. to the left and right of those)

These are middle school aged, so like averaging 14 or so years old.

What I do is intersperse mini-talks on Python with hands on play with
showings of Youtubes.

Yesterday we zoomed in on Mandelbrot sets before lunch, then switched
to Mandelbulb fly-throughs after lunch.

I have them for two hours, with a lunch break in between of under an hour.

The title of the course is 'Martian Math and Programming in Python'.
The Martian part is rather subtle in that I just plant some ideas.

I bring a large tetrahedron to the room, plus carry it through the
halls, turning heads.

In other versions of this course I might dwell on a particular
storyboard / story problem wherein Earthlings and ETs are working
together on a big dam (hydro-electric) but measure concrete in
different units (cube vs tetrahedron respectively).

Here's some code I'll be taking on memory stick today, reviewing some
of what we've been doing.

We're using Python 2.7 + VPython on Win7.

===
"""sa1.py"""

from visual import *
import math

def ballmatrix( ):
for x in range(-10, 10):
for y in range(-10, 10):
sphere(radius=.5, pos=(x,y,0))

def hidef( ):
for x in range(-100, 100):
for y in range(-100, 100):
sphere(radius=.5, pos=(x,y,0))

def mandelbrot( ):
for r in range(-40, 10):
for i in range(-20, 20):
   c = complex(r/10.0, i/10.0)
   z = 0
   for times in range(10):
   z = z*z + c
   if abs(z) < 1:
   sphere(radius=.5, pos=(r,i,0), color = color.black)
   else:
   sphere(radius=.5, pos=(r,i,0), color = color.red)


def mandelbrot2( ):
for r in range(-40, 10):
for i in range(-20, 20):
   c = complex(r/10.0, i/10.0)
   z = 0
   for times in range(10):
   z = z*z + c
   thelength = abs(z)
   if thelength < 1:
   sphere(radius=.5, pos=(r,i,0), color = color.black)
   elif 2 >= thelength >= 1:
   sphere(radius=.5, pos=(r,i,0), color = color.red)
   elif 5 >= thelength >= 2:
   sphere(radius=.5, pos=(r,i,0), color = color.orange)
   elif 20 >= thelength >= 5:
   sphere(radius=.5, pos=(r,i,0), color = color.green)
   else:
   sphere(radius=.5, pos=(r,i,0), color = color.blue)

mandelbrot2()

===
""" sa2.py """

from visual import *
import math

"""
color = (r, g, b) where r,g,b are between 0 and 1.  red green blue
"""

def colorchange():
g, b = 0, 0
for r in range(0, 100):  # increase red from 0 to 1
   ball = sphere(radius=10, color=(r/100.0, g, b))
   rate(50)
   ball.visible = False
   del ball
r, b = 1, 0
for g in range(0, 100):  # increase green from 0 to 1
   ball = sphere(radius=10, color=(r, g/100., b))
   rate(50)
   ball.visible = False
   del ball
g, b = 1, 1
for b in range(0, 100):  # increase blue from 0 to 1
   ball = sphere(radius=10, color=(r, g, b/100.))
   rate(50)
   ball.visible = False
   del ball
ball = sphere(radius=10, color=(1,1,1))  # white


colorchange()

===
""" sa3.py """

from visual import *
import math
from random import randint


def say_something():
"""
Get something from the user to display
"""
saywhat = raw_input("What shall I print? ")

text(text=saywhat,
align='center', depth=-0.3, color=color.green)


def rand_color():
"""
pick three random numbers between 0 and 1, e.g. 0.5 or 0.3
"""
r = randint(0,100)/100.
g = randint(0,100)/100.
b = randint(0,100)/100.
return (r,g,b)


def say_alphabet():
x = -25  # offset to the left
for c in "ABCDEFGHIJKLMNOPQRSTUVWZYZ":  # jump through each letter
 

Re: [Edu-sig] Updated Blog - Khan Academy: Savior of the American Educational System?

2012-07-29 Thread Kirby Urner
On Sun, Jul 29, 2012 at 4:10 PM, A. Jorge Garcia  wrote:
>
> I blogged about Khan Academy recently. If you've seen my post, you may want 
> to revisit it as I've been updating it over the last few weeks. I've been 
> getting a lot of email queries about SmartBoarding and ScreenCasting so I've 
> been adding them to this blog post:
>
> http://shadowfaxrant.blogspot.com/2012/07/kahn-academy-savior-of-american.html
>
> HTH,
> A. Jorge Garcia
> Applied Math & CompSci
> http://shadowfaxrant.blogspot.com
> http://ww.youtube.com/calcpage2009
>
>

I've been writing about Khan Academy too sometimes:

"""
Keith Devlin's idea at the Oregon Math Summit (1997) was that basic
competence in computation and numeracy needed to diffuse throughout
the curriculum, so that these generic life skills would not be overly
confused with "mathematics" in particular. I support that idea, but
in part I see the process ("cultural osmosis" you could call it)
happening outside the school. 'Sesame Street' marked a turning point
in elementary education in many ways. 'Khan Academy' is just code for
didactic content in short clips, i.e. 'Sesame Street' at a higher
level (might still feature animation and puppets -- Khan's are one
aesthetic among many).

In other words, if we're talking about how to advance the level of
STEM sophistication in the broader culture, among youth and oldsters
alike, it's not a given that "aligning the the Common Core" is where
to focus -- more a side show than a big tent activity.

We have far more leverage in other areas, such as in the content of
Saturday morning cartoons.

Bill Nye the Science Guy made a big difference to STEM and yet those
silly DCers don't award "best teacher" to TV personalities, because
they're too busy inspiring a different set of vocations as encoded in
Department of Labor catalogs (i.e. "TV personality" is not coded as
"Teacher"). Katie Couric is not considered a "teacher". She's an
"anchor". Such are the exigencies of the English language and its
many calcified / codified grammars (language games).
"""

http://mathforum.org/kb/message.jspa?messageID=7854797


Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] first thoughts after OSCON

2012-07-21 Thread kirby urner
I've been to a number of OSCONs in my day, this being the 2nd wherein
a participated behind the scenes on the talks selection committee, a
pretty big commitment actually.  I've also been a speaker, which is
pressure of a different kind.

OSCON is like a weather sensing device, very sensitive, but of
patterns to complicated for the solo brain to grok, at least in the
short time -- takes time to consider.

Like this year the Cloud was big, with both Rackspace and HP about to
get more public about their support for the OpenStack solution, which
is very much a Python project, which is not to say Java can't be spun
up in a virtual server just like anything else i.e. a commitment to
Python as a platform language has nothing to do with limiting the
freedoms of developers.  Yes, we have a lot of Java programmers out
there, thanks in large degree to a chapter wherein people went gaga
for Java, especially in CS.  And why not?  It's a good and capable
language.

I worked at upping my level of appreciation for Go, no not the board
game, the computer language.  Yes it's open source and yes the talks
and tutorial were well attended.  I bought a book on Go as well, got
it compiling on the Air.

Could there be an implementation of Python in the Go language someday?
 That was my first question when Go started to get press, whereas the
more computer illiterate were asking dumb questions like was Go the
new Python killer.  One's a system language the other's an agile.  If
history is any guide, there'll be be a GoPython someday.

The Python and Perl tracks were both strong this year.  You can't beat
Damian Conway for drawing an audience.  I'm a huge fan of Perl
mongers.  Sorry but that divide and conquer thing didn't work.  We
agiles are soul mates.  OSCON got going thanks to Perl.

What was kinda weird though was the education track in F-151 (kinda of
like Area 51).  The Common Standards buzz is a new one at OSCON,
reminiscent of OLPC in terms of reaching a peak, feeding a frenzy, but
I didn't sense the same levels.  To be fair though, I didn't make it
to either Texas Pycon, when OLPC was flying high.

Pearson was there, and the Shared Learning Collaborative.

http://www.oscon.com/oscon2012/public/schedule/detail/26434

What were they there for, mostly?  To recruit?  To share source code?
To attend others' talks?  These are questions to take back for further
analysis.

I guess one could ask a similar question about O'Reilly School of
Technology, but no, not really, as (a) OST presented no talks and (b)
we're just O'Reilly Media (part of) anyway, but with a Red Leaf logo,
so we're an expected presence, with an already obvious agenda.

In the case of the FERPA talk, it sounded like university admin might
like more help with their dino sinking ship codebase, and I agree,
they could use some.  No question.

What I took away from my brief work with Portland State (vicariously,
not a direct contract) was that universities should do a lot more to
eat their own dog food when it comes to administrative software.
Start from the open source "clay" the real world economy uses, and
take this as a teaching opportunity, with lessons about how closed
data is still quite possible in this environment and in fact security
is more robust as computer literacy improves across the population.

I look forward to more university presence someday.  They should be
getting their faculty from us.  We do STEM, not just computer science.
 The focus on outdoor sports, quantified self, camping (for real),
planting sensors and enviro-cams around the world (oreilly/animals) is
already well entrenched.  The idea this is a group of cola drinking
nerds eating pizza in windowless basements is way too 1970s.  If
that's your picture, time to hit fast forward on that antique VCR of
yours.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Education Room (Pycon 2013)

2012-07-13 Thread kirby urner
On Wed, Jul 11, 2012 at 4:36 AM, Nicholas H.Tollervey  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I'm a former teacher currently working as a Python developer and I've
> stepped up to help organise the "Education" track at this year's
> PyconUK (happening in September - see http://pyconuk.org).
>

That all sounds like excellent thinking and planning Nicholas.

My experience is a minority will seize on the new toys / tools and
share their delight with peers.  Many will only be swayed if they see
student enthusiasm tick up as well, but that requires getting that far
(so where's the door to get in again? -- not math class they say).

The idea of a classroom especially outfitted for computer-based
learning is still new and undeveloped.  The idea of "passing a
terminal around" or better, having students enabled to share their
screens in real time, front projected, or to join the teacher at the
command line (two keyboards feed the same console), or to split the
console among screens... we don't try enough such experiments.

I always thought HP would get into that, but then "selling classrooms"
is not quite like "selling cath labs" (more GE's line of business) --
could be though, if schools were built more like hospitals.

PythonAnyhwere:  https://www.pythonanywhere.com/

http://python-in-the-lab.blogspot.de/  (Lantz is looking interesting)

More open sorcery needed.

The economic bottleneck in my state of Oregon is that CS is an
elective meaning it doesn't count towards requirements.

The idea that getting serious at the command line, learning all that
open source jazz, could count towards the math requirement was what we
floated, as three years of math is required, by order of the state.

The lawyers who write such standards *may* know computers exist but
this should not be taken for granted.  Remember, Oregon is home to
places like Boring, Fossil and Remote.

And Dufur:
>>> "Ask not what Dufur can dufur you, but what you can dufur 
>>> Dufur".replace("dufur", "do for")   #  Heh.

So say you've done your algebra / geometry and need one more year of
math, and maybe calculus isn't quite your cup of tea.

We've got this other thing for you then.  Piece of cake.

Didn't fly yet though, except informally it's what half the kids are
doing anyway.  Like my daughter (18) got help rooting her phone to
upgrade the OS, but don't expect any classes in your high school to
help with that.   You're lucky if there's one dusty room with Ubuntu
somewhere.

If you wanna learn fast, make up excuses to stay home, where the
bandwidth is better.  Sad but true.

But with teachers coming up to speed more  could be a whole new
ballgame.  School could become relevant again, maybe!

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] more pix of Raspberry Pi

2012-07-13 Thread kirby urner
> I've been able to make RaspberryPi smoothly play FullHD video, here is
> the screenshot -
> https://lh5.googleusercontent.com/-yd7QUT3ujlQ/T-2QzuE5POI/CGs/_JeF_q3YAzQ/s1024/P1010060.JPG
>
>>
>> Kirby

Way cool.  Looks like 'Bugs Life' on screen maybe.

We figured out how to modify /etc/default/keyboard to make it "us"
instead of "gb" (Great Britain) -- didn't get as far as audio out yet.

The x gig boot / storage device is not included in the $30 price tag.
These can be swapped around with different distros.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] more pix of Raspberry Pi

2012-07-12 Thread kirby urner
Steve Holden is fresh back from the UK and had one of these in his
pocket (yes they're quite tiny).

Had it working in studio within minutes:  some happy tweeting across the room.

Steve Holden ‏@holdenweb

The @Raspberry_Pi looks pretty neat projected on my living room wall.
Pictures coming courtesy of @thekirbster

5m Kirby Urner Kirby Urner ‏@thekirbster

@holdenweb here's the blog post, w pix
http://controlroom.blogspot.com/2012/07/from-open-bastion.html

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Education Room (Pycon 2013)

2012-07-10 Thread kirby urner
Vern and I have been chatting off list about his plans for an
Education Room (ER? -- name collision) at Pycon 2013 (US).

I've been thinking of exhibits, independently of the poster space,
giving a sense of Python's span, as well has history, vis-a-vis the
education systems.

We've talked about Raspberry Pi and the RaspberryJam meetups these
inspire, and OLPC -- I thought we should exhibit an XO tablet or two,
running Sugar.  Could we have those as prizes?

Vern talked about his sense, chatting with educators, that we still
lack a great set of resources for K-12 use.  'Mathematics for the
Digital Age' is great, but couldn't we have more along these lines?

'How To Think Like a Computer Scientist' has also come a long way
since Jeffrey Elkner helped bring it into Python culture, where it has
remained.

http://www.greenteapress.com/thinkpython/

I find myself recommending it to students pretty often.

Regarding the future of Python in K-12, I think there are other
discussions going on that will have an impact.

STEM is a buzzword these days, but more than that it's the old school
idea of a more integrated curriculum, wherein S, T, E and M have much
less of a "standalone" or "stand offish" attitude.

For quite awhile, I was hoping to get a blend of CS and math topics
(like in 'Digital Age') accepted for math credits in the State of
Oregon.  I wasn't the only one with this hope.

We had that workshop / planning meeting about it 3 years ago now. [1]

The "Digital Math" or "Computational Thinking" or Discrete Math"
topics were floated.  I was pushing a 4 year track parallel to
established "analog math" so we could have some green field
development.

That's still a useful vision for me, but I've more recently been
attracted to STEM as a way to bring more Python in particular into
more student spheres.

The idea of a machine as a "formal system" is strong enough to keep
the math purists from retaliating too concertedly.  It's not like
we're getting off topic.[2]

We shall see.  I joked we should call it the World Domination Room in
light of Python's evident success, a tongue-in-cheek allusion to a
perennial theme within free software and open access movements.

Speaking of World Domination, Michelle's experiment in an all-mostly
women Python class went well per reports, with more maxed out sessions
already scheduled.  The PSF has been financially supportive.

I joke that a lot of my students might be veiled when in public, given
the distance ed protocol.[3]  I evaluate between 100 - 200 projects
and quizzes a day, from around the Global U.

Anyway, some brain storming on the big picture and how it's going
might help us steer the direction of the Education Room in 2013.  Feel
free to share overview.

Kirby

[1] Chris Brooks went on to WebMD and I lost touch with SAO, so I'm
not sure if anyone meets about this still.  I've stopped getting those
emails.

[2] http://www.earlham.edu/~peters/courses/logsys/machines.htm

[3] http://worldgame.blogspot.com/2012/07/ppug-2012710.html
("perhaps some of them veiled in Tehran")
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] guide to learning decorators

2012-07-08 Thread kirby urner
On Sun, Jul 8, 2012 at 10:03 PM, Matt Harrison
 wrote:
> Hey Kirby-
>
> Author of said book replying :)
>

Wow fast.  I wondered if you'd spider over here for a chat (smile),
sensing vibrations in the Web.

>>
>> I didn't give it my highest rating though, for two reasons:
>>
>> (a)  there's some representing that an exhaustive treatment of the
>> function arguments and parameters topic, but the use of * (asterisk)
>> on its own, to section off keyword-only parameters, is not mentioned
>>
>
> I'm not sure I'm parsing this correctly. Could you elaborate?
>

There's this new syntax that allows you to specify that certain
parameters may only be set with keyword syntax (not positionally), yet
they don't have default values.

I don't think your book covered that wrinkle.

>>> def hodgepodge(a, b, *, c, d, e=1, f='f', **g):  # note asterisk alone as a 
>>> parameter
print(a, b, c, d, e, f, g, sep="\n")


>>> hodgepodge(1, 2, 3, 4)  # try to reach c, d positionally
Traceback (most recent call last):
  File "", line 1, in 
hodgepodge(1, 2, 3, 4)
TypeError: hodgepodge() takes exactly 2 positional arguments (4 given)


>>> hodgepodge(1, 2, c=3, d=4)  # fill them in, the rest have defaults or 
>>> aren't mandatory (**g is happy to stay empty)
1
2
3
4
1
f
{}


>>> hodgepodge(1, 2, c=3, d=4, e=5, cat="dog")
1
2
3
4
5
f
{'cat': 'dog'}


>>> hodgepodge(1, 2)  #  c and d can't be left alone though, unlike typical 
>>> keyword parameters, which have defaults
Traceback (most recent call last):
  File "", line 1, in 
hodgepodge(1, 2)
TypeError: hodgepodge() needs keyword-only argument c


>>> hodgepodge(1, 2, c=3)
Traceback (most recent call last):
  File "", line 1, in 
hodgepodge(1, 2, c=3)
TypeError: hodgepodge() needs keyword-only argument d


>>> hodgepodge(1, 2, c=3, d=4)  # gotta mention 'em both


Thanks for sharing more about your plans.

I am excited to get up to speed on a Kindle (recent acquisition) in a
way that boosts my Python and Bucky worlds, also Portland.

In chronological order, my downloads have been:

The Lost Inventions of Buckminster Fuller and Other Essays
Blake, Trevor   June 30, 2012

Portland Memorials
Blake, Trevor   June 30, 2012   

Guide to: Learning Python Decorators
Harrison, Matt  June 30, 2012

The Time Machine
Wells, H. G. (Herbert George)   July 1, 2012

The Complete Works of Edgar Allan Poe (Includes Essay About the
History of the Horror Genre)
Poe, Edgar Allan, Golgotha PressJuly 1, 2012


Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] guide to learning decorators

2012-07-08 Thread kirby urner
Re:  http://www.amazon.com/Guide-Learning-Python-Decorators-ebook/dp/B006ZHJSIM

I got the Kindle book on Python decorators.

Quite inexpensive.

I didn't give it my highest rating though, for two reasons:

(a)  there's some representing that an exhaustive treatment of the
function arguments and parameters topic, but the use of * (asterisk)
on its own, to section off keyword-only parameters, is not mentioned

and

(b)  the authors hint at the many useful and wonderful things decorators
might do, but are somewhat shy on examples.  One would think just
a few more pages of clever examples would round out the treatment.

Other than those two omissions, I thought it was pretty strong.  The main
goal was to get to where your decorator function might itself take arguments,
what that means.

There are no examples of using a class as a decorator that I recall, nor
of decorating a class.  I should double check that.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] gender-specific Python training; link to MathFuture

2012-06-18 Thread kirby urner
Portland's Python community is experimenting with some more
gender-specific Python training, geared for noobs:

http://www.meetup.com/pdxpython/events/66193362/

Michelle Rowley, newly sired into the PSF (my nominee), has a full
house already and a 2nd such event is in the planning stage.

Over on MathFuture (a Google group), I've been bringing up
'Mathematics for the Digital Age' as exemplary again.

Lets see how good Google is at finding an example:  << verdict:  it's
too soon, no web crawling yet >>

https://groups.google.com/forum/#!msg/mathfuture/-_X2NzprDhs/kkZTtc46SzkJ
 (thread in progress)

math-thinking-l, on the other hand, seems dead as a door nail.

I guess they like it that way, those Scheme people.

http://mail.geneseo.edu/mailman/listinfo/math-thinking-l  (nothing
since April!).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] visualizing namespaces

2012-05-30 Thread kirby urner
Although I emphasize the idea of namespaces in a "tree structure" in
my caption to this picture (below), we should admit that namespaces
may import one another in a cyclic networky way.  It's really just
what each namespace needs to do its own work, that it should import.

You can get into cyclic trouble this way (I've been there).

The tree structure really comes in useful with the filesystem and the
whole idea of paths.  I'm always surprise when I tour US public
schools, how few posters or how little wall art I see with CS
metaphors or CS teachings -- that's got to change with STEM I'm
thinking.

I see STEM as somewhat on a collision course with the "common core
standards" by the way (apologies to international readership for
parochial jargon) as the math standards, for example, are being
dreamed up by cube farmers with not much overview.  They're distilling
from textbooks of the recent two generations, not thinking ahead to
STEM integration.

This is because common core standards was supposed to be a way to
capitalize on existing textbook inventory (existing word problems,
exercises), to help with recycling.  Textbook publishers aren't
planning any major "integration" across S, T, E and M -- that's not in
their game plan.

That's why the STEM people tend to want to drop over-reliance on wood
pulp textbooks to begin with.  You can't correct them (not the
physical copies) except with a new edition.  If you need hardcopy,
print on demand is the way to go, and charge only those that opt for
it.  Requiring a hard copy for every student is more the hallmark of
the dino publishers and their "common core" -- nothing to do with
STEM.

Speaking of tree structures and filesystems:  important to emphasize
sys.path fairly early in the Python training I think, as a way of
reinforcing ideas about the file tree, and as a way of giving the
coder / programmer a feeling of power and control, as sys.path may be
added to dynamically, by your program.

Kirby


On Sun, May 27, 2012 at 10:26 AM, kirby urner  wrote:

<< SNIP >>

> http://www.flickr.com/photos/17157315@N00/7276024654/in/photostream
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] visualizing namespaces

2012-05-27 Thread kirby urner
Steve Holden was asking on the PSF members list (some overlap with
here) for other ways to diagram / teach about namespaces in his
slides.

This is the slide show he's talking about.

http://holdenweb.com/files/PythonIntro.pdf  (namespaces = like clouds)

After some back and forth, another visual:

http://www.flickr.com/photos/17157315@N00/7276024654/in/photostream

The namespace is a way objects on the heap get to be "thought of" by
the interpreter.

The "thought balloon" (similar to Steve's cloud) in contrast to a pile
of rocks (objects) belongs to the Python inside.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Teaching python at a Computer Clubhouse

2012-05-21 Thread kirby urner
On Mon, May 21, 2012 at 1:54 PM, Carl Cerecke  wrote:
> I'm thinking of becoming a mentor at a local Computer
> Clubhouse http://www.computerclubhouse.org/. In particular, there are some
> kids there who are quite keen to learn to make their own games, but none of
> the current mentors know any programming (one said that he had done some
> "programming" in HTML).

Hi Carl --

A lot of kids say "games" because that's what's in their vocabulary
and it most closely approximates the idea of a bright buzzing world
with fun interactivity.

I would recommend immediately coming back with "simulations" and
identifying Sims as one of those, "not just a game".

Then point out how all the Sims and their houses and furniture (and
cities) are Objects and Objects have Attributes and Behavior.

With all that as background, I find many kids will then amuse
themselves with core Python, imagining the "game" in their heads, but
in reality just doing primitive classes and functions.

They pass the CS-1 level pretty quickly, if the latter is imagined as
purely procedural only (not many of those left I hope).

In other words, I hope you succeed in giving them excuses to learn
core Python and get some clear concepts, as that will help when you
introduce PyGame in the next meeting.

Kirby

PS:  congrats to New Zealand for already having some of the more
visionary and forward thinking computer science curriculum
promulgators.  Isn't Nat Torkington still there --or did he move
again?   http://nathan.torkington.com/  I figure everybody knows
everybody in a place that small, like the Shire.
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Next Steps in Python, for teachers

2012-05-19 Thread Kirby Urner
Way cool Alan.  I helped spread the word here:

http://www.facebook.com/oreillyschool

What to do with Python?  How to integrate it with STEM?

Lots of ways to go, including with VPython (vpython.org).

Kirby


On Sat, May 19, 2012 at 5:09 AM, Alan O'Donohoe wrote:

> We held a Python event for 39 teachers new to Python at our school this
> week. You might find the blog post with photos of interest.
>
> http://teachcomputing.wordpress.com/2012/05/18/cas-hub-next-steps-in-python/
>
> Alan
>
> *
> *
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] a short essay about programming

2012-04-21 Thread kirby urner
... another useful contribution to this thread.

-- Forwarded message --
From: Richard Pattis 
Date: Sat, Apr 21, 2012 at 6:53 PM
Subject: I'm not allowed to post
To: kirby urner 


Feel free to post this for me, which got returned. Probably
because I use a mail alias and never tried to post before.

Rich


I replied to Kirby privately, and he suggested I post to the listserv,
so I have. Because UCI is starting to teach Python next year, I might
be on the listserv (more than you want) over the summer as I learn
Python and how to program in it and teach it: a tall order for a few
months. As Charles McCabe (SF Examiner) said, "Any clod can
have the facts; having opinions is an art." - rep


Kirby,

I'm a long time Java teacher (heck, I started teaching Fortran in
1976) who will soon be teaching Python. We (here at UC Irvine)
are switching to a 3 quarter introduction to programming sequence
all in Python (and then on to Java and C++ for upper division courses,
although Python could leak upwards).

I've been subscribing to edu-sig Python for a while and appreciate
your efforts (and have learned from them).

I'm a big fan in Java of teaching beginners only
for(;;) -I call it for-ever- and if/break termination (although some
colleagues accuse me of teaching machine language in Java).

I like forever if/break for a few reasons, among them are I
teach ifs right before looping, so students get a chance to
immediately use ifs; I think it is easier to state the
condition in which to break instead of the condition in which
to continue (although we discuss how to compute one from
the other by DeMorgan's laws later); there is only one looping
form, so students aren't faced with the up-front decision of what
kind of loop to use; and finally, they can fully write the loop and
its body and then worry about termination later (unlike a while
loop, where syntactically the first thing you must write is the
continuation test -although some computer scientists would
consider this a feature, not a bug).

So my students don't have to think of which Java loop to use:
while or do/while. They code everything (early in class) using
forever if/break, although later I illustrate the semantics of Java's
other looping forms, using forever if/break (which they are familiar
with), tell them if the pattern fits, do the transformation to simplify
their code, and if you do this enough, later in the course you will
write the "right" pattern first, without thinking about the transformation.

I'm not a big fan of continue here. I conceptualize this as an
N=1/2 loop (sentinel loops are also of this form) and am happy
with forever if/break; The question I'd have for a while loop, is
where does guess come from the first time the test is evaluated;
if the answer is some initialization that is not equal to secret, I'd
say yuck: guess should store the user's guesses only, not some crazy
value to make things work the first time the loop is entered.

Another reason I don't like continue is that it isn't local; you have to
"go around the loop again to exit".; and will you exit the next time
around, it doesn't jump out at me (same, but a little less so, for your
exit = True code in the later example; more soon). With break, you recognize
termination and perform the action immediately (like return). Also,
you have to have the condition stated twice in your final code, in two
opposite forms (guess != secret) and also (guess == secret); confusing
and double yuck.

Now in Java you could write this as a do/while,but you still have the
"repeat the test in two opposite forms" problem.

In your summary

> In short:  never use break to exit a while loop
> unless your condition is while True.


I agree with this, and argue this should be your loop form always
for beginners. I also require (for most of the quarter) at most one
break per loop.

> However, as soon as I make that rule I can
> think of good reasons to break it.


Yes, I believe you should break that rule, not continue to use  it

In the next code you set exit = True then continue so the next
iteration terminates
the loop, which I think is also bad because of non-locality. You are
terminating indirectly all over the loop. I tell my students since
loop termination
is what the loop is all about, it should be obvious where you are
terminating and why. I start by making them put their break statements in
comment sandwiches, so they stand out:

   //
   break;
   //

OK, so how would I write your loop to match its semantics, but be
as simple as possible?  Before showing my code, I dislike the fact
that your code is impolite: it always says "try again" on a wrong guess,
but then sometimes doesn't let the user try again. So I'll fix this "feature".

In fact, your code infinite loops when allowed = 1 (because tries,
which is initi

Re: [Edu-sig] a short essay about programming

2012-04-21 Thread kirby urner
On Sat, Apr 21, 2012 at 6:11 AM, John Zelle  wrote:
> Kirby,
>
> There are some nice thoughts here that I don't really disagree with, but your 
> code examples don't use the while conditions well. If you put a condition on 
> the loop, there should be no reason to retest the same condition inside the 
> loop. Think of the loop condition as a guard, inside the loop it is true, 
> outside the loop it has become false.
>


Ah now there's a good rule of thumb maybe.

Whatever sentinel condition let you into the loop should not be
retested inside the loop.

That sounds cogent.

A related but somewhat contrary mental picture is:  only let live fish
into the fish tank, but some die once already inside the tank.

Are there cases where you need a preview, aren't ready to exit yet, so
need to re-test inside?

> That suggests the more elegant (in my eyes) way to write your first example 
> as a sort of sentinel loop:
>
> guess = int(input("Guess? "))
> while(guess != secret):  // as long as the user didn't get it, get another 
> guess

Pausing here:  I see this style quite often, of parens crammed right
up against the while keyword.  I

'm always worried when I see that in beginner Python that they're
imagining while is a callable, and their feeding it some kind of
argument.

Same with if:  I'll get if(x>5):

You're an experienced Pythonista though...

>    print("Nope, try again")
>    guess = int(input("Guess? "))
> // Here we know the condition is false
> print("You guessed it")
>
> There's no reason for the re-test of the loop condition to either break or 
> continue.
>

Or is there sometimes?  I'm thinking this is an excellent rule of
thumb of the kind that needs to be broken.

Python in particular is interesting because it tries to stay simple -
economical in providing control over flow.

Other languages gorge themselves on all imaginable kinds of loop
syntax, bulking up their keyword vocabulary in the process sometimes
(e.g. 'until').

I agree your examples look more elegant and economical than mine
featuring a re-test.

> This applies to the second example as well, but a post-loop conditional will 
> still be required to figure out why the loop quit:
>
> allowed = 5
>
> guess = int(input("Guess? "))
> tries = 1
>
> while guess != secret and tries < allowed:   //user gets to try again
>     print("Nope, try again")
>     guess = int(input("Guess? "))
>     tries += 1
>
> if tries <= allowed:
>    print("You guessed it")
> else:
>    print("You've maxed out.")
>

This is where the while statement's option else suite proves useful,
if you want to execute a block precisely because the while condition
has flipped.

I tend to find this useful in conjunction with 'break' though,
exploding my earlier hypothesis that while loops should have only one
entrance and one exit.

while guess != secret:  # front door
if tries > allowed:
print("Bummer")
break  # back door
tries += 1
guess = input ("Guess? ")
else:
print("Congratulations!")

Most public spaces have multiple exits, including a fire escape for
emergencies.  We haven't even touched on try: / except: as a way to
escape a while loop.

Mostly I just want these considerations to rise to the surface and
ruffle the surface awareness of the beginner mind programmer.

This is being a good thread for that.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] a short essay about programming

2012-04-21 Thread kirby urner
A common "error" (not too serious) that I see in
beginning Python (and no doubt other languages,
but Python is the one I'm teaching), is having a
while condition that appears to put a lid on things,
but then the flow all leaks away through break
statements, such that the "front door" condition
is never revisited.

while guess != secret:
guess = int(input("Guess?: ")
if guess == secret:
print("You guessed it!")
break
else:
print("Nope, try again...")

What's messed up about the above code is you
never really go back to the top in the case
where you'd get to leave.  Rather, you exit by
the back door, through break.

So in that case, wouldn't have been simpler and
more elegant, even more "correct" (dare I say it)
to have gone:

while True:  # no ifs ands or buts
guess = int(input("Guess?: ")
if guess == secret:
print("You guessed it!")
break
else:
print("Nope, try again...")

I see lots of heads nodding, and that could be
the end of the matter, but then a next question
arises:  wouldn't this also be a more correct
solution?:

while guess != secret:
guess = int(input("Guess?: ")
if guess == secret:
print("You guessed it!")
continue  # instead of break
else:
print("Nope, try again...")

We're back to having a variable while condition,
not a boolean constant, but this time we actually
exit by means of it, thanks to continue or...

while guess != secret:
guess = int(input("Guess?: ")
if guess == secret:
print("You guessed it!")
else:
print("Nope, try again...")

... thanks to no continue.  This last one is getting
a thumbs up, but then I'd pause here and say
"continue" can be easier on the eyes.  It's
unambiguous where it takes you, in contrast
to having to scan on down the gauntlet, looking
for possibly other open doors.  "What happens
next" should not require scanning ahead too
far.  Help us not to get lost.  Be a civic-minded
coder.

I'm thinking of a programming style that advises
two things:

(a) if you use a while condition that's variable,
that's expected to change, then your goal should
be to always exit because of that, i.e. that should
be your only exit point.  Even if some other
criterion suggests exiting, you have the option
to flip that "lid" at the top, to crack that front
door, and bounce the ball out.

(b)  which is why 'continue' is your friend.  You
are showing the user where your 'break' statements
are, except you don't use "break" statements, as
you've given a non-constant condition, and your
aim is to make that your ONLY exit point.

In short:  never use break to exit a while loop
unless your condition is while True.

Instead, always flip the condition and exit
through the font door.

However, as soon as I make that rule I can
think of good reasons to break it.  The other
programmers in the room are shaking their
heads.  Won't we lose information, needed
elsewhere in the program, if we "artificially"
force a True condition to False.  Aren't we, in
effect, lying?  That concern could be addressed.
Keep all the info true, just treat the "lid
condition" (it "keeps a lid on it") as a flag.
Go ahead and remember the user's guess.

allowed = 5
tries = 1
exit = False

while not exit:  # no other way out

guess = int(input("Guess?: ")
if guess == secret:
print("You guessed it!")
exit = True  # instead of break
continue

print("Nope, try again...")
tries += 1
if tries == allowed:
print("You've maxed out")
exit = True
continue


I think we all understand the main issue:
writing reader-friendly code, and rules for doing
so.  There's something comforting about approaching
a while loop and knowing its not a leaky sieve,
riddled with back doors, maybe even an exit( )
time bomb.  But in the recursion world we want
a minimum of two exits usually:  when another
round is called for versus when we've "hit bottom".
Can we have it both ways?

Conclusions:

Lets not be too hasty with rules of thumb

and:

Lets keep the reader in mind when writing code.

Just because the interpreter knows to compute
the flow unambiguously, doesn't mean all ways
of writing it are equally reader-friendly.

What may seem a gratuitous gesture, an
unnecessary flourish, may actually promote
reader comprehension of your code, and that
should be a goal as much as satisfying the
interpreter.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] transforming CS at Harvey Mudd

2012-04-05 Thread Kirby Urner
On Thu, Apr 5, 2012 at 11:42 AM, Jacqueline Wilson  wrote:

< ... >

Heh, good rant, really liked it.  << applause >>

I've volleyed back at my "buddy" -- hope to see what you'll make of it.

That's a moderated list (iron fist of Drexel) with known-quantity
characters / veterans duking it out in contentious fashion.  Like a comic
strip.

More like me 'n Arthur used to be here on edu-sig afore we lost him.  Kinda
Punch & Judy.

Lotsa listservs like that as I'm sure you well know.  Like Indonesian
shadow puppets.


> If Python makes CS accessible to more big-picture thinkers and future
> visionaries, that's what this country needs... not cowboys who spout off
> about what a "real job" is, or is not.
>
>
Hear hear.  Raises tankard.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] CS + theater

2012-04-05 Thread kirby urner
On Thu, Apr 5, 2012 at 10:39 AM, Philip Guo  wrote:
> Agreed that finding more synergies (pardon my business-speak) between
> computing and the liberal arts can be wonderful.  Reminds me a bit of
> Computing for Poets:
>
> http://cs.wheatoncollege.edu/~mleblanc/131/
>

Yes.

Theater in particular because they hand you a "Programme" as you go
in, and the actors are following "scripts".  Objects in Python are likewise
actors.  Having a "self" makes OO intrinsically theatrical (agents doing
stuff, acting out).

Problems of parallelism might be "acted out" (Johnny, you block over
here, until you, Sally, are ready to accept from the queue... OK Johnny,
she's ready, walk your message to Jimmy for pre-processing...).

I think the Liberal Arts could swallow CS tomorrow if CS were willing
(CS has its reservations, nostalgia about math, but I say were
swallowing math too so come on in the water's fine -- spoken like
a true Philosophy major).

Related:  I practice a quaint Amish-like (Weird Al like) branch of
Quakerism wherein we call ourselves "unprogrammed", the idea
being if you follow a preacher and stand up and sit down a lot,
you're just a big fat computer (holdover 1600s backlash against
bloated churches).  Here's a picture of our quaint little sign:

http://www.flickr.com/photos/17157315@N00/7037954577/in/photostream
(note small print)

Yes, Religion and theater go together -- any ethnographer could
tell you that.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] CS + theater

2012-04-05 Thread kirby urner
As I was telling my younger daughter during the ride to school today
(she's a senior in high school, though already 20% professor and 22%
your boss), a huge missed opportunity (so far) is the hybrid of
theater and computer science.

My older step daughter majored - minored in something like that, but
the college wasn't really doing the work to marry the two, she was.

Like with television, the computer comes with a "back stage" where we
craft a user experience (e.g. web site) -- like museum exhibit design
(interactive), like department store design (people behind counters,
customer service, help desk).**

The code is about animating agents and actors (how the systems people
talk).  In popular culture, this way of thinking was vastly aided and
abetted by 'The Matrix', wherein the idea was we live inside a
computer program built for us by computer viruses of extraterrestrial
origin.

Anyway, I think as the media continue to cross-fertilize, we'll be
getting back to theater more and more, as a core institution in both
east and west, and as a logical partner for the CS department /
compartment / pod.

Kirby

** museum exhibit design:  http://samgreen.to/blog/
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] transforming CS at Harvey Mudd

2012-04-05 Thread kirby urner
On Wed, Apr 4, 2012 at 10:28 PM, Mark Engelberg
 wrote:

< ... >

> I think it's pretty easy to interpret this article as saying that the women
> couldn't hack it until it was replaced with something light and fluffy with
> fewer sharp edges.  Nowhere does it indicate that students are learning just
> as much, or that this change in approach benefits all students, not just the
> women.  Are we elevating the quality of our computer science graduates, or
> just lowering the definition of what that means?  Without addressing these
> questions, I fear this article does more harm than good.
>

Yes, that's exactly the context in which the article was being cited
in the thread I got it from:  more evidence of dumbing down.

The implicit assumption is then that Python is watered down pabulum
while Java is for real non-quiche eating men or something.

I got into sparring with the guy pushing that interpretation.

http://mathforum.org/kb/message.jspa?messageID=7760263

(there's a tree view of our discussion commenting on the article -- ongoing)

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] transforming CS at Harvey Mudd

2012-04-03 Thread kirby urner
Picked off the math-teach list (where I'm active).

Mentions Python (as part of what made CS less intimidating).

Kirby


===

April 2, 2012
Giving Women the Access Code
By KATIE HAFNER

CLAREMONT, Calif. — When Maria Klawe became president of Harvey Mudd
College in 2006, she was dismayed — but not surprised — at how few
women were majoring in computer science.

A mathematician and computer scientist herself, she arrived at Harvey
Mudd (the smallest of the five so-called Claremont Colleges) in the
midst of a nationwide downturn for women in computer science. As
recently as 1985, 37 percent of graduates in the field were women; by
2005 it was down to 22 percent, and sinking.

And the situation at Mudd was even grimmer. Of the college’s 750
students, about a third were women (the figure is now closer to half),
but for years the percentage of computer science graduates had been
hovering around the single digits.

How Dr. Klawe (pronounced KLAH-vay) and her faculty turned things
around — this year, nearly 40 percent of Harvey Mudd’s computer
science degrees will go to women — sheds light on a gender gap that
elsewhere remains stubbornly resistant to changing times.

Thanks in part to companies like Facebook, Yelp and Zynga and in part
to cultural sensations like the movie “The Social Network,” coders are
hip and computer science is hot. Departments across the nation are
brimming with students.

But those students are overwhelmingly male. In 2010, just 18.2 percent
of undergraduates in the field were women, according to the National
Center for Education Statistics — in spite of gains in chemistry,
biomechanical engineering and other so-called STEM fields (the acronym
stands for science, technology, engineering and mathematics).

“It must be the unique area of science and technology where women have
made negative progress,” said Nicholas Pippenger, a mathematics
professor at Harvey Mudd, who is married to Dr. Klawe.

Dr. Klawe and others say the underrepresentation of women in the field
is detrimental in a larger sense. Computer science, they say, is as
vital to propelling society forward in the digital era as mechanical
engineering was in the industrial age.

“If we’re not getting more women to be part of that, it’s just nuts,”
Dr. Klawe said. At Mudd, she continued, “we’re graduating 20 female
computer science majors a year, and every one of them is a gem.” In
2005, the year before Dr. Klawe arrived, a group of faculty members
embarked on a full makeover of the introductory computer science
course, a requirement at Mudd.

Known as CS 5, the course focused on hard-core programming, appealing
to a particular kind of student — young men, already seasoned
programmers, who dominated the class. This only reinforced the women’s
sense that computer science was for geeky know-it-alls.

“Most of the female students were unwilling to go on in computer
science because of the stereotypes they had grown up with,” said
Zachary Dodds, a computer scientist at Mudd. “We realized we were
helping perpetuate that by teaching such a standard course.”

To reduce the intimidation factor, the course was divided into two
sections — “gold,” for those with no prior experience, and “black” for
everyone else. Java, a notoriously opaque programming language, was
replaced by a more accessible language called Python. And the focus of
the course changed to computational approaches to solving problems
across science.

“We realized that we needed to show students computer science is not
all about programming,” said Ran Libeskind-Hadas, chairman of the
department. “It has intellectual depth and connections to other
disciplines.”

Dr. Klawe supported the cause wholeheartedly, and provided money from
the college for every female freshman to travel to the annual Grace
Hopper conference, named after a pioneering programmer. The
conference, where freshmen are surrounded by female role models, has
inspired many a first-year “Mudder” to explore computer science more
seriously.

Firsthand Experience

The topic of women in computing was a preoccupation for Dr. Klawe well
before she took over at Harvey Mudd, in part because when she chose
her profession, women in male-dominated fields were especially rare.

“She was consistently told by teachers in adolescence, then later by
colleagues, that the things she was interested in were things women
didn’t do, and that there were no good female mathematicians,” Dr.
Pippenger said.

Dr. Klawe persevered. A native Canadian, she received her Ph.D. in
mathematics in 1977 from the University of Alberta. She started a
second Ph.D., in computer science, at the University of Toronto, but
was offered a faculty position there before completing the degree.

In 1980, she married Dr. Pippenger, a highly regarded theoretical
computer scientist, and for the first decade of their marriage Dr.
Klawe was the professional afterthought. In the 1980s, they both
worked at the I.B.M. Almaden Research Center in San Jose, Calif. “They
onl

Re: [Edu-sig] edu-sig in Pythonia

2012-04-02 Thread kirby urner
On Mon, Apr 2, 2012 at 10:07 AM, DeanG  wrote:

> +1
>
> Regarding the  Args Kwargs, Matt Harrisons "Guide to: Learning Python
> Decorators" was a great read for this topic.
> http://www.amazon.com/Guide-Learning-Python-Decorators-ebook/dp/B006ZHJSIM
>
>

I'm quite tempted to buy a Kindle.  I had no idea there was a whole Kindle
book on decorators.

Yes, decorators would have to be another one of those Standard Gotta Have
It track talks we edu-siggers are focused on.

ArgsKwags, IterStuff, Decorators, Metaclasses, Introspection... Dialectical
Differences

Library:  talks always welcome, standard usergroup fare (Portland's groups
always has Module of the Month)

3rd party:  IDEs (e.g. I-Python), VIsualization (e.g. Blender, VPython,
Pygame, matplotlib). Web (Django, web2py, Google App Engine)

Python plays well with others, so a lot of Design Patterns stuff relating
to OO in general would could push off to those OSCON type events where we
have Java, Python, Ruby, Perl, C++ all under one big tent.

There should be like OO track topics that don't count against the Python
quota, if ya know what I mean.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] edu-sig in Pythonia

2012-04-02 Thread kirby urner
A few of us at Pycon were nodding heads (+1ing)
over the idea that our subculture / ethnicity could
evolve these "canned talks" that different people
deliver in their personalized style.  More than that,
they demonstrate new "teaching techniques" such
that the audience might appreciate how advances
in pedagogy -- and in andragogy -- still occur.

Consider the O'Reilly 'Head First Into...' series.
Like 'for Dummies', it explains up front that there's
psychology at work, smart cookies have baked a
new mix of graphic art, sound bites, who knows
what's coming, and you, the reader / student are
in for a treat.  But then books, like videos, are a
somewhat passive medium.  Once you jump on
that gym equipment, that treadmill, that weight
pump, you know there's more to the educational
experience than having your butt in a chair.

Among the canned topics would be ArgsKwargs.
Everyone learning Python needs to keep spiraling
through the ArgsKwargs literature, wherein we do
what in other languages might be called gathering
and scattering.  The star and double star, which
C-language readers are used to seeing anyway
in function headers etc., have become scavengers,
accepting / liberal "all may pass" type guards at the
gate (function entrance), and yet still there are rules
(positionals before keyword).  Used when passing
arguments, the star and double-star are "exploders"
(scatterers), setting free their tuples and dicts to
mingle as individuals.

>>> def baby(skin="soft", noise_might_be = "crying", **blahblah):
print ("Hey baby, I notice the {} skin, and the {} noise you're
making".format(skin, noise_might_be))
print(blahblah)


>>> random_keys = {"safe":"12-15-44", "skin":"purple", "tomorrow":"wash
car"}
>>> baby(**random_keys)
Hey baby, I notice the purple skin, and the crying noise you're making
{'safe': '12-15-44', 'tomorrow': 'wash car'}

Another canned talk -- could be lightning format --
is IterStuff, beginning with the difference between
an iterator and an iterable, climbing through
generators (with plenty of send use) to iterator
defining classes, to itertools more generally, and
a discussion of "just in time" versus pre-stocking
memory with impossibly huge inventories.

Here I'd suggest a lore-based approach wherein
we go over how Python itself has become ever more
fascinated with iterators.  How is it that a range class
object is a sequence (indexable) whereas the
dict_items object is not (not indexable)?

>>> dict(a=1,b=2).items()[0]
Traceback (most recent call last):
  File "", line 1, in 
dict(a=1,b=2).items()[0]
TypeError: 'dict_items' object does not support indexing
>>> range(2)[0]
0

Then there'd be the protocol talks i.e. lets talk about
interfaces in the abstract.  The iterator is our first example,
in being about having __iter__ and __next__.  Then
comes the descriptor and its interface / protocol.

The point being:  we should always have these talks.

There will always be people new to Python (in this
model), or people wanting a refresher and (here's
the kicker) people needing practice in their teaching
techniques in front of an audience that's already very
much in the ballpark (already at a Pycon, not just
casually dropping by to see what this might be about).

Also:  the people most interested in teaching Python,
such as here on edu-sig, should be most involved in
organizing this track.

The track of standard topics, things we all need to
know -- but how best to share?  That track and that
question are one of our angles / self-chosen
responsibilities, along with the poster session.

I would extend this philosophy to say edu-sig types
should also take some 3rd party modules under their
collective wing, by which I mean to include such worthies
as:  Visual Python, I-Python, matplotlib, numpy, Blender
and web frameworks (including Google App Engine).

OK, now that's starting to sound like a complete Pycon,
not just a track.  Fair enough.

The edu-sig "base" is around a track of core topics.
Then each topic is conceived to "branch off" into
various "worlds" or "namespaces".  E.g the IterStuff
branches off into Twisted and asynchronous techniques
such as David Beazely has specialized in inventing and
teaching.  We'd need more diagrams, roadmaps, to
show the "lay of the land" (Pythonia).  Seeing it one
way doesn't preclude also seeing it in other ways too.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Raspberry Pi?

2012-03-29 Thread Kirby Urner
On Thu, Mar 29, 2012 at 9:04 AM, Bert Freudenberg wrote:

> On 29.03.2012, at 17:49, kirby urner wrote:
>
> > Raspberry Pi doesn't currently run Python but there is some thought that
> it should.
>
> Huh? This is what the FAQ says:
>
> http://www.raspberrypi.org/faqs
>
>
Apologies, the buzz on the list (generated by Steve Holden who is over
there talking to Eben) had to do with a Python OS, sort of like BASIC was
in ROM in early PCs.

Yes, it runs Linux and runs Python atop Linux, like the XO does.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Raspberry Pi?

2012-03-29 Thread kirby urner
Lots of buzz on PSF list about Python and Raspberry Pi.

I know from independent sources that Python has attracted
considerable attention in the UK education community.  Also,
the BBC Micro also came out around this time and our
PSF chairman is in the UK to help celebrate its anniversary
(50th? -- getting there).  http://en.wikipedia.org/wiki/BBC_Micro

In having a public charter, unlike private advertiser based
broadcasters such as Fox, the BBC is rather different from
any USA channels, including PBS.  Its forays into public
policy and initiatives, such as the Computer Literacy Project
of the 1980s, out of which the BBC Micro was born, is not
mirrored in the USA.

Raspberry Pi doesn't currently run Python but there is
some thought that it should.

I haven't researched the GNU / Stallman take yet, though I
know he's unhappy about the sell-out of Linux distros to
closed source video drivers, which appear as proprietary
blobs (already compiled binaries) with no source.  The
Raspberry Pi uses secret code to drive its GPU so is
not technically a purely FLOSS project (as of today
anyway).

Debian has a long history of working with not-free annexes
so this will feel like home to most Debian developers.

I'm glad the BBC has a mandate to serve the public in
the UK with interesting and innovative gadgets.  That's the
kind of R&D we like to see, including with closed source
components (I have access to closed source games
galore).  Even if the UK versions seem obsolete more
quickly, because leading edge (like the XO), the follow-on
products have the BBC to thank for opening world markets
( = the human imagination) to these new concepts.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] a snippet about Pycon 2012

2012-03-18 Thread kirby urner
Here's an excerpt from a post to a bfi.org related group in follow-up to Pycon:

"""

In other news, related in that micro-engineering is at the basis of
all of this, I have recently returned from PyCon 2012, more
technically the US Pycon of that year, but which will be moving to
Montreal in 2014, so North American more than just US.

Brazil and Argentina have their own Pycons.  Chairman Steve, my close
neighbor in Portland, was at both of those in 2011.  I need new
passport pictures if I'm to be going anywhere far away like that.

David Koski, our list owner, phoned me around the time he was getting
these most excellent shots of the TC Howard dome in Ohio.

http://www.flickr.com/photos/17157315@N00/6834704198/in/set-72157629206299498

I was in the meantime sparring (in a friendly way) with the ESRI guy
about why we'd call the Fuller Map "crazy" (he had it on screen) when
as geeks we're always gawking at how big Greenland really isn't.

This was during Q&A in a well attended session on the basics of GIS.
I'd heard similar content at a Portland Barcamp, and also at Metro
(Food Not Bombs on my nametag).

http://pyvideo.org/video/887/a-gentle-introduction-to-gis  (start
around 26 minutes to get the background leading up to my question -- I
come in at 29 mins 10 secs or so, to 30 mins 30 secs).

Portlanders are fairly adept with these tools.

"""

Lots about Bucky Fuller (RBF) related stuff because I'm bfi.org's
first web master, long ago (Drupal not even invented yet).

( not news to folks here -- like I've been writing about rbf.py and
sundries -- e.g. hypertoons -- for like decades )

Anyway, the above was from a report back to that little readership.

Barry Warsaw's talk on the future of mailman was of interest, given
that's what drives our little list here.

Did we want something besides plaintext for edu-sig?  On mathfuture
we're using all kinds of colors.

"Listservs" still rule (mail groups have a lot going for them) -- I
had some new links on that, but where'd they go?

Next time perhaps.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Bof, dinner, meeting... at PyCon

2012-03-05 Thread kirby urner
I expect to be around Saturday.  Is michael paul coming from Beverly
Hills I wonder?  His email is python.math these days.

FYI my new window on the world, professionally speaking:

http://blog.oreillyschool.com/2012/02/welcome-to-ost-python-wrangler-kirby-urner.html

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] spreading the word about PythonAnywhere

2012-02-23 Thread kirby urner
"""

Re:  freeing scholars to return to their studies

===

http://www.pythonanywhere.com/user/pdx4d/consoles/
You won't be able to access that username's consoles without
a password, but feel free to set up your own account.  Here's
a way to share Python across the wire.  A way to play around
and learn with others.  Math teachers take note.

Have a shared Python console open, along with audio/Skype,
and you have the basis for an interesting meetup.
Ideally, someone leading the presentation has uploaded some
modules via DropBox.  I could showcase rbf.py or quadrays.py.
Something to work on.  I'll post an update one day soon.

"""

to another list I frequent...


Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] edu.pycons?

2012-02-13 Thread kirby urner
I brought up the idea of edu.pycon.org again recently.
My idea was to have more university-based events
instead of meeting in business hotels.

Chairman Steve immediately pointed out the error of
my ways.  Pycons, including us.pycons, have already
been university-based, many times.

Those of you following the various blogs (planet this,
laughing that) maybe saw how pycon.org is able to
do outreach by tying to related domains through a
subdomain.  us.pycon.org is a good example.

edu.pycon.org might map to a university that has
chosen to specialize in Python, MIT for example.
Or would that be fair?  The PSF, as the owner of
the pycon.org domain, would have to decide.

Just because MIT hosted the site wouldn't mean
the edu.pycons couldn't be somewhere else.

On another front, I've been looking into the 'dirty
jobs for academic credit' scenario, which is already
a reality for some vets.  My friend Glenn, in the
military for a spell, got credits towards a degree
at Antioch, or I believe he did, based on previous
life experience.  But this would be different, more
like a semester abroad.

One of Haverford Colleges former presidents is
an inspiration here too.  He would take other jobs
just to keep his experience base broad.  He wasn't
trying to wear a halo, he was trying to stay smart
and up to date.

What "dirty jobs" might involve you with Python?

A lot depends on what counts as a "dirty job".
In one translation, it simply means "involving
hard physical labor, such as heavy lifting, or
the need to wear special clothing to guard
against toxins or extremes of heat and cold".

Python is not so often embedded in small devices
as Java I'm pretty sure.  The Java VM has a stronger
market share.  Who wants to talk about cell phones?

If we have an edu.pycon someday, I hope there
are tracks for people from many walks of life, and
therefore with a wide variety of experience.

I'm not saying the existing Pycons, in Asia, in South
America, in North America, aren't already diverse.
They are.

Chairman Steve got to the ones in Argentina and
Brazil last year, and in Singapore the year before.
Python is sprouting up all over.

I always think of Jeff Rush as an inspiration
and mover and shaker behind the edu.pycon
idea.

Given how quickly us.pycon sold out, we might
be seeing a surge of interest in this technology.
Even more teachers are giving it a first or
second look.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] will cows code?

2012-02-12 Thread kirby urner
My whimsical title relates to the conflation of two
notions:  cows in a morphogenetic field, and
the spread of computer languages.

As more and more people learn Python, does it
get easier to learn?  That would seem an obvious
"no" unless you believe in magic, but then think
about it:  more people learning it means more
people who know Python and can write books,
or already know how to make TV.  It's the overlap
in skill sets that spreads it, not spooky "action
at a distance."

The cow part comes for the story about those
bars across ditches, aimed at scaring cows from
trying to get through the gate.  They were
eventually so effective that baby cows would
"just know", even if not shown the consequences
(the adults already knew too).

Lets see what my CropCircle Tractor can dig up
on this...

Bingo.

"Is this because calves learn from older cattle
that they should not try to cross? Apparently not."

Feel free text search in the article below to this
well known meme (be the 100th monkey to do
so and win a prize!):

http://www.noetic.org/noetic/issue-four-november-2010/morphic-fields-and-morphic-resonance/

Hey, I'm not saying I don't believe in a Noosphere
(what they called it at Princeton).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] should we have learning languages?

2012-02-12 Thread kirby urner
One still hear's tones of regret that the good old
days are over, when one's choice of a first year
computer language was obvious:  Algol or Pascal.

Today there's no such consensus (if there ever
was), but another question is "should we have
learning languages?"

There was a time when it was considered
intuitive that languages not used in the "real
world" could be all that much more powerful
as educational tools because weighted to
"learner" needs.

BASIC was one of those languages, and we
may argue that it gave birth to the PC era, which
is what gave rise to the *nix explosion (aka the
"dot com bomb") as a follow-on event.**

But is the Darwinian process that winnows
the field to but a few languages also giving us
more learnable ones?

Consider Grace, a new language in development
for the express purpose of teaching object
oriented programming to students.  Why not
use Python?  Python lacks compile time type
checking.

Is that bad?

It's a subject of religious wars.  Note how the
voices beneath the main question worry about
it's "subjective" nature:  code for it's potential
to inspire "flame wars":

http://stackoverflow.com/questions/125367/dynamic-type-languages-versus-static-type-languages

The answer that's eventually accepted takes
the approach of reserving scorn for extremists
in both camps.

Kirby

** of course "dot com bomb" sounds bad
for business whereas the *Nix revolution paved
the way for the Free Web and free just about
everything.  New businesses depend on "going
viral" i.e. the infinite replicability of binary
objects is the key to their success, versus
failure (a big turnaround in some industries)
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Net Logo / Tractor Art

2012-01-17 Thread kirby urner
I'm downloading Net Logo in the background.

Logo is making a come back in this new form, thanks to "complexity studies".

http://www.flickr.com/photos/17157315@N00/5583591181/in/set-72157625646071793

Turtles have become "agents" and the typical thing is to have thousands of them.

http://ccl.northwestern.edu/netlogo/4.1.3/

Capturing the ideas in these new "chaos" related curricula was one of
my objectives in building a super primitive ASCII graphic system built
on Tractors versus Turtles.

The Tractor-as-agent motif links me, conveniently to the Make: / DIY /
open source / hacker vision of the Open Source Tractor:

http://opensource.com/life/11/4/open-source-tractors-and-diy-manufacturing

http://theshortearedowl.wordpress.com/2011/03/01/an-open-source-tractor/

And also:  the 50 machines needed for your semi-autonomous campus /
village / community.

http://opensourceecology.org/wiki/GVCS_tools

I hope to have some of my Tractor talks ready for lightning sharing at
Pycon this March.

Early draft of my code:  http://www.4dsolutions.net/ocn/python/OST/

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Strange results

2012-01-03 Thread kirby urner
On Tue, Jan 3, 2012 at 2:23 AM, Andrzej Kapanowski  wrote:
> Hello!
>
> My friend noticed strange results from Python 2.5.2:
>
 b=47
 0-b/2
> -23
 -b/2+0
> -24
>
> Anybody can explain that?
>

It's integer division:

>>> -1/2
-1
>>> 1/2
0

Not symmetrical.  Why?

http://www.peterbe.com/Integer-division-in-programming-languages

Helps some maybe.

Kirby

> Regards,
> Andrzej Kapanowski
>
>
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] a Python title I'd like to see.... (idle fantasy)

2011-12-23 Thread kirby urner
My idea of good Python lore would be an almost book length discussion,
at least, of the implementation of the "list" data structure.

Go through the C in great detail, using this as an excuse to teach C
in the context of it's supporting a higher language, looking ahead for
your readers, knowing some of them will be heading off into C#, Java
and PyPy implementations, at least.  Or have come from there.

Talk about what testing looks like, when working on Python, and where
can I get the tests, how might I set up shop as a developer (of Python
and other things).

One way is to read / compile / test the source code for Python itself.
 That's a curriculum I've proposed several times and I'm sure many
have thought of besides me:  cut your teeth learning Python and then
descend a level to a system language and begin studying the
implementation of Python in that language.

You'll start to appreciate Python in ways you never have, and you'll
start learning what nitty gritty memory allocation looks like, and
"declarative languages" (not the technical term -- compile-time
checked, type audited, the whole nine yards).

The thing is, you want your readers to be optionally following along,
doing their thing at the command line (fire up that gcc), meaning what
was "a book" is now this constellation of artifacts including
different versions of lessons depending on what kind of platform you
have.

Compiling Python on Windows is not only doable, it's highly
successful, but exactly how is it done?  Some readers would avidly
branch into that discussion, while others staying on a Mac (the
original Python was developed on a Lisa).

You've been studying the list type, as a data structure, have delved
into the history, of linked lists, bubble sorts, clever algorithms, a
kinds of class computer science.  Lots of names fly by, opportunities
to tell stories, fill us in.

Obviously it'd take a talented writer, far beyond my ken, to tie this
into LISP and the whole theory of S-expressions and like that, a heavy
dose of formality, somewhere in the middle of the book.

Make the list concept shine, but then come back to earth and have it
be one data structure among many.  Python celebrates diversity,
heterogeneity, cosmopolitan values.  The allure of crystalline purity
is thankfully muted in Pythonia.  We don't need it to be "seamless".

Because Python plays well with others, this is hardly just about
recruiting to Python.

We want to demystify computers more generally and find a
not-dumbed-down dissection of the list type, in terms of C, and even
lower level languages (how does C work), is just what a certain
segment of the public was craving.

A wild bestseller.  New York Times Review of Books is all agush.  "How
to think like a computer scientist on steroids...".

Dunno who could write it.  Might need to have interviews.  Maybe not a
book at all.  Direct to DVD?

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-19 Thread kirby urner
> Note every alternative weighs equally.  Laura things  thedict [thekey]
> = thedict.get( thekey, 0) + 1 is starting to get too fancy / clever /
> tricky and detracts from readability (a shared value).
>

"Not every alternative weighs equally.  Laura thinks..." (fixing errors)...

Quoting from Python scripture, I'm not saying much more than (or much
different from):

"""
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
"""

-- from import this

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-19 Thread kirby urner
>
> if ext not in res_dict:
> res_dict[ext] = 0
>
> res_dict[ext] += 1
>
> Cheers,
> Carl.

Truth be told, I do that too a lot.

After being shown all the options, let the programmer choose.

However, in a learning situation, it's about showing these options,
including with the dict.get method.

These patterns need not be visited in a vaccuum, i.e. it's quite often
that one needs a default returned (and not an error message) if such
and such is the case, a pre-existing value otherwise.

This pattern is not confined to dicts of course.

What I will correct though, as an example of what I consider a mistake, is like:

for word in wordlist:
if word == "fox":
result = True
else:
result = False

in place of

result = "fox" in wordlist

Note every alternative weighs equally.  Laura things  thedict [thekey]
= thedict.get( thekey, 0) + 1 is starting to get too fancy / clever /
tricky and detracts from readability (a shared value).

I would agree there are honest disagreements about what's "too clever"
(I think using a builtin method for what it's for should be shown, but
then possibly avoided).

However, coding a loop to go through a list looking for a match,
rather than letting the keyword "in" do the work, strikes me as "poor
Python" that should be tightened up to pass muster.

I don't think an "anything goes" attitude works.  Like in sports, some
moves win more points and when you hire a coach, it's to develop best
practices, not to prove how you're free of all idioms.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-15 Thread kirby urner
On Thu, Dec 15, 2011 at 10:18 AM, Christian Mascher
 wrote:
>
>>> On the other hand,
>>>     res_dict[ext] = res_dict.get(ext, 0) + 1
>>>
>> Isn't this at least as readable, and conceptually simpler?
>>
>>    if ext in res_dict:
>>        res_dict[ext] += 1
>>    else:         res_dict[ext] = 1
>>
>
>
> I haven't done much coding in Python lately. And I found this much more
> readable than the .get method which I forgot about. I positively didn't
> understand the oneliner just by reading it over and over again.
>

I might try something like this to make it clearer.

I can cut and paste such code snippets from my Replies
archive (another way to save time -- I edit from a pool
and splice in what's custom).

This goes off the common cartoon convention of a
prisoner putting one stroke on a wall for each day
in prison.  Here we use a string of "bars" (apropos).

>>> def strokes(prisoner, days=1):
cells[prisoner] = cells.get( prisoner, "") + "|"*days


>>> cells = {}
>>> strokes("Mandela")
>>> cells
{'Mandela': '|'}
>>> strokes("Aung San Suu Kyi",10)
>>> cells
{'Aung San Suu Kyi': '||', 'Mandela': '|'}
>>> strokes("Mandela")
>>> strokes("Mandela")
>>> cells
{'Aung San Suu Kyi': '||', 'Mandela': '|||'}

What's also important is cells is global and need not be declared
global in strokes for this to work.  That's a stumbling block in
Lesson 12 or one of those, I forget which exactly, and is a
subtle aspect of Python:  you can poke items into a global
dict from a more local scope, just not rebind the name to some
other object.

> Of course I could easily have opened idle and looked up the .get method
> online (or looked in a manual).
>

Our you could wake up in the morning and have
a bunch of fresh feedback from a faithful mentor,
who points stuff out that passes for "accepted
holes" out there, but you could use to your advantage
in a job interview.  You know about dict.get, wow.
Hey, it's a competitive market out there.

I think we should have a whole thread on defaultdict
though.  I think we should also expose students to
importing django not to run a web service at first,
but to gain access to some low-level goodies like the
ordered dict.  Treat zope the same way -- just
something to import and "make math" with (interactive
console in CR or Eclipse in the current working
versions).

> The really good thing about Python is that so much of the core language
> doesn't surprise you. One is able to write code which is understandable even
> to people with very little experience or to yourself after not coding in
> Python for years. Nobody has to write such clear-cut code all the time, but
> at least it is possible with very little effort.
>

Yes, which is why Python is favored by the scientific
community.  It's powerful, thanks to libraries like numpy
and visual, comes with pyMol and sciPy and like that,
and you don't have to turn yourself into some compsci
geek to use it, just hack away and it makes sense, does
what you expect, fits your brain.

Python is great because now the physics team doesn't
have to sit around waiting for some back office "programming
team" to do some slow-poking away off camera.  "No, we
can do it ourselves!" -- the sense Python inspires.

I'm all for this.  As a long time math reformer, I've taken
the line that forcing Texas Instruments calculators down
the throats of K-12ers while denying them access to
free open source options such as Python, is malpractice
in the first degree and all student loans should be forgiven,
based on what was done to you people, and how you're
unemployable now, living in a tent someplace.  Dang.
Wouldn't it have been nice if the teachers had listened.

Kirby


> Christian
>
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-15 Thread kirby urner
On Thu, Dec 15, 2011 at 8:00 AM, Andrew Harrington  wrote:
> I'm not sure we are clear on the audience here.  I use Python in teaching in
> different situations.   For the newbie course with my Hands-on Python
> Tutorial, the main idea is an intro to creative programming, where many
> students will not get to anything more advanced.  Python is a great vehicle,
> but my emphasis is not on how much of the language an advanced programmer is
> going to use.  The dict get method is not high on my list in the newbie
> class.  In that situation I would be drawn to the    if key in ... syntax.
>

This is along a really steep climb, almost vertical in some sections.

After 16 lessons ending in an ASCII histogram, plotting word lengths
from the Declaration of Independence, they're in the world of
unittest and GUI programming with Tk, SQL.

By the 3rd module (batch of lessons) they're through regular
expressions, command line parsing.

Multi-threading and multi-process spawning come later, towards
the end.

The first Dog class with dog instances in Lesson 14, first module.
@properties in 3rd module, decorators more generally in last.

> Thanks to Andre for his practical data.  Getting real data like that fits in
> two situations:
>
> In a production situation where you need speed now, and you know your
> environment.
> Teaching about the *idea* of timing and optimization (knowing that what is
> optimal now, may not be in the future)
>

timeit module and profile module introduced in fourth batch of
lessons.

I'm working the first three batches only at the moment, on alternate
days.  Been doing it about a year now.

> Neither of these apply if you are just doing an intro to basic logical
> concepts in programming.
>
> When I use Python for my upper level cryptography course, I push way more
> advanced approaches.
>
> Andy
>

We could do a lot more with cryptography and I have lots of code
in the wings that does more with a Tractor class.  That's the
topic of my Standard Lightning Talk for social occasions and
meetups in Pythonia (Python World).

For example the CropCircle subclass of Tractor does a Mandelbrot.

Complex numbers have to do with some of these large number
multiplication algorithms used in RSA.

But I do more with RSA in my Portland pilots.

There's no automated grading at all and you just keep doing
the assignments until you pass them -- can take double digit
numbers of tries in some cases, especially with programs.

What few multiple choice questions there are (very few) are
hand graded.

Our boss went to Russia and realized the students there were
getting a wholly different education that was non-mechanized
and required more thinking on your feet.  This crystallized the
"active learning" or "make math" approach.  He thinks Americans
don't know dick for the most part, are basically faking it 24/7
(I would have to agree, especially when it comes to Washington
DC people and at Harvard).

It's funny to watch students tuck little comments and remarks
in their quizzes at first, wondering if "the machine" will notice.

Yet there is no machine, just a dedicated staff spread out in
different cities, using a shared hub in Illinois (the management
is in Sebastopol, the hardware in Illinois).

Kirby

Erratum

>>> print('''\
If I notice students making assertions like "doctstrings must be
triple quoted" I go:  """no, you *may* consistently always triple
quote even single-lined strings, but unless you have those
embedded linebreaks, "single quoted docstrings" are not an
impossibility -- not a syntax error, not an oxymoron""" (that's
a paraphrase; sounding more literal given I'm not plowing
through at high speed here).'''.replace("literal", "literary"))

If I notice students making assertions like "doctstrings must be
triple quoted" I go:  """no, you *may* consistently always triple
quote even single-lined strings, but unless you have those
embedded linebreaks, "single quoted docstrings" are not an
impossibility -- not a syntax error, not an oxymoron""" (that's
a paraphrase; sounding more literary given I'm not plowing
through at high speed here).
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-15 Thread kirby urner
On Thu, Dec 15, 2011 at 5:05 AM, Laura Creighton  wrote:

<< snip >>

> We're going to have to disagree about this one being 'just right' then.
>

That's OK.  Another attitude / realization I tried to get across in
the top thread of my post is:  schools of thought exist within the
Python community.

"you'll find some polarization among Pythonistas about whether
this is good style" I said.  "Polarization" is a good word because
we know you can't have left without right, up without down --
they define one another.

To take another probably less controversial example, I believe
PEP8 or one of those encourages always triple quoting docstrings.

If I notice students making assertions like "doctstrings must be
triple quoted" I go:  """no, you *may* consistently always triple
quote even single-lined strings, but unless you have those
embedded linebreaks, "single quoted docstrings" are not an
impossibility -- not a syntax error, not an oxymoron""" (that's
a paraphrase; sounding more literal given I'm not plowing
through at high speed here).

I'm guessing few of us here always triple quote our docstrings.

>
> with atomic:
>    
>
> see: 
> http://morepypy.blogspot.com/2011/08/we-need-software-transactional-memory.html
> for more details.
>

This whole discussion was enlightening / educational, re additions
to core Python.  I'm tempted to change the subject line and do
a branch on this.

A proposal consistent with a permanent moratorium would be:
yes, many dialects of Python, variants of Core, include the
"with atomic" syntax, and you'll want one of those if doing
multi-core programming -- unless of course you want to try
PythonX by the team at Y, still experimental but  etc.

In other words, just because Core Python is innocent of the
multi-core environment, doesn't mean we can't have five
Not-Core Pythons that deal with it intelligently.

Core Python becomes frozen, a kind of fossil, but there's
just the one of them, the superclass.  Then you have subclasses
of Python-the-language that inherit and hearken back, but
don't claim themselves to be Core anymore.  No more fights.
Just Diversity.

You might see where I'm going with this:  a version of
Python with all keywords in Farsi for example.  It's actually
Core but with this one change.  Rather than say we're
running it through a translator, we're saying we have
at least 300 new Pythons by the end of 2015, each in
a different unicode language (when it comes to keywords).

Of course many would decry this availability of multi-
language Pythons and say it detracts from the universal
readability of the One ASCII / English Core Version.
But that's jumping the gun.  Maybe only a tiny ethnic
subculture of Farsi speakers use the Farsi one and so
on, which the super-vast majority continue with the
English core.  So what?  I'm just saying:  it'd be useful
to have the idea of "dialects" or "versions" well
developed on many axes, not just one-core / multi-core.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-14 Thread kirby urner
On Wed, Dec 14, 2011 at 7:38 PM, Laura Creighton  wrote:

> If you are seeing this over and over, then it is time to reach for
> defaultdict, no?  I've found that that often does produce what is for me
> more readable code, and has the advantage of being very fast, too.
>

I'm happy to see defaultdict enter the picture.  That adds new
grist for the mill.

It's not covered in the lessons I teach from, so it wouldn't be
as apropos, whereas students are much encouraged to
explore the dict object using dir({}) etc.

dict itself is an interesting builtin, being a type name and a
callable, but not a function.  dict( ) is not a function being
called, likewise list( ), str( ), float( ), set( )... int( ).

I'm getting off topic slightly.

Also, I don't think fussing about a few microseconds is
very Pythonic.  If that's really your concern, then C might
be better.  VHLL means we're not anal about micoseconds.
It's an interpreted language for crying out loud.

"Readability" is the value I think we both agree on.

It's more just a matter of where to draw the line.

I'm thinking the dict's get( ) method, like itemsI( ), is
too important to bleep over, especially when you see
students using try: / except: syntax.

Likewise, when introducing print( ), one must look
at the optional keyword arguments, sep=, end= and
file=.  When you see a student laboriously trying to
get around that default space between strings, let
them know they have control.

Here's what I come down to:  at least make sure they
know they have a choice.  If they learn about .get and
still go back to something else, fine.

And that's indeed how I grade.  I never send it back
as "incorrect" if they didn't use .get (if it comes back,
it's for other reasons) and I don't get bent out of shape
if they decide to not incorporate it into their vocabulary,
even after it's been introduced.

At least I did my job in letting them know about it.

> But your last sentence here bothers me too.  I think that 'smarts' and
> 'cleverness' are terribly overrated in society today.  It's not that
> being stupid is an attractive option.  But often the alternative to
> being _clever_ about something is being _wise_ about something.  So
> the question, in that case, might not be 'why did Guido not have the
> smarts' but 'Was Guido being wise here?'.  Is there a reason why this
> sort of thing does not exist?
>

I happen to agree with your sentiments.

I still think  mytally [ mykey ] = mytally.get ( mykey, 0 )  + 1

is not "too clever".  I think it's rather "just right".  But sure,
use defaultdict instead if you prefer.  Or try / except, even
though it's more verbose.

What'd be a good lesson plan on defaultdict that lets it
strut its stuff.  I think we should incorporate that in one
of our lessons.  Who wants to do unpaid volunteer work. ;-)

> And, quite often, with questions of this sort you get the answer 'because
> there really isn't a need to clutter up the language with XXX' -- and
> you can look up past discussions about features that aren't in Python
> and see Guido saying exactly that all the time.
>

Which means he thinks dict.get is not clutter.  I feel it's being there
is evidence for my case in this debate.

[ re this being "a debate" and me looking for a shared "value" --
readability -- is likely influenced by my immersing myself in the
teen debate world in Washington / Oregon, and being suitably
and happily impressed much of the time:

http://worldgame.blogspot.com/2011/12/foray-to-washington.html

]


> The problem is that, after a certain stage in language development, you
> get beyond the point where every new feature you add is completely positive.
> Instead, you are stuck with haveing to decide for or against a feature
> that makes expressing 'this sort of problem' easier, and makes for clearer
> and more readable code, but at the expense of making it possible to use
> these constructs when dealing with 'that sort of problem', where the
> result is poorly constructed, harder to read code.  And that is the tradeoff
> that is always there.
>

Maybe core Python should stop advancing.  Seriously.  Why keep going?

It's a great language, 3 x best in show per LinuxJournal.  Quit while ahead?

Lets have cool libraries but call it quits on adding to core Python.

Is anyone taking that position, just for kicks?

I know about the moratorium that happened for awhile.  Why not make it
permanent?

Wouldn't it be refreshing to have Python not evolve just so a lot more
people could say they'd contributed a PEP?

If you really can't live with the limitation of Python being how it
is, start a new language.

Note:  I am mindful that PyPy provides many more freedoms and think halting the
evolution of core Python would NOT inhibit people from forking off in
all different
directions with *specialized* Pythons that would be for particular
lines of work, i.e.
we could still have many many more Pythons.  Just we're done defining "core"
such that these would be self-labeling as "di

Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-14 Thread kirby urner
On Wed, Dec 14, 2011 at 3:08 PM, Laura Creighton  wrote:
> In a message of Wed, 14 Dec 2011 14:36:43 PST, kirby urner writes:
>>> Isn't this at least as readable, and conceptually simpler?
>>>
>>> if ext in res_dict:
>>>    res_dict[ext] += 1
>>> else:
>>>    res_dict[ext] = 1
>>
>>I get that a lot too and often propose my one-liner.  This is not a
>>matter of flagging a mistake, just showing another way.
>>
>>It's a chance to learn dict methods better and hey, they're paying to
>>have a pro coach.
>>
>>Kirby
>
> This looks suspiciously like 'I am a superior being I know more
> obscure methods that you do, and obscure knowledge defines the professional'.
> Bleah.
>

I'll take the opposite view for the sake of argument.

dict is like the core data structure in Python and if you
don't know about dict.get( ) then good thing you came
to the right place where professionals are not afraid
to use the well-thought-out features of this language.

To treat dict.get(k, d) as obscure and it make it one's
professional business avoid it is misguided.

> By my standards, this is _unprofessional_.  Whenever you have the urge
> to write code to show off how smart or how knowledgable you are, kick
> yourself.  Professional code is meant to be read.  If you make the
> general reader go off to the manuals to find out why something is
> done, then you ought to have a darn good reason for doing it that way
> than the way that everybody can read and understand.
>

I always explain with the syntax is doing.  It's not about
going off to the manuals.  I'm shrinking four of five lines
of code to one.  Many of my students use dict get( )
naturally, without my prompting.

> Personally, I think that Python would be a much better language if it
> had fewer of these sorts of methods, thus forcing people to use syntax
> like Bert Freudenberg posted above, because the more obscure ways
> aren't available.  Now we have to rely on personal self-discipline to
> not use them, even when we know them, and a deep, unshakeable faith
> that code is meant, first and foremost to be _read_, and read by
> _everybody, not just the other 'experts' -- an expert being one who is
> defined here as 'one who is well-steeped in Python obscurity as you are'.
>

I think returning a default if a key is not found is one of those
workaday methods we thank Python for having, so we don't have
to code up little mini-functions.  If you saw try /except over and
over and each time it was the same thing:  some dict not having
a key, so needing to initialize a tally versus incrementing,
then pretty soon people'd be griping about why Guido didn't
have the smarts to put something so basic in the dict toolkit.

Hey here's an idea:

Lets all be patronizing and use baby talk, so our students
don't learn the basics in ways we were too lazy to.

> If we loose the ability to read Python, because all the new graduates
> are writing code that is hard to read as a matter of principle --
> because they think it is superior, or a matter of ego -- because it
> shows off their knowledge and maybe their cleverness, then I might as
> well be reading any other language.  We'll have lost the primary thing
> that I think makes Python valuable, via the 'boil-the-frog' principle.
> http://en.wikipedia.org/wiki/Boiling_frog

I think it's definitely a pitfall to be "too clever" in Python but
where do we draw the line.  Using built in methods that are
basic to dict?  I say what's *not* where to draw the line.

I think better is to give a choice, show the options.  It's my
job to show off some of these basics in Beginning Python.
Any method of any primitive data type is fair game.  This isn't
metaclasses or anything.

>
> I think as educators it is our job to make sure this does not happen by
> teaching the appropriate self-discipline.  I'd like to send your top
> students back their code with the comment, 'Great that it works.  Now can you
> make it more readable?' I'd be looking for code like the above to replace
> code like yours.
>
> Laura

I think Python is called a very high level language for a reason,
and if we think "readable Python" means pretending it's
C or restricted PyPy type Python, then we're just ripping
ourselves off and being proud for no good reason.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-14 Thread kirby urner
> Isn't this at least as readable, and conceptually simpler?
>
>    if ext in res_dict:
>        res_dict[ext] += 1
>    else:
>        res_dict[ext] = 1

I get that a lot too and often propose my one-liner.  This is not a
matter of flagging a mistake, just showing another way.

It's a chance to learn dict methods better and hey, they're paying to
have a pro coach.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Using try / except: any stipulations against routine use?

2011-12-14 Thread kirby urner
Interesting responses.

I harp on that

somedict [ key ] = somedict.get( key, 0 ) + 1

option quite a bit, as shorter and easier than all that try / except stuff.

That's just the bias I've been applying, to an invisible army of...
what?  Hundreds?  Hard to keep track.

Anyway, good to see the other side of things.

I tend to bust out in try / except syntax when I have to, but if I can
keep it more button-down, I do.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Using try / except: any stipulations against routine use?

2011-12-13 Thread Kirby Urner
Below is typical feedback to a student.

What do others think regarding my discussion of using try /except
in routine dict manipulation?

Kirby


===

Yes perfect.  Good work.

try:
res_dict[ext] += 1
except KeyError:
res_dict[ext] = 1

This code is not atypical and you'll find some polarization among
Pythonistas about whether this is good style.  Another construct:

   res_dict[ext] = res_dict.get(ext, 0) + 1

is the one I favor.  I think of a "key not found" event
in a dict as "routine, to be expected" whereas I think of
try: / except: as for "crying wolf" (not for everyday
contingencies).  The opposite bias is:  why make that
distinction, try: / except: is a perfectly reasonable
construct for trapping a new key to a dict.

In any case, good Python.

-Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] mac python graphics

2011-12-07 Thread Kirby Urner
Somewhat tangentially bouncing around in this
vicinity, I offer these remarks re our situation at
work, where we want students connecting over
the wire to have good first experience using Python.
Retention is an issue.

The school's guiding philosophy requires providing
real hands-on programming experiences and real
interactivity with a full Python console, which until
recently has meant booting a remote desktop into
a server, running a session of Eclipse on a Windows
server in Illinois (front end client could be anything).

Here's a picture of the rig:
http://controlroom.blogspot.com/2011/06/back-office.html

Part of what keeps us in Eclipse is Tkinter. Our
students can do widgets programming.  We do
not have the Zelle package installed, but would
like to add it.  We already work with Wolfram and
have new kind of science exhibits working in the
wings (I've posted about that here already), but
so far only in ASCII (console i/o).

Getting Game of Life type CA stuff running with
graphics.py has already been done right here
in this very archive, in earlier versions of Python.

Anyway, a lot of students feel overwhelmed by
Eclipse and have a hard time distinguishing
between Python-the-language and the surrounding
IDE.  Many are brand new to programming, having
heard Python is a friendlier-than-most language,
winning the "best language ever" award a 3rd
time in a row, didn't I just read?

http://www.linuxjournal.com/slideshow/readers-choice-2011?page=27

However just recently, management has decided to
swap out Eclipse in the first unit and go with a Javascript
and Java enabled front end in a browser, already used to
teach Perl.  We can get away with this in the first unit only
because Tk / Widget programming doesn't happen until
the second unit.  We'll ease them over to Eclipse having
won their loyalty on the basis of Python (plus Coderunner,
the name for the teaching tool).  In the new configuration,
no need for remote desktop, a less shaky connection.
So even if you loved Eclipse, your situation may improve.

The ability to learn widget programming interactively,
writing your own programs, without having to install
anything locally, not even Python itself, is a marketable
feature.  Then we have highly trained mentors to back
it up, so there's no sense of "just a machine" on the
back end.  Works well so far (a relatively new gig for
me, but this team has been at it for quite awhile).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Blogging Math Notations

2011-11-25 Thread kirby urner
Steve Holden (PSF chairman) put some hours into this one and is feeling
somewhat satisfied with the result:

http://holdenweb.blogspot.com/2011/11/blogging-mathematics.html

I need to guinea pig one of my own blogs in a bit, with some simple
formulas, including S = 10 * F ** 2 + 2 no doubt (but in 1800s notation).**

Good work Steve.

Kirby


** http://www.4dsolutions.net/ocn/numeracy0.html
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] learning algorithms

2011-11-18 Thread kirby urner
I recommend 'Mathematics for the Digital Age and Programming in Python'.

http://www.skylit.com/mathandpython.html  (definitely go with the
Python 3 edition, don't trip up on eBay)

It's obscure, it's esoteric, it's used at some of the best schools in
the country (and no one is stopping others from using it).

It steers toward RSA (an algorithm) about which much literature
exists, including for teens, most prominent of which is probably

In Code by Sarah Flannery

http://www.amazon.com/Code-Mathematical-Journey-Sarah-Flannery/dp/1565123778
 (lots of good buys)

If he gets into it, then lots more where that came from, including me
in some Python.tv video (sounds like some grampa, complete with dorky
photos)

http://4dsolutions.net/ocn/rsa.html

Other background also at my site, plus I know a guy who works for the
company that puts hardware RSA chips in cable TV boxes (DirecTV uses
that -- or did, I may be out of date on the specifics, plus haven't
been a subscriber for some time, despite the dish still pointed
skyward ** ).

http://en.wikipedia.org/wiki/Pirate_decryption

Kirby

** http://www.flickr.com/photos/17157315@N00/4835451138/  (note dish
to the left -- blind as a bat).  I have access to other neighborhood
homes though (bars etc.), so it's not like I miss everything HD.

On Fri, Nov 18, 2011 at 12:31 PM, roberto  wrote:
> I have to help a teenager who's fond of computer science.
> He told me he wants to learn "the tough algorithms out there". Of
> course, nobody helps him at school.
>
> I'd like to know some resources to guide him from the very basics of
> programming to as far as he can at the moment.
> Since python is my first choice, personally speaking, can you give me
> some suggestion about a step-by-step introduction to algorithms ?
>
> Thank you !
>
> --
> roberto
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] some useful memes anyone might use when teaching / learning Python

2011-11-14 Thread kirby urner
>
> More memes welcome.  Imagining a culturally savvy adult audience that
> knows about Monty Python is a helpful practice, if aiming for
> Python.tv
>
>
> Kirby
>

4.  Theater metaphors re agency

One of my recent comments on a student quiz re "what is a namespace?"

"names refer to objects in memory.  Objects are the actors or agents
who do the work of a script.  The script controls their performance."

We make wy to little of the fact that "program" and "programme"
come from the same roots in theater, as does "script".

If we weren't so brain damaged, in the sense of divorced from the
humanities, computer science could be something much more wonderful.

Perhaps maths will be where the healing takes place.  Or it will vary
by school, most likely.  STEM / STEAM has a long way to do.

Not nearly diverse enough, when it comes to andragogical techniques.

Fortunately, we have the Internet now so it's much easier to both
experiment and to poll viewers / audiences regarding what's working or
not working (what's effective).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Teaching GUI's in Python?

2011-11-14 Thread kirby urner
On Wed, Nov 9, 2011 at 11:59 AM, Andrew Harrington  wrote:
> Is anyone trying to modernize the code to work with more modern versions of
> the supporting packages?  Sad to still see Arthur's email address still on
> the home page so many years after his death.
>

I've seen estates keep email and Facebook pages alive for ancestors.
My work for the Oversight Committee of my local Meeting (religious)
has been to get those questions added to our "Wishes Upon Death" form
(i.e. what shall we do with your Flickr Photostream?  Most would want
theirs kept alive I expect).

"Deceased" needs to be just one more status on Facebook, akin to "in a
relationship".

As for Arthur's code, I think it's a time capsule for a future time
when the set of those into projective geometry (ala Klein), and the
set of those into Python (ala us), is not so close to the null set.

The way the Venn Diagrams look today, it appears some trend towards
hyper-specialization brought us close to the brink.   Good thing we've
reversed that trend, and not a moment too soon.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] some useful memes anyone might use when teaching / learning Python

2011-11-14 Thread kirby urner
Useful memes:

===

1. Bootup background as "starry firmament":

Python comes with a relatively fixed firmament, like the sphere of the
the stars:  the '__builtins__' namespace.

When your script (from your playbook) launches, it may assume this
starry firmament as a background.  print( ) will be there.

Using some retro pre-Copernican astrolabby toon (meme) is not verboten.

We trust our audience to have used Celestia and Stellarium (both open
source) and to be unconfused about solar system basics. **

2. Callables as "consumers":

Given emoticons, we know the ( ) in :-( ) stands for "sideways lips".
A callable, like an emoticon, has sideways lips:  duh( ).

Arguments are therefore "eaten" and are "fed" to said "mouth".

In the case of __init__ and/or instance creation, we use a birthing
metaphor and hence ( ) has a related other meaning.

Andragogy remember ( >= TV-14 much of the time, and somewhat demented)

Question:  we call them "consumers" but how "mindless" might they be?
Lets look at the source code.

3. Tractor Art:

I continue to develop this package, with an ecosystem of silos (useful
for anthropology talk, the A in STEAM).

The tractors plow in wavy fields of ASCII, simple 2D array objects
(list of lists) called Fields (what else?)

Different subtypes of Tractor, such as Cropcircle, know how to "do the
math" and give us Mandelbrots, or play Games of Life.

Lots of CS type maths in a dense little open source package, a focus
of my impromptu Lightning Talks these days (with laptop and slides)

The segues to Turtle Art are many and following them is encouraged
i.e. Tractor Art is an effective gateway (star gate) to deeper
treatments of so many topics.

===

More memes welcome.  Imagining a culturally savvy adult audience that
knows about Monty Python is a helpful practice, if aiming for
Python.tv


Kirby

** I sometimes get feedback warning I should stay away from too much
snake imagery, potentially offensive to Xtians (Diversity talk /
traffic ). Now that I've seen the new George Harrison biography (a 3.x
hour film), I even more appreciate the Monty Python / Beatles
connection, 'Life of Brian' in particular.  That's not a heritage to
be ashamed of, very much on the contrary.  So for myself, I'm not
worried about it.
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Teaching GUI's in Python?

2011-11-09 Thread Kirby Urner
> Exhibit, old project:  http://pygeo.sourceforge.net/
>

Arthur Siegel was the creator of this and he and I used to take a lot
of the bandwidth here on edu-sig hashing it out about various topics.
I still go back to that stuff.  We have a great archive, lots of
spirited discussion.

Having read other responses, I agree JavaScript deserves front and
center treatment, however I'd make a distinction between the server
and client and talk realistically of Python on the server.

You can talk about Model View Controller in a kind of "cave painting"
setting, where you don't squander hours on any one framework.

In my geometry classes, I bury the specs for polyhedrons in a
relational database (sqlite3 is good) and pull them up in VPython.

Turtle Art is fantastic and we've had many brilliant postings on that
thread.  At OST, I've been pioneering "Tractor Art", far more
primitive (ASCII-based "graphics") -- you'll see some evidence of that
work in those screen shots (my last post).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Teaching GUI's in Python?

2011-11-09 Thread Kirby Urner
On Wed, Nov 9, 2011 at 8:58 AM, Brian Wilkinson
 wrote:
>
> Hello everyone,
>
>
>
> Our upper school, looking to beef up their technology offerings, offered an 
> introductory programming course this year using Python.  I am normally a 
> technology coordinator, supporting teachers and students, but was tapped to 
> teach this class (which I have thoroughly enjoyed so far).  The purpose of 
> this course is to try and get kids excited about programming and so I would 
> like to teach them a bit about graphics and GUI’s.  My initial thought was 
> just to have them work with tkinter, as that (to me) seems the easiest path.  
> After doing some reading, it looks as though wxPython and pyQt are popular 
> options as well.
>
>
>
> So finally to the questions:
>
>
>
> 1) Is teaching basic graphics too ambitious for an introductory course?

Hi Brian --

I'm writing from my work address because this is particularly apropos,
around the water cooler conversation.

We teach GUI programming with Tkinter, and that's a perfectly good way
to go just to get the concepts.

With intro, you want to talk about everything, including wxPython (hi
Robin, Kevin...) and PyQT (don't know them, know it's pretty and has
lots more SQL stuff than Tk).

You can demo, yak, visit websites, show samples of code, without
making the homework be that.

Exhibits of old projects, like on a tour:

http://pythoncard.sourceforge.net/  (topics like SourceForge, Github,
version control, community coding -- you can yak about, as a tour
guide, without requiring hours of sweat learning git or hg).

Your other chief contender I'd say is the browser itself, if you want
to dive down the HTML5 route (hot right now), with Python busily
scribbling stuff on the server, return an httpresponse (even Standard
Library can do that).

>
> 2) If the answer to #1 is no, do folks out there have suggestions for the 
> best tool to use with the students?

My answer was yes.

I also think Visual Python (VPython) is highly useful for the kind of
geometry I'm doing / teaching / learning.

Exhibit, old project:  http://pygeo.sourceforge.net/

My approach in some classrooms (e.g. saturdayacademy.org) has been not
to teach Python as computer programming but as a math notation, so
getting math cred.

Never heard of computer science, don't know what that means (exaggerating).

Back to Tk, the GUI programs we have them write are by Steve Holden,
current PSF chairman.  They're pretty simple, like just "give us some
buttons along the bottom in some frames, and blah blah" (more definite
than that).

You build towards having an email application, sitting atop and SQL
engine, so it's not un-integrated with other topics we cover (a TDD
focus -- good stuff, pretty challenging).

However, we at the O'Reilly School of Technology (of O'Reilly Media)
don't do Tk / GUI stuff in the first course, Beginning Python, which
is the true intro course.

So in a sense, we aren't using it with beginners, because the Python 2
course assumes you're already at the Python 1 level of fluency (there
are four in the sequence).

It's a little hard to equate our situations, because my students are
on their own schedule and don't report to class.

They just have to get their GUIs right to continue up the fish ladder.
 The majority of programs are not GUI.  We get into optparse and argv
a lot, and of course user input( ).

Here's my stash of screen shots to give the flavor (I'll link to a
student GUI attempt -- we use Eclipse for our IDE):

http://www.flickr.com/photos/17157315@N00/5717612982/in/set-72157625646071793

(this is something I might send back for a next draft, because the
text widget should completely fill the frame and scale with it, and
the buttons should be thin across the bottom without the fat layer).

Kirby

>
>
>
> I have enjoyed reading this group this year.  It has been a big help.
>
>
>
> Brian Wilkinson
>
> Sandy Spring Friends School
>
> Technology Resource Coordinator
>
>
>
> “When you have eliminated the impossible, whatever remains, however 
> improbable, must be the truth.”
>
>
>
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] negative connotation of "object orientation"

2011-10-29 Thread Kirby Urner
On Wed, Oct 26, 2011 at 8:25 PM, michel paul  wrote:

> On Wed, Oct 26, 2011 at 3:36 PM, kirby urner wrote:
>
>>
>> PS:  on a related topic, there's also a negative connotation
>> associated with "imperative programming".  The word "imperative" gets
>> translated to mean "bullying".  The functional programmers exploit
>> that connotation, and imply that functional programming is kinder to
>> children.
>>
>
> OK, this is very interesting, especially in light of the Math 2.0 thread.
> So 'imperative' and 'procedural' are pretty much the same thing, right?
> But 'procedural' doesn't tend to imply 'bullying'.  It can simply mean
> 'orderly', spelling out a sequence of steps.  I just found this
> procedural/functional 
> comparison<http://en.wikipedia.org/wiki/Procedural_programming#Comparison_with_functional_programming>
>  useful.
>

Thanks for that reference.  Here's the opening paragraph:

*Procedural programming* can sometimes be used as a synonym for imperative
> programming <http://en.wikipedia.org/wiki/Imperative_programming>(specifying 
> the steps the program must take to reach the desired state),
> but can also refer (as in this article) to a programming 
> paradigm<http://en.wikipedia.org/wiki/Programming_paradigm>,
> derived from structured 
> programming<http://en.wikipedia.org/wiki/Structured_programming>,
> based upon the concept of the *procedure call*. Procedures, also known as
> routines, subroutines <http://en.wikipedia.org/wiki/Subroutine>, methods,
> or functions (not to be confused with mathematical functions, but similar
> to those used in functional 
> programming<http://en.wikipedia.org/wiki/Functional_programming>)
> simply contain a series of computational steps to be carried out. Any given
> procedure might be called at any point during a program's execution,
> including by other procedures or 
> itself.<http://en.wikipedia.org/wiki/Procedural_programming#cite_note-0>
>
What intrigues me is the prospect not *confusing* these functions with "the
mathematical functions" but being somewhat precise about the relationship,
as they're not on wholly different planets, either, or shouldn't be, unless
we're reading *The Little Prince* or something (everyone gets their own
planet in that book -- which has a snake, a constrictor, but it's not a
python).

I hosted a long thread at the Math Forum recently, on math-teach, where I
trucked out the "Dolciani" meaning of function, what we learn in "schoolish
math", especially since the New Math era, when much was done to formalize
the teaching of functions in pre-college courses.

http://mathforum.org/kb/thread.jspa?threadID=2303870&tstart=60  (quite
length, a silly argument about which of the two meanings of function is
"more general")

Predictably, there's a skeptical backlash and the thought of using Python
functions to help unlock the secrets of their mathematical counterparts is
generally dismissed as trying to get computer science treated as
mathematics.

I regard that broken record more as brokenness in the English language than
a real debate.  The categories into which "knowledge and skills" have been
subdivided are too arbitrary to matter much, their half-life will be short
(flash in the pan, obsolete as we speak).

Fortunately, I'm teaching Python to adults and getting to field test my
more activist mathematics concepts, so I am personally not that frustrated.

The other thing is I work with the Diversity people and am alert to these
anti-engineer stereotypes.

The "object oriented" moniker attracts flak from more than one angle then:

   - we have some functional programmers who think OOP is symptomatic of
   everything wrong with programmers and programming, and

   - we have some physicists who think "object oriented" means lacking in
   personal depth, warmth = a domineering pain in the ass, or a shy person
   with no social skills (many subspecies)

OOPers are basically somewhere between Lex Luthor in Smallville
(calculating) and Spongebob Squarepants (a dork).

How can we ever be cool, with that kind of PR dogging us around, feeding
the behind-our-backs gossip?
Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] negative connotation of "object orientation"

2011-10-26 Thread kirby urner
Appended: from a Physics teaching list I frequent.

Note the negative connotations associated with "object orientation" (=
asocial = lack of social affect).

I take up this ethnographic thread in my blogs and this discussion
list from time to time, as I think it's apropos to many subtopics
(Diversity in particular).

Here's my take on it from awhile back:

http://worldgame.blogspot.com/2009/02/regarding-objectifying.html

Kirby

PS:  on a related topic, there's also a negative connotation
associated with "imperative programming".  The word "imperative" gets
translated to mean "bullying".  The functional programmers exploit
that connotation, and imply that functional programming is kinder to
children.

===

Well, it is at least reminiscent of Sheila Tobias.

On a possibly related note, Simon Baron-Cohen studied personalities of
scientists and engineers across many subfields. Among his results was
(sorry to bring bad news) that the closer one comes to physics,
mathematics, or similar engineering disciplines, the more closely the
median practitioner resembles high functioning autism (which, of
course, affects males over females by a ratio of 4.2 to 1). That in
turns brings with it all manner of asocial phenomena -- object
orientation, lack of social affect and the like.
- Show quoted text -
-- 
Dr. Paul J. Camp
Physics Department
Spelman College
Atlanta, GA   30314
404-270-5864

"The beauty of the cosmos derives not only from unity in variety
 but also from variety in unity"
   -- Umberto Eco
   The Name of the Rose

in response to:

Inside Higher Ed
Why Female Engineering Students Are Discouraged
October 26, 2011 - 3:00am

   Women perform as well as men in engineering courses, but are
less likely to stay in the field because of a confidence gap,
according to research published in the new issue of
American
Sociological Review. Women are less likely to feel "professional role
confidence," the study found, which has to do both with their view of
their own talent and also of their sense that they are in the correct
field. "Often, competence in engineering is associated in people's
minds with men and masculinity more than it is with women and
femininity. So, there are these micro-biases that happen, and when
they add up, they result in women being less confident in their
expertise and their career fit," said the lead author of the study,
Erin Cech, a postdoctoral fellow at Stanford University's Clayman
Institute for Gender Research.

http://www.insidehighered.com/quicktakes/2011/10/26/why-female-engineering-students-are-discouraged#ixzz1btymrPZs
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Interested in a BBC Micro in schools project?

2011-10-05 Thread kirby urner
Greetings Alan, thanks for filing your thinking on edu-sig, where I'm
a lurker from the beginning or close to it (CP4E predates my
involvement).

I think readers outside the UK might benefit from a more frequent
decoding of BBC into British Broadcasting Corporation here and there
in your writings.

To many USAers, it might seem a little surreal to imagine Fox News
muscling in on the No Child Left Behind program, ostensibly run by the
government, in order to make sure it included lots of Python
programming.

On the other hand, Fox has mall outlet stores now, like in airports,
so maybe TV companies are indeed the right entities to be offering us
(their consumers) their leadership.

http://www.flickr.com/photos/17157315@N00/5497825739/

Apparently in the UK that might be OK, to have the TV people decide
that programming is a good idea.  Makes sense.  TV is all about
programming.

If a New York based TV company were to get more into Python, I'd like
it to be CBS as I'm a fan of many on that team.

Most USAers would say PBS is the logical choice, because it's more
tightly regulated / run / controlled by the government and so has the
right Big Brother overtones I suppose.

Or what do Americans think?  Anyone here wanna admit to being one?

Didn't PBS have storefronts too?  Lots of eCommerce goes on:
http://www.shoppbs.org/home/index.jsp  (reminds me of the Post Office,
from which I bough neck ties).

I haven't looked at the BBC's on-line gift shop yet.  Does it sell
computers?  TVs?

Kirby

PS:  I'm wondering if you know Dr. Ian Benson as your thinking seems
rather similar to his in some way.  He was based at Stanford last I
knew.  He talked about the BBC quite a bit.


On Wed, Oct 5, 2011 at 4:03 PM, Alan O'Donohoe  wrote:
> Ok - I know I upset a lot of Pythonistas with my "BBC CodeLab" stunt at
> PyconUK. I do sincerely regret any upset I caused anyone, the talk was meant
> to stimulate talk and discussion about whether it was a good idea and how
> feasible it could be. I accept I was wholly misguided in using such a rouse
> when there was already so much good work taking place. I did have honourable
> intentions, but used nefarious means to achieve my goal of raising the
> profile of computing in schools.
> If you dare watch the talk, you will find it
> here http://teachcomputing.wordpress.com/2011/09/26/bbc-b-to-python-gcse/
>
> Suffice to say, I will be eating 'Humble Pi' or HumblePy for some time to
> come. ;-)
>
> So - imagine how surprised I was to discover in the last few days that the
> real BBC (not the one in my head) are actually seriously considering a BBC
> Micro in schools project! I thought my Christmas had come early! I don't
> wish to claim any credit for this, I am sure it was something that was
> already on the table before I came and opened my big gob.
>
> If you don't believe me - that's ok with me. The fable of 'The Boy Who Cried
> Wolf' springs to mind.
>
> So you don't need to take my word for it, Professor Keri Facer of Manchester
> Metropolitan Uni has been asked by the BBC to gather a network of teachers,
> programmers/developers and university lecturers/professors to gauge te level
> of interest in a 'BBC Micro Project'
>
> She requests that anyone with an interest email her directly
> at k.fa...@mmu.ac.uk
>
> Can I please urge anyone who values the principle of allowing children in
> the UK to experience a little (or a lot) of what programming is to contact
> her and express your interest.
>
> If we want the BBC to sit up and take an interest - we need to show our
> level of interest and commitment to this cause.
>
> Alan O'Donohoe
> @teknoteacher
> 07791 126056
> ___
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] notes from a User Group meeting... (Urner in Portland)

2011-09-28 Thread Kirby Urner
> Our recent PPUG meeting at Produce Row included Michelle Rowley's
> proposal to do a Pycon talk centered around posture, ergonomics, yoga,
> all those tricks you need to know to stay buff in your cubicle.
>
>
Something like:

class Kundalini:
def __chakra1__(self): "Muladhara"
def __chakra2__(self): "Swadhisthana"
def __chakra3__(self): "Manipura"
def __chakra4__(self): "Anahata"
def __chakra5__(self): "Vishuddha"
def __chakra6__(self): "Ajna"
def __chakra7__(self): "Sahasrara"


comes to mind as a good mnemonic, acknowledging up front this isn't a real
magic name (so it'd mangle, not crash -- the above is legal Python, OK to
have docstring instead of pass).

The point of using underunder (dunder) is to remind us of ribs (__ribs__)
which is what a snake has (a backbone) and what a kundalini is.

Anyway, I'm supposed to be working.  Enough water cooler mumbo jumbo.

Back to the cube (somewhat figurative in my case, though I've been an
indigenous cube farmer in my day).**

Kirby

** http://worldgame.blogspot.com/2007/05/qyoobin.html
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] notes from a User Group meeting... (Urner in Portland)

2011-09-27 Thread kirby urner
I've been enjoying repartee with the math-teach irregulars over on
Math Forum, an old haunt of mine, approaching 6K postings over the
years, maybe more if we count lost dialogs (had a good one with J.H.
Conway when MF was still with Swarthmore).

The thread includes some commentary on OLPC and some early mistakes.
I should have more links to back me up on some of this stuff.
Wikipedia would likely sweep it out the door in its present form, but
then I wasn't intending to write the veridical history.

Our recent PPUG meeting at Produce Row included Michelle Rowley's
proposal to do a Pycon talk centered around posture, ergonomics, yoga,
all those tricks you need to know to stay buff in your cubicle.

Reasonably, she was concerned this topic would be deemed too froo froo
by the ambient serious-minded engineering culture, however she had
solutions for that, namely software services, written in Python, that
would encourage self-awareness while working.

Your phone might have a few words to say about your posture
occasionally, thanks to a tickler file you threw together in some DIY
hack job, latter ported to github and turned into a community service
enterprise, complete with forking branches.

We talked about the self quantification movement springing from
athletics mixing with cloud services.  This'd make work in a cubicle a
little more like a gym class.

The next generation of cubicle may have more "monkey bar" features,
letting you hang upside down while coding.  I could see a whole office
doing that, maybe at Marvel Comics.  Urban Airship.

Michelle is an accomplished Djangsta and systems architect, with an
earlier background in PHP.

She's working on a yoga-related web site for teachers, a kind of Khan
Academy for yogis, minus most of those Youtubes (that's not how she
describes it, and I'm not doing her business model justice, just
giving some more background on our User Group leader).

I brought a laptop to the meeting and showcased some of my Tractor
Graphics, simple Python generators ploughing in 2D fields of ASCII.

I've written a lot about that here before.  I've got some sample
slides in my Photostream, clearly early draft in that the spellchecker
is turned on and giving wavy lines in Powerpoint.

I've pointed math-thinking-l to the thread, so far without sparking
any commentary.  That's a sleepy-head list these days.

Kirby

Thread on Math Forum:
http://mathforum.org/kb/thread.jspa?threadID=2299146&tstart=0
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] djangsta rap

2011-09-11 Thread kirby urner
Greetings from Portlandia.

DjangoCon 2011 has just ended.  This is a pretty deep community with
some excellent leadership, and the size of conference (under 400) is
comfortable and intimate for many people.

Here's a link to some fun pix from Yarko that I just got from
"Chairman Steve" (as in Steve Holden):

https://plus.google.com/photos/112974129603800923888/albums/5650503738306636689

My own folder has tended to focus on branding and ad agency kinds of
stuff, perhaps thanks the W + K meeting re LimeSurvey (per Wikipedia),
which was used for post-conference psychometrics by one Patrick
Barton.

http://www.flickr.com/photos/17157315@N00/sets/72157627512153141/  (ads etc.)

http://worldgame.blogspot.com/2011/08/blue-house-news.html (mentions LimeSurvey)

I had some good talks with the GeoDjango people especially.  We had a
geographer from Philly, several others drawn to this community via the
GIS world.

As someone who has presented twice at GIS in Action, once as a
quasi-keynote, I had some interesting perspectives for them.

http://www.4dsolutions.net/presentations/gis_2009_workshop.pdf  (where
is Pythonia = Python Nation?).

Yarko and I talked more about my Radical Math curriculum, a
combination of OO, group theory (elementary) and newfangled (fringe)
geometry.

He even started sounding upbeat about the idea of "demented cartoons"
on Python.tv (one of Steve's domains).

I'm big into getting more animated cartoon characters lined up to
teach Python.

Speaking of which, check out this "Djangsta" pony the PyLadies came up with:

[ technical glitch, will post later to Diversity ]

I did my usual chauffeuring and schlepping for this conference (same
as last year), working for Open Bastion (a sponsor / producer).

Quite a few people at the conference knew me from the Diversity list
in particular.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Yet another online Python...

2011-09-01 Thread Kirby Urner
On Thu, Sep 1, 2011 at 8:59 AM, kirby urner  wrote:

>
> Python's Standard Library turtle module is just another Python module
> with no more docs than average for an SL mod.
>
>
I suppose in the interests of completeness we
should mention that Python's native turtle mod
is in that subcategory of library modules that
depend on Tk and tkinter.  Not every Python
installation comes with the Tk base.  That's
just a standard way to bundle widgets and
GUI options.  wxPython, wrapping wx, has it's
alternative graphical scheme etc., other turtles.

Python, unlike Java, does not attempt to
build GUI widgets right into the language as
"foundation classes".  The Standard Library
solution is a different style of architecture.

Part of what keeps Python small, as a language,
is its decoupling from any one GUI library.

Python is not monogamous (plays well with
others), but then that's not a feature unique
to Python.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Yet another online Python...

2011-09-01 Thread kirby urner
> This online version looks good for these classes.
> learnpython.org  has some turtle graphics, which we'd like to use.
> I don't see a description of the turtle graphics syntax/capabilities on the
> site, although the opening program has an example turtle program.
> Randy Latimer
>

Python's Standard Library turtle module is just another Python module
with no more docs than average for an SL mod.

Then we have numerous 3rd party modules, some of which focus
exclusively on turtle graphics and may involve special not-Python
syntax (because they're imitating Logo perhaps).

You likely know all this, just clearing it up for our readers.  Gregor
Lindl maintains the SL mod and has contributed lots of cool .py files
to drive turtles.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Announcement: How to Think Like a Computer Scientist -- Interactive Edition

2011-08-29 Thread kirby urner
On Sat, Aug 27, 2011 at 11:20 PM, Sarina Canelake  wrote:
> Hi Kirby,
> Thanks for the feedback. I've enjoyed reading your posts on the list, and
> the specific concerns you address are well worth considering. If you don't
> mind, I'd like to give some background on my project.

I'm glad you found your way to this list Sarina as it's definitely an
apropos place to archive details about your project, the thinking
behind it and so forth.

Python got a big boost when MIT started to become more Python-centric
in its courseware, some of which is free and open source.

Speaking for myself (not any of my co-workers) I have no objections to
automated grading / scoring as an option.

The Python interpreter is itself automatic and a great source of
impersonal (non-judgmental) feedback.

Some students respond better in anonymous automatic situations as they
do not feel judged by another human who might know them (an invasion
of privacy).

The thing Scott wants to combat is too much passivity in the culture.

It's a generic problem with a lot of schooling, when it becomes an
extension of spectator sports, with the learner the passive spectator.

No one technology or learning experience can be singled out.  Even
television may inspire lots of activity -- especially if you make it,
don't just watch it.

That sense of "hard fun" where you struggle with a program, and don't
just have to fill in the blanks or do multiple choice, has to be
developed somewhere.

Automated feedback services have their role.

The mathematics curriculum I write about and implement / field test
where feasible (quite a few opportunities) has people actually biking
around town hauling vegetables in trailers.

Down the road, our work will involve the placement of sensors,
environmental monitors, here there and everywhere, again using bikes
sometimes (sometimes going on foot, sometimes kayaks or canoes).

MIT has been an inspiration for some of this thinking.  This web site
for example:  http://web.mit.edu/newsoffice/2010/landman-report.html

Also the movie 'Gasland'.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Yet another online Python...

2011-08-28 Thread kirby urner
Just alerted to this one by the chairman:

http://pythonfiddle.com/

Still checking it out.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] OO and story problems

2011-08-28 Thread kirby urner
2011/8/27  :

> It turns out that many Young-Earth Creationists deny the existence of all
> of geology (including all methods of dating rocks using radioactive
> isotopes) and most of astronomy. We cannot, in their view, see light from
> objects more than 10,000 light-years away, which is most of this galaxy
> and all of any others, and nothing that we can see can be older than that.
> But they generally won't fight you on those issues the way they will on
> all of us being descended from (presumably Black) Africans, and they won't
> insist on the stars being part of the solid firmament over the Earth where
> the rains came through in Noah's Flood. ^_^

Cosmologies come under geography in my Geometry + Geography
heuristic.

I encourage sharing many cosmologies and use a spectrum of
literal versus symbolic (to be simplistic about it).  Karen Armstrong
wrote pretty well on this didn't she ('Battle for God' etc.)

Some creation myths, such as Bucky's in 'Tetrascroll', aren't
designed to be taken literally ("a cosmic fairy tale" is the subtitle).

I liked 'Sita Sings the Blues', an adaptation of the Ramayana.

http://worldgame.blogspot.com/2011/08/sita-sings-blues-movie-review.html

I'm hoping Gagus will like my idea of using Indonesian shadow
puppets to teach Python.  We have enough lighting for puppets
after dark.

Welcome to XO country right?  Rugged and outdoorsy.

Richard Stallman in Sri Lanka:  I have a poster about that in my blog.

http://worldgame.blogspot.com/2011/04/richard-stallman-at-psu.html

>> Of course
>> anything can be twisted, but at least it's relatively free from the
>> specters
>> that your opponents point out.
>
> What?!? You don't know about NASA faking the moon landings?
>

Lets cut people some slack though:  they are often the
target of misinformation campaigns.  Salvos go out
daily from these "news sources" as you know.
NASA's are pretty good (I subscribe to a news feed).

Some others are pretty terrible.

In general the defenses seem kinda weak around here,
even against only mediocre spin doctors.

I've got a pretty entertaining rant about that from 2005:

http://worldgame.blogspot.com/2005/12/big-foot-strikes.html

>> Just a .02 cent thought 
>
> I have one word for any of you who want meaningful story problems: sports
>

Yes, sports is a fine entry point, I agree, especially when you
zoom in on the human body and just focus on athletics in the
sense of scripted / practiced motion, picking up dance, theater
and musical performance.

In the field I describe, we've had a triathlete join us, using our
story problem output as a chief source of nutrition.

Solving our story problems requires exertion.

Not everyone is equally able to do all the problems, but that's
not a big worry.  We talk about our various gifts and leadings
and divvy the labor.  Self organization is key, without too
much overhead.

One of my fears is that as we grow bigger and more
successful, our bureaucratic layer will grow.

> The leading world sports, including baseball, soccer, cricket, rugby,
> tennis, and golf, have well over a century each of recorded statistics of
> amateur and professional leagues. One can do all kinds of probability and
> statistics, of course; the combinatorics of tournaments; the paradoxical
> aspects of rating systems; and a wide range of physics problems. There is
> no need for synthetic interest when you have the real thing. Students who
> don't care for sports can do chess (human or AI) or whatever else of
> comparable depth interests them. Or politics, thus leading to the
> thorniest question of civics: What should we do when government does not
> act in a satisfactory manner? in parallel with the question What should we
> do when the rules or laws of a game or of a tournament are clearly
> unsatisfactory? (Officiating in World Cup Soccer has come under particular
> criticism in recent years, as has the practice of deliberately making a
> red card (expulsion) foul in the last minute of a game to prevent a goal
> by the other side.)
>

Questions of ethics matter yes.  And what are young bodies doing
with themselves to keep in shape?  We usually separate that question
from mathematics, but as I've been saying, the self quantification
movement is suggesting a lifestyle where we take bold interest
in our many personal statistics.  This naturally feeds into the baseball
fascination (for example), where statistics have been king for a long
time.

I'd not want to encourage couch potato approaches to sports.
Archery.  Now there's a good one.  Also skating of various kinds,
and skiing (including on water).

First Person Physics fits in here too.  As a certified scuba diver,
I can tell you we got quite a bit of physics and chemistry in the
lectures.  Gas laws, Boyle's Law, no Gibbs Phase Rule that
I recall but it would have fit.

> I recommend the book Money Ball for showing how questions of genuine
> interest in sports have had real financial consequences in US baseball.
> For example, 

Re: [Edu-sig] Announcement: How to Think Like a Computer Scientist -- Interactive Edition

2011-08-27 Thread Kirby Urner
On Sat, Aug 27, 2011 at 8:31 AM, Sarina Canelake  wrote:

> Hi Carl,
>
> I am a master's student, and for my project I am building an interactive
> Python tutor system, hopefully with 150-250 problems, as well as embedded
> video. Some of my inspirations have been the Khan Academy and codingbat.
>
>
Heads up re talk at OSCON this year by Scott Gray (full disclosure:  I work
for the guy) ranting against several categories of interactive courseware,
but namely "watch a video then play the match game with canned quiz show
type questions".  There's no "making with tools", no "apprenticeship".
Anyway, just saying there's a spectrum.

This isn't about passing judgment on any particular system, either.  Our
Python Track has lots of "no brainer" quiz questions for student
reinforcement.  It's not like this doesn't feel like a school (though more
asynchronous and with less emphasis on externally imposed deadlines). The
projects tend to be Python modules, or pairs, with one unit testing the
other.  Teachers provide feedback.

Any time you see complete automation on the back end, I say you have a
competitive edge if you add a human touch.  Our testing instruments are all
hand graded, and projects come with real advisers, albeit not in real time
(it's an asynchronous UI).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] Announcement: How to Think Like a Computer Scientist -- Interactive Edition

2011-08-26 Thread kirby urner
On Fri, Aug 26, 2011 at 7:07 PM, Carl Cerecke  wrote:
> Looks good. Nice work.
>

+1

Blogged a link:

http://worldgame.blogspot.com/2011/08/how-to-think-like-computer-scientist.html

Great contribution to computer lit.

Kirby

>> Hello,
>> As part of my Sabbatical this past year I've been working on a new edition
>> of How to Think Like a Computer Scientist (by Elkner et. al) with my
>> colleague David Ranum.  The idea behind this new edition is to make it
>> interactive, to encourage students to learn by doing and to explore.  The
>> three main features we've added to previous editions are:
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] OO and story problems

2011-08-26 Thread kirby urner
2011/8/26 Charles Cossé :
> Greetings, Kirby,
> just thought I'd throw-out-there that physics/astronomy can offer a context
> that is neither meaningless, nor open to political propaganda.   Of course
> anything can be twisted, but at least it's relatively free from the specters
> that your opponents point out.  Just a .02 cent thought 
> Cheers,
> Charles Cosse

Yes sir.

Quoting from that very thread (on math-teach):

+++
My approach is like John Saxon's "spiraling" in that
I'd rather connect a lot of story problems into a
consistent framework, in part for mnemonic value.[1]
One may work on more than one framework. The
focus on food distribution below does not preclude
using the solar system and its states of affairs to
anchor other stories. Indeed, these scenarios
partially overlap. The universe is multi-disciplinary.
Geometry + Geography is an organizing heuristic
(a first divide, as distinct from the older trivium /
quadrivium).
+++

http://mathforum.org/kb/message.jspa?messageID=7532037&tstart=0

Thanks for jumping in.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig


<    2   3   4   5   6   7   8   9   10   11   >