December 30, 2007
Starting to Understand Django
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
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 21, 2007
December 19, 2007
Cheese Shop Doing Good Business
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
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
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
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
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
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
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
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
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
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
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
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
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?
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?
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
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
Great Python Reference Site
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
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
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
October 14, 2007
Python 3.X Switch Poll Result
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 ... ?
PyWPS releases version 2.0.0Turns 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
October 10, 2007
Python Magazine Technology
Virtualenv is Real
October 9, 2007
Kudos to SoC Mentors
* Python Software Foundation
October 8, 2007
Will McGugan on PyGame
October 6, 2007
No Print Statement? Python 3 Web Seminar
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
Jeff Rush Wins "Most Popular Video" on ShowMeDo
October 3, 2007
Subversive Activities
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
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?
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
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 BloggerI 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?
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?":
Blogger Behind the Curve?
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
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
September 12, 2007
Innovate and Get Sued by Apple?
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
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
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.
August 22, 2007
Half-open Interval
August 21, 2007
Google's Spam Priorities?
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.comHooray! 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.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).
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., ...]
I guess it's up to us vigilantes, then. Whar's mah gun?
August 17, 2007
Close Enough?
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
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"
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
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
an extensible programming language, which is becoming widely supported by other application vendors and forming the backbone of many studios pipelinesIt 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
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)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
{
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();
}
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 Personthat allows direct access to the instance variables by client code, readers are encouraged to write horrendous code like
{
public int Age;
public string HairColor;
}
class Personwhich 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.
{
private int age;
private string hairColor;
public int Age
{
get
{
return age;
}
set
{
age = value;
}
}
public string HairColor
{
get
{
return hairColor;
}
set
{
hairColor = value;
}
}
}
July 17, 2007
Misunderstandings
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
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
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]
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
June 23, 2007
Is Guido Drunk Yet?
The Python Community
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
"""June 20, 2007
Guido van Rossum Posts Python Status Update
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.Jay Pfaffman - It's Time to Consider Open Source Software (I)
May 26, 2007
Natural Language Toolkit
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
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
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
Another Great Python Blog Entry
Wyatt Baldwin Blog - Google Maps
May 16, 2007
Debian -- python-samba
At the moment their status is "experimental" but they have been reported to work well.
May 15, 2007
Rethinking the Linux Distribution
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
May 2, 2007
Open Source "Increasingly Used for Critical Applications"
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
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
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
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
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
"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.