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.

October 31, 2007

Python Now Embedded In EventScripts

Simon Willison points out that the 2.0 release of EventScripts can be scripted in Python. It seems like Python is a popular language with gaming companies.

Great Python Reference Site

Bruce Eckel recently reminded us in his Ode to the Python Quick Reference (PQR) that Richard Gruet and his collaborators have done the community a great service by preparing and maintaining these notes. The documents are available under a Creative Commons license.

If you want to know the specifics of a given version of Python then the series goes all the way back to version 1.5.2, making it valuable in archaeological terms too!

What more need be said? Thanks, guys, the PQR is an invaluable resource that truly caters to an international market.

October 24, 2007

Google Set to Become a Proper Mail Provider

Gmail is taking a step forward this week, as Google roll out IMAP access for their mail service that offers 2.5+ GB of on-line storage per customer. It may be a while before it's available to all users.

This makes it possible to use Gmail from a range of different devices and see the synchronized contents of your Gmail mailbox from them all. Well done Google, people have been after this for years.

October 23, 2007

reSTinPeace Beta Release

I only recently found out about reSTinPeace (now I check, I see it is yet another fuzzyman recommendation) and managed to install it very easily using easy_install (which I installed as a part of the process).

Although it's in beta the author claims to be adding features, so I figure he's looking for user feedback. Give it a try and see what you think, offer your feedback if you want. It isn't finished yet but it looks like it's going to be a very useful tool, and I hope that eventually it will make the task of contributing to the Python documentation even easier than it currently is.

October 15, 2007

RESTORE Act - Reject Telco Immunity

We disenfranchised immigrants don't even get to vote for our congressman. If you have a congressman's ear I would encourage you to ask them not to vote for telco immunity provisions should they appear in this bill. The Electronic Frontier Foundation have provided a succinct summary of the issues which I commend to your attention. Basically it would be an attempt to write retroactive immunity for criminal behavior.

October 14, 2007

Python 3.X Switch Poll Result

So, I Saw This Poll Widget on Blogger ...
As Seth Godin reminds us, anyone who treats these figures as any kind of indication of what might exist or happen in reality is treating them as way too significant, so I am publishing them as a graphic to make them less easy to copy and paste in a way that might come to Google's (the search engine's) attention.

As far as the results go, I think it's interesting that about a third of voters are ready to switch (which, remember, does not mean porting existing products, necessarily) and the biggest group has no current plans (which in effect you don't if it isn't going to happen in the next three years). I think this will be reassuring to the developers, because I don't believe 2.x will stop being the recommended release even after 3.0.0's initial release. [David Goodger kindly pointed out I originally negated the proposition of this sentence in error].

It will be helpful for 3.0 to have a relatively populous user base, though. These people can blaze the trail (and another Seth Godin post has something to say about that, too). There will be a lot of crossover between the languages by backporting features into 2.6 et seq, so porting from 2.6 or maybe 2.7 to 3.1 or 3.2 after a year or two's experience with the new features is likely to be a viable option, I believe.

Various cautions were raised on mailing lists and by email about the limited nature of the choices, lack of information about when Python 3.0 goes live and so on, along with some individual votes for options not listed. Thanks for those; once a vote has been cast the poll cannot be edited, though, and I did not want to throw away votes already cast. Most cautions were reasonable and could have improved the poll. Despite its inherently unscientific nature it's does at least show what some people are thinking.

Thanks To All Voters
Seth Godin is right about polls being traffic stunts too (else why would Blogger offer them?), though I suspect many of those voting will have been what regulars this blog has. If the poll brought you to "... Magic" for the first time, welcome. If it didn't, welcome back!

I try to make it a dialog, but often end up talking to myself. A bit like the rest of life, really.

October 11, 2007

And, In Related News ... ?

So I read the output from my daily agent and it includes this gem:
PyWPS releases version 2.0.0
Turns out that even while I was blundering along completely unaware of version 1.something, the PyWPS Development Team have been slaving away to produce version 2.0! Now there's dedication.

Sorry to seem cynical. It is in fact an entirely worthy site, as a look at pywps.wald.intevation.org should convince anybody. As usual my ignorance's limits continue to widen. This strikes me as an amazing opportunity for a bright Python programmer or two to succeed. Geospatial data processing is hot right now.

I am extremely glad to hear that there is an open standard for this stuff. I don't suppose (hope springing, as it does, eternal in the human breast) that Microsoft are on board with the standard. Perhaps they already decided to just buy the committee when the votes come around.

Reading and Writing Zip Files in Python

Nice piece in Builder AU (an Australian web site, but none the worse for that) about how to manipulate a Zip file from inside a Python program. This is useful (for example) to Zip-encode attachments before sending them.

October 10, 2007

Python Magazine Technology

Brian Jones has posted a blog entry detailing how Python magazine is put together. Brian mentions that the Python community has been very accepting of the fact the web site is written in PHP. Just goes to show that the Python community has little interest in religious wars.

Virtualenv is Real

Sorry, couldn't resist the pun. I have been waiting for a couple of weeks for Ian Bicking to get his finger out and finish virtualenv so it works on Windows as well as Unix-like systems. Being Ian, of course, he included Mac framework builds, and he now appears confident the code, while not yet perfect, is ready for general use. Well done, Ian, and thanks.

October 9, 2007

Kudos to SoC Mentors

Over the last two years the PSF* has received $24,500 in Google Summer of Code mentoring fees, representing (I believe) 49 different projects. Thanks to the mentors, who chose not to claim their mentoring fees back. That kind of community spirit is one of the things I really like about Python users.

* Python Software Foundation

October 8, 2007

Will McGugan on PyGame

I see from this blog entry that Will now has some idea of the shape of his (?) forthcoming book on Pygame. Good luck with the book, it's a hard road to hoe.

October 6, 2007

No Print Statement? Python 3 Web Seminar

Young boy trying to be scary© Photographer: Freefly | Agency: Dreamstime.com
Of course, contemplating change is scary. But how scary, exactly, does it need to be? I have been asked to present a web seminar about what we might loosely term Python, the Next Generation, and rather than just touch on what I think are the interesting issues I wanted to find out what real people are interested in. So cardboard replicas may not apply.

Thanks, by the way, to everybody who has bothered to respond to the I Will Switch to Python 3.x ... poll. Six days left to run but I doubt that the answers are likely to change that much. Maybe I'll just run the next one a week,

So, please add a comment to this post (or mail me if you must ...) with your thoughts. What do you want to know about the future of Python? I can't guarantee to answer all questions, but I will try my best.

October 4, 2007

Script the Acorn Image Editor in Python

Flying Meat have released a piece of software I can't use, but it's still interesting. Their Acorn image editor product, recently released for MacOS, is another in the long list of products that can be scripted in Python. The march to world domination continues ...

Jeff Rush Wins "Most Popular Video" on ShowMeDo

Congratulations to the PSF's Advocacy Coordinator, Jeff Rush. Jeff has just been awarded ShowMeDo's second (September) most popular video award for his The 'IPython' Interactive Shell - Part 1 video. Well done, Jeff, and good luck as you move on from the Coordinator position to other challenges. The Forrester report in scripting languages might have been far less favorable to Python had it not been for your efforts!

LinkedIn Annoyance

October 3, 2007

Subversive Activities

I have supported the EFF with everything except money since they opened for business, and they deserve wider support than they receive, since they are fighting to define important constitutional rights (even for us disenfranchised immigrants) in the USA. Time I gave then some money.

I also bought a GNU T-shirt back in 1980-something to support development of Emacs and the the FSF. So sue me.

Refactoring for Journalism

Strange journalistic synchronicity.

Today the Electronic Frontier Foundation (EFF) notified their contacts of a telco lobby to the administration to evade legal liability for possible anti-constitutional crimes. I wanted to blog about it in my Yorkshireman in America blog, and sought editorial scrutiny from the Foundation. Their Danny O'Brien replied:

Looks fine! Perhaps worth adding that Congress still has a chance to show some spine, and that you can call Pelosi or Reid to demand they stand up to the lobbyists.

So I did. Look at me, Ma, I'm a journalist :-)

All this success on the same day I learn that the first issue of the new Python Magazine is going to be electronic and free (as in beer, at least - the editor will have to speak to the rest). Look for the news on holdenweb.com - if I can get that blasted del.icio.us summary program working again ... but anyway I have some sort of an end-piece in it (which I wrote so long ago I am unsure of its subject, let alone its gist).

September 27, 2007

Blogger is Buggered?

Well, three posts in a row about Blogger is a little unusual, but I think this is merited.

From time to time I amuse myself by following the "Next Blog" links to get an idea of what was going on in the blog stream. If today's experience is typical then about one blog in three is complete spam, obscured by a pop-up ad window and full of links to pornographic sites. It seems clear that nobody is exercising any kind of critical control over Blogger content, and frankly it's got to the point where I am no longer sure I want to be associated with it.

I've been a web use for a long time, and it saddens me to see a potentially fantastic medium ruined by the swarms of lowest-common-denominator advertiser scum. If this is "what the people want" then they are welcome to it. I really don't think Blogger are doing themselves any favors by letting this situation continue.

September 18, 2007

Blogger Hoses Notification Emails

Just to underline my feeling that Blogger is the poor relation at Google, the confirmation emails that come through to let me know that people have made comments have recently been mangled badly.

Formerly I would get a properly-formatted text email saying something like

ScW has left a new comment on your post "Innovate and Get Sued by Apple?":
...


Now instead I see stuff like:
New comment on  Blogger
Behind the Curve?.
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_28_25742053.1190124918523"

------=_Part_28_25742053.1190124918523
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Doug Napoleone has left a new comment on your post "Blogger Behind the Curve?":
I don't know what's happened, but I am pretty sure I haven't made any change to my email system that might be responsible. Of course, we never have, have we? I suppose it's possible I might be responsible, but I'd much rather blame Blogger. If nobody else is seeing this, however, then perhaps it is me. Am I alone, or have Blogger screwed up by inadequate testing?

Blogger Behind the Curve?

I am sure I wasn't the only one who greeted Blogger's acquisition by Google with enthusiasm. At last, I thought, I will be free of the editor applet, which has become rather tedious to use.

Alas not, though. While much has changed, and the AJAX-based layout editor is a great improvement, we are still left with a content editor that creates horrible HTML and whose toggle buttons easily lose synchronization with the editor's state.

A recent post by Paddy also highlights the fact that there is inadequate support for posting code. I realise this probably isn't a majority interest, but in this day and age you would think the the world's leading web company could do better.

September 15, 2007

ReStructured Text to Anything

I stopped using the "How'd I Get Here" Firefox add-on when I had to reload Windows last time, so I don't remember where I saw this, but there's an interesting new service that lets you convert your ReST documents to HTML or PDF with a choice of styles. Worth a look.

The authors give credit to many open source products including Docutils, Python, Django, MochiKit, LaTeX, ImageMagick, MySQL and Ubuntu.

It's good to see great services coming out of the Python community, and this is a nicely put together example of what you can do with open source.

Stock Quotes in Python

Corey Goldberg has been publishing some interesting blog posts lately. Today I spotted one that uses Google Finance to get a current price on a stock given its four-character ticker symbol. Good work, Corey, keep it up!

September 12, 2007

Innovate and Get Sued by Apple?

Yet more evidence came to light this week in my EFF newsletter about Apple's lack of will to compete. In fact, make that Apple's determination to stymie competition in any shape or form. They have never been an open systems company, and it appears now that they don't see any advantage in helping others to expand the market for iPhones. No sirree, that's Apple's territory, and Apple's alone. If you believe Apple, that is. But if Henry Ford had taken the same attitude to free market innovation that Steve Jobs does we would probably still be riding round on horses.

There was a major battle around the ability to have your iPhone load ringtones that you didn't pay Apple 99 cents for. The ModifyMyiPhone site detailed how to download "unauthorized" ringtones using two different pieces of software, iFuntastic and iRingtoner. Just before Apple's recent announcement of additional products including the iPod Touch a company called Ambrosia announced a product called iToner that also allowed the download of ringtones.

Apple's response? Version 7.4 of iTunes automatically deleted any non-approved (i.e. not purchased from Apple) ring tones. Ambrosia figured a workaround for this update, which iTunes version 7.4.1 again defeated, and so on.

Another battle is over video output. Presumably because they can, Apple has locked the video output on recent versions of the iPod classic and iPod nano. Vendors who want to provide compatible accessories are required to buy licensed chips from Apple and pay a fee of 10% of their wholesale price. Apple are charging $49 for a kit containing a video cable that has the activation chip along wiht a power supply. That sounds suspiciously like gouging to me.

The next laptop suddenly looks less and less like an Apple. How can we be for open source and yet condone this kind of behavior in the marketplace?

August 31, 2007

Yet Another Longhorn Delay

Why don't Microsoft just stop announcing product plans? Their releases inevitably turn out to be later than anticipated, and the resulting back-pedaling just makes them look like bad planners.

As you might have read, the Microsoft Server Division Blog has detailed another delay - it now looks like Windows Server 2008 will actually be released in 2008 (assuming they manage to avoid another 9 months of slippage).

It's interesting that the explanation for the delay tries to mask the fact that Microsoft are apparently not yet satisfied with product quality. If the quality of some earlier products is anything to go by then it doesn't bode well for Server 2008. Still, nobody said running the largest software company in the world would be easy.

Python 3.0 First Alpha Build Available

Guido has just announced the availability of a public alpha of Python 3.0.

Please remember there are several things this does not mean:

  • Python 2.x is not obsolete. The series will continue through 2.6 (which will include backports of many Python 3 features) and probably 2.7. In fact the only guarantee is that there will be no releases after 2.9.x, as Guido has stated his dislike of the ambiguities inherent in a 2.10 release number.
  • Python 3 is not ready for production work. The alpha series is expected to last a considerable length of time, and even when Python 3 comes into production (in around a year from now if Guido's original schedule is maintained) 2.6 will be the major platform.
  • There should be no need to develop parallel source trees for your Python code. The 2.6 translator will have a "Python 3 warnings" mode, and if you ensure that this doesn't produce warnings you will be able to convert your code to Python 3 automatically using a conversion tool.
For a summary of other things you might like to know about Python 3 see Guido's blog.

August 22, 2007

Half-open Interval

Score two if you also noticed that there was no footnote for the asterisk in the preceding post.

August 21, 2007

Google's Spam Priorities?

So, this bunch of annoying little [expletive deleted]s have recently started spamming one of the newsgroups I haunt with messages about things like "Best Car Air Conditioners". For email my spam filters take care of a lot of this crap, but on newsgroups I pretty much have to take what my NNTP server delivers [and there's a market opportunity right there: millions of Thunderbird users are currently casting around for the next non-Microsoft solution to their problems, and if someone chooses to build a newsreader that integrates Spambayes or some similarly competent technology they could probably make a modest income). Score one if you noticed that I just wrote a half-open interval.*

Being a civic-minded netizen I decide that my only recourse is to make sure that at least these nasty little buggers will have to register new Gmail accounts (not that they will worry about that, as they probably register thirty-five new accounts a day, but anyway ...), so I decide to report them to the appropriate abuse address (even though I realize as I do so that I will either be ignored, or I will be one of several thousand irritated readers who are just as pissed as me).

So. CTRL/U gets me the message headers, and lo! I see
        Complaints-To: groups-abuse@google.com
Hooray! There's a large, responsible, "do no evil" company who is prepared to stand up and stop these little [expletive deleted]s in their tracks. Great. So I send a message (being careful to include all the headers) to the appropriate address and return to work basking in the warm comfortable glow of having done my duty and helped, as best I can, to put an end to the abhorrence of spam (really, sometimes I look at the human race and what I see depresses me: there really are people out there to whom money is so important that they will fund the exploitation of thousands, nay millions, of vulnerable always-on under-protected basement-dwelling computer systems to send out millions of messages a day about how someone is just waiting to transfer several million dollars into their bank account in return for a modest fee for their assistance. Give me a [expletive deleted] [expletive deleted] break).

Having taken the time to compose and send a message to the above-mentioned address, pointing out how the offenders are spamming a programming language group with inappropriate messages, I go about my business feeling virtuous. Only to see, when I next return to the computer, the following email:
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of
its recipients. The following addresses failed:



SMTP error from remote server after RCPT command:
host gmail-smtp-in.l.google.com[64.233.167.114]:
550 5.1.1 No such user v66si6536119pyh

--- The header of the original message is following. ---

Received: from [12.47.149.104] (helo=[12.47.149.104])
by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis),
id 0MKpCa-1INdGx0Vee-0007V8; Tue, 21 Aug 2007 19:36:44 -0400
Message-ID: <46cb7706.4050206@holdenweb.com>

[... etc., etc., ...]
It can't be easy running a large company. If it was easy then I guess I could do it too. So much for help with abuse. I guess we have to turn to the federal government for assistance now. Oh, sorry, that's no good. The federal government stopped taking an interest in the spam problem when it was pointed out that over 50% of the world's spam originated in the USA (though this is now an out-of-date statistic).

I guess it's up to us vigilantes, then. Whar's mah gun?

August 17, 2007

Close Enough?

I have long admired the formula often known as Euler's identity. It was probably known before Euler's time, but it is associated inextricably with his name because it is a special case of a more general formula, with π as the value of the bound variable. The identity asserts that


To me this is a thing of beauty and a joy forever, but I have long since given up trying to explain to other people why or how I perceive beauty in mathematics. Anyway I thought I would see how close my trusty laptop could get to emulating this mystic identity (it's amazing what I get up to when procrastinating), and naturally chose Python (though I believe the results would be just as disappointing in any other language). Here's what I got:

>>> math.e**(math.pi*-1j)
(-1-1.2246467991473532e-16j)


Definitely not quite the same mystical properties there, even though numerically quite close. No wonder I never liked applied mathematics!

August 13, 2007

SCO's Fate Is Sealed

A preliminary ruling in SCO's battle against users of the Linux operating system has decreed that the rights SCO was licensing actually belonged to Novell. There is along way still to go before all issues are resolved, but it's my belief that this judgment sounds SCO's death-knell. It is now a company with no prospects and precious few products, and a completely discredited CEO.

If SCO survives long enough to see all legal questions resolved I will be surprised. Novell can now choose to force SCO to waive its claims against IBM and Sequent, and the war chest that SCO had hoped to use to fund legal actions is likely to be needed to pay Novell fees that SCO have received for licenses it had no legal power to levy.

I wonder what Darl McBride's next job will be?

August 3, 2007

Electronic Voting? Just Say "No"

Because Ka-Ping Yee was involved, and because I have a professional interest in information security, I have been keeping my eye on the California Secretary of State's investigation into electronic voting machines. I'm afraid the initial results are not at all promising for the future of American democracy. Here's the most telling quote from the source code review of the Sequoia system:
Of particular concern is that virtually every software mechanism related to counting votes is exposed, directly or indirectly, to compromise through tampering with equipment that is deployed in the field. In many cases, tampering sufficient to cause compromise requires only brief physical access and may leave behind little or no evidence.
This is hardly a surprise to those who have studied computer intrusion techniques, but clearly wasn't taken into account by the system's designers. The list of vulnerabilities makes me wonder whether the people who designed the system actually had any security training at all. Yet I just know, before I look for it, that the inevitable response of the vendors involved will be to try to minimize the impact of the security issues, just like Microsoft used to (they know better now).

As far as the voting public is concerned all of this might just as well not have happened, since they are neither educated nor encouraged to value their participation in democracy. As a result I fully expect that electronic voting systems of dubious security and with no paper audit trail will be even more widely deployed in the next election, with the result that victory will go to the least scrupulous, and no challeneg will be mounted by an apathetic populace.

The depressing thing is that the majority of voters (hey, aren't they supposed to decide who gets elected?) would rather leave the dirty business of politics to someone else. It's easier to keep their heads buried in the sand than engage with the endemic corruption of the democratic process. Perhaps you really do get the government you deserve.

Because I live in the USA I can't really claim to be disinterested, but for the record I am at present merely a disenfranchised immigrant. So I am asking all the citizens I know to take an interest in these issues and force the politicos and bureaucrats to implement a more rigorous and respectful approach to secure voting. There would be a real value to open source voting machines.

August 1, 2007

A Great Resource Ruined

I recently visited the SourceForge web site, as I am taking another look at the mingw toolchain. What a disaster the site has become. It seems like it is now organized with the principal intention of maximizing the number of page views, and hence the revenue that can be gained from advertising. All thoughts of user convenience appear to have been banished.

Back when SourceForge was the major repository for open source work it was easy to find a project and download it. The interface wasn't particularly glitzy but it was usable, and you could get where you needed to be with relatively few clicks. Now even a relatively simple download forces you through a chain of links.

I take Inkscape as an example, because I was interested in obtaining an up-to-date copy. The project home page has a friendly-looking link on it that says "Download Inkscape." The first glitch is that although there's a green graphic to make the link look like a button, the graphic isn't part of the link so you have to click on the text! Clicking doesn't download anything, however, it merely takes you to the download page. This page contains a list of files, each of which has a friendly green button (that again isn't really a button) labeled "Download".

You've guessed it - clicking on the text link doesn't download anything, it takes you to yet another download page. Then, finally, you get to download your file by clicking on its name. I don't think the people who designed this site read Jakob Nielsen's work much.

What's even worse is what they have done to the mailing lists. I was having trouble with Msys apparently not actioning the /etc/fstab file so I searched for msys ignores fstab using Google. The first hit was on SourceForge, but the page I obtained by following the link was not only completely useless, it also bore absolutely no relationship to the cached copy page that Google provided, and appeared to be badly broken. There's probably a reason for it, but I was no longer prepared to give the site the benefit of any doubt.

I am so glad that the Python development team took the decision a long time ago to migrate away from SourceForge's repository (they wanted to use Subversion, and SourceForge were taking way too long to offer it as an option). I hope that the final migration of the issue tracker will soon mean that Python development is no longer dependent on what appears to have become a sadly broken system, though I understand there may be issues with content migration.

I suspect that SourceForge's justification for the changes was that they needed to generate revenues to pay for the continued operation of the site. Just the same I will be very surprised if they haven't completely lost their dominant position in five years. Given the right resources it would be so easy to do a better job. Someone is going to see this as a business opportunity and eat SourceForge's lunch before too long. This is a great pity considering the service that the site provided to so many open source projects through the end of the twentieth century.

July 22, 2007

Python Further Embedded in the Animation Industry

Python's inexorable march towards world domination* continues with the recent announcement that visual effects provider The Foundry plans to incorporate a Python programming interface into the next version of its Furnace product. The UK broadcast industry news article that brought this to my attention also (correctly) says Python is
an extensible programming language, which is becoming widely supported by other application vendors and forming the backbone of many studios pipelines
It seems that Python's origins in "computer programming for everybody" has allowed it to become a default choice for embedded scripting capabilities in many areas. It is fast becoming the standard in the film industry. It would be nice, now the secret is out, to see that industry contributing a bit more to the development of the language and its community.

* Just in case you wondered, there are no such plans!

July 18, 2007

Obscurantism

I may have mentioned before that I have started to use the C# language. Overall it isn't bad - it uses static typing, which I have always found irksome, but the language is reasinably expressive and compact compared with something like Java or C++. Because it is heavily promoted by Microsoft there are any number of tutorial and example web sites, not all of them by programming experts.

Somehow the Java message that it's bad to allow direct access to instance and class attributes appears to have permeated the C# world, I have no idea why. I have just been reading one of the better-written tutorials, which offers the following code as an example if instance creation and manipulation.
static void Main(string[] args)
{
Person Michael = new Person();
Person Mary = new Person();
// Specify some values for the instance variables
Michael.Age = 20;
Michael.HairColor = "Brown";
Mary.Age = 25;
Mary.HairColor = "Black";
// print the console's screen some of the variable's values
Console.WriteLine("Michael's age = {0}, and Mary's age = {1}",
Michael.Age, Mary.Age);
Console.ReadLine();
}
As code goes that isn't bad, and apart from the different comment styles and the declarations it could almost be Python. Unfortnately the author has tasted the Java Kool-Aid, and shortly after this example writes
So each object now contains different data. Note that we directly accessed the variables and we put any values we wanted, right? But wait there is a solution to this problem. We will use properties.

There is no attempt to explain what the "problem" is, and you will probably not be surprised to learn that the "solution" involves making the attributes private to the class and then providing public getter and setter methods for instance users. This turns a five-line class declaration into a 32-line one (though to be fair to the author, he does at least include checking code that demonstrates the value of properties in applying class-based logic during assignment).

I have now read any number of texts where instead of something like
class Person
{
public int Age;
public string HairColor;
}
that allows direct access to the instance variables by client code, readers are encouraged to write horrendous code like
class Person
{
private int age;
private string hairColor;
public int Age
{
get
{
return age;
}
set
{
age = value;
}
}
public string HairColor
{
get
{
return hairColor;
}
set
{
hairColor = value;
}
}
}
which actually offers no benefit over the short version at all. Python users are used to accessing attributes directly in their code, which clearly has performance benefits, and then implementing properties if and when they are required to add logic to the setting or retrieval of attribute values. I just wish that C# users could see that empty getters and setters offer no measurable benefit over direct access to attributes.

July 17, 2007

Misunderstandings

Here's a quote from an article about agile programming which is otherwise quite well-informed:
But because of their simplicity, languages such as Python and Ruby are better-suited to writing small applications.
This is the kind of myth that really needs to be squashed at the source. Unfortunately the source in this case is a journalist who has written an article and moved on with her misunderstanding of the issues and the facts completely untouched.

It's difficult to know how to attack this problem, because even the Python Software Foundation's advocacy coordinator were to contact the journalist in question and correct the mis-impression the damage is already done, and another opportunity to gain the wrong idea about dynamic languages is out there to be used as "evidence" by those looking to press the advantage of some other technique. It must have annoyed David Goodger (one of the Foundation's directors) to be quoted shortly after that misstatement.

In this particular case the author of the article did manage to get a lot right - technologies should come second to business needs, agile methods can save money by delivering business value faster and avoiding large amount of rework, and so on. So the content wasn't all bad, but the misunderstanding of Python's suitability for large projects spoiled it for me.

But then, I (and, I presume, most of thios blog's readers) already know that Python can be used successfully to build very large systems indeed.

July 4, 2007

Developers Migrating Away from Windows

In a research report from Evans Data Corporation we learn that last year's decline in the targeting of Windows as a primary development platform has been repeated. John Andrews of Evans says "it's clear that a shift away Windows began about two years ago, and the data show that this migration is now accelerating. Linux has benefited, but we also see corresponding growth in niche operating systems for non-traditional client devices. The landscape is changing."

If I were a Microsoft shareholder I might be happier if I could see Microsoft engaging more aggressively with the open source community. It's difficult to steer something with the inertia of a large organization like Microsoft, though, so perhaps they are changing course as fast as is practical. Ultimately even Microsoft will have to realize that they can't do everything by themselves, and specifically that they can't dictate standards (e.g. WSDL) to the rest of the world.

Python Magazine Coming Soon

As Brian Jones has just announced, there will be a new Python magazine (imaginatively entitled Python Magazine) out before the end of the year.

It's encouraging that the publishing world is taking Python seriously enough to produce magazines . There's already the online PyZine and the more academically-inclined Python Papers, and I may have missed some.

This will tend to encourage further interest in Python, which I feel is kind of on the brink of mainstream significance. After a mere 17 or 18 years in development Python is about mature enough to become widely adopted - it took UNIX about the same length of time to appear as a commercial operating system.

If you have any ideas about what you'd like to see in Python Magazine, or if you're interested in writing for it, they would be happy to hear from you! I have agreed to provide a regular column, and so I have to get back to putting four months' material together.

June 28, 2007

Wing IDE Editor Video [Test]

So, today's exercise is to embed a ShowMeDo video into my blog. I'm thinking of extending the wxPython series - do readers think there could be a demand for such videos?
I use Wing IDE quite a lot, so I chose that one, but ShowMeDo now have over 100 Python-related videos.

Get the Flash Player to see this movie.




This video originally comes from here
at ShowMeDo
from the Python category.

June 24, 2007

Time to Book Some Vacation

I noticed today that my schedule shows only one open week between now and September 21. Better make sure I book some time to move house ...

June 23, 2007

Is Guido Drunk Yet?

So Guido is encouraging people to get him drunk today. I hope someone gets a video!

The Python Community

This page is clearly seditious, as it claims that there are activities that are "more fun" than programming in Python*.

It does start to give you some idea of the breadth of the Python community. Strange as it may seem, after 40 years working with information technology I like the Python community as a place I don't necessarily have to do technical stuff. So I have tended to organize conferences rather than present at them.

With PyCon and EuroPython, and now individual conferences all over Europe and South America starting up under the PyCon [the page is a bit out of date] banner, Python has a truly international community.

Through its various electronic media, both interactive (newsgroups/mailing lists, Wiki, IRC) and with groupings based on geography and technical interests, everyone gets a chance to contribute no matter where in the world they are. The jobs list is also worldwide.

The Python Software Foundation's Advocacy Coordinator (Jeff Rush) certainly has his hands full!

* ObGeek: Outrageous suggestion.

June 21, 2007

Guido Uses My Birthday to Talk About Python's Future

Not really, of course. He didn't even know it was my birthday. From Dr. Dobb's:

"""June 20, 2007
Guido van Rossum Posts Python Status Update
Guido van Rossum has posted a status update on progress toward the 3.0 version of Python.

Python creator Guido van Rossum has posted a summary of progress in the "Python 3000 project," which is the code name for Python 3.0. The release schedule has slipped by two months, with a proposed first alpha now slated for the end of August. The final release is scheduled for one year from then.

In his update, he lays out an eight-step plan for developers who need to transition their code from Python 2.6 to Python 3.0. Changes between the two versions will break backward compatibility, so transition is not trivial. A tool to convert Python 2.6 syntax to Python 3.0 syntax exists.

Van Rossum then provides a laundry list of language changes, including a new I/O library, new print() and format() functions, and many changes to the class and type system, including class decorators and a new metaclass syntax.

The full posting can be found here."""


Good for Guido. I think that a number of interested parties managed to convince hin of the sincerity of their migration concerns at PyCon earlier this year, and it looks as though Guido has taken these concerns on board.

June 10, 2007

Where Were You When You Discovered Google Maps Street View?


I was actually teaching a class at One New York Plaza, a building that can be seen in the street view of New York. So I was able to show my students this page on Learning Tree's MagnaLearn display system. The students seemed to think the new service will be popular.

June 9, 2007

Excellent Free Beer Quote

Though many people would gladly accept a free beer, it is not one of the fundamental principles of democracy.

May 26, 2007

Natural Language Toolkit

I have just seen an announcement for the latest version of the Natural Language Toolkit. This is an excellent example of a useful open source software project and, as the announcement says:
It comes with 50k lines of code, 300Mb of datasets, and a 360 page book which teaches both Python and Natural Language Processing. NLTK has been adopted in at least 40 university courses. NLTK is hosted on sourceforge, and is ranked in the top 200 projects.
With this kind of software available for download, there will be many more unsuspecting Python users. The really nice thing, of course, is that the users aren't interested in using a particular language, they are interested in solving problems in a specific domain. The fact that Python lets them do this is a testament to its usefulness.

May 24, 2007

Goodbye Site Meter

Just goes to show, you can't be too careful. A while ago, wanting to know a little more about the traffic this blog sees, I added a widget from Site Meter to the layout.

Today I discovered that Site Meter have done a deal with a third party company, and that the code they send out includes references to specificclick.net pages, allowing tracking via cookies. So I have removed the widget and am looking for a new site metering technology.

It's not a huge security problem, but it means that you can be tracked across multiple sites that each use SiteMeter's logging widgets. This is allowed by their terms and conditions:
Site Meter may from time to time also authorize and facilitate the use of cookies from trusted third party business partners to gather and aggregate additional, anonymous, and non-Personal Information data from general internet visitors for the purpose of providing our customers with additional information about their viewing audience.
It's true that as long as SiteMeter don't release users' personal information there's nothing that specificclick.net can do over and above correlation of visits by anonymous users across multiple sites. But if one of those sites collects personal data and chooses to release it, that privacy is over. I decided I'd rather not subject my readers to that risk. If you have any such cookies in your browser I'd recommend you delete them. If you don't know how to do that you can find instructions at this About Cookies page.

May 19, 2007

Does python.org Need a Better Navigation Bar?


Someone recently posted on c.l.py that the python.org site didn't make it obvious where to post a bug. So I snapped the navigation bar from the home page (though of course the navigation bar isn't necessarily where the feature should be added). How do readers think it could be improved?

[Note added later: clipmark feature was unsuccessful at capture, so I have replaced it with a PNG capture to better show the site]

May 17, 2007

Microsoft Strategy is Patently Ridiculous

A recent Fortune article, Microsoft claims software like Linux violates its patents, suggests that the Ballmer empire is about to start seeking royalties from users of open source software whihc, the company claims, violates 235 of their patents.

I don't think they have thought this through. The US Supreme Court has so far issued no ruling on whether software is even patentable, despite the Patent Office's ridiculous willingness to issue patents on techniques that fail even the simplest test of obviousness. When the most powerful software company in the world starts throwing its weight around to gain revenue from those patents it will force the issue somewhat.

The inevitable result will be a Supreme Court ruling that inevitably weakens, or even removes altogether, the protection that patents have been assumed to provide by those who have invested heavily in them. Microsoft senior VP Brad Smith claims, for example, that the Linux kernel violates 42 Microsoft patents.ourse the joke is that nobody has any idea how many patents Microsoft products violate because, unlike the open source projects Microsoft complains about, the code that comprises them isn't available for public scrutiny.

Python Slithers into Systems

Nice to see ITA, a PyCon sponsor, getting publicity for themselves and Python in eWeek: Python Slithers into Systems. ITA aren't exclusively programming in Python, I happen to know they use Lisp and at least one compiled language as well. This demonstrates yet again that Python is a pragmatist's language, and it's definitely rising in visibility.

Another Great Python Blog Entry

I've been following Doug Hellman's Python Module of the Week series, but I already know most of the modules he'd covered until along came PyMOTW: logging which describes a module I have always found difficult to understand in terms that make it comprehensible. Nice job!

Wyatt Baldwin Blog - Google Maps

Wyatt Baldwin has recently made a couple of interesting blog entries (I'm just catching up after an extended Windows repair session [spit, spit]. In Google Maps Encoded Polylines he uses Python to draw shapes on Google Maps, and in Creating a (Google Maps) Tosca Widget he explains in considerable detail just how to do that. Both great posts demonstrating Python's power, and much kudos to Wyatt for this excellent work.

May 16, 2007

Debian -- python-samba

I wonder what's happening with python-samba. I came across the Debian package while looking at a Samba bug notice, but so far I haven't heard about usage. The package description does say
At the moment their status is "experimental" but they have been reported to work well.

May 15, 2007

Rethinking the Linux Distribution

Just one or two quotes from this interesting ONLamp.com piece.

Many well-known Linux distributions already use Python in their key tools. Red Hat's Anaconda installer, and Gentoo's Portage package manager are two examples. Ubuntu (the top distribution for the last 12 months, according to DistroWatch) "... prefers the community to contribute work in Python."

and

"Among the high level languages, Python seemed to be the best choice, since we already use it in many places like package build scripts, package manager, control panel modules, and installer program YALI. Python has small and has clean source codes. Standard library is full of useful modules. Learning curve is easy, most of the developers in our team picked up the language in a few days without prior experience."

So why aren't you using Python? (Don't tell me, you are ...)

May 3, 2007

Writerly Advice

Kurt Vonnegut died recently, but one of his legacies is this advice for writers. We could all read it and benefit from it, but I hope it will be of particular use to anyone responding to my PSF blog entry encouraging people to write Python articles for Sys Admin magazine.

May 2, 2007

Open Source "Increasingly Used for Critical Applications"

The market research company Forrester has just issued a report saying (among many other things) that more than 75% of respondents "agreed that open source software was making an important or very important contribution to improving efficiency and concolidating IT infrastructure". Other highlights include the fact that concerns about intellectual property are fading (presumably as SCO's cases are seen more and more clearly to be the FUD of a desperate last-ditch bid for survival).

The closing advice for would-be adopters comes in two major chunks:

1. Lower Internal barriers to Open Source Adoption - clearly it's time for policies to be refined to give open source a level playing field against proprietary products; some organizations still have blanket bans on the evaluation, let alone use, of open source.

2. Identify Services Before You Commit - many corporate users appear to be concerned that appropriate support services don't exist for open source products. While this isn't universally true, the open source communities equally need to acknowledge that corporate users might not feel completely comfortable relying solely on volunteer newsgroups for support.

It would be good to start building international federations that can collectively offer 24/7 support for open source projects, with specified service levels. That's going to be a challenge for the open sourcerers, but if they can solve it then they might even manage to get on the gravy train before it leaves the station. While this may not be everyone's dream it would be nice to channel funds in directions that allow (or even encourage) the development more and better open source software.

DRM Saga Continues: No Surprises

Well, the content protection debacle grinds on. The users continue to be unimpressed with digital rights management, and the hackers and crackers continue to break the harebrained industry schemes with monotonous regularity. Digg temporarily tried to censor material as a result of a blanket cease-and-desist threat, got it in the neck from their users, and apparently learned their lesson.

Favorite quotes from the latest discussion:
As Joe Rogan's character on Newsradio once quite accurately quipped, "Dude, you can't take something off the Internet.. that's like trying to take pee out of a swimming pool." The content providers have attempted to do exactly that, remove pee from the proverbial swimming pool that is the Internet and, as we've witnessed so many times before, they've failed miserably. [1]
and
There isn't a single known DRM system worth cracking that hasn't been cracked, multiple times; AACS will likely be no different. [2]
When will the recording and film industries learn that the "lost income" from content pillaging by dishonest consumers isn't "lost" at all? It's what the retail trade calls "wastage" (some things arrive spoiled, some get spoiled, some are stolen). Their revenues are what their revenues are, and the overall level of dishonesty is what it is. The prospect of additional billions is illusory, because people who don't pay for content will simply stop consuming it if they can't get it for nothing.

So the joke is that if the industry ever achieved their total-protection nirvana they will have shot themselves in the foot, because even bootleg copies are positive marketing. Sometimes greed is so sad. Were I a stockholder in RIAA member companies I would be furious at the waste of effort. I wonder if the senior staff of studios actually pay for the DVDs they take home. If not, aren't they too stealing from their stockholders?

April 29, 2007

I am Smalltalk

Well, apparently I am Smalltalk. According to this highly reputable quiz I found on the Internet :-)

You are Smalltalk. You like to treat everyone the same way, but this lack of individuality makes everyone feel like objects.
Which Programming Language are You?


Given that I was responsible for an early UK port of Smalltalk-80 (the heavy lifting being done by Mario Wolczko) I don't particularly mind this verdict, but I don't do Smalltalk any more. It's wrong about the objectification, though.

April 26, 2007

Other People's Time

Would you rather work with a contractor who gives you a due date and sticks to it or one you could never be entirely certain of? If the project slips, how good will communications be?

Seth Godin here relates why it's important to keep public events to a schedule. Conferences aren't about the muckety-mucks, they're about the hard-working stiffs who've forked over their cash. Well, the conferences I organize are, anyway.

If a meeting's not about the participants, why are they there?

April 23, 2007

Python Acknowledged at IEEE

The May/June edition of the prestigious Computing in Science and Engineering (CiSE) magazine is a single-subject issue on the topic of Python. This is surely a recognition of the language's value to scientists, and a vindication of the work put in by scientists all over the world to apply Python to scientific tasks.

CiSE is a joint publication of the IEEE Computer Society and the American Institute of Physics. Unfortunately not all articles are available electronically to non-members.

Bet Your Business on Python

It is encouraging to see that increasingly businesses are depending on Python to give them a strategic advantage in their marketplaces. The most recent comment of note comes from yet another PyCon sponsor, ITA Software, who use Twisted quite heavily in airline scheduling applications. They are a new phenomenon to the airline business: a company that provides responsive service without the use of mainframe heavy-iron. You can read the whole eWeek article to get more context about ITA's use of Python, but the quote I liked best was from Dan Kelley, ITA's director of application integration:
"So we think, absolutely, that it's ready for prime time. What we're doing is saying to a billion-dollar business, 'Yes, we can write components in this particular programming language, and they will keep your airline running.'"
Note that ITA don't use Python exclusively, and they see one of the advantages of distributed systems as being able to choose appropriate languages for each component.. I don't believe anyone thinks Python is perfect - it's a waste of time to seek perfection in a programming language because the concept is so subjective. Just the same it's nice to see real businesses coming out with this kind of informed opinion about Python in fairly mainstream publications. Quite apart from the general advocacy benefits it is useful, among other things, as ammunition against the dynamic language bigots should any such ammunition be needed.