Computing Thoughts The Python Conference by Bruce Eckel February 25, 2007
Observations from Pycon 2007.
You can find the list of talks here. If you hover your mouse over a particular talk, it will pop up a description box which will (possibly) include links to notes, audio and video. If these things aren't available right now, they may show up over the next few days or weeks.
One Laptop Per Child
The opening keynote was tremendous. Ivan Krstic' is a software architect and researcher currently on leave from Harvard University. He is the director of security and information architecture at the One Laptop per Child project. He told us about the project, how it overcame numerous challenges after they had been told that each hurdle was impossible. He brought several machines with him, so you could see what they were really like.
The project decided to write everything in Python, except for a few pieces of low-level driver-type code. Even the file system is written in Python. And there's a dedicated button on the keyboard, with a little gear on it, to "view source." So kids can see what code is making their applications run, and even modify it.
Ivan is looking for people to help on the project -- they are supposed to begin shipping in August -- both in full-time and internship positions. I found myself wondering if there was some way that I could even fit a few weeks in to go help. I think this is a truly world-changing project.
The following morning, Adelle Goldberg (of Smalltalk fame) followed with a keynote about the hurdles and problems of education, both in the US and in the world. It's even more of a mess than I've always thought. We learn in spite of the education system. The one laptop per child initiative allows children to learn in spite of not even having an education system. My hope is that it might catalyze change in the education system worldwide. If you want a vision of what this might mean, read Neal Stephenson's novel "The Diamond Age" (which I personally like better than "Snow Crash").
One great anecdote Adelle told had to do with schools that had only one or two computers per classrom. They put them in closets, and the students would take turns going into the closets and working on the computers. But they discovered that the students in the classes that had only one computer were doing much better. Because the teacher was sending them to the computer closet in pairs. So they were helping each other. On numerous occasions she pointed out how much the educational system discourages us from helping each other. Sigh. To the point where management (and programmers) often patently dismiss the possibilities of of pair programming.
What Can Python Learn from Other Languages?
I held an openspace session on this topic. Here's a list, in no particular order, of ideas that came from that session (those of you who photographed the whiteboard, if you think I left out something important please add a comment):
Extension methods/Open classes
Multicore Concurrency (like Erlang?)
Better support for metaclass programming. It has gotten better in Python, but
it still requires an intellectual leap -- to the point that many Ruby programmers don't
think metaclass programming is possible in Python.
XML Direct Support (or more trivial). Groovy has XML support that allows you to completely treat XML as an object tree -- you don't have to see or type a single angle brace. The inclusion of elementree has helped the situation, but I like the idea of being completely shielded from XML.
Macros -- a'la Lisp. This might throw open the door to tremendous power. I've never seen a Lisp macro, but I've heard Lisp programmers wax poetic about them.
Restricted Execution (sandbox). Similar to Java's applet sandbox. Might allow an applet-like mechanism for Python on the web.
Forking Interpreter/Cached Interpreter. A potential way to deal with the concurrency issue, if it's very fast to start up a new interpreter in a separate process.
Improve Interprocess Communication. (Posh?)
Built in application packager. It would be really helpful to be able to have zero-configuration, one-button creation of an application distribution.
Direct support for useful Idioms/Patterns. For example, the reactor pattern has direct support in the form of the asyncore library.
Trigger SQL from SELECT, etc. Take inspiration from C# Linq query expressions, which look like list comprehensions for data selection. Database programming becomes fully integrated into the core of the programming language.
Agents/Actors. This may have some support through Pygame extended agent. Apparently an agent framework on top of Pygame. Pyro -- Python Remote Objects -- apparently has some agent behavior.
Precompiler for domain-specific languages -- library and other tools. It would be nice to have some kind of support for creating DSLs in the way Ruby does. This could be a precompiler, the aforementioned Lisp-style macros, or something else. IPython is embeddable, and something like that might be a good start.
Crunchy (formerly crunchy frog) is a very impressive way to create interactive tutorials that work inside a browser (for full functionality, requires Firefox).
I saw a very impressive lightning talk about a new game and multimedia library from Pyglet. This apparently uses ctypes to directly connect to the built-in operating system facilities on Linux, Mac OS X and Windows. Looks quite promising.
IronPython gets around the global interpreter lock. So you can create fully threaded programs that run in true parallel on multiple cores using IronPython. It also provides an easy interface to Windows Forms.
ctypes are built into Python 2.5. These allow fairly easy connection to C dlls. This provides a way to reuse C libraries, but it also seems like a good way for speed optimizations. Numpy supports ctypes. There's also COMtypes, which is a Win32 COM wrapper. Swig seems to have improved, as well (but doesn't support nested C++ classes).
Bazaar-vcs.org. A new distributed version control system. The next step up from subversion.
Trac (written in Python) has a plugin framework, might be useful as an example plugin architecture.
Enthought: SciPy, visualization support.
Itertools talk. Very powerful stuff here. Look for Itertools recipes. Talk slides at
It seems likely that TurboGears and Pylons will merge. This looks like a good thing.
Pylab has good plotting support. Also Matplotlib.
There's a 300-page book out soon about Numpy (Numerical python).
Checking tools: Pychecker, Pylint, pyflakes.
The Zeroconf Python library uses multicast DNS to broadcast configuration information among machines. Also see mod_rendevous.
Guido's current project information can be found by looking him up on Google video.
Pymock appears to be a very powerful mock object framework.
Nose: discovers and runs unit tests. Eliminates unit test scaffolding. Also provides code coverage, and uses the hotshot profiler.
Nosy: "cruise control" style system for Nose tests.
Stackless python seems to have evolved significantly. Gained many benefits from PyPy project (Python written in Python). It doesn't seem to get around the global interpreter lock problem, and thus is a code organization technique rather than allowing true parallel programming on multiple processors.
RPython allows you to write Python that is compiled to C, in order to execute 30-40 times faster.
A universal problem with conferences is the infamous "closing session." These are usually fluffy, boring and a waste of time. Pycon ended with lightning talks. What an excellent way to finish the conference.
There were 593 attendees, which is a 44% increase over last year. The day before the conference started was tutorials, which were all full, and the days after the conference were sprints where groups got together and worked on specific problems for a few days. Real code is developed during these sprints.
Pycon 2008 will be held March 14-18 in Chicago.
Have an opinion?
Readers have already posted
about this weblog entry. Why not
If you'd like to be notified whenever Bruce Eckel adds a new entry to his weblog, subscribe to his RSS feed.
Bruce Eckel (www.BruceEckel.com) provides development assistance in Python with user interfaces in Flex. He is the author of Thinking in Java (Prentice-Hall, 1998, 2nd Edition, 2000, 3rd Edition, 2003, 4th Edition, 2005), the Hands-On Java Seminar CD ROM (available on the Web site), Thinking in C++ (PH 1995; 2nd edition 2000, Volume 2 with Chuck Allison, 2003), C++ Inside & Out (Osborne/McGraw-Hill 1993), among others. He's given hundreds of presentations throughout the world, published over 150 articles in numerous magazines, was a founding member of the ANSI/ISO C++ committee and speaks regularly at conferences.