December 21, 2010

Linux Journal Readers Choose Python Again

I've just noticed the latest Linux Journal, which contains details of their 2010 readers poll. In former years they attempted to distinguish between "programming languages" and "scripting languages" but last year and this they just allowed readers to vote for any languages they liked in either category.

The interesting outcome was that readers voted Python as both the best programming language and the best scripting language. Thanks, Linux Journal readers!

DjangoCon Retrospective

Tumultuous events seem to occur in clusters in my life, and the week of DjangoCon found me in the middle of one such cluster. This being more of a professional than a personal blog I concentrate here on the conference, where the tumult manifested itself first in the shape of a chance meeting with a congressman. The next day I helped the Conference Direct team prepare for evening registration and helped people sign in.

The three days of DjangoCon were a most stimulating time. The Django community has its share of characters, and being among so many was truly a joy. I ended up just up the corridor from James Bennett[1], who is also quite a social person, and so a certain amount of partying ensued (which I regret to say I was not really in the best mood to enjoy). James was happy to entertain the people I kicked out, and they were apparently happy to be entertained, so we achieved a pleasant win-win.

Conference time is usually fairly closely scheduled, and DjangoCon is no exception. I used my "keynote" to try to get people relaxed and in the mood to enjoy themselves a little during all the serious learning that was taking place [2]. Then it was into tracks and running. Lunch seemed to go down well and everyone appeared to enjoy the breaks. Due to the generosity of our sponsors it was possible to provide a continental breakfast this year as well as lunch and breaks. After James Bennett's keynote were the lightning talks, which I had to miss because I was running a Python programming competition (won by Justin Lilley, against some worthy competition). I finished the day with a quiet room-service dinner with Kirby Urner, who was acting as Snake Wrangler and my general factotum.

This reminds me to mention that the Django pony was again in evidence as was Naga, the PSF_Snake. Everyone who came to the conference received their own "My Little Pony" toy, and I believe I may have detected early signs that the Django community is moving towards being "ponied out". The pony was the subject of a question during my keynote that rather sandbagged me - I was unaware of strong feelings in certain elements of the community about the pony as a symbol. Having said which, honesty is the best policy and I said what I believe.

Day two moved on in strong style. I was much preoccupied with how best to try and accommodate a visiting speaker. In the end we just moved the whole afternoon forward by a quarter of an hour, leaving a 5:15 to 5:30 slot for Congressman David Wu. I don't really know what the audience made of being addressed by a congressman. The decision to invite him was a no-brainer for me. I would rather hear a bit of "why ever did you bring a congressman in to speak?" that any "why on earth didn't you ask the congressman to speak?" Congressmen aren't like buses, they don't come along on a regular schedule, and the particular congressman in question happens to have impeccable science and technology credentials. He certainly seemed reasonably well-briefed on open source, which is a big thing in Portland right now.

The early part of the evening was spent at a reception my company gave, which a couple of campaign staff also attended. I entertained them a little longer after the reception finished, and then went downstairs to grab a roomful of people to help me consume wine and food I had ordered for my room. This turned into a most stimulating party, but at midnight or so I realized I needed to get some sleep. Fortunately James sent a scouting party down, and a transfer to his rooms was affected with only one use of the verbal crowbar.

Later to bed than I had anticipated, I had to rise early to attend a breakfast meeting away from the conference. As I returned it was gratifying to learn that the bacon had been delivered for breakfast at DjangoCon. The hotel had to serve the savory pastries late and in insufficient quantity on day two because their bakery supplier let them down. They asked if we would like a per-delegate refund, but I suggested instead that they add bacon to the Thursday menu, which they duly did. Unfortunately the bacon was apparently set down in the middle of the general display, and although I made light of it at the time[3] it would have been nicer for the vegetarian population if it hadn't been thrust under their noses.

The day appeared to go well. At lunchtime I gave away books from APress and O'Reilly, our two media sponsors, and awarded prizes for various pieces of arcane knowledge ("What's the animal on the front of this book?"). The only slight logisitical glitch in the proceedings occurred right at the end, when the short length of the sprint preparations caught us on the hop. I got a call and immediately went down and "turned the bar on" so people could get a drink, and a couple of minutes later Nancy from Conference Direct arrived with the drinks tickets and it was business as usual.

I like to think that most people had a good time, and I have tried to deal with criticism as it was raised in so far as I could. Sometimes, though, people insist on waiting until they have left and then making negative remarks, and I have seen a few such:
What I learned at #djangocon: 1. Not enough core committers. That's it. Total bummer of a conference #circlejerk I hope this twitterer realises that the chairman and community volunteers are the right people to take this up with, and there has already been talk of an Exreme Django track.
Oh fast internet, how I missed you! Back from #djangocon.  I don't think the Internet service was that bad (considering that PyCon spends four times as much and still gets it wrong when they don't let Sean Reifschneider do it), and there weren't extensive complaints as far as I knew (except maybe one fairly short period). Or maybe the author is, like me, a happy consumer of fiber to the customer premises. You do get spoiled ...
What I disliked most about #Djangocon: I have a toy for a 3 year old kid as a shwag. The pony isn't funny anymore. And yet, such is the power of the six dollar pony that you kept it despite the fact that you hate it. Nobody was checking at the doors to make sure you took your pony home with you. You're just a schwag collector, aren't you?
@pydanny please be careful around those dirty Django men, @pythonchelle watch out too #djangocon. I don't remember who tweeted this, but I hope the dissatisfaction was momentary.  Dirty Django men? Not dirty (mostly), simply in way too large a majority. We need to work on that. And the dirt ... is just cruel #djangocon I have to agree, it is, but I don't think that this is in any way DjangoCon's responsibility [4].
Overall I think most delegates enjoyed their conference. While running these events can be a little stressful it is rewarding to feel that the conference has helped in some way to advance the state of the Django art and allowed people some relaxation during the conference "white space".

My thanks to all DjangoCon US's sponsors, and to everyone from the Django community who helped to make the event such a success. I am already looking forward to 2011.

NOTE: DjangoCon US 2011 will be held at the Hilton Portland and Executive Tower on September 6-8.

[1]: OHWar quote: "Beer. My suite. Now."
[2]: As is perhaps indicated by the title: Matters of Little Consequence or The Care and Feeding of Ponies.
[3]: OHWar quote: "Screw the vegetarians."
[4]: OHWar quote: "Pinax is sort of a reusable application thing." As you will have seen if you followed the link, Alex's status has changed since the site was instigated, and the question is now answered in the affirmative.

December 12, 2010

PyCon Financial Assistance

PyCon US is again offering assistance to delegates who may not be able to cover their own travel and/or accommodation costs. Applications have now opened, and the announcement page contains a link to the application form (separately linked here in case that's all you need).

While there can be no guarantees of financial assistance I can think of many delegates who have enriched the conference by their presence only because they received assistance. And those from places where few people even travel abroad can attend and set minds on fire when they return home. So financial assistance is a real investment in broadening the Python community, and I hope it will continue to be so.

There's a deadline, though, so don't spend too long thinking about it!

December 5, 2010

Templating Systems

Recently Danny Greenfeld wrote a blog post called Stupid Template Languages in which he attempted to advocate the Django approach to templating. Basically this is to keep any logic in the templates as simple as possible (but no simpler). So it includes the ability to write for loops but not, for example, to define re-usable procedures with parameter passing.

Armin Ronacher reacted to this with a blog post of his own called Not So Stupid Template Languages, in which he attempts to defend Mako and similarly complex templating schemes. I don't see the Jinja2 examples he gives as countering the main thrust of the Django wish for simplicity in templating. He does, however, explicitly point out the weaknesses of the Django include mechanism, and highlights the "macro" feature of Jinja2, which is its equivalent of Django's include feature. Jinja2 macros require that data is provided to the call by argument passing rather than simply being extracted from an implied context. I agree that requiring the use of arguments is probably a good way to make the couplings explicit.

This doesn't however, negate the value of keeping complex logic out of the templates. This desire originally comes from Django's background in the newspaper industry, where the designers were definitely not programmers. So they didn't need a hugely complex templating languages, and were prepared to ask the programmers to generate in their views the values required by the templates. I have worked with tools like Mako, which includes the ability to write very complex logic which should really be part of the controller rather than the view. It doesn't help that Django's designers perhaps didn't understand MVC that well, otherwise they would have called views "controllers" and templates "views". Nowadays I believe they call it the "model view template" model, but that still doesn't avoid the ambiguity about views and whether they should include logic or not.

Even with a pure MVC architecture Jinja2's argument-passing enhancements would be an improvement - as Armin says, making the couplings explicit would be a Pythonic thing to do. The nice thing is that argument passing could be implemented as a backwards-compatible extension, where a call without arguments could fall back to using the context as a default global namespace.

November 22, 2010

Larry Ellison Prostitutes Java?

I just saw a tweet from a character called Zed Shaw. Zed is a colorful guy, and a man of determined opinions. If he thinks something is wrong he will say so, most likely dropping f-bombs freely in the process.

His first tweet was rapidly followed by another.

Thinking about it, I cannot remember installing any other language and have it dick around with the settings on some other application.

I thought possibly Zed had caught the toolbar from somewhere else (I came within an inch of simply throwing WinAmp away when it intruded on my browser's search facilities in a similar way), but sure enough there's a (sadly undated) article at entitled How do I unistall the Yahoo! toolbar from Firefox?, a clear enough indication to me that Java is likely responsible for Zed's woes.The FAQ explains about not just the Yahoo! toolbar but also the Bing and Google toolbars, but it appears that only the first two are installed by Java.

I suppose I could be wrong, but it seems to me that this behavior is new since the Sun empire was assimilated into the hive-mind by the Oracle collective. The fact that you can deselect the install options is neither here nor there. The real question is, what's the strategy behind this change? I can hardly believe that any revenues this hare-brained scheme might bring in are of the slightest significance to the world's second largest software company. But why would the company that effectively owns Java (in so far as anyone can own a language) deliberately try to discredit it in this way?

We can only speculate. Let's make it interesting ...

October 25, 2010

Lazy Programmers, Installment 315

So, during a brief engagement with ING Direct's web site I receive the following error message:
 It was complaining because a) I had used a one-digit form for the month (i.e. 9/19/2010 rather than 09/19/2010), and b) because I had just entered the telephone numbers, as is my wont, as ten-digit strings.

What I want to know is, is there any user-centered QA in effect on this site? Who exactly decreed that dates had to be entered in that inflexible format? Who reviewed the stupid decision to require that specific format for telephone numbers, when it's actually much easier to simply throw away anything that isn't a digit, store that and then format numbers when they are printed? Finally, does anyone at ING care how much trouble they put their users to?

See, I've been in the business long enough to remember the days when computers were there to make things easier for user-type people, not for the programmers. This is clearly a lost approach, one sees so many ridiculous requirements such as the above.

October 24, 2010

What Do We Tell the Government?

This coming Thursday I am speaking at GOSCON, a conference organized with the specific intentions of informing governmental IT users about open source. Most of the speakers will be from the government side if the last such event I attended is typical, so I am giving a talk called No Free Lunch. The idea is to suggest ways that government can maximize the benefits of using open source, and provide open source teams with resources that will enable us to increase production, so this isn't just a talk for the Python Software Foundation - I want to represent a wider community if I can.

Twitter friends have already provided some useful ideas, but I will be happy to weave more in there if you can provide them. So, what would you like to see government (which in this context is principally the executive branch, but I am happy to include points for the legislative and judicial branches if you have them) doing for open source?

September 9, 2010

Pony Outlook Fine, Say Wu and Holden

There's been some reportage about the presence of Congressman David Wu at DjangoCon this year (to which the most I could do yesterday was briefly allude). After my Labor Day post I think I can safely say that Chairman Wu's presence was reassuring to the many at DjangoCon who might have been seriously inconvenienced by the pony shortage, which has been discussed in panels at the conference.

Of course it would have been terribly unfair to the Congressman to have asked public questions, and as he is in a busy campaign I know you would not have wanted me to delay him in your name. After a breakfast meeting this morning I am happy to be able to tell you, though, that his staff have convinced me there really is no sign of a pony shortage (and I doubt many reading this will have bought more ponies than I of late). In fact, had I known that I could have procured the ponies locally (Oregon price: 50c less than manufacturer's) I might have saved the cost of carriage, too. Next time I'll just call the store in advance.

If further reassurance is needed, I would like to note that after a third meeting with Congressman Wu I am happy to endorse him as a two-pony family man. Those ponies will be in safe hands, and the people of the First District of Oregon would be ably represented by a Congressman of such integrity.

Open Source and Politics Mix

Kirby Urner has written this great summary of the events of late Wednesday (DjangoCon time).

September 6, 2010

DjangoCon Triggers National Pony Shortage?

Hasbro Toys today took the unprecedented step of insisting that pony supplies were "absolutely not a concern" in response to persistent rumors that a foreign national had cornered the market  in ponies. A spokesman said "while it is true that there has been an unusual demand for ponies in the Portland area our normal stocking policies were quite adequate to meet demand. Anyone who wants a pony can have one".

The House Committee on Science and Technology is rumored to have directed its Subcommittee on Technology and Innovation to investigate this potential shortage of a strategically important resource in the creation of critical national web site infrastructure. The chairman of the Subcommittee, congressman David Wu of Oregon's first district, was not available for comment. Hasbro could not explain why American pony manufacturing facilities had opened on Labor Day, normally a national holiday.

August 29, 2010

Preparedness, Privilege and Discrimination

Coming very late to the party I noticed a blog entry from June about the JavaScript community's response to Google's financial support to allow more women to attend JSConf Europe. It sounds like it was indeed the usual real can of worms, and many of the comments show the usual lack of appreciation of the problems from the privileged side of the issue (in this case men, since it is a gender issue and women appear to be about as well represented in the JavaScript community as they are in the Python world, which is to say hardly at all).

The reason I found it interesting was that this year, for the first time, PyCon also used Google's support to fund the attendance for more women, who came from as far afield as Roumania and India. I was gratified to be told by several of those who would otherwise not have been at the conference how happy they were to have had the chance to attend. (In truth I had little to do with it: Google should get the credit for the funding, and the actual hard work was done by Peter Kropf and Gloria Willedsen). In the Python community's case there was one short period of adverse comment on the #python IRC channel, which resulted in my exchanging emails with one person to explain why I thought it was a good idea to encourage more women to be at PyCon. End of story, except that in 2010 women represented 11% of PyCon attendance, up from 2% the previous year. I count that as one of the better results of my time as chairman.

Now I am not saying this to be smug, but because I believe there was a reason for the difference in the reactions. Last year the PSF, at Guido van Rossum's urging, started a diversity mailing list which discussed the questions of race, gender and other discrimination extensively and sometimes acrimoniously. Eventually this led to a proposal for a "diversity statement", which was referred to the membership where it triggered another round of extensive and sometimes acrimonious discussions, leading to a referral back to the diversity list and a further proposal which was finally accepted by the membership more or less unchanged and adopted by the Board:
The Python Software Foundation and the global Python community welcome and encourage participation by everyone. Our community is based on mutual respect, tolerance, and encouragement, and we are working to help each other live up to these principles. We want our community to be more diverse: whoever you are, and whatever your background, we welcome you.

This may not be the best statement ever, but if anyone bothers to look it does make it clear that these issues have been addressed. Thus anyone who feels discriminated against can decide that at least they would have a chance of a fair hearing should they choose to complain (which, sadly, I imagine most don't, instead choosing to vote with their feet). Similarly, anyone about to indulge in discriminatory behavior might think twice before doing so.

The hidden benefit of this long-drawn-out process was the creation, on the diversity list, of a corpus of varied individuals who had discussed these  issues and hammered out a shared approach to the problems that included a refusal to punish individuals for things done out of ignorance. It also meant that when one speaker used a slightly ill-advised graphic in a presentation the issue was dealt with then and there in a very direct manner without any recriminations, and I didn't even get to hear about it until  much later that day. The speaker was advised that the material was inappropriate and that therefore the slides and the video of the talk wouldn't be published, and hopefully left without feeling that they weren't welcome at next year's conference.

I hope that the JavaScript community manages to develop its own understanding of diversity issues and its own process for dealing with them. I know it took up a lot of my time as PSF chairman and gave me some uncomfortable moments (and does not exempt me from the results of my own stupidity in the future), but I am glad it led to a tolerant community process that nevertheless has made it clear that discrimination is not acceptable.

August 28, 2010

The Hiring Smiley Curve

I recently commented on how hi-tech companies seem to advertise for "rock star" developers. This appears to me to be a little shortsighted. Maybe Google have enough money to do it, but the average company looking for a singer wouldn't be able to go out and hire Mick Jagger or Van Morrison (yes, I know, I am showing my age - it will become obvious this isn't an accident). So why do they think they can afford the software equivalent?

As I mature (that sounds so much less pejorative than "grow older", doesn't it?) I have realized that my decision to eschew the corporate world and plough my own furrow wasn't entirely disastrous. I have been self-employed, or an employee of a company which I owned, for over twenty years now. The last large company I worked for was Sun Microsystems, and I left in 1988 after realizing that I was a misfit for the corporate environment. Since then I can honestly say I have never worked for a more charming or delightful person. Nowadays my boss never hesitates to take my interests into account.

Just occasionally, I have toyed with the idea of third-party employment, most recently with Google (twice). The first time I explained before going for interview that I was not prepared to relocate to the West coast . At the time I was moving back from the UK to the USA, and had just bought a house in Virginia, so I was a little surprised to learn three weeks after my interview that "we aren't prepared to make a remote hire, but would consider you for Mountain View". Large company mentality: ignore what the potential recruit wants, and try to hire them anyway. No sale. About a month ago they called me to ask if I would consider employment in the DC area, but it turned out they were only hiring for Java projects. I used to write Java but I'm all right now, so the recruiter and I agreed to part company amicably after ten minutes on the 'phone.

None of this amounts to a hill of beans but I was encouraged about a year ago, when I was talking to someone in New York City about experience levels and consulting opportunities, to learn about the "smiley curve" theory of work rewards. In brief, this theory says that you hire young raw recruits because they are full of energy and don't cost much. As people become more experienced they expect more money but their productivity doesn't go up commensurately, so they are less desirable but you need them because there aren't enough young turks to do all the work. Then, as you mature, your desirability goes up again because (direct quote, as far as I can remember) "you have seen everything and you know everything".

If true, this is quite encouraging. There must be lots of companies looking for someone as experienced as me. The only question now is whether they can afford me!

August 27, 2010

Apple Going Over the Top?

Yet again I rejoice that I am not an iPhone user. Indeed, given this latest news I might well just chuck  my Mac mini away in protest (no, you probably don't want it - it's an aging obsolete PPC mini from about six years ago).

In news from the Electronic Frontier Foundation I learned today that Apple has applied for patents on method of spying intrusively on the users of their devices. Here's a partial list of possible applications:
  • The system can take a picture of the user's face, "without a flash, any noise, or any indication that a picture is being taken to prevent the current user from knowing he is being photographed";
  • The system can record the user's voice, whether or not a phone call is even being made;
  • The system can determine the user's unique individual heartbeat "signature";
  • To determine if the device has been hacked, the device can watch for "a sudden increase in memory usage of the electronic device";
  • The user's "Internet activity can be monitored or any communication packets that are served to the electronic device can be recorded"; and
  • The device can take a photograph of the surrounding location to determine where it is being used.
So enjoy your iPhones. I won;t be doing business with a company that thinks this way. Sigh. I suppose that means the new laptop will have to be PC based.

August 22, 2010

Windows Vista Mystery Shares

For reasons best known to Microsoft, when I try to delete a folder which has been shared (through the Explorer interface) it takes forever to complete. This would not be so bad if there were just one or two shares, but sadly (for reasons best known to Microsoft) a large number of folders randomly appear to have become shares (see the screen dump of a portion of my home directory at the right). I have no idea how these folders became shared. It certainly wasn't any intentional act of mine, and heaven alone knows what this does to performance.

Now, you are probably wondering why I don't just switch off sharing before I delete the directory. The answer to that is that although Windows is displaying the folders as shared, it doesn't really seem to believe that they are shared. So there doesn't appear to be an easy way to switch this sharing off.

If I had some idea how it had been switched on in the first place that might help, but as with so many other aspects of Windows performance this remains a mystery. If someone cold offer some insight I'd be happy to find out what's going on here.

August 16, 2010

Schmidt Foot-In-Mouth Attack Continues

Wow, two consecutive Eric Schmidt posts. But this really is quite newsworthy. An interview with Wall Street Journal published on Saturday claims
He predicts, apparently seriously, that every young person one day will be entitled automatically to change his or her name on reaching adulthood in order to disown youthful hijinks stored on their friends' social media sites. 

This really is the most patent hogwash. Surely someone like Schmidt, with a brain the size of a planet, could foresee that if such name changing were to become commonplace it would inevitably lead to the creation of services that mapped between past and present-day identities? Given the ability to identify images recently demonstrated by sites like it's only a matter of time before changing your name will no longer be a way to erase the records of your misdeeds.

This makes it all the more important that privacy and basic information security become high school subjects, but alas the corporate overlords that have the ear of government in most developed (and many less-developed) countries will be attempting to make sure that isn't a priority, because it isn't in their interests.

August 12, 2010

Eric Schmidt Looks Forward to Big Brother

"You only need to give up
just a little bit of freedom"
Well, Google's senior management are really keeping us guessing this month. I am not really sure any longer whether the company actually has any coherent point of view on individual privacy. Nowadays it seems you can't even expect consistency. In a startling repetition of his prior assertions that not only is Internet anonymity dead but that he wants to dance on its grave. According to a Read Write Web report Eric Schmidt, CEO of Google, included the following comments in his remarks to the Techonomy conference:
"The only way to manage this is true transparency and no anonymity. In a world of asynchronous threats, it is too dangerous for there not to be some way to identify you. We need a [verified] name service for people. Governments will demand it."

Any government that requires individuals to give up their rights to anonymity is a government past its sell-by date. To my mind this reveals further insight into Schmidt's "what's good for business is good for the people"  view exemplified by the much-discussed recent joint statement with Verizon on network neutrality. It's fairly obvious that Schmidt sees government's role as paving the way for corporations to increase their profits, not preserving the freedoms of the citizenry who elected it. This is so far from "government of the people, for the people and by the people" that it's apparently time "do no evil" was replaced by "make more money".

"But that would hurt Google's
stock price!"
Yet it was only in May (yes, three months ago) that Schmidt was publicly suggesting that as far as Google was concerned "privacy is paramount". Does he really know what the priorities are any longer? It seems like we can dismiss any further utterances as the self-serving flip-floppery of the 129th richest man in the world. What does he really think? Apparently it depends on which way the financial wind is blowing. The really depressing thing is it's transparently obvious that here we have a man who will do well in politics. "The Best Democracy Money Can Buy" indeed.

August 6, 2010

Tests That Test Your Tests

I just had an interesting experience with Steve Miller, the technical editor of the Python classes I am writing for O'Reilly School of Technology. We are just getting to the end of the second of four courses, and I like to think that we are moving right along: in the final lesson students write a simple GUI-based program that searches for and displays e-mail messages stored in a MySQL database.

I introduced test-driven development in the second course. Not only does this encourage good habits in the students, it also makes it somewhat easier to test some of their exercises (though I still do not have a good approach to testing Tkinter-based GUI applications). In time-honored fashion we start with tests and a program full of stubs, and then expand the stubs to pass the tests. For the email database the initial API is very simple: there is one function to store messages and two others to retrieve them, by primary key and Message-Id.

In the final chapter I start out with a very simple database table that stores the body of the message as a LONGTEXT column. The only other columns in the table (to start with—it gets more complex later) are the automatically-generated primary key and the Message-Id Header. The tests use a setUp() method that completely re-creates the database table and populates it from messages stored in a bunch of files:

 FILESPEC = "V:/Python2/Lesson12/MailData/*.eml"  
 class testRealEmail_traffic(unittest.TestCase):  
   def setUp(self):  
     Reads an arbitrary number of mail messages and  
     stores them in a brand new messages table.  
     DANGER: Any existing message table WILL be lost.  
     curs.execute("DROP TABLE IF EXISTS message")  
     files = glob(FILESPEC)  
     self.msgids = {} # Keyed by message_id  
     self.message_ids = {} # keyed by id  
     for f in files:  
       ff = open(f)  
       text =  
       msg = message_from_string(text)  
       id = self.msgids[msg['message-id']] =  
       self.message_ids[id] = msg['message-id']  

There were two relatively simple tests, one to test each of the retrieval functions in a fairly simplistic way by verifying the correspondence between the primary key values and the Message-Id headers using the msgids and message_ids dicts created during the set-up. The initial stub under test only implemented the store() function, so these tests were initially expected to fail:

   def test_message_ids(self):  
     Verify that items retrieved by id have the correct Message-ID.  
     for message_id in self.msgids.keys():  
       pk, msg = maildb.msg_by_id(self.msgids[message_id])   
       self.assertEqual(msg['message-id'], message_id)  
   def test_ids(self):  
     Verify that items retrieved by message_id have the correct Message-ID.  
     for id in self.message_ids.keys():  
       pk, msg = maildb.msg_by_message_id(self.message_ids[id])  
       self.assertEqual(msg['message-id'], self.message_ids[id])  

Steve and I had both run this code under much the same conditions as the students would, and verified that the tests did indeed fail due to the AttributeError exceptions raised by the missing msg_by_id() and msg_by_message_id() functions. Later steps have the student implement these functions, which makes the tests pass.

We were somewhat surprised to find when Steve ran his final checks that the tests were now passing, even though he had reverted to the original module with no implementations of the message retrieval functions! It took me the best part of an hour chatting with Steve to eliminate everything I could think of that might be wrong: no .pyc files left lying around, no odd path settings that allowed import from other copies of the code, and so on.

We finally tracked the issue down to something stupidly simple, as is often the case with bugs that have you scratching your head for an extended period: for production purposes the data files had been moved to an area where all students could share them (each student has their own V: directory). This meant that the setUp() method was not inserting any rows into the newly-created message table. The empty table in turn meant that neither test_message_ids() nor test_ids() was running the the body of the for loop, and consequently no AttributeError exceptions were being raised. The tests were passing even though the functions they were supposed to test had not been implemented!

My solution to this was to add a further test to verify that the table was not empty. That way, even if the other tests passed, this one would fail:

   def test_not_empty(self):  
     Verify that the setUp method actually created some messages.  
     If it finds no files there will be no messages in the table,  
     the loop bodies in the other tests will never run, and potential  
     errors will never be discovered.  
     curs.execute("SELECT COUNT(*) FROM message")  
     messagect = curs.fetchone()[0]  
     self.assertGreater(messagect, 0, "Database message table is empty")  

The check could have been added to one of the other tests but it seemed to make more sense to keep it separate, since several tests relied on the table having been populated.

In this case the error condition was that the test were passing! I am happy about this because it clearly demonstrates the value of test-driven development, even though the result I was getting was normally the desired goal of testing. It has also taught me to be more careful about tests in loops: if there is no guarantee that the loop body will execute then the tests inside it can be completely useless.

August 5, 2010

DjangoCon US is International

As registrations for DjangoCon US grow it's been interesting to see where people are coming from. I originally thought that it would be US-only. While US delegates dominate the lists as you might expect, we have people coming from all over the world. Here's a graphic showing the distribution of delegates across the globe.
I think it's a measure of Django's excellence that DjangoCon attracts people from so far away. I well remember when Jacob Kaplan-Moss and Adrian Holovaty first came to PyCon in Washington DC to describe the system they were putting together. At that stage Django wasn't open source, and the encouragement of the enthusiastic PyCon audience was a major factor in its becoming so. The software has come a huge distance in a relatively short time, and is now a major Python success story.

There are still places left at the conference if you would like to register. Portland is an intriguing city that offers a warm welcome to visitors, and the Doubletree is a green hotel with excellent accommodation. The conference room rate is only guaranteed until August 13, so make sure to book your accommodation soon.

Wave Goodbye

So Google's blog announced today that development of Google Wave "as a standalone product" will end because "Wave has not seen the adoption we would like". It's kind of a shame, because Wave was intriguing, but as an infrequent Wave user I found several issues that made it less than user-friendly. So here are a few points that developers might like to take home from the train-wreck that is Wave (100 developers for two years is a substantial investment, even for Google). The servers will continue to be available "at least until the end of the year".
  1. Don't try to replace standard GUI components with inferior and non-intuitive substitutes. The Wave scrollbar was a user interface disaster, and a source of frustration to many of the users I interacted with.
  2. Don't promote technologies that depend heavily on high-bandwidth connectivity, or at least not for Internet use. Many times I was left frustrated, not knowing whether the Wave had crashed or whether it was simply waiting for a server response.
  3. Realize that even the best technologies need marketing and publicity. 80%+ of desktop computer users don't use Windows because it's the best system, they use it because it's the best alternative they know about. If people don't know about your technology they won't use it, and techies alone probably aren't the right user base to make a product viral.
In some ways I am sorry that the Wave didn't succeed as so many techies apparently thought it would. In other ways I am disappointed that the technology didn't really deliver on its promise. It's one of those things that needs to be ubiquitous to succeed.

Google's misstep with Buzz earlier this year probably didn't help either - it led to distrust about Google's intentions with regard to (or, worse, competence at securing) users' personal data.

So whatever the next big thing on the Web is going to be, it isn't going to be Google Wave. RIP.

July 10, 2010

Paypal Pending Balances

According to the PayPal user agreement:
10.7 Reserves. If you receive Purchase Payments, PayPal, in its sole discretion, may place a Reserve on funds held in your Premier or Business Account when PayPal believes there may be a high level of risk associated with your Account. If PayPal places a Reserve on funds in your Account, they will be shown as “pending” in your PayPal Balance. If your Account is subject to a Reserve, PayPal will provide you with notice specifying the terms of the Reserve. The terms may require that a certain percentage of the amounts received into your Account are held for a certain period of time, or that a certain amount of money is held in reserve, or anything else that PayPal determines is necessary to protect against the risk associated with your Account. PayPal may change the terms of the Reserve at any time by providing you with notice of the new terms. 
 What this doesn't say is that PayPal will also deny you the ability to earn interest on those funds while they are held in reserve.  Because Holden Web is organizing DjangoCon we currently have a substantial balance (which will soon disappear once the outgoing starts). So PayPal have decided that they can place $20,000 on reserve, thereby refusing me the right to earn interest on that money.

Naturally the "notice" I received just said that the funds were being held on reserve until further notice, and when I inquired about this the "explanation" I received didn't explain anything at all: it simply pointed me to the user agreement and suggested that I could find out what information they had used in the decision-making process by taking out a subpoena. Definitely not cool. In terms of customer service PayPal are scoring about 1 out of 10 here.

July 7, 2010

Death by Oracle

This is probably not an original idea. I am not one of those who complain about Oracle's acquisition, as a part of Sun Microsystems, of the MySQL mark and the associated software. Larry Ellison is plenty shrewd enough to make money out of open source - OK, maybe not as much as from proprietary, but when you are Larry Ellison you might figure you are getting close to enough anyway. Or maybe not.

But suppose someone evil in the Ellison empire were to decide to bury MySQL for ever, it strikes me that all they would have to do would be to bundle it under the Oracle installer. This gargantuan framework with basic Java look-and-feel and often totally inadequate error handling (disclaimer: I have little recent experience of Oracle, but I have used their products since 1986 or thereabouts and would be surprised if things had changed radically) would be quite enough to deter anyone who hadn't already forked over huge amounts of money for the software behind it. A free software release would simply not be worth the pain.

July 1, 2010

Progress, Of a Kind

Remember all the stuff that visionary management guru Peter Drucker was enthusing about in the 1980s - about how markets will appear and disappear, and collaborations will form to meet them and dissolve as the market disintegrates? Only after 30 years has the information technology industry been able to come  up with systems that stand some chance of meeting the requirements of such markets. Boy, are they enablers. Who wants to know what the vendor wants us to believe, when we can ask actual customers among our social networks?

June 15, 2010

Metaclass Madness (Python 3 Version)

Last week I was at PyCon Asia Pacific to deliver the opening keynote. Liew Beng Keat, the conference chair, was kind enough to invite me to give a technical talk as well, so I brushed up a talk that I had given previously to the Icelandic Python User Group entitled Metaclass Madness. The material is fairly straightforward, but metaclasses have the reputation for making people's heads explode, so the title was something of a warning for the unwary.

The evening before the presentation I decided to update the code, so the current download includes not only the PowerPoint slides but also usable source code for both Python 2.x and Python 3.x.

I had thought of adding class decorators to the talk, but interestingly I realized that the example I was using didn't translate. The issue was that the metaclass is called with three arguments, the third of which is a dict containing the namespace that has been constructed during the compilation of the class body. So in the metaclass's __new__() method it is easy to decorate each method by iterating over the namespace dict and replacing each callable (whose name does not begin with a double underscore) with the result of applying a decorator to it.

A class decorator cannot work this way, though (at least with a new-style class, which is all you have in Python 3). The reason is that new-style classes use a dict_proxy object as their __dict__, and the dict_proxy does not all you to set items. Consequently, by the time the decorator gets called the class __dict__ is already pretty much set in concrete.

Since the particular example I chose deliberately omitted the methods whose names began with a double underscore someone asked me whether name mangling would affect the process. [For those who don't know about name mangling it is an attempt to protect "private" variables, those whose names begin with a double underscore and end with at most one underscore. See this documentation page for further details]. I was able to demonstrate interactively, after a couple of false starts, that mangling apparently took place *after* the call to __new__() (presumably in type.__new__(), which the metaclass __new__() method must call to ensure completion of the class creation).

May 23, 2010

New Holden Web Subsidiary to Produce DjangoCon 2010

DjangoCon 2010 had to happen. After a brilliant start at the GooglePlex the event followed up with a transition to a hotel venue. DjangoCon is "small" in some sense that PyCon isn't (it probably compares with the size of the first PyCon if the figures I have seen are close). Well, I managed the first PyCon in 2003 (and the second, and the third), so I figured I could probably manage DjangoCon. Fingers crossed, wish me luck, DjangoCon is at the DoubleTree in Portland, OR from September 7-9 this year.

It will be interesting. My close involvement with the US open source community was relatively new when I started PyCon, whose development was therefore very organic rather than being the structured product of corporate thinking.  It was really my instinctive rebellion against the exclusive nature of the corporate conferences that Python users used to have to attend.

DjangoCon's sponsorship tariff this year makes small company participation eminently practical, and serious visibility is a practical proposition for the medium-sized enterprise. I am delighted to say that HUGE Inc., besides hosting the meeting at which the announcement was made, have agreed to be our first commercial sponsor, closely followed by Clearwind as our second. If you know anybody who might want to sponsor the conference please let us know.

DjangoCon can continue to demonstrate the practicality of collaboration between the open source communities and the "outside world". Sponsorship will be shared between commercial enterprises and recognized open source organizations such as OSU OSL and the Python Software Foundation, who can mingle with and get to know all segments of the Django world. The reverse is obviously also true.

This particular venture is being run by a new organization, "Steve Holden's Mighty Python Empire," whose mission is to increase the visibility of open source technologies by running popular and profitable training and conference events. Look for more about its other activities towards the fall.

I am looking forward to getting to know the Django community better, and to working with them to give them the best possible forum to learn about the technologies surrounding this fascinating application.

May 11, 2010

Simple Database QueryTool

This fascinating little program only needs proper exception handling to turn it into a versatile teaching tool. As it is, one SQL syntax error and you have to re-run the program. I was impressed by how easy this was to write, and it should work on any Python 3 installation.

The odd .strip() calls compensate for some glitch in certain input channels.

"Takes input from the user and runs it through a sqlite relational database."
import sqlite3
dbname = input("Database name: ").strip()
dbpath = r"V:\{0}.db".format(dbname)
conn = sqlite3.connect(dbpath)
curs = conn.cursor()

while True:
    stmt = input("DB> ").strip()
    if not stmt:
    while True:
        line = input("... ").strip()
        if not line:
        stmt += "\n" + line
    result = curs.fetchall()
    if result:
        for row in result:

So, if you have ever wanted to dive down into SQL, Python now provides you with an easy tool. Then you just have to learn SQL. That's where the exception handling comes in ...

May 10, 2010

The Python MiroCommunity

Well, I have been wondering what to do with for a while, but I think it's pretty clear now that a lot of redirection to the Python Miro Community is in order. This is some seriously helpful stuff for anyone who wants to know more about Python.

If I were Steve Jobs (and I'm sure he will tell you I'm not) I might want to say it was fantastically amazingly stupendously great, but in fact it's simply the result of some solid work by an individual and a foundation.

So, a tip o' the hat to Will Kahn-Greene, the currently volunteer curator of the collection (sorry the PSF couldn't help you with funding, Will, but the amazing job you have done without it surely tells potential sponsors that your channel will represent amazing value to them) and to the Participatory Culture Foundation, Miro's originators.

Oh, and then of course there's the hundreds of people involved in creating the videos and the conferences and user group meetings at which they were made. Including a small core centered around Carl Karsten who have worked for years to get to the stage where we are publishing video while the conference is still happening. Pretty amazing stuff, really. Lots of Python in the mix, naturally, and pretty all of it open source unless I mistake my guess.

Hmmm, ...

April 10, 2010

Digital Rights Repression

There's something about the phrase "Digital Rights Management" that gets right up my nose. I suppose it's because it makes it sound as though we have digital rights and other rights, and they are somehow different. The digital age has definitely brought new approaches and new legislation which infringe on our freedoms.

The US Digital Millenium Copyright Act has had a "chilling effect" on free speech by allowing copyright holders to achieve censorship of publication without any prior scrutiny by a court being required. This is very definitely a bridge too far.

Now the UK has gone the same way with the second reading of the Digital Economy Bill. This reading was cynically timed to assure the bill's passage and enactment in the "wash-up" process following the dissolution of parliament prior to the general election of May 6. The most sinister and at the same time the most ridiculous aspect of the Bill is its provision that someone about whom three complaints have been received will be liable to have their Internet services removed - again without the intrusion of any legal process, let alone the requirement for conviction in a court of law. The Bill makes no mention of the collateral damage caused to other people living in the same domicile, nor does it propose any sensible way of stopping such disenfranchised individuals from using the many free wireless access points that are available throughout the world. The law is, in short, an ass.

It's easy to see in both the DMCA and the DEB the hand of corporations seeking to enforce their copyright and bolster their profits. It's also easy to see that the laws were framed by people who either didn't understand the broader implications of their work or who didn't care. The DEB is the brainchild of Lord Mandelson, an effete politician who's too snobby to tread in dogshit and no more a servant of the people than Dick Cheney.

This handover of power to the corporate world has now officially gone way too far. The legal notion that corporations should be granted the same rights as individuals, although enshrined in case law, is fundamentally unconstitutional. Corporations wield a disproportionate amount of wealth and power in today's society. The recording industry lobbied for a levy on blank audio cassettes because (to use their slogan) "Home Taping is Killling Music", yet twenty years later music seems very much alive.

I have railed against the DEB, unsuccessfully. The DMCA is ten years old. I've been a supporter of the open source movement for over twenty years, and I can tell you that it's a harbinger of  new approach. In the short term the corporations may feel they are winning, but in fact they are merely sowing the seeds of their own eventual destruction. You might care to bear that in mind in your investment strategy, if you have one. The music industry is like the boy who cried wolf; pretty soon nobody will care when they get eaten.

March 30, 2010

Students: Help Python 3 Take Off

If you are a student you have a chance to get paid to work on Python this summer. Google is once more funding the "Summer of Code", and once again Python is participating in the hope of getting as many students as possible to move the language's development forwards. In fact this year the focus is on supporting the migration to Python 3 - although the "current" release of Python is 2.6.5 there is also a perfectly competent 3.1 release available, and 3.2 is shortly on the cards.

So this year the Python GSoC efforts have a distinctly forward looking flavor, and as you will see there are some amazing mentors available to help you complete your projects and earn the $5,000 that Google is offering.

Kudos to Arc Riley for once again agreeing to keep the Python show on the road as the Python Software Foundation's education projects manager (and to C. Titus Brown for the support he lends). Come and help them repeat the successes of earlier years, move Python forward in a visible way, and become a part of the growing Python community.

February 25, 2010

Small Python from Synapse is a Big Deal

The guys from Synapse didn't appear to be at PyCon this year, but they impressed me last year with their hacking of the "Easy Button" to tweet on Twitter when the button was pressed.

It seems they are still impressing people, as they have just been awarded a Product of the Year award. Congratulations to them - I am sure they will be a significant Python user in future.

February 20, 2010

#PyCon on Twitter ... or wait for posts like these.

John Graves, a New Zealand reader, wrote in to let me know:

Plug for PyConPads

Plug for PyCon 2010 Slides

By the way, New Zealand had a very successful Kiwi PyCon last November:
Thanks, John. Hope this gives the links a little extra publicity.

February 18, 2010

A Python 3 Idiom?

A while ago I wrote a short Python 3 snippet as an introduction to a post about factory functions. Second thoughts are proverbially the best, and I realised that in the following code:

def powers(a):
    return a, a*a, a*a*a

a, square, cube = powers(10)
print(a, square, cube)

the last two lines could be refactored as:

This technique is ineffective in Python 2, where print is a statement and the syntax would be invalid.

February 17, 2010

Software QA Rant

Don't want to publish the whole thing on the Python feed, but this post applies equally to Python users if you have the time to read it ...

February 16, 2010

Customer Hostility

Seth Godin is right: the world is full of commercial dinosaurs, due to expire shortly. And I will be happy to dance on their graves.

I have written before about the rigors of modern day travel, and the travel industry (or a large part of it) appears to be doing its best to discourage people from traveling. Part of it, of course, is the TSA and its associated stupidities, but I will not again go into the irrationality of spending billions of dollars to make what is already the safest mode of transport in the world even safer (assuming that the TSA is indeed living up to that dubious claim, which I frankly doubt -- otherwise why aren't they shouting from the rooftops about the number of plots they have foiled?)

So today, for "convenience" I am flying to Atlanta. To minimize the airport hassle I have already checked in on-line, and paid $23 for the privilege of checking a bag. Assuming the charge on the way back is the same, this will amount to just over 24% of the price I have already paid for the ticket.

I have always disliked unbundling, ever since I argued in Sun against Eric Schmidt's proposal that Sun unbundle the C compiler from what was then SunOS. Since I was a minion and Eric was a big-shot you can guess how that one went (though Sun's eventual fate makes me glad that I sold my stock at $28). I suppose that's why I'm a socialist: while it may not give each user of a service the absolute lowest possible cost, it's much more efficient to spread the load around. If the rich weren't so mean, the poor could enjoy better lives. Sorry, where was I?

Oh, right. So, I have got through the security theater (doubly inconvenient this trip, since I am carrying two laptops) and I decide that, to conserve battery, I will find a venue that allows me to plug my power brick in. What do I find? Each and every establishment in the newly-refurbished Dulles airport appears to have been designed specifically to exclude any possibility that the on-line traveler such as myself  might steal a few joules at their expense.

So, for the record, let me squeak this into the ears of any future airport Eric Schmidts who might be reading. If you provide power and wifi (assuming, of course, that your license from the airport doesn't force you to make your customers rely on the airport's crappy facilities) in your establishment, and advertise that fact, I will support your business in preference to the short-sighted idiots who insist on trying to milk me dry whenever I come into contact with them.

So now we come to Verizon Wireless. Having finally found a place quiet enough that I can plug into the power without creating a trip hazard (which, believe me, would be impossible when the airport was anything like busy), and to avoid whatever extortionate rates the airport authority might choose to charge, I plug in my cellular broadband card and fire up the Internet,only to be confronted by a dialog box telling me that I can upgrade. Upgrades are always good, right? Well, yes, but ... here's the dialog box, at the left.

Call me picky if you like, but this seems to me like the ultmate failure in quality assurance. I have to wonder how many pairs of eyeballs scrutinized this dialog box before it went into production, and how come none of the owners of said eyeballs thought to ask the question "What 'Update' button"? I am imagining that each scrutineer, supposing they notice any discrepancy at all between the text in the dialog box and the reality they were presented with, thought to themselves (consciously or otherwise) "Well, clearly they mean the 'Download' button". To which my immediate response is that they cannot possibly be geeks. I am a geek, and believe me I am intimately familiar with all the shit that can land on your head in short order when you make that kind of dumb-assed assumption. So being a geek, I decline to either "Download", or "Update" or whatever kind of trouble it is that Verizon would like to get into.

Next I am presented with an opportunity to "view my account". Now I actually have two accounts with Verizon Wireless, one of which seems to be uncomfortably and inextricably intertwined with my home-based FIOS account. So I am impressed to see both a "register" link and a pulldown that allows me to select "Business Account" rather than "Personal Account". Which I do before clicking the "register" link, whereupon I am presented with a form that asks me for quite a bit of information including both my Employer Identification Number (EIN) and my Dun and Bradstreet number.

Being in an airport, I figure I have done pretty well to produce the former, and I happily fill in the other fields, only to be presented with the message shown at the left. Now, this is telling me a number of things I don't particularly like.

First off, there is something "invalid" about my company name. But of course I am left to guess what; it would clearly be far too easy to provide any description of the rules that are declaring my company name to be invalid.

Next I am informed that the Tax ID is invalid. I discover by reading the form (not the error message) that this is because I have failed to put a dash between the second and third digits, but apparently the programming monkeys who have put this application together have never thought about maybe, hey, just throwing anything that isn't a digit away. Even though only the digits in this particular identifier carry any meaning. Give me a break.

There is a similar problem with the telephone number, though in this case the programmers have taken the trouble to tell me exactly how the number needs to be formatted (thank you!). I especially like the double period at the end of that line, which implies that not only do I have to put dashes after the third and sixth digits, I also have to put a period at the end of it. This reminds me of many interactions where people have asked me my telephone number and I have replied "eight hundred dash four nine four dash nine one one nine". Not. This is getting quite cussworthy, but I am restraining myself.

Now the message about the email address again throws me into confusion, since I have (as a look at the form clearly shows) entered my email address one hundred percent correctly., just like I always type it. So again I am left to guess exactly what about my email address the Verizon system has chosen to declare "invalid". The f-bomb is now hanging in the air, poised like the sword of Damocles above a web site that has clearly been programmed by monkeys, and not even monkeys with brains.

Lastly, just in case I didn't understand that I should have put that oh-so-important dash between the second and third digits, I am presented with a message that my "Federal Tax ID" was incorrect, as though the form has requested two separate tax IDs (which, by the way, it hasn't).

At this point my almost-forty-three years of programming experience, integrally connected to my geek identity, makes me want to scream "WHAT IS WRONG WITH THESE PEOPLE? DON'T THEY WANT MY [expletive deleted] BUSINESS?". I swear, at this moment, if there was a button I could click with the label "Consign VerizonWireless and all its employees to hell" I would click it whether or not there was the slightest chance that the click would have any positive effect. It would just make me feel better. I am trying to interact with a corporate entity (which due to a strange and to my mind totally obsolescent notion of law has most of the legal rights of an individual) that doesn't give two hoots what its customers think about it or how infuriating its systems are to use.

At this stage I realize I am not complaining just as a programmer, or even just as a web systems designer, I am complaining as a human being. Where, I ask myself, is the VerizonWireless Quality Assurance department in all this? (They must have one: no corporation of that size can possibly have failed to consider the liability implications of not doing). Did anyone actually take the time to interact with this application and deliberately provide "invalid" answers to determine whether the systems response would be considered reasonable by a human being?

I swear, sometimes, I truly believe that top-level corporate managers' ultimate dream is a system that requires no human intervention at all. If this really is the case then I have to explain (and will do so, given access to the Verizon top level management and a sock full of wet sand, in explicit detail) that they are a long way from reaching their goal.

Sure, we all understand (even those of use who aren't lucky enough to hold stock in public corporations) that a publicly-owned business has a duty to be cost-efficient. We also understand that in a capitalist world we are likely to be forced to interact with entities that don't always choose to employ human labor to interact with its human customers. But in the final analysis, if I personally can choose to pay a few percent more to deal with a business that bothers to pay someone to listen to my problems and help me get my confusion sorted out, I will always take that option.

That is why, being the bloody-minded socialist that I am, I usually choose to stand in line at the supermarket checkout rather than take the option of the "self-service" checkout. I don't want to serve myself. I want the companies I deal with to pay someone to help me, and I want to be sure that my own business always presents a human face to its human customers. All Holden Web's customers are corporations, but it's their employees that I have to satisfy.

So, if you happen to be a Verizon Wireless stockholder, please ask some awkward questions at the next stockholders meeting. This laziness should be stomped on quickly, and hard.

If you happen to be in the IT industry, please make sure you don't phone it in by producing this kind of shabby excuse for a human interface.

And now I am in Atlanta, and things feel better.

February 12, 2010

New Python Class Available

I am happy to announce that the O'Reilly School of Technology have made the first of four Python classes available on their interactive teaching system. Students passing all four modules will be eligible to receive a Certificate for Professional Development from the University of Illinois' Office of Continuing Education.

The PSF has discussed certification schemes in the past, and the general feeling of the membership appeared to be against them. This may be true for high-level personnel and those with advanced degrees, but we should remember that Python will also be increasingly used by technicians and others whose formal educational background does not include a training in computer programming. I feel that a university-approved certification will be helpful at that level.

While many certifications aren't that meritorious, if a scheme requires proper practical experience and the training includes mentoring by live instructors or advisers rather than just the passing of a multiple-choice examination it can have some real value.

Time will tell, but I believe we will have passed a milestone once a university-accredited Python certification scheme is available. All I have to do now is write the other three courses ...

[NOTE: the author of this blog will receive royalties based on the number of students taking the classes mentioned in this article]

Ubuntu 9.10 Wireless on Dell Precision M6300

For reasons too complex to go into (they involve a talking penguin) I have just installed Ubuntu 9.10 (Karmic) 32-bit on the laptop I was talking about when I wrote this post last June.

Whether it's the change to 32-bit or the change to Karmic I do not know, but I am happy to report that everything works like a dream: I just had to install the BroadCom proprietary driver (boo! - I wish companies like Nvidias and BroadCom would cooperate more fully with the open source world) and suddenly I could disconnect the wires and away I went. This post is being made from the very laptop about which I complained so bitterly eight months ago.

February 9, 2010

One More Day to Register for PyCon on the Web

Incredible though it seems, PyCon tutorials start a week tomorrow!

If you are planning to attend and want to register at pre-conference prices you have just over 24 hours to do so!

PyCon is the place to learn about new and existing Python features and meet Python personalities. Register now while you still have chance to save money!

February 5, 2010

Choose Python

Ethan Furman linked to this "Choose Python" poster on comp.lang.python. While some of the humor might not mean much to people who haven't chosen Python yet it certainly gave me a smile on a cold, grey morning.

[EDIT: as you can see in the comments design credit should go to Tim Lesher]

January 27, 2010

iPad Name Already in Use

One thing that Apple appears to have lost sight of in all the thrills of announcing their new tablet computer is that Widgetaria, presumably an Apple business partner, already promotes software called iPad. I wonder if they care?

January 17, 2010

Welcome BlueBream

Finally, a chance to start afresh with a promising set of technologies that has consistently been under-utilized. I am not even going to mention the old  name of the project, simply say that if you use Python you have likely heard of it. I have blogged  in the past about the confusion of search results.  Hopefully under the new name the vast preponderance of search results will be accurate and useful. So go meet BlueBream.

So, One of Life's Little Frustrations ...

... is the way Vista insists on taking the numbers in my filenames as numbers, thereby sorting them in precisely no convenient order. These files, however, are effectively named using a Hamming Code, so 62 is actually greater than 212, just like XP always knew. I just know this is going to turn out to be one of those awful tweaks that I should have put in three minutes after starting Vista.

I don't think we'll bother those nice Python people with that one. Which probably dooms this post to have me as the single reader.

Sudden pleasant thought. I will email the client to whom I first promised this work and then they will know that work is not only underway but almost complete. I have to finish this today or send an incomplete deliverable, since the client has paid for the classes, which have been delivered.

Happy Sunday. And people think that consulting is a part-time job ...

Not Really Python, But ...

We interrupt the newly established Python-only regime with a message from your fellow human-beings in Haiti.

if YouGiveAShit:

'Nuff said. This is a long-term project.

January 16, 2010

Definitely Not P*thon

And, to  complete my test of the feed reconfiguration I am going to post something that isn't about the P-language and ensure that it doesn't show up in Planet P*thon.

To make ad hominem remarks about the collective denizens of the planet would be like talking behind their backs - and besides, what if the test fails?

January 15, 2010

Just the Python, Please

The webmasters are having a spring clean and suggested that I might like to provide a "pure Python" feed. Michael Foord pointed out that such feeds existed already. If you want to skip the irrelevant waffling and occasional foray into politics then from now on Planet Python should see such a feed.

Direct subscribers wanting only Python can follow
if they prefer.

Other blogs:
    A Yorkshireman in America where the rabid politics really live
    On Your Desktop lame celebrity desktop blog
    PyCon conferences - you probably get this via the Planet
    Python Software Foundation News others contribute more than I do

January 7, 2010

Absent DB API Test Files Fixed

I saw a somewhat annoying comment from a web site reader recently:
The following message was received via the web site.

Subject:    /PyConTX2007/dbapi.tgz  Not Available

I am grateful to the anonymous commenter for letting me know that I'd failed to redirect certain essential links in the recent web site migration.

It would have been even better if I could have replied to the comment to let my reader know that the problem is fixed (which it now appears to be). Alas he or she left absolutely no contact information whatsoever.So all I can do is record the fix and hope that this file wasn't being urgently sought (which I doubt it was).

January 6, 2010

Register for PyCon, or the Kitten Gets It

Just sayin', it might be better if you planned to attend the conference.

It's not that I like harming innocent small furry creatures, it's just that there are still thousands of Python users and potential Python users who still don't know what excellent value for money the conference is, or how much fun you can have there.

PyCon is in Atlanta this year, and despite the parlous state of the world economy there's a chance that it will be the biggest Python event ever. But hey, we all know that size isn't everything.

Although I was notionally on the program committee, and did at least register my opinions of the talks I was allocated by the submissions scheme, I (yet again) didn't manage to make a single meeting due to pressure of other business.  I'm actually not too unhappy about that, given the incredibly difficult task that the committee had to perform in order to ... well, I was going to say "sort the wheat from the chaff", but in fact there was so little chaff that wouldn't really be an appropriate analogy.

A number of people have blogged already about Five PyCon Talks You Must Not Miss, but since there's still a few hours to get in at the early bird rate I thought I'd throw out my list of unmissables from the extensive list of talks. How's that for arrogance?

A Short Pinax Tutorial, Danny Greenfeld. I have heard Danny speak at local Python user groups. If I had time I would be attending the half day Pinax tutorial that he and James Tauber are giving, but this is the second best way to find out how to get started with Pinax.

What Every Developer Should Know About Database Scalability, Jonathan Ellis. This one will be straight from the horse's mouth - it's always worth hearing Jonathan's summaries of his immense practical experience.

IronPython Tooling, Dino E Viehland. As a Windows user who has hardly touched IronPython so far I am interested in finding out what my options are. Nobody is likely to know better than Dino, who is probably the most prominent member of the Microsoft development team.

Scaling Python Webapps from Zero to 50 Million Users - A Top-Down Approach, Jinal Jhaveri. Although I haven't heard Jinal speak before I can't resist the lure of hearing what someone with really high-volume Python web experience has to say.

Why Not Run All Your Tests All the Time? A Study of Continuous Integration Systems, Titus C Brown. Ever since I hear Titus' tutorial (with Grig Gheorghiu) on testing a couple of year's ago I've wanted to hear what he has to say about CI. This is my chance.

Alas, five talks isn't anywhere near enough to encompass everything I want to hear, and I am also keenly anticipating Turtles All The Way Down: Demystifying Deferreds, Decorators, and Declarations, Pay Only for What You Eat: A Tour of the Repoze.BFG Repository and Philosophy, On The Subject Of Source Code, Python's Dusty Corners, Debating 'til Dawn: Topics to Keep You Up All Night, Powerful Pythonic Patterns and Tests and Testability.  This is going to be a knockout conference even before you consider all the amazing things that will be happening in Open Space.

You really have to be there. And you'll be helping to save a poor kitten that never did anyone any harm in its life!

January 5, 2010

Two Days Left to be a PyCon Early Bird

Just a quick reminder that PyCon early bird registrations end on January 6, so you don't have long to take advantage of these rates. Quick! Before you forget!

January 2, 2010

Why Save MySQL Now?

I am having a hard time understanding why Michael "Monty" Widenius is pushing so hard to Save MySQL as the Oracle takeover of Sun Microsystems looms. It was Widenius himself, one of two primary developers of the product, who introduced a dual-licensing model that allowed clients to purchase supported products from his company, MySQL AB, or to download the open source components themselves.

After a considerable length of time running the company and presumably directing its operations he agreed to sell MySQL AB (including the rights to the MySQL branding and trademarks, apparently) to Sun Microsystems in January 2008, and went to work in Sun's MySQL division. One presumes that a good portion of the billion dollars that Sun paid for the company went to Widenius.

He then proceeded to undermine the MySQL 5.1 launch at the end of November the same year with a rant about its unsuitability for purpose (for which he strangely appeared to feel little or no responsibility) that sent a terrible message to the user community. Then he followed that up less than three months later with an announcement that he was leaving Sun and had started his own business, Monty Program AB. Fair enough.

He now apparently perceives a threat to the MySQL "brand" because Oracle will have no vested interest in ensuring the vigorous development of the MySQL software to compete with its high-margin brand. The question that I am left with is: why, having sold the brand (and since MySQL was open source licensed under version 2 of the GPL, the brand was the main intellectual property transferred along with the support business) does Monty imagine he has any right to control what happens to it?

The software itself is protected under the GPL, so a fork is perfectly practical (and indeed Monty's new company has for some time been working on a branch they call Maria). So all we are talking about is a name, and one which Monty willingly sold. What's the deal?