November 29, 2009

Comments or Not? Public or Private? Relevant or Irrelevant?

Recently I heard that some people aren't happy about changes made to PyPi, the Python Package Index. As far as I am aware there is only one person who has been working on that application recently, and that's Martin von Loewis. Martin, last year's winner of the Frank Willison Award, is a Director of the PSF and someone who works tirelessly at various aspects of Python -- many of them not particularly rewarding. As with many open source activities it is (I assume) a labor of love.

Recently Martin updated the Package Index to allow users to leave comments, and it appears that this innovation has been contentious. As a result of the rumblings Martin created a poll to determine whether the feature should continue in its present form or be modified in various ways. Here are the results as at the time of this writing:

Allow ratings and comments on all packages (status quo)



223
Allow package owners to disallow comments (ratings unmodified)



137
Allow comments, but only send them to package owners (ratings unmodified)



33
Disallow comments (ratings unmodified)



24
Disallow ratings and comments (status three months ago)



88

This is all very well, but unfortunately it appears that PyPi is now boxed into a corner. Even if the most popular option is implemented (retaining the current situation, where the newly-added rating and comment feature is allowed on all packages) this guarantees that a majority of those voting will have their favored option rejected. I suppose this demonstrates that you can give people too many choices.

My own discomfort with PyPi goes rather deeper. While I think that it's great that we have a central repository to support setuptools (even though release 0.6 is now three years into its release cycle and onto its eleventh release candidate) and now distribute, I would like to see it become much more usable than it currently is. It would be easy to see this as an attack on the implementers and maintainers (which it is not intended to be: the maintainers of all the software I have mentioned have done valuable work that I could not). Honestly, it isn't.

In reality I think it would be good if they had more help. Particularly the kind of help that let them package the facilities this excellent tool PyPi provides, in a much more obvious way. Even if this means complaining about the way things currently are.

Almost as a side note, I ended up following a twisty little maze of (web) passages all alike which finally led me to the Python issue tracker. Since it showed an apparently remembered login name and password I assumed all I had to do was click the Login button and all would be well, but apparently not. So I did what any user would do, and followed the Lost your login? link.

Alas, neither my email address nor my user name was recognized on that page, so I decided the only thing I could do was to register an account (even though I know I have submitted bugs in the past). So I went through the registration process only to be presented with the following unhelpful message:


OK, so what the heck is all that about? How am I now supposed to proceed if by chance I have burning information about a bug in the Python system? I have said before, and I will say again, that as an interface between Python's users and its developers the issue tracker sucks. I am sure it is very useful for the developers, but as an input collection mechanism it seems to be only slightly less valuable than a customer service desk staffed only by a notice reading "go away" (I am exaggerating for dramatic effect here).

[Edit: this was apparently a bug, which has now been fixed at least for the Python bug tracker.]

I suspect that what is needed here is the e-mail equivalent of a help desk, where people with no knowledge of the infrastructure can exchange messages with a team of real human beings who know what the score is and can make any necessary inputs to the issue tracking system on their behalf. Call them user proxies, if you like. I am aware that in the high-tech world of open source this may be seen as a heresy, but people still have their uses, dammit, and they clamor to be useful even as the capitalist world declares them redundant by the hundreds of thousands.

Now I know before I post it that some people are not going to like this article: they will either say that I shouldn't be complaining if I'm not prepared to fix what I'm complaining about, or that I should not be making a noise about something that third parties will use as evidence that the Python world is in some sort of disarray. Frankly I don't buy either of those arguments.

The Python world has recently gone through a long-drawn-out and extremely energetic discussion about increasing the diversity of the community. As an existing community we are fighting an uphill battle, because it's even more difficult to change the constituency of existing communities than it is to recruit a diverse mix to new ones. Just the same this has had some very positive results, not least the publication of a diversity statement that I think the Python Software Foundation has every right to be proud of -- it might seem like a simple piece of text, but it was a hard-won development that even cost us the resignation of a member.

Yet despite all that work, we apparently haven't yet got to the stage where the Python community includes people who can look at a less-than-optimal interface and say out loud "we need to do something about this". I don't know if this is because we are too close to PyPi to be able to acknowledge its faults, or because people fear hostile responses if they make negative comments about the infrastructure, or (perhaps most likely) because they don't want to offend those who have invested their time and effort into producing something, at least, which is more than most of us do. I do know that it frustrates the hell out of me.

So let me put a public stake in the ground here. I have visited a number of local Python user groups in the past year (the first PSF chairman to do so, as far as I can tell). Almost everyone I have spoken to along the above lines has been enthusiastic about making things better, and willing to volunteer to help make the necessary improvements. So now I need to hear from the broader Python community about what's "wrong" (less pejoratively: what we should change to make things better). This means you.

The Python Software Foundation is currently looking quite critically at next year's activities and the budget to support those activities. If we are going to make a real difference to the perception of Python and to its adoption as a serious IT solution to a broad range of problems then we need broad involvement from the whole community, not just the PSF membership. I am investigating a number of ways in which the PSF could encourage a broader involvement, and it would be helpful at this point if there were general evidence of a desire by non-members to get more involved in Python: not just its development, but its community.

If this piece isn't enough to get a decent discussion going then I suppose I should just resign as PSF chairman and look elsewhere for a community that gives a damn. I honestly don't think that will be what I need to do. I'm really hoping you guys don't let me down here.

November 20, 2009

Starting 2010 With a Bang

Holden Web's first one-day workshop was, thanks to Jacob Kaplan Moss, a sell-out success. As a result, and partially due to some excellent feedback from the New York City Python Meetup group, we will be running the same workshop in New York on January 22, again with Jacob presenting. We are also offering a one-day IronPython workshop presented by Michael Foord on January 21.

Since the three-day Introduction to Python classes have been well-received in Virginia we are also offering that class in New York on January 18-20.

To try and make things easier for those attending and smooth out our administration we are using Eventbrite for the first time. I would really like to know how easy people find it to get information about our classes and to enroll for them. Anyone wanting specific information not mentioned in the course outlines is, of course, welcome to contact us for further details.

If you would like to take one of these classes simply follow the links above (or click here for a list of all our current offerings, then just go to the ones you are interested in) and click the Order Now button which should be clearly visible. Once you have entered the details click the Review Your Order button, and you have fifteen minutes to check that you have entered the correct information before you click the Pay Now button. It really couldn't be much easier, I hope.

We are also very interested to know what other event you would like us to run. This is the front end of a new venture for Holden Web, and your opinions and requirements (places you'd like to attend presentations as well as other topics) will help us to move in the right direction. So feel free to contact us with your suggestions, or make them in comments below. Thanks in advance for the feedback.

November 17, 2009

Two Thousand Posts Behind

While recording material for the first three episodes of a new Python podcast (you'll have to wait*) I realized that I've been less in contact with the doings of the Python community than usual over the last six months, due to project and teaching work.

When I am in "less busy" mode and have some spare time I often follow the comp.lang.python newsgroup, offering advice and opinion when the occasion allows. I also find the time to track the Planet Python newsfeed, which is full of interesting (and often detailed) information about what various Python personalities have been up to. When I get busy, as I have been this year, those information sources tend to take a background role.

I just started on the task of "catching up" with Planet Python, and have had to recognize that there is no way I am going to. There have been over two thousand posts since the start of June this year, and I just don't have the time to run through it all -- particularly not if I want to follow up all the interesting stuff I see. In the first minute of examination I saw details of an IronPython application that allows you to examine .NET binary assemblies and instantiate the various classes you come across, interacting with them through an interactive console.

This was interesting because it's been one of the reasons many Java shops keep Jython in their toolkit. Java is also a compiled language not an interactive one, and so it's difficult to learn about the tools without going through an intensive "write/run/debug" cycle that makes it difficult to condense your experience into learned material. With Jython you just use the interactive Python interpreter, creating instances as you like, calling their methods and examining their attributes. "Plays well with others" has always been one of Python's strengths.

Anyway, suffice it to say that there's been some amazing stuff going on in the Python ecosphere recently. I am really looking forward to next year's PyCon (February, in Atlanta). There were so many great proposals that even with an expansion from four tracks to five there wasn't room to accommodate all the stuff that could have gone in. So expect some pretty amazing Open Space sessions too!

* Provisionally entitled "A Little Bit of Python"

October 31, 2009

Google Mail Weirdness

I'd be delighted if somebody could explain what the hell's going on here. I switched mail for the holdenweb.com domain to run through Google's Gmail for Domains service. Things had been going quite nicely, and the spam levels had reduced amazingly without me having to apply any external filtering (which makes me wonder just exactly why Google Groups is so clogged up with the output of asshole spammers, but that's another post).

Recently I have started to receive replies to emails sent out from my holdenweb.com account in the Gmail mailbox I have used for years. At first I though this might be Thunderbird (or me) getting my email accounts and personalities mixed up, but it appears this isn't the case. Here's a test message I sent to myself as an experiment, as it looks in my Sent folder:
So it definitely looks as though it went out from holdenweb.com. And here's the same message as it arrived in my Inbox:
So it goes out from my holdenweb.com address, and arrived at the recipient from my gmail.com address. That's pretty evil, Google - or is there some obvious way I am shooting myself in the foot? It's making my mail conversations pretty hard to track right now.

PyCon is Coming


Kirby Urner suggested that the PSF should advertise PyCon at airports. I though this was a great idea until I looked into the cost of hiring the billboards. Thanks to the wonders of modern web technology, however, we can all now see what it would be like to advertise PyCon on buses.

My slogan is probably pretty feeble. Can you do better?

October 16, 2009

Pyticipate: Interpret Your World

Well, Grig Gheorghiu just posted the list of invited speakers for PyCon 2010, with their chosen topics. It's a doozie:

Ian Bicking: On the Subject of Source Code
Jeff Rush: Interfaces, Adapters and Factories
Jack Diederich: Python's Dusty Corners
Mike Fletcher: Debating 'til Dawn: Topics to Keep You Up All Night
Raymond Hettinger: Mastering Team Play: Four Powerful Examples of Composing Python Tools
Bob Ippolito: The Other Kind of Testing
Alex Martelli: Powerful Pythonic Patterns
Joe Gregorio
: Threading is Not a Model
Ned Batchelder: Tests and Testability
Holger Krekel: The Ring of Python
Ted Leung: A Survey of Concurrency Constructs

More details on the PyCon web site. If PyCon only had those talks it would make an amazing one-day event, but of course there will be three days of talks, with four tracks, so in practice it will be completely impossible for anyone to attend all the talks that they would like to.

That's where the Pycon videos come in - high quality recordings of every scheduled talk will be available. It's nowhere near as good as being there, but if you were at PyCon it's a great way to fill in the gaps, and if you weren't then it's a good reminder of exactly why you should be next time around.

PyCon is a great conference. I'm looking forward to it already!

September 27, 2009

Lending Pythonistas

Too often I hear people bemoaning their inability to change the world, so I wanted to bring Kiva, and specifically the Pythonistas team, to your attention because if you have even a modest amount of money to spare you can put it to use again and again to help worthy enterprises, typically closely allied with their local community.

I started lending money through Kiva a while ago, and more recently joined its Pythonistas team. I suggested starting such a team shortly after I joined Kiva, but it took Anna Martelli's energy to actually get it off the ground, and I received my invitation a couple of months ago - thanks, Anna! If you decide you want to become a "Kiva Pythonista" all you have to do is follow this link.

Even as a Kiva Pythonista you still decide to whom you want to lend money, you simply say you want your loans to be counted as a part of the Pythonista effort. The enterprises you will fund are typically far from hi-tech: here are some of the groups I am currently funding to give you some idea of the kinds of activity you can support.

Secretarial Services in Uganda
Second-Hand Clothing in Guatemala
Fish Retailing in Senegal
Cattle Farming in Azerbaijan
A Grocery Store in Cambodia
Animal Rearing in Tajikistan
A General Store in Togo
A Cooperative Bank in Bolivia

This came to mind because I got an email this morning reminding me that I had received repayments of $150, and so I am just about to use the Kiva site to lend those repaid funds to new borrowers, keeping my money actively at work. And now I can do it as a Pythonista!

September 23, 2009

Last Week to Submit Your PyCon Papers

PyCon is a little earlier next year, and the organizers are trying to prepare earlier too. So this is a reminder that there is one week remaining to submit your PyCon talk proposals. PyCon 2010, in Atlanta, is a must-attend event. It's a great event to speak at, too, so don't delay!

September 16, 2009

PyCon Talk Submissions Closing Soon

Please note that if you would like to present a talk at next year's PyCon, time is rapidly running out. The call for papers was issued some time ago, and closes on October 1. So get your writing hat on, and put that proposal in now!

September 15, 2009

Apple's Cynical Approach

It turns out that for a long time now Apple iPhones have been lying to Exchange Server mail hosts, telling the mail servers that on-device encryption is supported. It now transpires that only the recently-added 3G S model supports encryption through hardware, and this came to light when a recent upgrade made the phones tell the truth.

The unfortunate consequence for any business that has standardized on iPhones for remote mail access is that if they have required on-device encryption the iPhone has been breaking their security guidelines since it was installed. According to Apple their only alternatives are to change their security policies to allow iPhones to store plain text emails or upgrade everyone to the new 3G S device.

What a crock. Not only that, the iPhone users apparently had to wait until after they'd been upgraded to even learn that this issue existed. I am so glad I'm not a corporate Apple user.

September 9, 2009

Community Spirit

If the Python community (or the whole open source community, for that matter) could learn to work together for a common goal there's almost nothing it couldn't achieve. Here's an example of what single-minded determination can do.

August 29, 2009

Python in Brazil

If you want an exotic holiday, fly to Brazil. While you are there, take in the pythonbrasil conference. That's a good web site that makes it look like fun!

August 27, 2009

Can You Do Better?

As a graphic artist I'm a pretty good combine harvester operator, so there is no subtlety about the banner graphic I came up with for (maybe) the python.org homepage. But I was glad that Andrew Kuchling asked, because PyCon should be better known. If Python is the technical secret weapon then I believe PyCon is truly the social secret weapon. I know other projects are having good success with community conferences, and would like to have the time to visit some of our sibling foundations' events.

If you attend such an event you will be doing the Python community a service by writing it up for Planet Python. It's not hard to get your blog on the Planet if you do a few good Python posts, and we hear a lot more about the technical than the social normally.

Wow, next year it will be PyCon number eight. Three years after that will be the tenth anniversary of the very first PyCon. It would be terrific if we could go back to DC for that conference. What about it, DC metro area?

August 21, 2009

Bugzilla Bug?

Why, when you change the assignment of an issue in Bugzilla, doesn't the default status change to "Assigned"? I so often forget to make that change it's not funny.

August 17, 2009

Hono(u)r Alan Turing

Alan Turing was the greatest computer scientist ever born in Britain. He laid the foundations of computing, helped break the Nazi Enigma code and told us how to tell whether a machine could think.

The world might have benefited from his ideas considerably more had the prudish (and, as it turned out, probably hypocritical) authorities at the time not hounded him to an early grave because of his homosexuality.

We should think before we cast the first stone, as we do not know where the universe pivots.

This story has been considerably edited, as I must acknowledge the force of my critics' remarks. The original was intemperate and, well, unoriginal so I decided to remove the call to read and sign a petition and simply make my own statement about how Turing, one of the seminal intellectual leaders of the 20th century, was treated by an unthinking populace allowing the irresponsible authorities to act "in their name". The first paragraph is from the petition.

EveryBlock Acquired by MSNBC

News today from EveryBlock via Adrian Holovaty that the founders have agreed to let MSNBC acquire their company. Happily Adrian is on record already as expecting a completely unchanged relationship with Django and Python, pointing out that MSNBC is only half-owned by Microsoft.

August 15, 2009

Advertising the Competition

Someone asked me why the last two posts had highlighted "competing" classes.

This blog isn't here to sell training. It's a place to learn about training, among other things. Feel free to come here to learn about the competition's classes. It's this blog you're coming to, right?

If I only mentioned Holden Web's classes, and not Enthought's and David Beazley's (and ...), you probably wouldn't consider this blog quite such an impartial source. I don't think it hurts to be on good terms with the competition. It's the Python way, after all.

Python for Systems Hackers

Given by David Beazley, Chicago. 3 days, August 17-19 (next week). Details here.

Python Training for Scientists

[Disclosure: Enthought and Holden Web have discussed joint training plans in the past. No commercial agreements are currently in force.]

If you're a scientist and you want to use computers as more that just calculators then you just might want to learn Python. So you could take the Holden Web Introduction to Python class, or you could take two extra days and go to the Python for Scientists class at Enthought.

August 14, 2009

The Internet is Not the UK

Without the EFF Western society's relentless march towards 1984 would have concluded by now. Many formerly accepted liberties have been eroded in the first decade of the 21st century. Think about joining.

Burning Man Rip-Off?

Bother, and I was starting to think Burning Man might be worth attending. Looks like they need to get this silliness sorted out. Hardly appropriate in the 21st century. If I had a ticket they could even make me change this heading!

Which, since second thoughts are proverbially the best, I have done by adding a question mark; I also prefer "silliness" to the former"stupidity". A potentially offensive word was replaced.

Further edit: from the Burning Man web site:
"Use of Images"
I UNDERSTAND AND ACCEPT THAT NO USE OF IMAGES, FILM, OR VIDEO OBTAINED AT THE EVENT MAY BE MADE WITHOUT PRIOR WRITTEN PERMISSION FROM BURNING MAN, OTHER THAN PERSONAL USE. I understand that I have no rights to make any non-personal use of any image, film, or video footage obtained at the event, and that I cannot sell, transfer, or give the footage or completed film or video to any other party, except for personal use, and I agree to inform anyone to whom I give any footage, film, or video that it can only be used for personal use.

August 13, 2009

PyCon 2010 Call for Papers

From Jesse Noller and his colleagues on the PyCon 2010 Program Committee comes the following message. Please consider submitting one or more presentations. PyCon is the largest Python conference in the world, and delegates have a fabulous time.

Call for proposals -- PyCon 2010 -- http://us.pycon.org/2010/

Due date: October 1st, 2009

Want to showcase your skills as a Python Hacker? Want to have
hundreds of people see your talk on the subject of your choice? Have some
hot button issue you think the community needs to address, or have some
package, code or project you simply love talking about? Want to launch
your master plan to take over the world with python?

PyCon is your platform for getting the word out and teaching something
new to hundreds of people, face to face.

Previous PyCon conferences have had a broad range of presentations,
from reports on academic and commercial projects, tutorials on a broad
range of subjects and case studies. All conference speakers are volunteers
and come from a myriad of backgrounds. Some are new speakers, some
are old speakers. Everyone is welcome so bring your passion and your
code! We're looking to you to help us top the previous years of success
PyCon has had.

PyCon 2010 is looking for proposals to fill the formal presentation tracks.
The PyCon conference days will be February 19-22, 2010 in Atlanta,
Georgia, preceded by the tutorial days (February 17-18), and followed
by four days of development sprints (February 22-25).

Online proposal submission is open now! Proposals will be accepted
through October 1st, with acceptance notifications coming out on
November 15th. For the detailed call for proposals, please see:

http://us.pycon.org/2010/conference/proposals/

For videos of talks from previous years - check out:

http://pycon.blip.tv

- Hide quoted text -
We look forward to seeing you in Atlanta!

August 10, 2009

People Using Python

The Python Software Foundation has embarked on a mission to find out more about Python users. We want to know as much about the organizations that use Python as possible. If you want to give us information about any Python usage at all (even organizations other than the one you work for) please fill out this form. We don't even need your details, and we'll filter for duplicates.

So please help us to find out as much as we can about who's using Python, and what for!

Google Sorry

Quite why Google Documents should be giving me this message when Gmail, Blogger, YouTube and various other Google services are all working normally I have no idea. This is particularly frustrating since it's OK for me to look at "documents" and "files", but apparently when it comes to "spreadsheets" I am a botnet and not to be trusted.

Clearly I'm on some sort of blacklist. For how long, who knows? This has been going on for four hours now. And one of the frustrating things about using Google's services is that it's absolutely impossible to get a human being to tell you what the heck is going on, or take some action about it. You can rely too much on automation (but hey, it keeps the margins up).

Going to rethink this one. The document I can't get access to is the PyCon 2010 budget. Google sorry? Google FAIL.

August 4, 2009

Who Put the "Ass" in Associated Press?

The recently-publicized Associated Press approach to copyrighting the news includes such stupidities as
To this stupidity it appears that through the inadequacies of the system they have chosen to use for licensing we can now add
  • Charging people for things that were never said:
This does raise some interesting questions, however. Since I now have a license (purchased for $12.50) from Associated Press to quote these words, are they going to sue me for defamation (against which my defense would be "fair comment") or will they instead fall back on their terms of use, which does not allow me to use licensed material in a way "derogatory to Publisher"?

Given the huge popularity of this blog (not) I suspect this one will sneak under their radar, but if it doesn't (and assuming I am neither subjected to a gag order nor rubbed out by hired gorillas) I shall report back.

UPDATE: About five hours later I received a refund on the grounds that the quoted material was not part of the referenced article:
So it appears that the system isn't quite as asinine as it might at first seem. But Associated Press still need to get a clue, I think.

July 12, 2009

PSF Associate Memberships?

When I spoke about The PSF and Us at EuroPython a couple of weeks ago there were some interesting questions, many of which related to how individuals could help the Python Software Foundation. During the discussion I asked how many people would be prepared to support the Foundation by paying for some kind of (non-voting) associate membership, and I estimate at least half the audience's hands were raised.

It appears, therefore, that Python users want to be associated with the Foundation. So now I would like to ask readers (whom I assume will mostly be Python users) a few questions.

Do you think it would be a good idea for the PSF to broaden its membership base in this way? If you aren't a nominated member, would you like to become an associate? If so, why? What would you like to get from an associate membership? What could the Foundation offer in return for some annual payment? What should that payment be? What could (or should) the Foundation be doing for you and Python that it isn't already?

I am looking for some guidance here from an apparently under-served section of the Python community. Your feedback will be invaluable.

June 27, 2009

Another United Web Screw-Up

So, wanting to answer a question about my flight times for EuroPython I clicked on an email link to "My Itineraries". Thanks, United, this couldn't be clearer.

June 23, 2009

My God, I Have Fans

I've been putting out links on delicious.com for a while now (when I started it was del.icio.us, which I personally still prefer as a domain name, though probably it was too esoteric for the non-geeks). It's a great system, and I have a program that searches my feed for the last seven items I tagged with "python" and makes those the front-page news item on holdenweb.com.

Most of my interactions with delicious go through the Firefox add-on, so I was a little surprised today to discover that my delicious network page shows that my feed has 44 fans. This means I now have a bunch of feeds to start looking at. I am going to have to stop sleeping ...

Looking at the network page I was also quite interested to see the top 10 tags list of the things I have tagged most frequently.

python 194
web 96
programming 80
design 71
development 58
tools< 49
politics 46
webdesign 44
marketing 40
open< 40

That gives you a fair idea of my interests. Don't tell Guido about the marketing ...

June 19, 2009

June 18, 2009

Technology for Keeping People Honest?

Simon Willison and his team at the Guardian in the UK have brought a dream a step nearer to becoming true for me with his new Investigate Your MP's Expenses site. After looking at government profligacy in the USA I decided the only thing to do was to open up public accounts to public scrutiny.

Simon's site (quite independently conceived) is a practical demonstration of the idea's feasibility on a large scale. All we need now is a sponsor with deep pockets and an interface to Mechanical Turk. The next election is going to be interesting.

June 17, 2009

Seth Godin Says A Mouthful

You will probably be aware if you are a regular reader that while I'm not wild about marketing generally, I do see value in some things some marketers do and say. Seth Godin had a blog post recently called You Matter that describes quite well the kind of spirit I want to foster in the Python community.

As tummy.com said on their PyCon sticker this year: "Python will save the world! I don't know how, but it will." Isn't it up to us all to help Python do that?

June 11, 2009

Ubuntu 9.04 Wireless on Dell Precision M6300

The best laid plans of mice and men have yet again gone agley. For a couple of years now I have been running Vista on my Precision workstation. In order to move to the Linux platform I bought a 320 GB 2.5" disk (amazing value at $90) and planned to install Ubuntu Jaunty Jackalope on it then migrate the Vista disk to a VirtualBox virtual machine accessing a raw patition which contained a Ghost copy of the original Windows partition.

Alas I couldn't get the virtual to boot, and anyway the Vista load is starting to show signs of instability (hardly surprising in a Windows installation that's been poked and prodded as heavily as mine has), so I have bitten the bullet and am reinstalling Vista from scratch with a virtual filesystem. The partition that was going to host Vista is now an ext4 filsystem which can host whatever I want or need to put on it. I have installed VirtualBox, and Vista loaded up like a champ.

The only (current) fly in the ointment is that for the life of me I can't get wireless networking to work. Unfortunately Command Line Idiot appears to be right when he or she writes:
There are roughly 19 billion tutorials for how to do anything you would ever want to do with Ubuntu. Unfortunately, they are all written by a 12 year old who knows even less than you.
Some of the advice I have seen is so cryptic as to be incomprehensible, some refer to drivers I don't have and don't seem to be able to download, the majority of it its either apparently irrelevant or clearly wrong.

So, crazy fundamentalist or not, I'll be happy to hear from you if you can tell me how to get the wireless networking going.

June 10, 2009

Not My Day with Microsoft

Well, I guess I won't be downloading SharePoint Designer just yet, then ... even the best-run and largest organizations have problems.

You know, I really wish the free software/open source world would come up with something as easy and effective as SharePoint. Maybe it will soon. SharePoint has become as popular as it is (and it's making Microsoft over $1 billion a year now) because, like Office, it's broad enough to meet the majority of most people's needs.

It's complex, but not really complicated, and I know it's not beyond the skills of the free software/open source community. Support, of course, would be something else. Now that would be a company I'd like to start ...

June 5, 2009

Google Wave: A Reason to Learn Java?

I've just (finally!) finished viewing the developer preview video of Google's Wave project from the recent Google I/O gathering. If I had time I would be brushing up my Java right now. I understand that the Java world was somewhat upset that Google App Engine supported only Python as a programming language for so long. Well, Wave is based on the Google Web Toolkit (GWT), a fascinating development platform that allows you to program in Java and deliver AJAX applications automatically translated (on the client side) into JavaScript. So now it's time for us Python guys to stand in line.

Wave is an amazing demonstration of where the web is going, and our lives are going to be richer for it. It's an entirely new approach to personal communication, and clearly demonstrates that open architectures are (pun intended) the wave of the future. Google are actively looking for people to get involved with the project already.

More later. For now I am too blown away to do much more than sit here thinking about the potential. I am also excited that this represents a bundle of opportunities for the open source world to demonstrate technical leadership. Unless other vendors have come up with some competing web-based technology I'm not aware of, and I'd be happy to learn about that too.

Information about the Wave platform (and, of course, the open source code) is on Google Code. The open Wave protocol details are on a separate site. Look for Wave's public arrival later in the year. Nice job, Google.

June 3, 2009

Something Smells

If you were at PyCon you probably noticed that netbooks are becoming more popular. PyCon delegates being geeks, I don't remember seeing a single one that wasn't running some form of Linux, though Microsoft do support the little machines with Windows XP. This in itself is an admission that Vista, their current operating system, is a resource hog. As a Vista user all I am prepared to say is "get me out of here", though the day-to-day experience is made bearable [short pause while all applications lock up for 90 seconds and the disk hammers away madly at I know not what] by the (open source) Cygwin command shell and the (open source) VirtualBox virtual machine that lets me operate virtual Linux hosts.

I don't have a netbook yet (though I have already bought one for my wife), but it's only a matter of time. I currently lug 6.6 pounds of laptop around with me for the large 17" screen that I find useful for development and the 4GB of memory, which was a lot for a laptop a couple of years ago. I may extend the life of the machine by upsizing the drive to 500GB, but I definitely want my next portable machine to be lighter, and lighter means smaller (though nowadays not necessarily much less powerful). In other words, it's the coming trend.

The manufacturers (who are all in the far East, naturally) have detected this trend, and are pushing out new hardware faster than a sow can push piglets. All of this new hardware can run at least three different operating systems: Linux, Windows and Android. Users have been expressing their discontent with the higher price of Windows systems in the desktop market, but didn't have a lot of alternative. However, Microsoft realized that if they charged their usual premium for Windows XP on the netbooks people would just laugh and buy a system with one of the alternatives loaded.

So the bottom line is that Microsoft are almost giving XP away (and why wouldn't they, the money it's already made them) just as a damage-control measure. It's vital to Microsoft that Linux and Android aren't seen as viable alternatives to Windows, particularly since the beta program of Windows 7 is making it seem like an operating system whose principal selling-point is the ability to switch its features off.

Enter the Taiwanese Computex trade show that opened yesterday. Qualcomm were showing a new Asus netbook running the Android operating system, but on the Asus stand there was no sign at all of this startling new development. In fact Asustek's vice chairman John Tsang said, shortly after sharing the stage with Intel and Microsoft representatives, that the Android notebook was not a priority. Android still has a way to go to be totally user-friendly on a netbook, but if Qualcomm could show it, why couldn't Asus? Were they, perhaps, being polite to a major business partner?

The UK PCWorld chain also said it is stopping selling anything but Windows through itsbricks-and-mortar stores, though mail-order buyers still have the Linux option. When I see press releases like that I am always intrigued about whether they are induced purely by market forces or whether some backroom maneuvering isn't involved.

One thing's certain. No matter what they have done for Mac sales, Apple's long-running TV adverts have positioned Windows (synonymous in the public mind with "PC") as an unstable, unreliable, bug-ridden inconvenient platform. Now it's beginning to look as though the hardware industry is becoming more independent of Microsoft for the software necessary to run its devices, which I see as a good thing.

Microsoft stockholders may, of course, disagree. I wouldn't necessarily sell your Microsoft stock right now. Just don't buy too much more.

May 31, 2009

PyCon is Popular!

Regular readers will know that this year's PyCon went extremely well. Not only was it excellent value for money, but we finally got our video recording act together, to the point where most sessions' video was available on blip.tv less than a week after the end of the conference.

I just learned that there have already been over 180,000 views of the material since it was uploaded roughly two months ago, which works out at around 3,000 per day. It just goes to show that there is a lot of demand for material about Python!

May 29, 2009

Where Next for PyCon?

PyCon 2010 will be in Atlanta, as I wrote a few weeks ago. No decision has been made about future venues, but given yesterday's release of the PyCon 2009 delegate questionnaire response data I thought it might be instructive to use Python to try and get a handle on public opinion about future locations. Question 13 asked "Where would you like to see PyCon 2010 or a future PyCon? Enter up to 3 cities or regions."

I copied the data into a spreadsheet for ease of manipulation, and did some munging to standardize presentation. I may have taken a few liberties here (such as replacing "California, Bay Area" with "San Francisco"), but I did so in an honest attempt to make sure that every important datum was counted. If the conference were to go to "San Francisco" the organizers would be very foolish to overlook other potential Bay Area locations, for example.

The Data
You can find the raw data I ended up with at http://holdenweb.com/files/wherenext.txt if you want to play about with them yourself. Here's a small section to give you the flavor:
New Jersey      Palm Springs    "Portland, OR"
New York "Portland, OR" "Portland, OR"
New York "Portland, OR" "Portland, OR"
New York "Portland, OR" San Diego
Northeast "Portland, OR" San Diego
Nowhere specific "Portland, OR" San Francisco
Phoenix Saint Paul San Francisco
"Portland, OR" San Francisco Seattle
It's simple tab-separated data, with gratuitous quote marks from Excel. The presentation makes it look like everyone made first second and third choices that were suspiciously close together in the alphabet, but that's only because I sorted each column independently to make the munging easier. I should probably have used the csv module to read the data, but foolishly chose to do it myself. Just the same, there isn't a lot of code.

The Program
#!/usr/bin/python
#
# Process PyCon feedback about future venues
#
# NOTE: Food for thought only ...
#
pd = {}
f = open("wherenext.txt")
for line in f:
places = [p.strip('"') for p in line.strip().split("\t")]
for rank, where in enumerate(places):
if not where in pd:
pd[where] = [0, 0, 0]
if where:
pd[where][rank] += 1

places = []
for where, [w1, w2, w3] in pd.items():
places.append((3*w1+2*w2+w3, where, [w1, w2, w3]))
for rank, where, scores in sorted(places):
print where, rank, scores
The first for loop simply iterates over the file. Each place's position in the line is the weighting that a voter gave it, so after splitting the line at each tab and removing any leading or trailing quotes I then use enumerate() to generate (rank, placename) pairs for all elements in the line. Some lines have only one or two entries because not everyone made three choices, but the formulation I used copes fine with that.

The placename of each pair is used to index a dict of [first, second, third] counts which counts the number of times a specific place was ranked in each position.

The next for loop is my favorite piece of this little program. It generates a new list of (weighted_score, placename, raw_scores) tuples ready to be sorted. The weightings I used (3 for a first choice, 2 for a second and 1 for a third) were completely arbitrary, so feel freee to change them in an attemto to fudge the results for your favored location.

Why did I like this particular loop so much? Since each item in the dict is a (placename, raw_scores) tuple I unpack the elements right in the for statement. It's such little elegances that endear Python to its fans: you can always do things in a straightforward way if you want, but as long as it doesn't interfere with readability I usually take advantage of such abbreviations.

I felt that a list comprehension would have been just a little bit too difficult to read, but you could easily replace the loop with one, and for further illegibility you could put it directly as the argument to sorted().

Finally I print out the results, with the lowest scoring first. Yes, I could have used a reverse() call to print out the favorite first, but then I'd have had to scroll the window back to know which city had "won". I could have formatted them better, too. Feel free, knock yourself out. I try to avoid over-specifying presentation when it's really the data I am interested in.

The Results
Given that the 2009 conference was held in Chicago I was unsurprised to see a strong vote for it, presumably by locals who might not be able to get to Atlanta, and certainly wouldn't find it as convenient. The only surprise was that it came in second rather than first! Portland, OR made a very strong showing, scoring only two points less, closely followed by Seattle with New York and Washington DC trailing rather further behind, But the clear winner was San Francisco, by coincidence the other location to make a strong bid for 2010 with Atlanta. Here are the results in their entirety.

Please remember that the data is from a self-selected group, and that this program is not binding on the PyCon organizers! Despite my best efforts I must have left a blank line in the data, so the empty string is recorded as having no scores! The if where condition should really have guarded the whole loop body, but it was an afterthought, and serves to remind us that sloppy design will lead to sub-optimal results.

0 [0, 0, 0]
Bay Area, CA 1 [0, 0, 1]
Cleveland 1 [0, 0, 1]
Houston, Texas 1 [0, 0, 1]
Knoxville, TN 1 [0, 0, 1]
Midwest 1 [0, 0, 1]
Oregon 1 [0, 0, 1]
Orlando, FL 1 [0, 0, 1]
Phoenix, Az 1 [0, 0, 1]
Pittsburgh, PA 1 [0, 0, 1]
Portland, ME 1 [0, 0, 1]
Twin Cities, MN 1 [0, 0, 1]
Virgin Islands 1 [0, 0, 1]
West coast 1 [0, 0, 1]
not next to an airport 1 [0, 0, 1]
vancouver 1 [0, 0, 1]
Boston Area 2 [0, 1, 0]
Cleveland, OH 2 [0, 1, 0]
East coast 2 [0, 1, 0]
Fort Collins, CO 2 [0, 1, 0]
Honalulu, HI 2 [0, 1, 0]
Kansas City, MO 2 [0, 1, 0]
Las Vegas, NV 2 [0, 1, 0]
Lawrence, Kansas 2 [0, 1, 0]
Los Angeles, CA 2 [0, 0, 2]
Manhattan 2 [0, 1, 0]
Minnesota 2 [0, 1, 0]
New York, NY 2 [0, 1, 0]
Palm Springs 2 [0, 1, 0]
Saint Paul 2 [0, 1, 0]
San Diego 2 [0, 0, 2]
Seatle 2 [0, 1, 0]
Toronto, ON 2 [0, 1, 0]
Vegas 2 [0, 1, 0]
huntsville, al 2 [0, 1, 0]
new orleans 2 [0, 1, 0]
Detroit, MI 3 [1, 0, 0]
East Coast 3 [1, 0, 0]
Europe 3 [1, 0, 0]
Houston, TX 3 [1, 0, 0]
Huntsville, AL 3 [1, 0, 0]
Kansas City 3 [1, 0, 0]
Madison, WI 3 [1, 0, 0]
Miami 3 [1, 0, 0]
Montreal 3 [1, 0, 0]
New Jersey 3 [1, 0, 0]
Nowhere specific 3 [1, 0, 0]
Phoenix 3 [1, 0, 0]
Raleigh/Durham, NC 3 [1, 0, 0]
Reno, NV 3 [1, 0, 0]
San Diego , CA 3 [1, 0, 0]
San Fransisco 3 [1, 0, 0]
San Jose 3 [1, 0, 0]
St. Louis, MO 3 [1, 0, 0]
Tucson, AZ 3 [1, 0, 0]
london 3 [1, 0, 0]
New Orleans 4 [0, 2, 0]
Colorado 5 [1, 1, 0]
Northeast 5 [1, 1, 0]
Canada 6 [2, 0, 0]
Las Vegas 6 [1, 0, 3]
Somewhere hot 6 [1, 1, 1]
Vancouver 6 [0, 3, 0]
Dallas, TX 7 [1, 2, 0]
Denver 7 [1, 2, 0]
Minneapolis 7 [2, 0, 1]
Toronto 7 [2, 0, 1]
California 9 [3, 0, 0]
Atlanta 10 [2, 2, 0]
Austin, TX 14 [1, 5, 1]
Boston 16 [2, 2, 6]
Washington, DC 16 [4, 2, 0]
New York 19 [3, 4, 2]
Seattle 27 [3, 7, 4]
Portland, OR 35 [5, 5, 10]
Chicago 37 [10, 2, 3]
San Francisco 45 [11, 5, 2]

May 25, 2009

Memorial Day

No matter what you think about the US's current wars (and I think they are an abomination) one can have only the utmost respect for those who choose to serve their country in the armed forces. This post is published as an expression of my admiration for the country's servicemen and women, with sympathy and deepest condolences to all families whose loved ones have been lost in action.

May 22, 2009

EuroPython Booked

So the flights and hotel are booked and it's confirmed: I am going to EuroPython. This will only be my second attendance, and since it's in England this year close to where my one of my sisters lives I expect to feel reasonably at home. It won't be a long trip, but John Pinner tells me he'd like me to give a talk about the PSF and an after-dinner speech, and that "we may like you to join a panel or two, Open Space etc as well if that's OK".

Since the conference is paying my travel and accommodation it would seem ungracious to refuse. So it looks like I'll be busy. I am already looking forward to it!

One of the nice parts of visiting the Midlands will be a chance to sample some British beers. If you have any recommendations or suggestions please be sure to let me know!

May 21, 2009

Trying Again

I believe my typesetting confusion of recent days was due not, as I had feared, to my advancing years and inability to solve technical problems, but rather to a discrepancy between Blogger's preview and the final display of the blog, plus the absence of div tags.

The output of the program in Blogging Python Output: A Challenge should have displayed as
<__main__.MyCls object at 0x024217F0>
Let's see if this survives being saved and published, as so few have before it.

Factory Functions

In the last entry we discussed passing callables (using functions and classes) as arguments to functions, and calling them within the body of the function. This time we'll look at how functions can return more esoteric objects - again including functions and classes.

Beginners sometimes ask how a function can be made to return "more than one object". The strict answer is that it can't. The single object it returns can be a container, though, allowing several values to be extracted from the returned object. If you want a function to return three values the easiest way to arrange this is to have it return a three-element tuple, and then extract the individual values using an unpacking assignment. Here's a simple example.
def powers(a):
return a, a*a, a*a*a

a, square, cube = powers(10)
print(a, square, cube)
This prints 10 100 1000, showing that the three returned values have indeed been assigned to individual variables. Functions can return more complex objects than simple containers, though. A frequent example in the programming literature is a function that returns some newly-created function each time it is called. Typically the function returned will vary according to one or more of the arguments passed to the call that creates it.
def make_fun(power, debug=False):
def pow(x):
result = x ** power
if debug:
print("power(%s, %s) returned" % (x, power), result)
return result
return pow

squarer = make_fun(2)
cuber = make_fun(3, True)

print([f(9) for f in (squarer, cuber)])
A call to make_fun() results in a function being defined as make_fun's function body is being executed. This function (whose local name is pow) contains references to the arguments passed to make_fun, and is returned by the call to make_fun to be assigned and eventually called. The calls to the function are inside a list comprehension just because that's the easiest way to call a set of functions with the same argument(s).

The output from this is
power(9, 3) returned 729
[81, 729]
The debugging output from cuber is seen before the list comprehension because all calls have to return their values before the list comprehension is complete and ready for printing.

You may be familiar with the concept of a mixin class. Such classes are designed to take advantage of Python's multiple inheritance features to add functionality to any chosen classes, by creating a new class which is a subclass of both the mixin and the chosen class. You can see an exellent example of this in the socket library, where a ThreadingMixIn class is defined and can be used to extend the features of the basic UDPServer class like this:
class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass
Note that the newly-declared ThreadingUDPServer class doesn't specify any behavior of its own, it merely inherits - first from the mixin and then from the base class, meaning that methods defined in the mixin take precedence over those defined in the base server class. One problem with this, however, is that it doesn't allow for any variation in the mixin classes - by the time you use them they are already created, and it's too late.

In the same way that we can parameterize functions, however, we can parameterize classes as well. Suppose we want to provide a trivial mixin to print the class's name in either upper- or lower-case. Not very inspiring, but the simplest example I could think of to get the point over, so please bear with me if you can think of simpler ways to do this. One possibility is this.
def mixin(cls, lcase=True):
class Mixin:
def nprint(self):
if lcase:
print(str(cls).lower())
else:
print(str(cls).upper())
class Result(Mixin, cls):
pass
return Result

class FirstClass:
pass

Cl1 = mixin(FirstClass, True)
cl1 = Cl1()
cl1.nprint()

mixin(FirstClass, False)().nprint()

Here the function first defines a mixin class, then creates a new class from the mixin and the base class provided as an argument. The interpreter cares not at all where the class definitions come from - classes are first-class objects just like functions and strings, and can just as easily be passed as function arguments as obtained any other way.

The output from the program, which I am sure you are waiting for with bated breath, is
<class '__main__.firstclass'>
<CLASS '__MAIN__.FIRSTCLASS'>
which shows that the program runs, and that the mixin class's behavior is conditioned by the function's second argument.

Now you might choose to argue that this isn't a very natural example, and I'd be inclined to agree with you. All I have to say besides that is, you try coming up with these examples and see how you like it. If anyone chooses to contribute a more natural example that can be expressed without too much extra code I'll be happy to write about it.

May 20, 2009

Blogging Python Output: A Challenge

I spent half an hour yesterday in a battle with Bogger, trying to get it to render the output of this Python 3 program:
class MyCls:
pass

obj = MyCls()
print(obj)
Unfortunately, despite batting to with HTML entities for less than and the like, and even changing all spaces to non-breaking spaces*, the best I seem to be able to do is:

<__main__.mycls>

It starts out looking OK, but once I preview it, or publish it, Blogger just throws away everything after the first space up to the closing angle. Who can tell me what I am doing wrong? Or is Blogger being unfair.

* don't even think about blogging the actual entity codes: they'll be mangled too.

[The program will run, producing slightly different output, under Python 2. I suspect Blogger will mangle that output too]

Everything's an Object

"Everything's an object" is a truism for truly object-oriented languages, and Python is truly object-oriented. You may meet some purists who try to tell you that only [their favorite language] can really be called object-oriented, because Python doesn't have this feature or that feature, but don't take any notice of them. Religious zealots are everywhere, and their only interest is to convert you to their faith. In the Python world we don't tend to hold with religious zeal, and much prefer irreverent comedy sketches and making fun of things. Particularly religious zealots.

Newcomers to the language are sometimes surprised to find that you can pass all kinds of things as arguments to functions, and use them quite naturally inside the functions. The classic example is functions themselves. Let's write a program containing an innocuous little function that takes a function as its first argument and returns the result of calling the function on its second and third arguments.
def caller(f, a, b):
return f(a, b)

def adder(x, y):
return x+y

print(caller(adder, "abc", "def"))
print(caller(adder, 123, 456))

class MyCls:
def __init__(self, first, second):
self.first = first
self.second = second
def method(self):
return self.first*self.second

obj = caller(MyCls, "=", 10)
print(obj, obj.method())
The adder function adds two arguments, and pass that as the first argument to caller a couple of times. If all has gone to plan the first two lines of output will look like this:
abcdef
579
The first argument to adder isn't constrained to be a function. It just has to be something that can be called.We can take advantage of the fact that a call to a class creates an instance of the class to have caller create the instance for us. The MyCls class has an __init__() method that takes two arguments (as well as the ubiquitous self that the zealots will try and persuade you isn't necessary).

The call to caller returns an instance of MyCls. When that instance's method() is called it uses the remembered arguments to print out a string of ten equals signs:

==========


The generality that this demonstrates can be difficult to get used to if you haven't come across anything like it before. Once you appreciate it, though, it gives you a flexibility that is hard to match in many other languages. That's one of the reasons why the Python world often talks about "callables": we don't care whether it's a function or a class, we only care that it can be called.

This is one aspect of polymorphism, one of the foundations of object-oriented programming.

[The code will run under Python 2, but the output shown here was produce by Python 3. The output from Python 2 will differ slightly].

May 19, 2009

Who's Up for a Sprint, Then?

It's now a good long time since Need for Speed (three years, I find, rather to my surprise), and I have settled back into a more or less regular routine after my move back to the USA. So I am starting to wonder whether it might not be time for another speed-focused sprint, and this post represents a first attempt to run the idea up the flagpole and see if anyone salutes.

There have been many interesting developments on the VM front in the intervening years, and it seems like there's a distinct possibility that the current speed limits are going to be history in a year's time. That being the case, I would be prepared to put some effort into getting sponsorship and doing the administration and organization.

I was wondering about Amsterdam as a venue. Given the required lead times to recruit sponsors, get sprinters on board and ensure adequate accommodation I am thinking that the best time might betowards the end of the year - say October or November.

Who thinks this could be helpful? Who'd like to join in and sprint? Who would contribute funding to make it happen? All these questions are important, and only you can answer them!

Is It Installed or Not?

[Notes for a while back, as can be seen by the version numbering]

Hmm. What could be the problem here?

sholden@bigboy ~
$ easy_install-2.5 SQLAlchemy
Searching for SQLAlchemy
Best match: sqlalchemy 0.4.2dev-r3811
Processing sqlalchemy-0.4.2dev_r3811-py2.5.egg
sqlalchemy 0.4.2dev-r3811 is already the active version in easy-install.pth

Using c:\python25\lib\site-packages\sqlalchemy-0.4.2dev_r3811-py2.5.egg
Processing dependencies for SQLAlchemy
Finished processing dependencies for SQLAlchemy

sholden@bigboy ~
$ python
Python 2.5.1 (r251:54863, May 18 2007, 16:56:43)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named sqlalchemy
>>>
Simple, once realized: the easy_install I was running was based on Python for Windows, so running it under Cygwin still reported the state of the Windows installation! That's one slight down-side to Cygwin picking up so mcuh from the Windows side of things: sometimes it gets holds of things it shouldn't.

May 18, 2009

Simple Object Interactions

Here's a relatively simple piece of code that shows how easy it is to have Python objects interact. It's fairly standard stuff, so it probably won't be interesting to old hands, but if you haven't been using object-oriented programming very long then it might make a point or two.

Note that the code is in Python 3, though it will actually run on earlier versions, the printing will just be slightly different.
#
# Calling all reactive agents (with apologies to William Burroughs)
#
class Simulation:

def __init__(self, howmany):
self.agents = []
for i in range(howmany):
self.agents.append(Agent(self, i))

def showImportant(self, agent):
return "Agent: %d simulation: %d" % (agent.number, id(self))

def listAgents(self):
for a in self.agents:
a.showMe()

class Agent:

def __init__(self, sim, number):
self.sim = sim
self.number = number

def showMe(self):
print("Agent", self.number, "reporting:")
result = self.sim.showImportant(self)
print(result)

s = Simulation(3)
s.listAgents()
So, we start out with a class whose __init__() method is called with one argument, the number of agents to create. It creates a list of that many agents as its agents attribute. Note that when the Agent is created the Simulation instance passes itself as an argument to the Agent creator, and the Agent.__init__() method saves the reference to the Simulation instance as the Agent's sim instance variable.

Colloquially we could say that each Agent "knows" which Simulation it's a part of. So an Agent is able to call the methods of the simulation that it's a part of. This makes it possible to devise agents that call various simulation methods, and to incorporate them in several different simulations which implement those methods differently.

When building large data structures with this kind of pattern, by the way, it's important to note that the references are circular (simulations refer to agents, and agents refer to simulations). The garbage collector in older versions of Python would have real difficulties with structures such as the ones created in the code above. In essence it would say to itself "Well, I can't delete the simulation until I have deleted all the agents it refers to." Then it would look at all the agents, and for each one it would say to itself "I can't delete this until I have deleted the simulation it refers to". An unintelligent garbage collection might get stuck in an infinite loop here, but Python's garbage collector has never been that stupid.

Nowadays, I am happy to say, in Python 2 or 3 the collector is able to recognize these cyclic references and, as long as there are no references to such a structure from the outside, will (eventually) reclaim the space.

Next time we'll consider how a simulation might use several types of agents, still providing common behavior for them all.

May 17, 2009

Python is So Versatile

Even though I use Python all the time, and I am well-connected in the Python world, so much is happening that it's difficult to stay in touch with everything Python. Taking a look at the Python Package Index, in just the last 24 hours there have been over 40 submissions. Not all of them will be new releases, but it's instructive to take a look at what's come in to PyPI as an indication of the breadth of applications in which Python is used. Rather than list all 40 submissions available from the RSS feed, let's just take a look at some of the more interesting items.

You could use the new release of Dumbo to write programs in Hadoop, the language for specifying massively parallel map-reduce computations. With AMFast you could create rich Internet applications using Flash remoting. If you wanted to write a Unix daemon in Python you could use the python-daemon library that implements PEP 3143. You could write a network time client with ntplib.

If you wanted to add automated image processing to your Django web application you could do it with django-imagekit, or you could add AJAX with Dajax. To make it useful to a broader audience you could add django-bidi-utils to handle bi-directional text.

You might want to analyze some PDF files, in which case you could use pdfminer. If you are more interested in structural bioinformatics research then Biskit might be more your cup of tea. With all this complex software flying around you might need a program to handle a structured to-do list, and Task Coach would be ready and waiting for you.

There's also a slew of Zope and Plone components to add to these already very capable systems. Python is just so versatile!

May 16, 2009

Python Booth at OSCON

For the first time this year Python will have a booth at OSCON, thanks to the good offices of Aahz. If you'd like to keep the Python banner flying over the exhibition hall I am sure he could do with some help.

What's the point? Well, certainly it will help to raise awareness of the language, which can only be a good thing. Having a booth puts a human face on Python and gives people a chance to get first-hand information rather than being filtered through other people's prejudices. OSCON is probably the largest open source conference in the world, so it's a good place to advertise the best open source language in the world.

The Python Software Foundation will be funding a large banner, and whatever else is required. I am sure Aahz will be happy to have suggestions and (most especially) offers of assistance. I've spent time in the past manning exhibition stands, and while it's interesting to meet a wide range of people it can be surprisingly tiring, so a one-man effort won't be enough. You can subscribe to the Python OSCON mailing list if you are interested in helping with either or both of the planning and execution.

May 14, 2009

Help Files Should Help, Right?

Microsoft Documentation Sucks
God knows I've had my complaints about Microsoft documentation in the past. Often about manuals consisting mostly of descriptions of the following nature:
Threep Nardling
To nardle threeps, select the Threep tab and check the Nardling checkbox.
Frankly this kind of documentation is worse than useless - it elevates statement of the bleeding obvious to new heights, and frustrates all users with at least one eye and half a brain. If you don't know what a threep is, or when it might usefully be nardled, the implication is that you are in the wrong place (though quite where else you would be expected to go for this information escapes me).

Ubuntu/Gnome Documentation Sucks
That said, I hope I am setting myself up for a fall here. I've just installed a number of Ubuntu 8.04 virtuals (because I want to be compatible with a client environment, since you ask), and I have been having problems getting the network interfaces to behave. So I go to the help file for the GUI-based networking tool so kindly provided, and the main portion is filled with this sort of idiocy:

The really annoying piece is that I went to the help file to try and get an understanding of the roaming mode, only to discover that this steaming pile of placemarkers* masquerading as documentation contains zero mention of the one interface feature I needed to know about. They could at least have had a section saying "Check this box to put the interface into roaming mode".

I am really hoping that this documentation has improved a lot in the two versions of Ubuntu that have been released since 8.04. If not, then it's time somebody (either at the Gnome Foundation or at Canonical) started to give some serious attention to documentation. Help files that don't help are a major source of end-user frustration.

Somebody, please put me out of my misery and tell me that this nonsense is gone in more recent releases. Otherwise I might just have to go home and bang my head against the wall.

The Real Problem
All of this is merely subsidiary to the real issue, which is how to I get a VirtualBox Ubuntu guest running under a Windows Vista host to track changes in the Vista internet connectivity. It seems like every time I change locations I have to spend time tweaking settings on the virtuals, rebooting uselessly and generally poking things until I get them to work without any clear idea of the eventually successful strategy.

So, dear lazyweb, please help me. If there's a manual that explains this I'd be happy to make a donation to its author. The open source world should, in my less than humbe opinion, value good documentation as much as (or more than) good code. Once you get past the obvious, the docs help you more than the code.

* Admit it, you though I was going to write "dung" there, didn't you? I am trying to eschew the obvious.

May 10, 2009

SCO's Inevitable End Moves Closer

A recent development in SCO's Chapter 11 bankruptcy takes the company still closer to its inevitable final demise. Groklaw reports that the US trustee has filed a motion to convert the bankruptcy proceedings from Chapter 11 (reorganization under protection from creditors) to Chapter 7 (liquidation of the business).

Darl McBride, somewhat predictably, is quoted as saying he was surprised by the decision, and that the company will fight it. This doesn't hide the fact that a bankrupt strategy will lead to a bankrupt company. The current stock price of $0.15 capitalizes the company at just over $3 million. How are the mighty fallen.