From andre.roberge at gmail.com Thu Oct 1 22:50:01 2015 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 1 Oct 2015 17:50:01 -0300 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: References: Message-ID: On Wed, Sep 30, 2015 at 3:50 PM, Andre Roberge wrote: > Hi everyone, > > Google has failed me, and I'm hoping that someone on this list could > help... > > About a year or two ago, I read a study comparing different programming > languages used for beginners. I believe there were at least four > different languages that had been looked at, one of which was Python. I > also believe that the (main) author including their newly created language > as comparison. > > As I recall, the author looked at the reading comprehension (and writing > ability?) demonstrated by the students for basic programming structures. > One thing that jumped at me was that one of the structures used by Python > (likely the for loop) was not very understood by the students. > > I'd appreciate if anyone could turn the above poor description into an > actual link to the actual article I'm attempting to describe! ;-) > > Andr? > Thanks to those that contacted me directly with suggestions; I believe that I found the paper that I was looking for (although it states less explicitly what I thought about Python and loops). A link to the paper can be found on the author's website: http://web.cs.unlv.edu/stefika/Papers.php The paper is 1. Andreas Stefik and Susanna Siebert. 2013. An Empirical Investigation into Programming Language Syntax. ACM Transactions on Computing Education 13, 4, Article 19 (November 2013), 40 pages. It links to an acm website and you have to wait for a few seconds for it to load from that site. The part of interest (to me) was on Table V which lists the "best" keywords and the "worst" to describe loops, as indicated by both programmers and non-programmers. The best keywords (combining result from the two groups) are thought to include: repeat, again, loop, cycle The worst keywords are thought to include: foreach, while, echo, duplicate, for .... with "for" getting the worst result of all. The paper was a follow-up from a previous paper that compared an existing language (Perl), a semi-randomly created one (Randomo), and an especially designed one (Quorum). Unsurprisingly, Quorum performed best when it came to readability .... but Perl was apparently on par with Randomo. This follow-up paper included more languages, with Python and Ruby achieving better results than Quorum .... and with Perl and Java being comparable to Randomo when it came to readability. I bet that if Python included a construct for loops like the one found in Guido van Robot, namely do n: block or possibly repeat n: block it would have performed even better. Cheers, Andr? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at handysoftware.com Fri Oct 2 16:02:32 2015 From: david at handysoftware.com (David Handy) Date: Fri, 2 Oct 2015 10:02:32 -0400 (EDT) Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: References: Message-ID: <1443794552.478719338@apps.rackspace.com> On Thursday, October 1, 2015 4:50pm, "Andre Roberge" said: ... The best keywords (combining result from the two groups) are thought to include: repeat, again, loop, cycle The worst keywords are thought to include: foreach, while, echo, duplicate, for .... with "for" getting the worst result of all.Now that you mention it, I have hazy memories from > 30 years ago, when I was learning BASIC, of puzzling over the meaning of the FOR keyword and wondering why they chose that word. So I'm not surprised to see that on the list of difficult keywords. However, the WHILE keyword in BASIC was intuitive for me. So it surprises me to see that on their list of bad keywords. David H -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Fri Oct 2 18:03:38 2015 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 2 Oct 2015 09:03:38 -0700 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: <1443794552.478719338@apps.rackspace.com> References: <1443794552.478719338@apps.rackspace.com> Message-ID: This list begs the question of whether English language words should take precedence of those of another language or symbols such as used in APL, J and so on, for important verbs. I'm leery of such rankings anyway. Knowledge-by-survey is not the same as knowledge. Kirby On Fri, Oct 2, 2015 at 7:02 AM, David Handy wrote: > On Thursday, October 1, 2015 4:50pm, "Andre Roberge" < > andre.roberge at gmail.com> said: > > > ... > > > The best keywords (combining result from the two groups) are thought to > include: repeat, again, loop, cycle > The worst keywords are thought to include: foreach, while, echo, > duplicate, for .... with "for" getting the worst result of all. > Now that you mention it, I have hazy memories from > 30 years ago, when I > was learning BASIC, of puzzling over the meaning of the FOR keyword and > wondering why they chose that word. So I'm not surprised to see that on the > list of difficult keywords. > However, the WHILE keyword in BASIC was intuitive for me. So it surprises > me to see that on their list of bad keywords. > David H > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aharrin at luc.edu Fri Oct 2 18:05:02 2015 From: aharrin at luc.edu (Andrew Harrington) Date: Fri, 2 Oct 2015 11:05:02 -0500 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: References: Message-ID: Look at page 19 on how the loop syntax was used! It was used just for "repeat n times" - really simple, (and with a trivial useless loop body). "while" is for a more complicated situation (in general) where there the number of repetitions is controlled by a significant and flexible condition. Such loops (particularly with code to prepare for the next time through the loop) are likely the most difficult for my students to understand, but I am not convinced that it is because of the word keyword used, but just because of the more complicated real situation. Also the keywords were not tested when a definite collection of objects was being iterated over, as opposed to a simple repetition or an artificial sequence created just to repeat. Then foreach sounds like a clear winner, likely somewhat better than to shorter Python "for". "while" and "for" require complicated additional syntax if you just want "repeat n times". The question then becomes whether adding special syntax for a simple repetition complicates the overall learning situation more than sticking with fewer keywords and depending on flexible synthesis, like using "for" with "range" in Python. This is the only thing I get out of the looping section of the article. I find the table very misleading. Dr. Andrew N. Harrington Computer Science Department Graduate Program Director gpd at cs.luc.edu Loyola University Chicago 529 Lewis Towers, 111 E. Pearson St. (Downtown) 417 Cudahy Science Hall (Rogers Park campus) http://www.cs.luc.edu/~anh Phone: 312-915-7982 Fax: 312-915-7998 aharrin at luc.edu (as professor, not gpd role) On Fri, Oct 2, 2015 at 9:02 AM, David Handy wrote: > On Thursday, October 1, 2015 4:50pm, "Andre Roberge" < > andre.roberge at gmail.com> said: > > > ... > > > The best keywords (combining result from the two groups) are thought to > include: repeat, again, loop, cycle > The worst keywords are thought to include: foreach, while, echo, > duplicate, for .... with "for" getting the worst result of all. > Now that you mention it, I have hazy memories from > 30 years ago, when I > was learning BASIC, of puzzling over the meaning of the FOR keyword and > wondering why they chose that word. So I'm not surprised to see that on the > list of difficult keywords. > However, the WHILE keyword in BASIC was intuitive for me. So it surprises > me to see that on their list of bad keywords. > David H > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lac at openend.se Fri Oct 2 18:33:24 2015 From: lac at openend.se (Laura Creighton) Date: Fri, 02 Oct 2015 18:33:24 +0200 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: References: Message-ID: <201510021633.t92GXOFV028465@fido.openend.se> I have found that if you begin teaching: for item in lst: and for letter in word: and then add break, and continue, and then teach for x in range(y): and then teach while (something): it all goes better than if you begin with while loops. But I don't know whether this means this is a better order to teach in, or simply a better order for _me_ to teach in. Laura From ntoll at ntoll.org Fri Oct 2 18:43:14 2015 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Fri, 2 Oct 2015 17:43:14 +0100 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: <201510021633.t92GXOFV028465@fido.openend.se> References: <201510021633.t92GXOFV028465@fido.openend.se> Message-ID: <560EB422.2010508@ntoll.org> I would take this sort of study with a pinch of salt... The quality and skill of the teacher as well as the aptitude and learning context of the students has a huge impact on the end result. There are numerous studies that show this. To my mind this invalidates the "use method X or Y in subject area Z?" type questions such as this one. (For example, in my specialism of music there's a huge amount of debate over when and how to introduce various concepts. Such arguments usually boil down to, a good teacher will use their judgement depending on the aptitude and outlook of their students. This has been the case for at least 500 years of western classical music education.) Social science FTW!!!!! (So says a former teacher and classical musician with a philosophy degree.) :-) N. On 02/10/15 17:33, Laura Creighton wrote: > I have found that if you begin teaching: > > for item in lst: > > and > > for letter in word: > > and then add break, and continue, > > and then teach > > for x in range(y): > > and then teach > > while (something): > > it all goes better than if you begin with while loops. > > But I don't know whether this means this is a better order to teach in, > or simply a better order for _me_ to teach in. > > Laura > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From kirby.urner at gmail.com Fri Oct 2 19:16:18 2015 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 2 Oct 2015 10:16:18 -0700 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: References: Message-ID: I'd say it's not just a matter of which keywords one chooses but how many. It'd be easy enough for Python to bloat with additional control structures the "fit the brain" of those used to thinking a particular way. I favor teaching any language with an assumption the student will always be learning others, so it helps to make bridges and analogies. When it comes to keywords, the discussion could go in the direction of "expression versus statement" e.g. in Python we have that distinction (an if statement is not an expression, defining expressions as "namables" e.g. name = "rock" in pile) whereas in Clojure (LISP family) we don't. Python's list comprehension syntax is a good example of how the keywords for controlling logic also enter into creating expressions i.e. for loop and if condition syntax as a part of an expression. That brings up another point: once you've mastered Python's for, you also have easy access to list, set and dict comprehension syntax. So the question is not just: which keywords are best but *how few* might one get away with (if *any*) and what's the payback for learning them i.e. how powerful are they, used in conjunction? Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From aharrin at luc.edu Fri Oct 2 21:00:06 2015 From: aharrin at luc.edu (Andrew Harrington) Date: Fri, 2 Oct 2015 14:00:06 -0500 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: <96e43595e0b04c079ec6013ee38486e2@MBXWT3.adms.luc.edu> References: <96e43595e0b04c079ec6013ee38486e2@MBXWT3.adms.luc.edu> Message-ID: Good point on order of keyword introduction affecting ease. I agree with yours, though having introduced functions first allows me to show how to use return to short-circuit a loop without having to add the extra syntax of break so early. Dr. Andrew N. Harrington Computer Science Department Graduate Program Director gpd at cs.luc.edu Loyola University Chicago 529 Lewis Towers, 111 E. Pearson St. (Downtown) 417 Cudahy Science Hall (Rogers Park campus) http://www.cs.luc.edu/~anh Phone: 312-915-7982 Fax: 312-915-7998 aharrin at luc.edu (as professor, not gpd role) On Fri, Oct 2, 2015 at 11:33 AM, Laura Creighton wrote: > I have found that if you begin teaching: > > for item in lst: > > and > > for letter in word: > > and then add break, and continue, > > and then teach > > for x in range(y): > > and then teach > > while (something): > > it all goes better than if you begin with while loops. > > But I don't know whether this means this is a better order to teach in, > or simply a better order for _me_ to teach in. > > Laura > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Oct 3 01:18:22 2015 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 2 Oct 2015 16:18:22 -0700 Subject: [Edu-sig] Research on best language to use for teaching beginners In-Reply-To: References: Message-ID: On Fri, Oct 2, 2015 at 10:16 AM, kirby urner wrote: > That brings up another point: once you've mastered Python's for, you also > have easy access to list, set and dict comprehension syntax. > ... and generator expression syntax, I should have added. :-D > I like Laura's ordering as well. Also, I spend some time talking about how not all callables are functions and indeed the range type is a good example. In Python 2.x, range( ) was a built-in function returning a list. By Python 3.now, range() is a type call, just as are str(), list( ), dict( ), int( ), float( ) -- these are not function calls. A function is a type of callable, not the callable type in the general sense. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Oct 6 20:46:44 2015 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 6 Oct 2015 11:46:44 -0700 Subject: [Edu-sig] Free 'Intro to Python' talk offer to PPS Message-ID: Although full time employed with benefits, my hours are shifting such that I'm making more room during the day (I've done this before). In the run-up to PyCon, I want to put it out there that I'd be happy to drive to any Portland Public School and do a free talk on Python, to whatever mix of faculty + admin + students. *Resume*: former HS teacher (maths / history / honors philo ) Portland User Group organizer PSF voting member Full Time Python mentor for O'Reilly Had two daughters enrolled in PPS through HS Taught Python as volunteer to 8th graders @ Winterhaven PPS for some weeks Yes, I know, I should share this offer with PPS directly... so this is my way of creating something to link to. Others may want to jump in as willing 'Intro to Python' talk givers. Other audiences besides PPS would be totally viable, I'm just trying to limit my scope to stay sane. :-D Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Oct 10 17:54:20 2015 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 10 Oct 2015 08:54:20 -0700 Subject: [Edu-sig] more positive remarks re Fluent Python by L. Ramalho Message-ID: http://controlroom.blogspot.com/2015/10/integrated-learning.html -- twisting together my usual themes. :-D Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Oct 10 23:02:56 2015 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 10 Oct 2015 14:02:56 -0700 Subject: [Edu-sig] more PR for the __ribs__ mnemonic vis-a-vis "special names" Message-ID: A Youtube new this morning: https://youtu.be/lwDfvdUxuQc (4 mins 44 secs) Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sun Oct 11 19:02:29 2015 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 11 Oct 2015 10:02:29 -0700 Subject: [Edu-sig] Fwd: more PR for the __ribs__ mnemonic vis-a-vis "special names" In-Reply-To: References: Message-ID: Below: some followup from Google Plus, to my little videos. Joe Snyder is a retired veterinarian and fellow Friend (Quaker) whom I see at our Meeting ("church") sometimes. Here's a blog post with all three videos, for anyone interested: http://controlroom.blogspot.com/2015/10/pythons-ribs-special-names.html Also, I've been promoting edu-sig on python-cuba-wg, the connection being somewhat tenuous: when I held a competition around Python and generating Pi to a thousand places, way back in 2011, a student at University of Havana won. Now here we are in 2015, revisiting yet another way to converge to Pi, thanks to this generator we talked about last month. https://mail.python.org/pipermail/python-cuba/2015-October/000124.html Kirby ================ Joe Snyder Yesterday 1:51 PM So nice pictures, but I'm clueless about the lesson. Thanks for trying. Curious that after your presentation, it wants to show me a lot of yucky videos of various large snakes attacking and eating things. Hmmmm? Kirby Urner 8:14 AM Yeah, Youtube tends to be sensationalist around snakes. The computer language was named for Monty Python (which was named for?). However, as shown, I take good advantage of snake anatomy by inventing __ribs__ as terminology for what in the language we call "special name" (they have this underline thing going, two __ on each side). The three videos, each < 5 mins, form a triptych. Maybe enlightenment will come somewhere in the middle. :-D https://youtu.be/lwDfvdUxuQc (special names) https://youtu.be/nOzMG-cPWnc (giving birth) https://youtu.be/9pxshtSJI8E (touching on inheritance) More depth: http://controlroom.blogspot.com/2015/10/integrated-learning.html Great to have an animal vet check my presentation on Python __ribs__, couldn't ask for a better form of peer review, even if it's hard to make head or tail, coming into it cold. (I was asked to audition by a commercial training provider: "Don't over-think it, type and talk at the same time, no editing". Having done one, I couldn't resist tying off some loose ends).? On Sat, Oct 10, 2015 at 2:02 PM, kirby urner wrote: > > > A Youtube new this morning: > > https://youtu.be/lwDfvdUxuQc (4 mins 44 secs) > > Kirby > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Oct 17 15:58:17 2015 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 17 Oct 2015 06:58:17 -0700 Subject: [Edu-sig] bioinformatics? Message-ID: I don't think code like this is exactly what's meant by bioinformatics, which is more statistical in nature. However as a way of reinforcing both knowledge domain content and learning Python concepts, I think it has utility. If you're already familiar with some cell biology, this would be a useful way to hammer home Python. I tossed up a simple 7 minute Youtube on the code below, talking mostly about Inheritance & Composition in the OO sense. https://youtu.be/UoHJdQeYa8k (sound not so great, just using laptap microphone). I encourage others to do something more produced. Example usage: In [3]: the_cell = Eukaryote(0, 'GATACA') In [4]: the_cell.nucleus.dna Out[4]: ('GATACA', '') In [5]: the_cell.nucleus.dna[0] Out[5]: 'GATACA' In [6]: the_cell.S_phase() # this is when DNA replicates In [7]: the_cell.nucleus.dna # cell is now "mature" (ready to divide) Out[7]: ('GATACA', 'CTATGT') In [8]: new_cell = the_cell.divide() In [9]: new_cell.nucleus.dna Out[9]: ('GATACA', '') Related: https://mail.python.org/pipermail/edu-sig/2012-December/010709.html Kirby # -*- coding: utf-8 -*- """ Created on Sat Oct 10 12:02:55 2015 @author: Kirby Urner, MIT License """ class Mitochondrion: """Cell Battery""" pass class Golgi: """Router""" pass class Nucleus: """DNA Hut""" def __init__(self, dna_A): """Get half the DNA""" self.dna = dna_A, '' def mitosis(self): """Split DNA in two""" return self.dna[0], self.dna[1] class Cell: def __init__(self, gen=0): """Age""" self.gen = gen + 1 class Prokaryote(Cell): pass # won't have a nucleus class Eukaryote(Cell): def __init__(self, gen, dna): super().__init__(gen) # get older self.nucleus = Nucleus(dna) # store DNA self.organelles = [Golgi(), Mitochondrion()] self.mature = False def S_phase(self): """Make other half of DNA""" dna_B = [] dna_A = self.nucleus.dna[0] for base in dna_A: if base=='A': dna_B.append('T') elif base=='T': dna_B.append('A') elif base=='G': dna_B.append('C') elif base=='C': dna_B.append('G') dna_B = "".join(dna_B) self.nucleus.dna = (dna_A, dna_B) self.mature = True # I'm ready for sex! def divide(self): if not self.mature: # don't try it! raise ValueError dna_A, dna_B = self.nucleus.mitosis() new_cell = Eukaryote(self.gen, dna_A) # next generation of me self.gen += 1 # should be an upper limit self.nucleus.dna = '', dna_B self.mature = False return new_cell # spawn of me -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Oct 17 21:32:44 2015 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 17 Oct 2015 12:32:44 -0700 Subject: [Edu-sig] bioinformatics? In-Reply-To: References: Message-ID: > I tossed up a simple 7 minute Youtube on the code below, talking mostly > about Inheritance & Composition in the OO sense. > > https://youtu.be/UoHJdQeYa8k (sound not so great, just using laptap > microphone). > > I encourage others to do something more produced. > Here's the same video clip with a different voice over. https://youtu.be/tqNe3ZeDz90 I imported the clip made from QuickTimePlayer, record screencast, microphone on, into iMovie, squelched the sound track, and over-recorded a new one. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Tue Oct 20 09:58:53 2015 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Tue, 20 Oct 2015 08:58:53 +0100 Subject: [Edu-sig] Opening up MicroPython on the BBC micro:bit Message-ID: <5625F43D.20008@ntoll.org> Hi Folks, Many apologies for cross posting. Here's some good news - we've finally been given permission to open-source our work on the BBC micro:bit (http://www.bbc.co.uk/mediacentre/mediapacks/microbit) and be a bit more vocal and public about what we're doing. Put simply, around 1 million of these devices will be given to the UK's 11yo in the spring. They are all capable of running Python. If you think the following is of interest, please spread the word! It'd be great to see the wider Python community get involved in this. Damien George (creator of MicroPython) announced it here: http://forum.micropython.org/viewtopic.php?f=8&t=1042 I've written up a "story so far" blog post, for those of you who need some context, here: http://ntoll.org/article/story-micropython-on-microbit The actual source code can be found here: https://github.com/bbcmicrobit/micropython I'm more than happy to answer any questions you may have. Best wishes, Nicholas. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From kirby.urner at gmail.com Tue Oct 27 13:16:11 2015 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 27 Oct 2015 10:16:11 -0700 Subject: [Edu-sig] "star alone" syntax Message-ID: Whew, glad to see email at python.org working again. It was out there for a few. The video below covers what I call "star alone" syntax: https://youtu.be/0TtHCK1q-Tg Errata: I spell some English words incorrectly, even though it's my first language. Sorry for the low rez, a tad fuzzy. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: