skip to main bit
a man slumped on his desk, from 'The Sleep of Reason Produces
      Monsters'

Oblomovka

Currently:

Archive for October 11th, 2008

2008-10-11

python class Culture:

Every Friday at EFF, we have a Python class, where anyone in the org (and a few friends from outside) join up to learn a little Python, talk about coding and share what they’ve learnt. There’s a good mix of seasoned python hackers, coders who don’t know much python, casual programmers, and people for whom this is their first experience of programming.

The part i enjoy the most (apart from congratulating myself for reaching a level of maturity that means I don’t go I KNOW I KNOW whenever i know the answer) is the material that isn’t about the technicalities of programming, but of the culture. We often discuss, for instance, about the most aesthetically pleasing way of writing code. Watching smart coders attempt to verbalise those instincts is fascinating, especially when the instincts begin to spread through the group.

To give an example, we’ve been coding up a Python version of Conway’s Game of Life. We all spent a fair bit of time discussing that niggling problem with counting up how many neighbours a cell has. Do you do it “manually”:

or iteratively:

I think most coders would end up doing the first, but they would feel a bit dirty doing it, just as I always feel a bit dirty when I have x and y as attributes, instead of being able to treat them as different aspects of the same thing. It’s the right instinct to try and generalise, and it was fun seeing starter programmers expressing their mild discomfort.

After we’d got Life to work, Seth rewarded us by showing Golly, which is a great cross-platform Life simulator with many pre-programmed patterns. I really had no idea that they’d managed to code up a Turing machine in Life, let alone patterns that emulate a universal machine, running a program that runs the Game of Life.

                                                                                                                                                                                                                                                                                                           

petit disclaimer:
My employer has enough opinions of its own, without having to have mine too.