Today, I presented a position paper entitled “Programming Can Deepen Understanding Across Disciplines”. This paper came about from several discussions: Aaron Sloman has been making similar points for a long time, and Tom Crick is a big proponent of getting Computer Science recognised as useful to other subjects. I’m not going to post the actual slides from my talk as it was mainly demos, but here is the gist of my talk.
There already exist several useful cross-disciplinary skills in schools. Some are useful transferable skills, such as the ability to construct written arguments, or skills in secondary research. Some are more specific skills that enable further learning. Reading is a very basic example, but also things like equation handling — the ability to read, understand and lightly manipulate equations. I contend that basic programming is such a skill, and what follows are some examples of how programming can be useful in other disciplines.
Physics
Computer simulations can be useful for teaching in the sciences. The PhET project has a whole collection, such as this example of wave motion in a string. That’s useful to get an understanding by playing, but the scenario is closed source (so far as I can tell), meaning you can’t see exactly how it works “under the hood”. Here is that exact same example in Greenfoot, this time with an “Open in Greenfoot” button that allows you to access the source code. Which means we can open up the source and see the precise description of the motion of each disc in the string:
double middle = (leftNeighbour.getExactY() + rightNeighbour.getExactY()) / 2; double newForce = (middle - getExactY()) * 2; movement = (newForce + movement) / (1.0 + damping);
If we taught students some basic programming, they should be able to understand that code. My contention is that students can increase their understanding of the simulation by seeing this exact description of what it is actually doing. Seeing the code allows them to map the code to the maths equations, and the maths equations to the physics theories behind this motion. Opening up the source decreases the magic of the simulation, and potentially increases understanding.
Biology
The thing with physics simulations is that it doesn’t make much sense to modify them — the laws of physics are not to be messed with! But tinkering with simulations could aid learning, too. Take this example of a biological simulation looking at natural selection. You play the predator, killing off the frogs by clicking on them. Eventually the frogs that are left will be green. You can work out why by modifying the scenario. A small change is to turn the background red, and see if the frogs end up red — they are likely to, which suggests that they end up green because you click the ones that stand out from the background.
A further investigation that actually involves modifying the code is to look at how new frogs are spawned. Currently the colour of a new frog is based on the colour of parent that it is spawning from. So what happens if you increase the mutation rate? What happens if you stop the colour of new frogs being based on their parent? These small programming tasks can enable further play with the scenario, and increase understanding: the natural selection effect on colour requires that the mutation rate not be too high, and that the colour is based on the parent frog. Without these genetic effects, you don’t see the natural selection effect on the colour. Programming allows play, which increases understanding.
English
The sciences are perhaps an obvious candidate for programming. But there are examples that lie further afield. I think there’s possibility in things like sociology and economics for crowd simulations, but here’s an example for a core subject: English (or whatever your native language is!), specifically: grammar. Here is a basic example of specifying a simple, restricted grammar:
noun = article >>> item article = word "the" <|> word "a" item = word "cat" <|> word "man" verb = word "fed" <|> word "ignored" simpleSentence = noun >>> verb >>> noun
So a sentence is a noun (the subject) followed by a verb, followed by a verb (the object). With these rules written as program code, we can interact with them to try out sentences, and get the machine to print out all possible sentences:
*Main> validate simpleSentence Enter sentence: The man fed the cat Valid Enter sentence: A man ignored the man Valid Enter sentence: The cat Invalid *Main> printAll simpleSentence the cat fed the cat the cat fed the man the cat fed a cat ...a man ignored a cat a man ignored a man
The cat isn’t a valid sentence because it has no verb and noun following the first noun. (I’ve chopped out some of the possible sentences, to save space.) The idea is: grammar is already a fairly precise system, so by programming it, we can see the connection, and explore what is valid grammar and what is not (at least with this simple system). Students could then extend the grammar to allow more sentences. This is quite a simple example of using the grammar but you could also build visual parse trees to see the structure of longer examples.
Maths
Perhaps the most obvious of all the examples is maths, where there are many examples of using programming to learn and apply maths. I’m collecting them over on my other blog, The Sinepost, but the point to make here is that computers allow for a practical and fun application of maths in games.
Summary and Outcome
I’ve tried to give examples of how simple programming can be useful in other subjects. Overall, I wanted to get across in the talk that computing (as embodied/represented here by programming) does have links to other subjects, and shouldn’t be seen as an isolated discipline.
That’s roughly the talk I gave earlier today. I got some discussion, but two responses stand out. One response was that essentially I was retreading ground, proposing things already discussed and tried back in the ’80s — and this later led to further discussion on how we can make sure people [i.e. like me] are aware of previous education literature to avoid education researchers duplicating effort. So: unoriginal, apparently.
The other response was that computing shouldn’t be afraid to stand as its own discipline, and shouldn’t have to scrabble for links to other disciplines. As I explained to the questioner, I feel like the CAS mission of getting computing to stand on its own is already making headway, and it’s only with that in motion that we are able to push this secondary agenda, to make people realise that computing doesn’t stand alone as a completely separate subject from the rest of the curriculum, but rather that there is common ground to be found.
I totally support your argument. And people have been this way before, but perhaps so long ago that the work is little known, now.
The Logo research community did lots of work on this, circa 1980s. MIT Press had a series of books on applying Logo to other subject disciplines. Three of these were:
Exploring Language with Logo. Goldenberg, E. Paul; Feurzeig, Wallace. 1987.
Visual Modeling with Logo : A Structural Approach to Seeing. Clayson, James. 1988.
Investigations in Algebra. Cuoco, Albert. 1990.
(I expect you can pick these up for a few $ via internet booksellers)
As you may know, NetLogo is an ongoing project in the same tradition – but very rooted in physical simulation, not so wide as the above books.
There is a project at Oxford University, Modelling4All, which is doing very interesting work with devising a general-purpose modelling language for behaviour, using NetLogo as the underlying computation engine. http://m.modelling4all.org/
A group of us at the London Knowledge Lab (www.lkl.ac.uk) are interested in this stuff and would be pleased to open a dialogue about it.
-Phillip [www.phillipkent.net]
Phillip — thanks very much for the comment. Your Logo pointers echo suggestions at the end of my talk from the audience: that this had been done before in Logo in the ’80s. I’m going to take the maths-computing link as an example, because that’s the one in which I am most interested (hence my other blog: http://sinepost.wordpress.com/). I believe that programming’s utility with respect to maths is the ability to use maths in a practical context, and apply the mathematics that is being learnt: using the programming applications to motivate the maths.
Reading through the Cuoco book (via the wonders of Google books), it seems that it takes what I consider to be the wrong approach: I feel like it assumes that the reader is already a maths devotee and is looking to add some programming for no practical reason. The FahrenheitCelsius example rears its head, and a lot of the other examples are very dry, and motivated by a love of the theory — a love that is unlikely to be shared by most students. I believe instead that problems should be realistic and practical (e.g. wanting to move a sprite an angle, and rotate the image), using the applications in programming to motivate the need for maths theory, or to enhance understanding of its applications — rather than starting with the theory, and looking to express it in programming just because it’s possible.
I may be a little harsh on the book, but I think that there is room to tackle some of these ideas again, but with a different pedagogical approach. I will try to track down the other books that you suggest, as I might well have a blinkered or faulty view of the work that has been done in the past.
Dear Neil – I agree – the Cuoco book is pure maths done in a computational way. Certainly not to everyone’s taste (I could never get far with it, though I respect what the author is doing). The key point is “in a computational way”. The other books are different as they are attempts to reach into subject areas (english/language, art/design) which are traditionally very distant from computing – although Processing [processing.org] for example has been breaking down a lot of barriers in recent years. Your argument about applied maths I do support as well. One thing to bear in mind is that discipline boundaries do become significant as maths shades into physics, chemistry, etc. The computer breaks down the boundaries – which is great – but the boundaries often matter to teachers in schools in non-productive ways and getting cross-discipline teaching and learning (STEM, as I suppose I should call it now) is more challenging that one would think. (I painfully remember working in the 90s to get university mathematics lecturers to engage with Mathematica to do cross-discipline teaching with scientists and engineers.)
There are so many interesting projects to try out, and interesting ideas from the past to revisit…