Python in education
In a keynote on day four of EuroPython 2015 in Bilbao, Spain, Carrie Anne Philbin looked at using Python in computer education for children. She covered some of the background on a new curriculum that has been established in England and on why Python fits well into that curriculum. She also talked about using the Raspberry Pi as a platform for that teaching and at some of the challenges in using Python in the classroom.
Philbin considers herself an educator foremost and was a teacher at the time she started out working with the Raspberry Pi and Python. She now works for the Raspberry Pi Foundation, which is a registered educational charity. All of the profits from selling Raspberry Pi hardware go to the foundation, which was set up to advance the education of adults and children in computers and computer science.
Her journey
![[Carrie Anne Philbin]](https://static.lwn.net/images/2015/ep-philbin-sm.jpg)
Her journey started in the classroom where she was teaching an "information and communications technology" (ICT) class. In 2010 or 2011, Google's Eric Schmidt had made a speech in the UK (her home) where he said that UK computer science education was really bad and that it was being taught the wrong way. That was picked up by the media and was turned into a statement that all of the ICT teachers in the UK were terrible.
That was depressing to her, so she started thinking about ways to bring some of the new thinking about computer education into her classroom. She heard about the Raspberry Pi and tried to get one on the first day it was out, which was unsuccessful for her as it was for many. She did eventually get one two months later, plugged it in, and saw that it was simply a Linux computer, which was not anything new or exciting to her.
But she still saw it as a tool for teaching about computers, so to try to find ways to use it in her classroom, she decided to attend a nearby Raspberry Jam that was being held at the Mozilla Space in London. It was attended by fifty men and three women; all of the women were teachers. There were lots of "geeky projects" that were presented at the meeting, but she didn't see anything that she could bring into her classroom.
She eventually had the opportunity to address the meeting, so she explained that she was a teacher and that she wanted to bring the Pi into the classroom. The projects she saw might not inspire students, she said, and in particular might not inspire girls. That elicited a heckling response from one attendee who suggested that maybe she would need to program the device to go shopping or organize sleepovers in order to attract girls.
That was a "terrible experience" (also recounted here), but once she returned to her seat "something really amazing happened". Ten different people came up to her and told her to ignore the heckler, that they had ideas for projects that would inspire students both male and female, and that they wanted to help. From there, everything started to snowball. She "kind of just took over" the education track at the next PyCon UK and she now serves on the board of the Python Software Foundation.
In September 2014, a new computing curriculum for England was announced. From the age of five, children will learn to program and from eleven, they will learn at least two programming languages, at least one of them text-based. Unfortunately, the government only put an additional £3.5 million toward the effort, which works out to about £175 per school. That is not really a useful amount of money for training and the like.
England is something of a pioneer in requiring computer education. Israel has long had computers as part of its curriculum. Estonia, Australia, and New Zealand have recently added the subject. Some Scandinavian countries look like they may doing so in the near future. That's it, she said.
Why teach computing?
Philbin asked, why teach computing? There are a number of reasons to do so. To start with, children are creative and imaginative; they are also not afraid of failure. Educators actually train that out of them along the way. Children will also tinker with things, which is how we all learn.
Another reason is for social mobility. Most people with jobs in computer science have come from affluent backgrounds. Programming is also empowering. It makes people feel good about themselves and what they can accomplish. Bringing more diversity into the technical fields is also a reason for teaching about computers. Only 16% of IT workers in the UK (and 20% in the US) are women. Those who are creating technology are not representative of those who are using it.
The final and most important reason is shown in a video called "Humans Need Not Apply". Many things will become automated over time, including tasks for people like supermarket clerks or baristas. In addition, technology such as self-driving vehicles has the potential to put a lot of people out of a job, including taxi and lorry (truck) drivers, when it becomes legal. So the goal is to train today's children to be able to program or fix these machines.
But the focus is shifting from "why?" to "how?". The visual programming language Scratch is an easy win for young children, but eleven-year-olds need to learn a text-based language. So people started having a look at Python, she said.
Why Python?
There are good reasons to look at Python for education. It is used all over the world and is powerful enough to be used for real development. It is actually used in the real world by organizations like NASA, for example. It has a simple syntax; by comparison, writing "hello world" in Java takes six lines of code.
Probably the most important reason for educators, though, is the community. Python has a strong and helpful community. Raspberry Pi has a great community, too, she said, but Python's tops it. It is not just national and international communities that are the big draw; it is the local communities that really make Python special.
Python conferences have also taken up the cause of using the language in education. PyCon UK has had an educational track for the last eight years. This year, there were 40 teachers at PyCon UK. If you build it, they will start to come along, she said.
PyCon 2015 in Montréal had an educational track. There is an educational summit at this year's EuroPython; she was headed to PyCon Australia soon, which will also have an educational track. She suggested that conferences should try to help teachers by starting these tracks. They may not come the first year, which would be sad, but they will see and start coming.
Barriers
There are some significant barriers to students trying to learn Python, however. To start with, it is a struggle to move from Scratch to Python. The Raspberry Pi Foundation is trying to overcome some of that difficulty with a game called Pyland. Python 2 versus Python 3 is also a problem, but it really shouldn't be. There is no reason not to just teach Python 3. All of the foundation's resources are written in Python 3 and most major libraries are available for that version.
There are a number of naming issues that make Python difficult for children, she said. People write libraries for themselves and are not always consistent with the names they choose. She mentioned the general-purpose I/O (GPIO) library for Raspberry Pi as an example. It was written by a UK brewer to regulate the temperature in his brewery. That library is now used in education all over the world. Like other Python libraries, it has inconsistencies that make it hard for students.
Another problem stems from children saving their program with the same name as the library they are using. It may seem obvious to everyone in the room that naming your program that uses the pycamera library pycamera.py will not lead to happiness, but she has done it herself. When she did, there were five Python developers trying to help her figure out the problem and it actually took some time to do so.
Another example is the module for Minecraft. It is a real hook for children; it "kind of blows their mind" that you can build things in Minecraft by writing a program. But even the first line of a program causes problems:
from mcpi.minecraft import MinecraftThe capital letter often trips them up and children are impatient. In addition, the setPos() function's name is not all that helpful. In Ruby, for example, the function is called mc_teleport, which is much more obvious.
Another snippet of Minecraft code shows additional problems:
glass = block.GLASS.id mc.setBlock(40, 50, 60, glass)That is long-winded, and has the capital letters to deal with. By contrast, in Ruby it is simpler:
mc_set_block :glass, 40, 50, 60"Please think about children when naming things", Philbin said.
Pygame is a great library for children, but it is difficult to use in the classroom. There are a lot of concepts that need to be explained before you can start doing anything with it. That makes it hard to teach in an hour-long class. Daniel Pope came up with Pygame Zero to help bridge that gap. It simplifies Pygame by providing a runtime so that students don't need to understand game loops, event queues, and other concepts right away. That means a simple program that actually does something can be taught in a bite-sized lesson. It does make some decisions for you, she said, but you shouldn't be afraid to do that for children.
Adding extra libraries is another hurdle. It is easy to do it on one computer, but not for 30 or 50—or for Raspberry Pi devices. For one thing, school computers tend to be behind firewalls or filtering software that can make it difficult to simply access the extra libraries. She and Pope have been discussing an "education bundle" that would gather up useful libraries (e.g. Pygame Zero, NumPy) into a single package to help with that problem.
IDEs
Finally, there is the problem of a Python integrated development environment (IDE) for children. Finding programming interfaces for children is difficult. She asked how many in the audience used the Python-included IDLE as their IDE and got two or three hands out of more than 500. Being bundled with Python is a big advantage for IDLE, since it will always be available, whether there is internet connectivity or not.
She noted that her school was not able to upgrade to the newest version of Scratch because you needed to sign up online to get it. At her school, the internet was slow and firewalled. There are lots of online resources and IDEs for Python, but those won't work for children and schools that don't have access (or have restricted access) to the internet.
One offline option is the PyCharm Educational Edition, which is free and open, but it is not obvious how to use it. It is great for children sixteen or older, but won't work for those who are younger. There are too many buttons and too much setup required. There needs to be an simpler open solution.
IDLE is one option. It does come with simple syntax highlighting and some auto-indentation. But it runs in two separate windows, which is confusing. Adding a Minecraft window just makes that worse. In addition, the error reporting in IDLE is "atrocious", she said.
She showed a picture of the interface for an educational program developed by Dr. Sam Aaron called Sonic Pi. It is a synthesizer that can be live-coded to create various kinds of sounds and music. She apologized because it is written in Ruby, but it is a good example of a nice interface for students.
In Sonic Pi there is a button for "Run" and one for "Stop". There is a way to make the text smaller and larger (which is needed in IDLE). It has line numbers and its windows are all together as panes in a larger window. There is an inbuilt tutorial and it has a button to align the Ruby code. She wondered why there can't be something like that for Python.
Helping out
There are plenty of ways for those interested to help, Philbin said. Meeting with educators, talking with them, and listening to their problems is one way. Adding education tracks to conferences is another. Having a special education session at a local user group would be helpful, as would mentoring a teacher so they have someone to turn to with questions. In addition, creating and contributing "awesome libraries" (which have a consistent API) would be quite helpful.
There is a new Python education workgroup that is getting started. The intent is to "make some things happen", like making IDLE better, for example. The group needs any help people can bring to its mailing list. She would like to see the group set some specific goals before she tries to get recognition from the PSF board.
Ever the teacher, Philbin gave out some homework at the end of her talk. First was to join the workgroup mailing list. Second was to read and contribute to Al Sweigart's IDLE Reimagined project. Last was to read Nicholas Tollervey's Python in Education book, which is available as a free ebook. All of the homework is due by EuroPython 2016 (which will also be held in Bilbao). "I will be checking", she said with a laugh.
There is a danger that writing code will become an educational fad and that visual programming (with languages like Scratch) will dominate. "Please help make sure that doesn't happen". She firmly believes that code should be part of the curriculum and that it should be done with Python. If that doesn't happen, JavaScript could take over instead.
Computer education could change society in a positive way, she said. When the Raspberry Pi generation grows up in 20 years, they will not all be developers, certainly. But they could all benefit from the problem-solving skills that learning programming will provide.
Index entries for this article | |
---|---|
Conference | EuroPython/2015 |
Posted Jul 30, 2015 16:47 UTC (Thu)
by dashesy (guest, #74652)
[Link] (5 responses)
Posted Jul 30, 2015 21:59 UTC (Thu)
by smitty_one_each (subscriber, #28989)
[Link] (1 responses)
Posted Jul 31, 2015 2:24 UTC (Fri)
by dashesy (guest, #74652)
[Link]
Posted Aug 1, 2015 4:46 UTC (Sat)
by ncm (guest, #165)
[Link] (2 responses)
Maybe we need a non-weird language that can call into Python libraries, for power, via automatically generated references.
Posted Aug 6, 2015 16:26 UTC (Thu)
by pboddie (guest, #50784)
[Link]
And actually, I do see the merit of a simplified, cleaner dialect of Python. But I regard "deeply weird" as something of an exaggeration to say the least, even with my discomfort about Python's recent evolution.
Posted Nov 25, 2022 14:33 UTC (Fri)
by Benzo_1Slurry (guest, #162364)
[Link]
Posted Jul 30, 2015 18:15 UTC (Thu)
by magnus (subscriber, #34778)
[Link] (6 responses)
Posted Jul 31, 2015 13:25 UTC (Fri)
by ghane (guest, #1805)
[Link] (5 responses)
Firstly, this is _additional_ money. I doubt anyone expects to spend ₤175 on training, it is more likely that we wish to spend an extra ₤175.
Secondly, you should not divide the 3 million equally into 20,000 schools. This is like saying that "the Linux kernel has 0.2 bytes per internet user. That is not really a useful amount of coding for running hardware and the like".
I am not defending the amount, but I assume the UK Government probably has other expenses to meet as well; and does not grow on the green hills of England.
Posted Aug 6, 2015 16:18 UTC (Thu)
by pboddie (guest, #50784)
[Link] (4 responses)
(I like the double-crossed pound sign, by the way!)
Posted Aug 10, 2015 18:14 UTC (Mon)
by nix (subscriber, #2304)
[Link] (3 responses)
Posted Nov 28, 2022 11:02 UTC (Mon)
by hummassa (subscriber, #307)
[Link] (2 responses)
But... there was no standard sign or abbreviation for the Italian lira. The abbreviations Lit. (standing for Lira italiana) and L. (standing for Lira) and the sign ₤ or £ were all accepted representations of the currency. Banks and financial institutions, including the Bank of Italy,often used Lit. and this was regarded internationally as the abbreviation for the Italian lira.[7] Handwritten documents and signs at market stalls would often use "£" or "₤" while coins used "L." Italian postage stamps mostly used the word Lire in full but some (such as the 1975 monuments series) used "L."
The Unicode system allocated U+20A4 ₤ LIRA SIGN to the Lira, to provide compatibility with a legacy HP character set. As with U+00A3 £ POUND SIGN, where the one-bar and the two-bar versions are treated as allographs and the choice between them is merely stylistic, no evidence has been found that either style predominated in Italy or anywhere else.
And the Spanish currency is called "peseta", written "Pta" in the singular and "Pts" in the plural form, and while it does have a specific symbol U+20A7 ₧ PESETA SIGN it's not widely used and it's considered an historical artifact.
Both currencies were superceded by the Euro.
Posted Nov 28, 2022 12:24 UTC (Mon)
by geert (subscriber, #98403)
[Link] (1 responses)
Posted Nov 28, 2022 14:31 UTC (Mon)
by Wol (subscriber, #4433)
[Link]
Cheers,
Posted Jul 31, 2015 14:15 UTC (Fri)
by tzafrir (subscriber, #11501)
[Link] (1 responses)
Posted Aug 6, 2015 10:37 UTC (Thu)
by asbradbury (guest, #47625)
[Link]
Posted Aug 5, 2015 11:08 UTC (Wed)
by nadrimajstor (subscriber, #103198)
[Link]
Python in education
Python in education
Python in education
I learned how to program in a GWBasic editor that I had to use 150: to add a line between 100: and 200: because it could not insert a line. We have long passed the time computers had to be tolerated. I do not believe the current generation has had a boost in patience to learn. iPython/Jupiter is just superior and is as FOSS as it can get, so why not?
Python in education
Python in education
Python in education
Python in education
Python in education
Python in education
Python in education
OT
OT
OT
Wol
Python in education - pyland
Python in education - pyland
isCamelCasingBlindness a thing?