March 23, 2008

Goodbye, Arthur C. Clarke

Since my blog is emblazoned with a quotation from the man it would be ungracious of me to let his death last week pass by without some remark. A man of formidable vision, Clarke envisaged the geosynchronous satellite years before anyone else, but was denied a patent because his disclosure of the idea in a Wireless World article was regarded as prior art. (How ridiculous this makes the US Patent Office's current lax diligence in the software field).

He was an inventive science fiction author, and one whose books would frequently withstand the test of a second and subsequent reading. Many were more prolific in volume, but few could challenge him on the scope of his ideas. In later life his move to Sri Lanka kept him in touch with the needs of the people increasingly crammed together on this small shared ball of rock.

Who knows where he ranges now. The world is a smaller place for his passing.

Image: Arthur C. Clarke Foundation

March 21, 2008

Packaging Python

There's an extensive discussion at the moment on the python-dev list about how python modules and applications should be packaged up in future. This all relates to the distutils and setuptools features, which are great when they work and horrible when they don't. There seems to be general agreement that an uninstall feature would be useful.

My own point of view is that there are different requirements for installing applications for end users and modules for developers. In the former case I believe it would nowadays be easiest and least error-prone if each (Python) application were installed with its own interpreter and all dependencies. While this seems horribly wasteful, it neatly avoids any kind of version lock-in and allows application upgrades. In the latter case then something more like the traditional setup.py install is more appropriate, and the installation probably doesn't need to be recorded in whatever mechanism the system uses to record installed applications (e.g. Add/Remove Programs under Windows).

Whatever the result, it does appear that 2.6 could get us closer to a universal solution to installation problems.

Bruce Perens Needs Your Help

A co-founder of the Open Source Initiative, Bruce Perens is now concerned that the body is becoming increasingly dominated by vendor representatives who do not necessarily have the interests of the open source community at heart.

You can read about why he feels this is necessary on his campaign page. I would suggest that perhaps a change in bylaws is also required, since it appears from Article V Section 5 that the Board of the OSI is, or has the potential to become, a self-perpetuating cadre with no outside accountability. I can't help feeling that's a little unhealthy.

Please visit Bruce's Web site and support him in his campaign to keep Open Source open!

March 15, 2008

PyCon Friday: That's All, Folks

That's enough blogging, now I'm just going to try and enjoy the conference as much as I can.

PyCon Friday: Python Software Foundation News

Well, the PSF meeting is over, and we have eight new members. The Board of Directors has changed composition slightly, with the departure of Andrew Kuchling (left) and David Ascher (right).

Andrew was the first recipient of the Frank Willison Award for services to the Python community. He did amazing things for PyCon as its second chair (last year and the year before), and has put in huge amounts of unseen work on other issues but unfortunately is now too busy at work to continue as a PSF Director.

David was a founding Director, I believe, and the co-author of early editions of Learning Python and co-editor (with Alex Martelli) of the Python Cookbook. Our loss is the Mozilla Foundation's gain. His new job as head of the corporation to nurture the Thunderbird software meant that he too had to move on, but he's promised to continue to do all he can to support the Foundation even though his new role will clearly be taxing. We all wish him well.

Raymond Hettinger and James Tauber, both long-term supporters and users of Python, now join us on the Board. Raymond may be known to you as the author of the itertools module among his many other fine contributions to the Python core; without his influence Python would still lack a decimal module. James has more than ably represented the Foundation as its Summor Of Code coordinator, and is also a prolific author of code, most recently in the Django arena.

The eight new elected members are: Titus Brown, Mark Dickinson, Amaury Forgeot d'Arc, Christian Hiemes, Van Lindberg , David Mertz, John Pinner and James Tauber. Congratulations to them all. Three new sponsor members were also elected: EarnMyDegree.com, HitFlip and Sun Microsystems. We are happy to have their support.

At this evening's meeting of the newly constituted Board Stephan Deibel followed through on his announced intention to step down after four years as Chairman, though we are pleased to know he is continuing as a Director. I am the new Chairman for the next year. I hope I can do half as good a job as Stephan.

March 14, 2008

PyCon Friday: Guido's Keynote

Guido started by suggesting that this was going to be boring because it's the same talk as last year: Python 3.0 is coming, it's going to change everything, don't worry!

Matz, the author of Ruby, has said that "open source needs to move or die". Guido sees 3.0 as a chance to remove some of the sticky mistakes he made fairly early in the development of the language. Python is now 18 years old, its first open source release was in February 1991, and it's time for a change.

Guido gave a quick summary of major breakages. Most Python users by now re aware that the print statement is disappearing, that integer division is becoming a separate operator and so on. Guido was more interested in promoting the new features.

He feels that argument annotations will allow users to experiment with the feature, and that some interesting uses will eventually be available in the standard library. Abstract base classes offer an optional way to escape from duct typing. The wild-card unpacking assignment will offer more flexibility, and the new string formatting (similar to C#'s formatting feature), and many small improvements which he just displayed on one single slide.

Oberall Python 3.0 will become a smaller language, and some of the redundant older ways of doing things will be removed in the interests of keeping the language manageable and "fitting your brain". It is ready to evolve, and the new features provide the basis for that evolution. We have a good migration strategy (move to 2.6, then use warnings to make your 2.6 compatible with 2to3 automated translation).

There is no hurry - the 2.x series could be with us for another five years. In the meantime convert to new-style classes, stop using obsolete modules, and make more use of generators and iterators. Leave the small stuff to 2to3, the automated translator.

Porting C extensions may be more troublesome, because many API's will be removed.


Q (Jacob Kaplan-moss): One of Django's features is retaining compatibility with older Python versions, so a full port to 2.6 would effectively break backwards compatibility; what should our migration strategy be?

A: Migrate to 2.6 but don't immediately convert it for migration; track your user base and convert to 3.0-compatible source when it's practical without causing too many problems to your user base.

Q; 2to3 could be useful for frameworks that need to inport other people's code; will it be available with 3.0?

A: It would need some restructuring of the code, but is doesn't sound unreasonable; bring it up on the Python 3000 list, and offer to do a little of the work!

Q: Will the ABCs include an abstract sequence base class?

A: There's a container class, but not something explicit for sequences.

Q: What will the performance differences eventually be between 2.X and 3.0?

A: in the long term I don't anticipate much difference, though 3.0 may take a small hit initially.

Q: You said there would be no change to the whitespace issue - why not?

A: Most of the people here wouldn't let me! But the language is going to be stricter about the potentially damaging uses of mixed tabs and sapces.

Q: Is localization going to start working its way into the way we process strings?

A: I'll have to defer to others on that one; but there won't any longer be a need to work with data in specific encodings.

Q: I was expecting to be able to import 2.6 modules directly into 3.0 as opaque objects, avoiding the need to port legacy code; why can't this be done?

A: A virtual machine that's capable of running both 2.x and 3.0 bytecodes would be a great thing to have, but incompatibilities in the way the basic types operates make this not just ill-advised but impossible.

Q: Is there any change to the GIL strategy for 3.0? Our large applications with Python embedded need to take advantage of multiple CPUs.

A: For better of for worse, it's not going away, and there are good reasons for this, which have started to convince even the most reluctant. The pyprocessing module can help, or look at Jython or IronPython.

Marketing Open Source

Here's an interesting idea. Maybe the PSF should try to fund the development of a stick with Portable Python or Movable Python and a bunch of applications on it? That would have been amazingly useful for the PyCon tutorials this year.

PyCon Friday: the Calm Before the Storm

Late to bed last night, and clearly too sleepy to set the alarm properly, so woke up today feeling a little groggy rather later than I had intended. Laptop behaving so far, fingers crossed.

Breakfast and the keynotes first. For the morning session the only two talks I want to hear clash with each other! PSF members' meeting at lunchtime, then chairing a session in the afternoon (a good way to make sure you get to hear some talks you want to). Trying to leave the evening open for "social business" activities.

I'm asking all the newcomers I meet what made them come to PyCon this year in an attempt to understand the explosive growth. It seems that a lot more people are starting to use Python now, vindicating my ten-year master plan to be involved with a significant technology by the end of this decade. Wonder whether it will do me any good.

Alex Martelli says I should consider writing another book, and wants me to contact a publisher. Whenever anyone says this I always remember the $2.50 royalty check I got once for Python Web Programming, and this brings me back to reality. I told him I might consider it if he'd be my technical editor again. His encyclopedic programming knowledge was terrifically useful last time.

Talking to Glyph Lefkowitz in the bar about books, he asked me how sales were going and I told him it is still in print but I am waiting for it to be remaindered (though it's hardly Books-a-Million material). He was nice enough to say that compared with other six-year-old books on web technologies there was still a lot that was relevant, which is definitely a complement. I did try hard to include explanations of the fundamentals, and I guess that counts for something.

Enough, I'm getting hungry.

Practical Applications of Agile (Web) Testing Tools

This was a practical tutorial by Titus Brown and Grig Georghiu, two accomplished presenters who have given popular presentations at the last two PyCons. Titus opened the presentation, and told us he wanted us to be "test infected" - to make testing a necessary part of our development process. He confessed he feels a sense of physical discomfort when he writes untested code.

He gave us a number of practical guidelines, the most interesting of which were: start small; focus on actual problems; use continuous integration. The goal of testing should be to fail as quickly and as hard as possible: failure is good, because it reveals a need for revision. You should plan for testability, and as your experience level increases you will find that you naturally tend to do this.

Use a hierarchy of tests. The initial tests should run in under 20 seconds; only if those tests pass should you run the full test, which will take longer; then run regression tests, and then (if you have defined them) the acceptance tests. The point is that much of this work isn't done on your time: your continuous integration may be an overnight run, but you don't have to stay while they run. Titus feels that any test that takes over a couple of hours has limited (though definitely not zero) value, due to the lack of immediacy in the feedback it provides.

Taxonomy of testing: unit tests, functional tests, regression tests, UI tests, acceptance tests, integration tests, continuous integration, performance tests. Do you even know what all these are? Which to you need to define and use?

The more complicated it is to run the right tests, the higher the probability they won't get run. Titus talks about different strategies: TDD (Test-Driven Development) and SDT (Stupidity Driven Testing) , which he equated with TED (Test Enhanced Development). The general myth is that you are a bad person if you don't use TDD, but SDT is very important because you can ensure that bugs get properly squashed by adding specific tests after discovering one of the gruesome faults we all put in ur software from time to time.

Tests can be used to constrain your code; they force you to document your expectations, both internally and externally. internally, use more assert statements. Externally, write unit, functional and regression tests as "black box" tests to verify external behavior.

A "test umbrella" removes the need for memory. Everything should report back to a single source. This gives you a way to tell a new developer "run this; if it doesn't work, you have something to fix". You just have to remember to run the tests, not go through some complex sequence of commands that need separate documentation. This automation investment will reap big dividends in both time and quality.

Testing really helps when you want to refactor.

While code coverage may not be a good metric, it's definitely the case that if you don't run every line of code at least once in your tests then the possibility of failure becomes much higher. Line coverage is necessary, but not sufficient. Continuous integration helps you discover less obvious errors, like changes in process you forgot to document.

WSGI intercept is a useful test mechanism because it monkey-patches the Python web libraries.

[Interesting demos; I went for water for the speakers just before they started; my tests failed, and I never discovered whether they were supposed to or whether I had missed some crucial step while I was out].

The scotch tool is a recording proxy that will record everything that passes between the browser and the server: exceptionally useful for capturing AJAX interactions. It can also replay recorded sessions, and ensure that the responses that come back are "the same" (with minor exceptions such as ignoring date changes).

Figleaf is a code coverage recording tool. It saves it results in a pickle-based format, and can perform intelligent comparisons between tests, taking the union and intersection so you can easily discern what still needs testing.

Nose is a system that allows testing with a much lighter footprint than unittest. It will also all other doctests and unittests it can find if properly encouraged to do so, and can be used to add module-level setup and teardown.

Grig then took over and first described and then demonstrated Selenium, a testing tool written in Javascript that runs inside the browser (and probably one of the best-known web testing tools). It's one of the few tools that can adequately test AJAX functionality, and it's the default testing tool at Google). It has several components.

The core is augmented by an RC (remote control) module, and IDE (a Firefox add-on), and a Grid module that seems to relate to parallelized testing.

The biggest issue in defining Selenium tests is locating the required elements in the page. It would be much easier if web authors gave all elements IDs, but in practice you often end up using xpath, which has downsides. Many times there is no other way.

The IDE component allows you to record interactions with web servers, but again you have to be careful to use repeatable event sequences (e.g. pasting is not repeatable); the IDE is probably not as easy to use as Twill, but some AJAX applications are almost pure client-side, with very few server round-trips, and Twill is useless with these as it can't intercept the traffic.

Firebug is an essential component in developing the tests, as is the XPath Checker add-on, which helps greatly in generating the element locators.

The basis of Seleniun tests is a long string of locators and assertions. Selenium RC runs as a reverse HTTP proxy, bypassing the "same origin" cross-site scripting protections that normally insist that scripted content has to come from a single domain. By fooling the browser this way remote control allows you to write test of a remote server inside the local proxy. It also allows you to build simple looping constructs. Of interest to readers will be its ability to export test cases as (rather ugly) Python code. Google has a whole team working on Selenium, and others are also working to improve it, and extend it to broader browser support.

Grig then went on to describe buildbot, a continuous integration testing tool that allows a master system to run build (or indeed any other) commands on remote slaves and aggregate reports from the clients in a simple, readily available web format.

Although some people perform continuous integration on a single platform, buildbot was designed from the start to allow the master to drive the same tests across multiple clients and thereby discover cross-platform bugs that might otherwise go undetected.

Greg ran us through a configuration file. The learning curve can be steep, but once your buildbot is configured it usually needs little maintenance. He also highlighted the fact that someone has to keep on top of buildbots and avoid bitrot by displaying the currrently parlous state of the Python buildbot farm. Many clients are down, and those that are running appear to be failing their tests.

The evening closed with a brief discussion of Fitnesse, which is a higher-level tool that has you define tests declaratively in a language that allows you to refer to the concepts of the application domain; this makes them easier for the customer to comprehend, for example. The tests are maintained in a wiki.

I was beginning to flag a bit by now, so I can't really give you an intelligent summary better than Grig's "it's a Wiki that runs things". Ideally the client will at least understand the test descriptions.

All in all an excellent and enjoyable presentation that not only gave me some great ideas for testing but also left me more determined to introduce it into my web projects.

Getting Started with Pylons/TurboGears 2: Modern Python Web Development

This presentation was as frustrating for me as it probably was for the presenters, Mark Ramm and Ben Bangert. Unfortunately the examples for the first part of the tutorial relied on having up to date copies of lots of packages, and the audience were unable to download them from the Internet as the hotel staff appeared to be having some difficulty connecting 500 geeks to the fat Internet pipe through their wireless infrastructure, and connectivity was extremely intermittent.

Things went from bad to worse when I finally managed to download the required software from the Internet and found that my examples failed: it turned out that only the presenters' machines had the necessary combination of packages. Consequently a lot of the first hour was wasted in trying to organize a thumb-drive bucket-brigade to ensure that all present had the needed stuff loaded. I can understand Mark's anxiousness to present the latest and greatest TurboGears to the audience, but I was there primarily because I wanted to get back into the technology so as to be able to make fair comparisons with Django.

While we were trying to get the load problems sorted out, mark talked about the WSGI interface and its role as a standard in the Python web world. He then talked us through a couple of practical applications, and I ended up with a simple server working based on the reference implementation, wsgiref. We then implemented the same functionality using cherrypy.wsgiserver, observing that the fundamental techniques weren't particularly different. The third exercise didn't actually add much for me, since we just had to get the existing servers to replace the initial output with a listing of the environment dictionary.

Then we moved on to TurboGears. Alas, I ended up typing in code from the handout while Mark was explaining the supporting functionality, and when all was said and done I didn't notice a lot that was new in terms of how you put a TurboGears application together. In one way this is very good, because it means that the TG re-implementation has retained the same API that its developers have become familiar with; in another it's bad, because I didn't feel I actually learned all that much as someone who had already put TG applications together, albeit small ones. Much of what was said was narrative about the state of the software rather than directed towards learning the technology. I didn't have the sample web finished, with nine pages remaining of the handout by the time Mark's part of the session was over.

Ben Bangert then proceeded to explain the differences in philosophy between TurboGears and Pylons. I'm sorry to say that my experience on the first rather-more-than-half of the tutorial left me unable to concentrate sufficiently, and I didn't absorb as much as I would have liked. I don't remember any practical work at all, and I didn't end up with a handout, but I don't know whether I missed it or what.

This was the first of a matched pair of tutorials, the second discussing advanced use of TG and Pylons. I didn't attend it because I was booked on something else in the evening session, so I hope that those who did found that this tutorial had provided them with the necessary background.

PyCon Day 0: A Mixed Bag

Wel, the curse of PyCon struck again this year, and I woke up bright and early to find that my laptop had blue screened. Three hours to the start of my tutorial presentation! Fortunately I was in good shape in terms of backup, having brought my external disk drive with me, and Greg Lindstrom was also able to provide me with a thumb drive containing the PowerPoint slides and PDFs, so I was prepared for not having my own computer available. Fortunately after ninety minutes of repair work the machine was once again in a bootable condition, but it meant that I missed breakfast and was a little later into the tutorial room than I anticipated.

It was difficult for me to judge how well the tutorial went down, so I'll have to rely on people who attended it either commenting here or writing it up in their own blogs. I hope they all remember to fill out the evaluation forms, available electronically as well as on paper. That way I'll have some sort of objective evaluation, but at least a couple of the audience were kind enough to tell me afterwards that they felt better prepared to deal with the conference, which was after all the main idea.

In the afternoon I attended Getting Started with Pylons/TurboGears2 & WSGI: Modern Python Web Development, by Mark Ramm and Ben Bangert, and in the evening Practical Applications of Agile (Web) Testing Tools by Titus Brown and Grig Georghiu. I'll be writing those up in separate posts if you're interested.

In and amongst all that, friends old and new continued to pour in. Too many to mention without fear of upsetting someone, but excellent to see. This conference is going to be a blast, I just know it, and I am very excited about the prospects of the next few days even though it means being away from home. There's a buzz. Or is it just me?

March 13, 2008

PyCon: Plus ça Change ... *

As is my habit when I am teaching, I arrived in plenty of time (midday today), thinking I would probably be able to help with something or other. Turns out only Drew Moore got here before me (arriving on Tuesday, a luxury I did not have given that I am spending two days at the sprints once PyCon is over).

By 2 pm David Goodger, the chairman, and Doug Napoleone (who has done such sterling work on the PyCon-tech software that pretty much runs the whole deal) had arrived, so we shot the breeze over a few beers and I discovered that the kiloPythonista was a reality—awesome! The organizers (among whom I am no longer counted, except possibly in an emeritus sense) have done a truly magnificent job putting this deal together, and are to be congratulated.

In any gathering of 1,000 people there will be glitches. There are already rumblings about parking (though you can park for $6 a day within a few blocks if you still have the use of your legs). Another issue is that the hotel has apparently realized (after the deal was mentioned on the web) that they might be well advised not to let people to join Priority Club and get complimentary Internet service in their rooms, given that they are trying to share two T-1s among all the hotel guests. Which is pretty ironic, given that PyCon is giving away access to a 45 Mbps pipe downstairs all week. Perhaps we should offer to let them try our bandwidth after we've gone (the minimum term was a month), and see how their customers like free access to a fat pipe. Fat chance, I suspect, since the hotel is a conventional business and not really yet in touch with the long tail.

This conference is going to be huge, in every sense of the word. I have already met several people who are attending their first PyCon, and a large number of old hands who realize that there's a lot of fun to be had just meeting up with people you haven't seen since last year and finding out what they've been up to. As I said to tummy.com's Evelyn Mitchell in the bar last night, coming to PyCon is a bit like coming home.

Some people are wondering whether this increase in size is somehow going to spoil PyCon, and make it less than it has been in the past. I don't believe we need to worry. Despite Guido's rather pedestrian view of the Python community (expressed in an interview I did with him to be published in the conference edition of Python Magazine), I believe it is special. It's special because it collectively works to be different, and welcoming to newcomers (which is essential if the community is to thrive and grow—without that, PyCon would not be the special event that it is), and outgoing, and engaging. As geek communities go, Pythonistas are actually pretty extrovert.

Anyway, it's late and I need to get my beauty sleep, but I just want to record my goals for this year's PyCon. First, I want to forge new relationships on a business and personal level, and reinforce old ones. Secondly I want to ensure that the Python community as a whole knows about Holden Web's Python classes (which are currently being rather ineptly advertised), and understands that we are open for business. Then I want to learn some great new things (including, I hope, how to use Twisted), to teach fifty newcomers the delights of Python, to scope out the PyCon-Tech software with a view to refactoring and migration to the Django trunk, and make a start on a SQL Server back end for Django. Oh, and I am also looking for ideas for more Random Hits articles for Python Magazine too.

Large ambitions, but it's a large conference this year. As Chris McAvoy, whose enthusiasm is largely responsible for bringing PyCon to Chicago, has just written in his blog, hooray for PyCon!

* "plus ça change, plus c'est la même chose" — "the more it changes, the more it's the same thing", usually translated as "the more things change, the more they stay the same" (Jean-Baptiste Aphonse Karr, Les Guêpes, January 1849)

March 5, 2008

One kiloPythonista?

With only days to go to the end of pre-conference registration the numbers for PyCon 2008 are tantalizingly close to the thousand mark (as I write, 941 registered, and the possibility of a few additions in the pending changes). It would be nice to be present at the first kiloPythonista gathering, and there is often a minor surge at the very end of the registration period. Whatever happens, this conference represents a new high-water mark in Python interest.

Since I missed out on the (apparently very entertaining) Twisted BoF last year I have attempted to make amends by setting up a session in which I try to learn Twisted in public. I'm not sure how much I will manage to learn, but I hope it will be entertaining. We might even manage to generate some useful notes for others faced with the same task.

There's been a lot of talk about the catering on the organizers' list recently, leading to no real conclusion except that you can't please everyone. I am sure nobody will starve, though, and that's the main thing.

The Chicago Python group are meeting on the Thursday evening before the conference proper starts. I wanted to join them, but I am signed up for an evening tutorial which continues until after the end of the meeting. I hope they will publicize the location of the after-meeting meeting, and maybe we can share a drink.

Plans to promote a bid for PyCon to return to DC in 2010 have been shelved, as I don't have the time to do much about them. I was skeptical of the value of using a conference organizing company, but several of those who have been involved in the planning say that the assistance has been invaluable. It looks as though there may be a Python BarCamp in DC in the fall, though, and I am now setting my sites a little further out for the next DC PyCon.

All in all I am really looking forward to this PyCon, number six in the series. Hope to see you there - please look out for me (my photo is in my Blogger profile, among other places) and introduce yourself!

March 4, 2008

PyPy Catching Up ...

An interesting post on the PyPy (Python written in Python) blog explains that PyPy has finally, on carefully selected tests, benchmarked ever so slightly faster than CPython (1% faster on one test, 11% faster on the other).

It's also interesting to note that a 20% speedup is achieved by method caching, which avoids the need to create a new bound method every time a method is referenced relative to an instance. Apparently the same technique would be usable in CPython were it not for certain C modules directly modifying the __dict__ of new-style classes. I wonder if CPython could obtain an equivalent speed-up, and if so whether it would be worthwhile making the guilty C modules restrict themselves like PyPy does.

I have high hopes that within a year we will regularly be seeing benchmarks that show PyPy outperforming CPython.

If you can't wait for that, and can live with heavy restrictions on your use of the language, try RPython (another product of the fertile PyPy project, and one in which Stackless Python's Christian Tismer had a hand) which on occasion benchmarks faster than C!

March 3, 2008

Industry Support for Python Broadens

In a move of significance to all Python users Sun Microsystems has broadened its support for dynamic languages still further. There was some interest in their announcement less than six months ago that they had hired Charles Nutter and Thomas Enebo, developers of JRuby.

Today we learn that they have recruited Frank Wierzbicki and Ted Leung. Frank has been one of the two principal maintainers of the Jython project for a good long time now, and has brought the language forward to the point where it supports the newnew-style classes, a significant milestone in compatibility with CPython. Ted is a long-time member of the Apache Software Foundation who was a member of the OSAF's Chandler team for the last four years.

Sun was a great employer for me (I was badge number 1536, I believe, starting back in 1985), and I hope that Frank and Ted enjoy working there. It's certainly a great place to meet people with exceptional intelligence, and the fact that both Sun and Microsoft are now visibly taking a serious approach to dynamic languages in general and Python in particular is terrific.

Sun and Microsoft are both sponsoring this year's PyCon, for which registrations recently topped 900. If you want to meet them there then you still have four days to register at the pre-conference prices!

February 29, 2008

Back to the Drawing Board for OOXML?

Even some pretty shady manipulation of the various national committees doesn't appear to have helped Microsoft much in their bid to get OOXML, the proprietary format describing Office documents, declared an international standard. The ISO/EIC Ballot Resolution Meeting in Geneva has ended with what can at best be considered an inconclusive result, with only eight of the 'P' countries and ten countries altogether registering any kind of vote on the main matter put to them.

The real problem here is Microsoft's attempt, with the assistance of ECMA, to put the standard through the fast track process; that was clearly not appropriate for a standard of such complexity and political significance. There were over 1,100 dispositions to be decided at the meeting, and only 20 substantive dispositions received any measure of individual attention.

The meeting's convenor attempted to reach a conclusion by bundling together 900 dispositions that had not been discussed and asking the delegations to vote on each without discussion. Unfortunately this led to over 80% of the delegations either refusing to register a vote or abstaining on all dispositions.

The real problem is that rather than being a standard driven by the requirement to describe structured documents of all types, OOXML is simply an XML-based description of an existing proprietary format.If Microsoft truly want to embrace standardization they should now get behind the Open Office ODF format and support it with all the weight they can. This seems unlikely given their prior position on ODF support, which can at best be described as half-hearted. They apparently have a lot of work to do to make OOXML acceptable.

Technically there is now a 30-day period in which the ISO/IEC members can vote to approve the adoption of OOXML. I doubt even Microsoft has sufficient clout to persuade them that this travesty or a process represents a satisfactory basis on which to build an international standard.

False Economy?

I went to a meeting the other day with one of my clients and two third-party developers. We were meeting at the developers' offices, in a town I'm not familiar with, so when I arrived I looked for the closest parking garage and parked there.

Arriving at the offices, the opening smalltalk included parking. Both my client's representative and the two developers had parked in two-hour free parking areas, and when I said I'd used the parking garage eyebrows were raised and one person asked me "how much does that cost?". I replied "I don't know, I didn't even think to look".

The meeting lasted four hours, so half way through the other three participants in the meeting had to take ten minutes or so out to juggle their cars and avoid tickets. On my return to the parking garage I discovered that the charge equated to approximately three minutes' billable income, which I was happy to write off. Assuming the other three participants are similarly expensive their decision may have saved them personally a dollar or two, but it probably cost the client over a hundred bucks in lost time.

Yet I'm the one who's regarded as stupid for paying to park so I can happily take as long as I need to meet without interruption. I'd like to think my clients pay me the rates they do so, among other things, they don't have to pay me to go out and move my car in the middle of meetings. A couple of dollars out of my pocket is well worth it if the client gets (and perceives) better value for money as a result.

February 27, 2008

EU Slam Microsoft with Further Fine

The saga continues. The European Commission have fought Microsoft to ensure that, in Europe at least, they have to play by the rules rather than making them up as they go along. Unlike the US government (which not only refused to declare them a monopoly despite their domination of the desktop but also failed to properly enforce the rather tame sanctions they imposed), the EU has repeatedly told Microsoft to stop behaving in an anti-competitive way.

The latest action, in which the Commission sued Microsoft for failing to comply with previous antitrust decisions, has resulted in a €899 m ($1.35bn) fine. Though it has only led to a 12c drop in the stock this represents about a tenth of Microsoft's annual profits, and may finally give the company reason to think seriously about complying with court rulings rather than ignoring them.

This is the first time in 50 years that such action has been taken by the EU, because every other company losing such an action chose to comply with the spirit and the letter of the decisions.

Microsoft faces further trouble with the EU, which recently started a new investigation into Microsoft business practices relating to their dominance in the word processing and spreadsheet arenas, and to determine whether the company unfairly tied Internet Explorer to Windows. The recent announcement about API sharing will also come under scutiny, and the European Competition Commissioner, Neelie Kroes, observed it's the fifth time that Microsoft has made an announcement about improving interoperability. She said "Talk is cheap. Let's wait and let's find the reality in this case. They have to deliver and implement."

February 25, 2008

PyCon is International

Various national conferences have started to use the PyCon name, and this has now been formalized by making the various national sites available under the pycon.org domain. So now you can go to:
  • br.pycon.org
  • eu.pycon.org
  • fr.pycon.org
  • it.pycon.org
  • uk.pycon.org
That's a long way for a community conference to spread in five years! The eu conference is a redirection to EuroPython, which is a trans-national conference and (if I am not mistaken) was actually started the year before PyCon. But it's nice to have them in the family.

Thanks to Marc-Andre Lemburg for maintaining the domain. Let's hope to see more PyCons as the Python's influence spreads further and its popularity continues to increase.

February 24, 2008

Don't Compete and Microsoft Won't Sue

It's obvious that not everyone is happy about Microsoft's most recent attempt to woo the open source community by releasing API details and offering them for use with a covenant "not to sue open source developers for development or non-commercial distribution of implementations of these protocols".

It isn't yet clear exactly what qualifies as "non-commercial distribution", but it's an interesting approach: Microsoft has always complained (sometimes unjustifiably) about the GPL. Now authors of open source products can use the newly-released information as long as they don't gain commercial benefit by doing so. This could be seen as opening up, or simply as a nice piece of spite. It will definitely result in the development of interoperable projects that will take market share away from Microsoft, leaving software dollars looking for other places to be spent.

I suspect that a lot of people will say that this doesn't go far enough, but it's a sea change in Microsoft's approach and has doubtless taken lots of internal discussion. If you develop a commercial product based on Microsoft's patented technologies then you will still need a license from them before you go to market. As long as you believe software patents are reasonable this is nothing to complain about.

Personally I have never thought software patents reasonable, but Microsoft are to be congratulated for trying to promote their technologies in a more open way. Let's hope this is just the first step to fully open standards, only twenty years too late.

February 22, 2008

Phatch, the Photo Batch Processor


Phatch, written by Stani (author of SPE, Stani's Python Editor) is probably the nicest open source program I've used this year. I'm no great shakes with graphics, but I wouldn't even have been able to think about doing the transormations to my profile image that you see on the right.

The graphical interface makes it easy to perform the same operations on a bunch of different images in the same directory, and the flash image that comes up at the start always gives me a smile. Still in need of development, but definitely recommended, particularly if you have a lot of images to work on.

Needless to say, this little whizz is written in Python.

February 21, 2008

Biggest PyCon Ever Starts March 14

It now appears definite that this year's PyCon is going to be a monster. As of nine o'clock this morning there were 755 registrations, after the usual spike at the end of the Early Bird period.

Murphy's law dictated that registrants started experiencing problems with credit-card payments in the last 36 hours of Early Bird due to problems with the third-party processing service. Right now there are over 100 pending credit-card registrations! If you experienced a problem and did not manage to complete your registration, fear not—you will be charged the Early Bird price if your registration was started in the right time frame but you could not complete it due to site problems.

I'm buzzed about this conference. The tutorials are getting packed—several, including my own, are nearing the 50 mark—and there are still over three weeks to go. I believe this is going to be the largest-ever gathering of Pythonistas in the world. Be there, or be a four-sided regular geometrical shape.

I'm thinking about trying to do some audio interviews while I'm there. Who would you most like to hear from? You can see the sign-up list (excepting those who requested no publicity) here.

February 18, 2008

Python in 3 Hours?

As I work through the slides I am beginning to realize that I have set myself a very ambitious target for the Python 101 for Programmers tutorial at PyCon this year. I currently have 135 slides, which means I have roughly eighty seconds to cover the points on each slide. I normally plan on three to five minutes, so the presentation style is going to be a little terser and more rapid-fire than is my custom.

It's currently the best-subscribed seminar with a total attendance of 37 (!). As it was clearly flagged as being for experienced programmers who didn't know Python I hope that I am bringing a bunch of newcomers in to the Python community and helping them to make sense of the rest of the conference.

While I remember, Early Bird conference registration closes on February 20, so sign up now before it costs you more money!

February 17, 2008

Filmic Doppelganger

Ivan Krstic made a light-hearted blog post after eWeek named him the second most influential person in computer security, pointing out that there is an Ivan Krstic in the Internet Movie Database. So of course I had to go and see whether my name was there. Turns out my namesake is a production coordinator on PlayBoy films, and his STARmeter rating went down 40% this week —but you have to join the site to find out why, so I will never know.

I can't help feeling this is the moral equivalent of having a sheep thief in the family tree.

February 16, 2008

Cygwin SQLAlchemy Install Puzzler

Hmm. This Cygwin session gave me a few moments' pause. 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
>>>

Easy to spot once I focus on the filename and the Windows path it contains: even under Cygwin I am running the Windows easy_install, and so it reports that SQLAlchemy is already installed in Windows!

I chickened out of running ez_setup under Cygwin, and just used the "download tar, unpack, run setup.py install" dance. Happily this installed everything perfectly (so far as can currently be discerned). So life goes on.

February 15, 2008

New Blender Tutorial

Well, since I complained a while ago about Blender's documentation, I guess it's time for me to point out that this issue has been addressed (though I haven't yet had time to find out how well). Google's 2007 Summer of Code funded, among other things, the production of a new tutorial. Rene Dudlfield says nice things about it, so I guess from now on it's going to be easier to learn how to use Blender. Great news!

One question, though. Why doesn't the word "documentation" appear at least once in the Blender home page?

February 13, 2008

Senate Says Corporations Can Ignore the Law

[UPDATE: see this Salon.com article for a great summary of the position].

For a good while now there has been a political campaign to provide immunity to telecommunication companies that supported President Bush's illegal surveillance of US citizens. This appears to mean that "I was just obeying orders" is about to become a valid legal defense in the USA, and that corporate managers need take no account of the law when the executive branch asks them to take actions without any support from legislation and in clear defiance of the Foreign Intelligence Surveillance Act.

The House passed a surveillance bill in November 2007 that leaves the companies that assisted the CIA's spying mission responsible for their actions. Yesterday the Senate passed a similar bill, but one that would grant the telcos retrospective immunity for their lawbreaking.

The President has lost touch with reality to the extent that he appears to believe that he is above the law, and he now proposes to put the corporations that spied on their customers in the same happy position. Anyone who supports these actions needs to think really carefully: the founders of the Constitution established clear limits to Presidential authority, and if nobody takes the trouble to convince Bush and Cheney that they are mistaken it will be a bad day for us all.

I'd like to see them impeached: if a stupid sexual peccadillo was sufficient to appoint a special prosecutor to investigate Clinton's behavior, how much more appropriate is it to do so when a president takes the country into a bogus war on the basis of manufactured intelligence and spies on his fellow countrymen? This is a chance for the American people to show the rest of the world that the rule of law really does mean something in the USA.

This affects us all as technologists: we may be asked to take part in the spying next time (if we weren't this time), and soon there may be nothing to stop us from being thrown into prison merely for failing to comply. This represents the first step onto a very slippery slope indeed, and we need to help ensure that corporations and the executive remain subject to the rule of law. It isn't a party political matter. It's about standing together and taking action when the law which is supposed to protect us all is threatened.

February 9, 2008

Open Source Stands on GNU's Shoulders

It's nice to see Bruce Perens crediting Richard Stallman with being right about software freedom back in 1983. Stallman might be less than a diplomat, as he promotes his views uncompromisingly, but whatever you think of him persaonlly there's no denying that he is a man of vision.

I bought my first GNU t-shirt at the UK Unix User Group conference in (I think) 1988, and have supported free software and open source ever since. The dinosaurs can't see it but there is a groundswell of change that's growing and will, much sooner than most people anticipate, change the economic and social order of things.

Don't worry, the determined capitalists will find a way to steal it away and use it for their own gain. By the way, happy tenth birthday, OSI.

Introduction to Python, March 25-27

The only new content we added to the revamped site was a brief announcement of our new Introduction to Python course, which is currently planned to run four times this year. I'll be teaching these classes in a tailor-made classroom in Springfield, VA, a short ride from Reagan National Airport and close to the nation's capital.

There's currently no schedule on the web, and places aren't yet being sold by e-commerce techniques—the important thing is to make sure everything is right before we start selling it too aggressively. The materials are based on courses I have given on-site to various clients over the last four years, so they are proven to be effective. The first run is March 25-27, and places are limited so that there'll be plenty of time to ask questions.

If you know anyone who needs to learn Python, ask them to get in touch. Also, if you have training needs that aren't covered by this specific class please let me know: there'll be more coming up!

Live on Django

After some weeks of planning (our own site always takes second place to clients) I am happy to say that the holdenweb.com site is up and running on a new host as a Django site. Thanks to all those in the Django community who have provided help and advice over the past few weeks.

During the reorganization we also took the opportunity to polish up our standards compliance, and so as far as I know the whole site is now valid XHTML 1.0 Transitional. The server also now has a permanent redirect for requests for the www subdomain to the main domain, which will shorten most URLs by four characters and makes us no-www.org compliant at class B.



Not much else has changed yet, though you will notice that reloading a page now typically displays a different book. The next job is to reorganize the URLs, adding redirects for the existing ".html" locations and cleaning them up to be dotless (since there is no longer any static HTML in the site). We are excited by the possibilities.

Before undertaking this modest project I looked quite hard at both TurboGears and Django, and I have to say that both projects are so good the decision was quite difficult. In the end the thing that swung it for me was the ease of migration of the existing templates and database content. Had I been starting from scratch, however, I might have been tempted by TurboGears. I think that Django just fit my brain better on this one.

February 6, 2008

PyCon Registration Going Great Guns

With over five weeks still to go until PyCon 2008 in Chicago registrations already number over 180, almost three-quarters of the total registrations for the first PyCon in 2003 in Washington DC. The tutorials, running for the third year, are also popular and many of them already have enough registered students to guarantee that they will run.

I'm delighted to see that my own Python 101 for Programmers is a popular offering—it's intended for people who have had little or no previous exposure to the language, and I am trying to cover all the essentials in three hours! Let's hope that it brings some new members to the Python community.

If you have never been to PyCon, I would like to recommend you try it. It's definitely not a stuffy atmosphere, people go there to have fun as well as do productive work, you can learn huge amounts from both the tutorials and the regular papers, and the sprints are a great way to get into a new project and learn from the developers themselves.

It's a unique event, besides being terrific value for money.

January 29, 2008

MacBook Air Disappointment

I was rather surprised to see that the hard disk for the entry-level MacBook Air, while it has a reasonable 80 GB capacity, is a slow-as-a-drain 4200 rpm version. This is a real disappointment for what would otherwise be a reasonably-specified computer. It's a pity the solid-state optional drive adds a thousand dollars to the price. Still, the cool factor will inevitably have the Apple fanboys queuing round the block, so why should Steve Jobs worry?

January 24, 2008

Publicize PyCon!



PyCon 2008: ChicagoThere are signs that Chicago will be hosting the biggest and best PyCon ever in March this year. Even the publicity effort is better organized this year, with help from a PR company and now the introduction of the self-help PyCon publicity kit thanks to Catherine Devlin. The badge on the left comes pre-linked, and there's a smaller badge for your navigation bar too. Check it out, and help PyCon succeed!

January 21, 2008

PyCon 2008 Registration Opens

Roll up, roll up, roll up, for the greatest show on earth. If you're a devotee of the Python language, that is. In the USA PyCon has quickly become the conference to attend. Registration opened less than 24 hours ago, and early bird pricing ($400 corporate, $200 "hobbyist" $125 student and $60 tutorial only) is available until February 20.

Yours truly was registered early, having taken part in testing the new site, and I have also booked a hotel room. If last year is anything to go by then those wanting to register for tutorials should book early to avoid disappointment: the more popular sessions were filled up even before early bird registration closed.

Doug Napoleone (whose wife gave birth to their third child this month) and the PyCon-Tech team have put in an amazing amount of work to ensure smooth running of the registration process, and it is by far the best site PyCon has had. Kudos to them: this year you can change your registration information after sign-up, preview your conference badge and do many things that have been impossible in earlier years.

So, sign up and I'll see you there!

January 18, 2008

Resolver Released

In yet another piece of good news for Python fans, Resolver Systems have released their first product. It's a spreadsheet that you can manipulate in Python, and it's received a lot of interest from the financial communities on both sides of the Atlantic. [You would not believe how much of the world's financial dealing is controlled and managed by spreadsheets; it's really quite scary].

Resolver One is written in IronPython by a team which includes the Fuzzyman (occasionally also known as Michael Foord), of Voidspace Techie Blog fame, and it's currently the largest product developed in that languages, with a total codebase (including tests) of over 100 kloc. The company is bravely making the product available (though not, I believe, as open source) free for non-commercial use.

Mike and other members of the Resolver team will be at PyCon in Chicago in March, which is yet another reason to attend this most excellent conference. Registrations will, I am assured, be open by the beginning of next week--I have already secured my place by acting a test subject of the registration process, and will attempt to stay for a couple of the sprint days too this year.

Python Declared "Programming Language of 2007"

Yet another article meriting screaming headlines declares Python to be the language of 2007. But on the home page of the python.org website the "news" is that Python 3.0a2 was released on December 9 and there was a Python Bug Day on January 19 (hang on a minute, that publication date has to be wrong, it's 36 hours in the future—someone's been borrowing Guido's time machine again). Anyway, it's nice to see Python getting good headlines, even if it doesn't yet shout them abroad as effectively as it might.

Apparently Python has moved up from #8 to #6 in TIOBE's last table, but unfortunately their obtuse use of web technology (frames within frames, some of them dynamically populated by client-side code) makes it somewhat difficult to link to their explanation of how they compute the results. I suspect myself that a large part of Python's improvement is due to the increasing visibility of IronPython, the Microsoft-supported .NET Python implementation. One rather sad quote for the old guard: "Perl is just dead".

But now I have another blog entry to write.

Python Gets Security Plaudit, Moves to Coverity Rung 2

This is something that hasn't yet made big news, but I don't know why not. For over a year now Coverity, funded by the Department of Homeland Security's Open Source Hardening project, has been working to report potential security flaws in open source projects. The company recently announced that eleven projects had been sufficiently proactive in responding to defect reports that they now move to "rung 2", giving them access to further levels of Coverity's hardening technology.

Of course Python is one of those projects. It says a lot for the developers that they responded so aggressively to the reports (some, inevitably, were specious but several represented significant issues that thanks to this initiative will never trouble Python users). The bottom line? Python, like Amanda, NTP, OpenPAM, OpenVPN, Overdose, Perl, PHP, Postfix, Samba, and TCL, is a project whose developers take correctness and security seriously.

I anxiously await the results of the first scan of some Microsoft product, but I am not holding my breath. Even if the scan takes place (and for all I know Microsoft are using Coverity's scanners every day) Microsoft would not publish the results. This shows the value of openness, one of open source's major benefits: you know that security issues aren't being swept under the rug in the name of profit.

The tail end of a ZD-Net article suggests that some people are less than happy about this project because they feel it will lead to ill-informed discussion about security problems in open source software. While this isn't a battle that will be won in a day, being seen to assiduously fix reported software problems will eventually win against the lip service paid to security by so many commercial vendors. If you're looking for well-informed discussion then this blog is the place to come (he wrote, modestly).

January 17, 2008

Sun Buys MySQL for $1 billion

Sun just raised their bet on open source by buying MySQL AB, the company that makes the most popular open source relational database in the world. They paid $800m in cash and assumed $200m in options to do so, even though MySQL distribute most of their software as open source.

MySQL was the first to aggressively adopt the so-called dual licensing model, which allowed products to be acquired as open source or bought with a support contract, and this has been popular with those who don't like the prospect of having to fall back on their own support resources.

Sun seem to be betting that closer ties with a popular database product will bring them more server and suppoer business, and who's to say they're wrong?

January 8, 2008

Windmill Web Testing Framework

If what this page says is true then Windmill will be very well worth some investigation. Of course the major problem with the Python web world is that so much is going on it's simply impossible to keep up with everything! Of course WSGI lays the foundation for much else, and it appears that Zope 2 now plays well with others.

I think I might start trying to make shorter blog entries just to note the most interesting developments as PyPI (Cheese Shop) contributions fly past at a rate of knots.

In the past I have looked at TurboGears, and was impressed how easy it was to implement the functionality of another web site. Recently I have been doing a similar thing with Django. We are very fortunate to have two such capable frameworks available for our web developments, and I am going to try and make sure that they both get some coverage in Python Magazine.

January 7, 2008

Teaching Python to Programmers

Well, PyCon is now less than three months away, and the most recent event of note was the announcement of the list of tutorials. I am happy to say that my own proposal was accepted, so one of the offerings is Python 101 for Programmers.

The intention is to give experienced programmers who are new to Python enough insight into the language that the simpler PyCon sessions will make sense to them. PyCon is an incredibly valuable resource for promoting the Python language, and I hope that all readers will encourage programmers they know to come to the conference and learn more about this interesting language. Of course I'll be happy to see them in the tutorial too!

The PSF has made real attempts in the last couple of years to evangelize the language, but ultimately the lesson of evangelism is: the best promoters of a language are its enthusiastic users. It seems to me that Python is crossing the knee of some curve right now, and acceptance is improving to the stage that it's getting hard to find Python programmers.

Of course there's another reason for going to PyCon if you are looking for a job. The biggest and best Python employers have realized that PyCon is the easiest place to make contact with the community. You only have to look at the list of past and present sponsors to see that.

So, I hope to see you all at PyCon, preferably in the company of a programmer who's just starting out with the language!

December 30, 2007

Starting to Understand Django

Given a fairly quiet holiday season I wanted to try and make some sense of Django, having formerly given TurboGears a look (though not yet having written that up). Both are capable systems whose designers I have a lot of respect for, so it would be nice to master their elementss. Each in its own way has the potential to improve web productivity, though it remains to be seen whether I have the headspace for all of both systems given their complexity.

After a couple of days messing around with Django I am at the stage where I have imported the Holden Web database model using Django's introspection features. A deal of cleanup was required, as well as a certain amount of reordering—most of which would not have been necessary if I'd had the sense to delete the Django admin tables from mo model, since I doubt I will need to manipulate them directly. Anyway, it's rather nice to see that the following views.py can generate the almost home page shown above:

from django.http import HttpResponse
from django.template.loader import get_template
from mainapp.models import Section

def homepage(request):
seclist = Section.objects.all()
hpdict = dict(("secPathZone%d" % s.sechomeslot, s.secpath) for s in seclist)
return HttpResponse(get_template("homepage.html").render(hpdict))


This is neat, though I have an idea that rendering the unnumbered lists to add the missing link sets is going to involve me in a little more work than I have had to do so far. Still, it's an encouraging start. I am serving this web from a local Apache server using mod_python to control Django and serving static content (images, CSS files) directly.

December 22, 2007

Ubuntu 7.10 Sound on Asus M2NPV-VM Motherboard

Dear Lazyweb:

I am really enjoying my new Linux system, but I can't seem to get the sound working. Perhaps it's a driver issue: all I know is that the aplay -l command gives me the following output:

aplay: device_list: 204: no soundcards found

This is very disappointing, as I was hoping to use this machine to work on a podcasts and screencasts in the new year. I'd be very pleased to find a recipe for fully working audio and digital sound, but at the moment any kind of sound would be a great improvement.

Google searches reveal that this has been an issue with various distributions and releases but so far nobody seems to have published a reliable solution, and I am beginning to doubt that one exists ...

December 19, 2007

Cheese Shop Doing Good Business

PyPi, the Python Package Index, is affectionately known as the Cheese Shop due to the the Python world's affinity with Monty Python and its tendency to relish obscure puns based on the sketches. I can't say I have ever liked the nickname, but PyPi is a valuable repository of often highly usable code and currently contains over 3,000 contributions. So it's worth a look.

The RSS feed contains the last thirty updates, which currently covers a 48-hour span--the feed appears to be updated once daily at 7 pm. So there's clearly a lot going on, and when I get time (note the ironic sound of hollow laughter ringing metaphorically in your ears) I shall be using the browse interface to take a closer look.

December 18, 2007

Cygwin ssh-agent Control

[Edited: 10/6/08 Remove temporary files before starting a new agent]

Another little annoyance gone: all Cygwin processes now share a single ssh-agent instance, which is started up automatically as required. I picked this tip up from a now-forgotten blog. the only change required to that recipe being to re-order the redirections for the ssh-agent command. Since it took me a while to find (low Google-fu today?) I take the liberty of repeating it here so I don't forget it.

In your ~/.bashrc file add the following:

export SSH_AUTH_SOCK=/tmp/.ssh-socket

ssh-add -l >/dev/null 2>&1
if [ $? = 2 ]; then
# Exit status 2 means couldn't connect to ssh-agent; start one now
rm -rf /tmp/.ssh-*
ssh-agent -a $SSH_AUTH_SOCK >/tmp/.ssh-script
. /tmp/.ssh-script
echo $SSH_AGENT_PID >/tmp/.ssh-agent-pid
fi


function kill-agent {
pid=`cat /tmp/.ssh-agent-pid`
kill $pid
}



You can use Start | My Computer | Properties | Advanced | Environment Variables to add an environment variable called SSH_AUTH_SOCK whose value is /tmp/.ssh-socket to make the agent available to other Cygwin-aware processes you run under Windows.

That's better!

For some reason a number of posts were stuck in the blog as drafts. This one is from October last year.

December 16, 2007

Getting There

Damn, it's been a long time without a decent computing infrastructure.

Regular readers (you poor, benighted individuals) will know that a lot of the last year has been taken up by a relocation from the United Kingdom (back) to the USA. In the UK somebody asked me how many computers I had, after a brief mental count, I replied "seven" (which didn't seem excessive to me). I gave one away to an honorary niece before I moved--she is probably still the only kid in her school with a Linux laptop.

Unfortunately four of them had to be packed up and moved with the rest of my house contents, the only ones carried across by hand being my wife's laptop and mine. This wouldn't have been so bad had it not been for the unfortunate necessity to live in rented accommodation (thanks, Gwen and Warren) from February until our new house was ready in September. The move into the new house, of course, coincided with a rather large number of non-computing tasks regarded as necessary for making the new environment livable.

So, now we have blinds on most of the windows, rugs in all rooms, a properly sealed garage floor (yes, "...Magic" is not my only blog) and Christmas shopping completed and the necessary gifts mailed to the UK I have been able to start thinking again about working with more than just the single trusty laptop that has kept me going for the last year. Woot!

The first piece of slightly depressing news was that my Linux system headrat was dead on arrival. I could boot up from an original disk on the second IDE interface, but the primary disk was as dead as the proverbial dodo--we are talking clicking noises from the head actuator, which is rarely a good sign. Fortunately this disk wasn't the one with my home directory on it, so there was no need to restore from backups. Headrat was getting pretty long in the tooth, however: to give you some idea it was a system I put together myself and the first one with a 1GHz Athlon processor in it. While quite blazing seven years ago, the performance today is no longer so impressive, so I decided to see what was available today.

With the help of a local (and very competent) computer dealer I managed to get the following system (now christened hourbot) for just over $600 including sales tax.
  • Athlon 64 dual core 4600+ processor
  • 4 GB DDF-2-667 memory
  • 160 GB SATA 7200 RPM disk drive
  • 18x DVD+/- RW DL optical drive
  • Asus M2NPV-VM motherboard
It was a pleasant surprise to discover that I had saved myself $140 by not requiring the Windows Vista Professional operating system. I would like to think that I have also saved myself a whole passel of trouble down the line thereby--Vista smells to me whereas I know Linux, if not like the back of my hand, then at least a lot better than Vista. I am so pleased with the system I have even thought of installing a decent Linux distribution (I'm using Ubuntu 7.10, better known as Gutsy Gibbon) and putting it on the market.It's a long way from my core skill set, however, so this will probably remain a fantasy. If it ever becomes real I can think of several interesting pieces of software to deliver with it.

There have been a few glitches, like having to load the proprietary Nvidia video drivers before I could get reasonable display performance, but overall the road has been smooth. Ironically I chose the specific motherboard for the superior audio quality it potentially offers, but so far I have been unable to get the sound subsystem working properly. If the lazyweb can help ne solve this outstanding issue I will be a happy man indeed--I had hoped to be able to use this system for putting podcasts together, but this won' at least t be possible until Audacity can see some usable sound hardware. I am prepared to wait a little longer for full 5.1 sound.

I brought the new system home just less than a week ago, and so far haven't had time to do too much with it (though it's nice to have cron job keeping the holdenweb.com front page news up to date on an hourly basis). Yesterday I managed to put a new wireless router up for general use, allowing me to repurpose my venerable Linksys WRT54G (which had been running OpenWRT) by loading Sveasoft's GNU/Linux-based Talisman 1.3.1 release on it. This has allowed me to go to WPA encryption, meaning I can now do client work over a wireless connection with fewer worries and can also get back into the home network securely via SSH.

So far I have only used Cywin's X server over the LAN, but in theory it will soon be possible to use the Internet to get a full Linux desktop from machines inside my firewall .That will be something pleasant, even if asymmetries in cable bandwidth make it run at less than stellar speed.

I managed to get all this done before going out to celebrate a friend's 40th birthday (many happy returns, Dave!), which has left me too tired (though not "emotional") to write much more tonight. But boy, it's good to lose the limitations of Windows and get back to realizing how much simpler it is to solve problems when you are no longer limited by proprietary constraints.
We don't need no stinkin' Vista!

December 6, 2007

Voting Machine Manufacturers Don't Get It

It's reasonably well known that the governor of California instituted a thorough review of voting machines which culminated in a fairly damning report earlier this year. San Francisco is now getting ready to spend $12 million on new machines, and the manufacturers have (apparently successfully) resisted requests to open up their source code. The reason they give is that "it would amount to giving away to competitors their proprietary software code".

So never mind scrutinized correctness, let's keep the buggy stuff to ourselves. These people make me smile as I hit my head against the wall. If democracy is as important as everyone keeps claiming then the most important thing is to count the damned votes correctly. But this is America, so profits have to come first.

December 5, 2007

Sun to Reward Open Source Contributors

Sun Microsystems made the news on Tuesday by announcing in India (which they feel will produce the majority of open source contributors in future) that they intended to start handing out cash rewards to open source programmers. Interestingly, although it's all over Google, it seems impossible to find a reference that does not include the word "dangle", indicating to me that a single source - Chris Kanaracus of IDG - is involved. Nice to get so much attention!

It was also reported, though, that Sun would "be releasing further details on Wednesday". The details have received very little web coverage, however. It turns out that Sun are investing $1 million, and have selected a few specific communities to work with in their Open Source Community Awards program's first year.

It's good to see the commercial world starting to recognize that the efforts of a relatively small number of forward-thinking pioneers have quietly and effectively provided the beginnings of an open infrastructure that we can all work with. I hope that others who have profited by their efforts will follow suit in short order. Industrial Light and Magic, to mention but one worthy candidate.

HOPping All Over the Place

Several regular Python bloggers have already noted the Google Highly Open Project (GHOP), which aims to introduce secondary school students to the open source world. The team managing the Python effort for the project have been pleasantly surprised by the competence of the student contributors, and they are just getting ready to add another batch of projects. If there's a project that you think would improve the Python ecology, take a look at the Python project page and get in touch with the organizers from there.

The project has just received an offer of hardware to help it along. This will broaden the scope of the activities, and the team has already started brainstorming about uses for the new kit.

So, the reason for this post is mostly to point out what an awesome job the guys who are organizing the project have been doing. Titus Brown took the lead and came up with a stupendous list of projects in extremely short order. He has been ably assisted by Andre Roberge, Doug Hellman and Georg Brandl pretty much right from the start, and an increasing number of others have joined in to suggest projects and review student submissions, offering guidance and generally helping things along.

Well done, all of you. The whole Python community owes you thanks for the amazing efforts you continue to make on their behalf on GHOP.

November 30, 2007

Just go, SCO

Well, I said in August that SCO were dying, and shortly after that they filed for Chapter 11 bankruptcy. The company has since been delisted from NASDAQ. I've been looking at the company's web site, and I especially like the list of recent awards and recognition.

This all underlines the intellectual bankruptcy of Darl McBride's approach to open source technologies. I have no idea who holds stock in SCO, but I think it's time they chose a new chief executive. At 19 cents a share its total market capitalization is just over $4 million. How are the mighty fallen.

I just feel sorry for the SCO employees, who have done little to deserve the odium heaped on their employer from all sides.

November 29, 2007

Amazon Web Services

For the first time in a long time I have started to take a serious look at how the content for holdenweb.com is generated. The site is currently pretty much a testbed, and everything is generated from a database (even the occasional pieces of dynamic content, though most pages are simple static HTML). This allows us to ensure that all pages have a uniform style and that all the internal navigation links are consistent.

A couple of the content elements are generated programmatically. We create the Python news items by reading bookmarks I have tagged as python in my del.icio.us account (using methods to be described, I hope, in an upcoming Python Magazine article), and the books by searching for python using amazon.com's web services. Recent attempts to regenerate the content, however, have resulted in broken links to Amazon's site. Being Amazon they don't throw up an error page, they just try to sell you other products, but I don't want to piss our readers off with irrelevant links so I had to fix the code.

The issue causing the error turned out to be a change in the way that Amazon's site names its graphics files. When I first wrote the code all image names began with the product's ASIN (Amazon's product code), but now they get random-seeming names like 21rxsZ884SL.jpg. Since I was grabbing the leading digits and assuming that gave me the ASIN it's little wonder that the links were coming out wrong. During this effort I realized that I was using the API definition from November 10, 2004. Much to Amazon's credit the calls still work, despite the fact that the API seems to have been revised about twenty times since then.

The books have also become less relevant as more and more Monty Python content is issued, along with books about keeping snakes and the like, so I decided to hone up the search a little. It turns out that all I needed to do was add BrowseNode=5 to my request to limit it to computer and Internet books. Lo and behold, my test site is now populated with relevant literature, so after a few content tweaks I can republish the site and hopefully see the Amazon commission start to climb again. (Hope springs eternal). The new content probably won't be published until the weekend as there are a couple of other tweaks I'd like to make.

Since I was revising the code anyway I threw out the old expat-based parser and replaced it with code that used the friendlier ElementTree module, now a part of the Python standard library. This reduced the line count by about 35% and making it simpler, more robust, and easier to understand at the same time. I was quite amused to note that Amazon provide web service libraries for Java, C# and Visual Basic programmers. In Python the standard library already contains everything you need. We don't need no stinking libraries (though I am sure it would be easy to provide the same features that Amazon's libraries do from a Python library module).

Reading the updated specifications for Amazon web services has made me realize that there's a lot more you can do with them now than there was three years ago, so I shall be revisiting this topic before long. If you're doing neat things with Amazon and Python I'd be delighted to hear from you.

November 16, 2007

Your Chance to Talk at PyCon

If you've been thinking about submitting a talk or tutorial proposal for PyCon next year you have a few extra days. David Goodger, the chairman, has just announced a short extension to bring the deadline the other side of this weekend, at midnight (Chicago time) on Monday November 19.

You can see the original calls for talk proposals and tutorial proposals on the PyCon web site, where there are also lots of ideas for talk topics, and also some tutorial topic suggestions from last year's delegates.

Don't be a consumer - talks at all levels are needed to keep PyCon the vibrant meeting it has become. Help the Python community out, and make a name for yourself!

November 13, 2007

Training Plans

The demand for Python training is increasing by leaps and bounds, at least in the USA. This won't be a surprise to anyone who keeps an eye on the Python jobs board, since that makes it obvious that Python usage is growing quite rapidly (and not just in the USA).

As a result, Holden Web is planning a regular series of classes in the Washington DC area beginning February 2008. We have already identified a suitable venue, not far from National Airport and suitable for up to ten students.

If you have a current need for training, want to know what classes are currently available, or would simply like to let us know your requirements, please feel free to contact us. It's a juggling act to get public classes off the ground, and all information will be useful

Miro: A Cool Python Video Player

I have just downloaded Miro 1.0, whose announcement I saw on Will Guaraldi's blog. The Windows installer was trouble free (EDIT: Linux and Mac versions are also available). It's currently scanning my disk looking for videos (and I had no idea there were so many on my hard disk), and I am looking forward to getting rid of Real Player.

No, rats, I have to keep that because the BBC are in cahoots with Real so I have to use their plugin to listen to Radio 4.

November 12, 2007

Sim City, OLPC and Python

Don Hopkins, the original author of Sim City, has updated the Tcl/Tk/X11 version of the game (now no longer commercially available) to the OLPC platform. He plans to clean the code up some and then replace Tcl with Python! He says
The long term goal is to refactor the code so it can be scripted and extended in Python, and break out reusable general purpose components like the tile engine, sprite engine, etc, so kids can use them to build their own games, or create plug-ins and modify the graphics and behavior of SimCity.
This might do more than legions of commercial systems to boost Python's popularity, and I applaud the vision that lies behind it. Overall I have some serious philosophical doubts about the OLPC project, worthy though it seems, but its aggressive adoption of Python has certainly raised the language's visibility.

November 5, 2007

The Calm Before the Storm?

Bruce Schneier's Crypto-Gram is usually an interesting read, and October's was so for a fine description of much of what is known about the Storm worm (quite a lot) and its controllers (next to nothing, except that they are skilled programmers who continue to refine their technology). The scariest part was Schneier's closing remark:
Personally, I'm worried about what Storm's creators are planning for Phase II.

If he's worried I guess we should all be worried.

November 3, 2007

Microsoft Fully Engages Open Source?

Now this is really interesting. Michael Foord reports that a lead Microsoft developer has responded to an issue report by saying
One option might be a non-technical solution: Instead of you redistributing the library (or modified library) we distribute it w/ IronPython - and then you're just including the combined package. There's other reasons why it'd be good for us to do this (help, encodings, warnings, etc...).
Michael's understanding of this is in reference to the complete Python standard library rather than just the Decimal module. If so this is excellent news for all Python users, since it will broaden the common code base between CPython and IronPython and make portability between the two environments easier to achieve. It would be interesting to know whether the developers and maintainers of FePy, the open source IronPython distribution, would view such a move with apprehension or relief. Internationalization support can be a significant effort, and Microsoft have a lot of experience in that area.

My own hope is that this move might eventually broaden the support base for the standard library, which hasn't developed as much as I had hoped in 2.5. There will be some sort of reorganization of the library in (I think) 3.1, but I haven't heard much about that yet.

Michael Foord's blog post is amusingly prioritized from an industry perspective, which is one of the charms of the blog: he was reporting big things for Resolver, which I am sure will become a significant Python application in short order. But it's a little like "Three Hundred Japanese Killed in Earthquake: Ohio Man Breaks Ankle" with a different twist. Good luck in Barcelona, Michael (and in New York and Paris too, guys).

I suspect that we have just seen the magic of the Python license at work: there isn't much doubt in my mind that Python's explicit permission to redistribute for broad purposes without opening up your own code makes it easier for organizations with a large proprietary code base to incorporate the language into their own technologies. I know from reports at PyCon that Jim Hugunin has been surprising audiences inside and outside Microsoft at how easy it is to do things in the .NET environment with Python. Surely full IronPython support in Visual Studio must inevitably follow.

US Government Adopting Open Source by Degrees

An interesting Computerworld article reports on a survey by the Federal Open Source Alliance (Intel, Hewlett-Packard and Red Hat) whose responses indicate that more than half the US government's agencies are making use of open source software, and more are planning to do so. You can see more statistics in the report from NetworkWorld, though nobody says whether the sample was large enough to draw significant conclusions from.

Apparently the main drivers are the ability to customize open source packages and access to advanced security facilities, and 97% of respondents report success or partial success in their open source-based projects. This compares extremely well with projects based on commercial products.

Look for another survey next year, as the alliance plan to repeat the exercise and track open source's increasing penetration of government applications.