Simon Willison’s Weblog

Python in Mathematics

Python in the Mathematics Curriculum by Kirby Urner is something of a sprawling masterpiece. It really comes in four parts: the first is a history of computer science in education, the second an appraisal of the impact of open source on education and the world at last, the third a dive in to the things that make Python so suitable for enhancing the mathematics curriculum and the fourth a discussion of how computer science and traditional mathematics are likely to play off against each other in the field of high school education.

It’s a long read, but well worth it. Kirby drops in numerous short Python code samples, such as this neat little implementation of Euclid’s algorithm for finding the greatest common denominator of two numbers:


def gcd(a,b):
    while b:
        a,b = b, a % b
    return a

His thoughs on open source and general geek culture are worth digging out even if the main topic of the paper has no interest for you. Here’s a sample:

Additionally, I think a key cultural phenomenon is the evolving perception of geek culture as a whole. What many students discover is a global network of loosely organized, yet talented individuals, including many free spirits. The network is cosmopolitan and guided by some newly articulated principles regarding how some forms of intellectual assets should remain freely accessible and reusable. While these values might seem another ideological pipe dream, were they expressed in merely political terms, in this case the lingua franca of the movement is source code, and licensing agreements designed to protect it against leaking off into the proprietary sector. Even though Python may be used in proprietary ways, Python itself remains free.

Kirby presented the talk at Python DC ’04 back in March. I wish I’d been there, but the conference was too close to SxSW for me to make it to both.

This is Python in Mathematics by Simon Willison, posted on 22nd April 2004.

Next: Mozilla 1.7 RC 1

Previous: Fixing sequence problems in PostgreSQL

Previously hosted at http://simon.incutio.com/archive/2004/04/22/pythonMathematics