Date

Two nights ago I was able to attend a talked titled "Python: Building an Open Source Project and Community" given by the creator of Python himself at Xerox Parc.

Guido is a funny man (the name Python is from the comedy troupe "Monte Python" — not the animal Python) and shared his experiences and the reasons behind the Python language.

I'll share a few of the things that were interesting to me:

  • Guido currently works (since 2003) at a "stealth mode" startup Elemental Security, that is working on policy compliance. The code consists of java and Python. He wrote 20k of the 30k lines of Python code.

  • Encapsulation is poor in Python. There are no "private" variables. But this design makes it trivial to create a profile, debugger and provide introspection.

  • Language Design: He wanted Python to be flexible and extensible. I believe that this is one of the key areas that has led to the community around Python. It is easy to write modules for the language so gui, db, web people can all create modules for their own needs.

  • Someone asked why Python programs can run for days on end while other languages (specifically Java in this case) run out of memory? Guido traced this back the the simple design of the garbage collector which is doing reference counting (plus cycle/loop detection), while other runtimes implement more difficult memory management schemes which lead to greater overhead (in startup time) and more complicated design.

  • Of the "P" languages (Perl, Python, Php) he said the Php is the most successful because it delivers a specific need to a niche. But he said that the design of the language itself is poor. Version 5.0 and newer versions should address some issues.

  • According to the Burton Group, programmers are "5 times more productive" when using "P languages". Also, the Burton Group said that Python is the "preferred" p language for application development. Guido attributed the productivity increase (for Python at least) to the fact that Python code is much shorter (he said around 5 times) than C, C++, and Java because there is much less syntatic sugar (no type declarations). He also said that he feels a programmer’s productivity is bounded more by lines of code than functionality of code. Thus a 500 line Python program is more maintainable than a 2500 line c program that does the same thing. (Guido also admitted that there are places where Python is not appropriate, writing a mp3 decoder is an example). He also said that most programmers are not fit to do memory management (C/C++).

  • When asked about static type checking, he basically said that it was a crutch. The "benefit" of static type checking was that the compiler would warn you of type mismatches. Guido claims that these errors will be caught be unit testing anyway. (and since java developers are supposed to be writing unit tests the value of static typing erodes) The harder type of bugs (value errors) will not be caught by the compiler. See Bruce Eckel's take on this , the author of Thinking in Java.

  • Python is object oriented, procedural and functional. Guido said he didn't really know what functional means, but Paul Graham does, and he says that "Python is most like lisp", so that makes it a good langauge. See Paul Graham’s essay on Python where he makes other interesting claims about Python and google.

  • Licensing: Guido says wished he could keep the Python license to 2 paragraphs, but the lawyers said that "can't be a license". He feels good that the license is OSI approved. He says that half-free licenses won't work (free to universities but not for commercial). He also says that opensourcing abandonware won't make it popular ("if your software isn't used before it is opensourced, it won't be afterwards"). He also noted that Python's license was "non-gpl" so people would feel comfortable using Python in their environment.

  • Debugging: Guido uses print statements for 90% of his debugging and a debugger for the times when his brain stops working or he has to debug some wierd code that someone else wrote.