Python Programming, news on the Voidspace Python Projects and all things techie.
The Testing Panel at EuroPython
EuroPython 2010 is getting closer (July 19th - 22nd) with such esteemed speakers as Guido van Rossum, Raymond Hettinger, Brett Cannon and Bruce Lawson. Google are also making available grants for women to help girl geeks attend EuroPython.
One of the talks will be a testing panel, headed by the inestimable Ali Afshar, where you get to test the knowledge and wisdom of several Python testing 'experts' including:
- Raymond Hettinger
- Holger Krekel
- Uhm... me
- Geoff Bache
- Mark Ramm (to be confirmed)
- Jason Huggins (to be confirmed)
Ali has setup a google moderator instance for the panel, so you can prepare your fiendish questions in advance and vote on the questions that other people have asked:
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2010-05-11 00:51:31 | |
Categories: Python, Life Tags: testing, europython, conferences
An Awesome PyCon
As always PyCon was awesome, I had a great time catching up with old friends and making some new friends. The conference wasn't bad either...
This year was particularly awesome. After a recession fuelled downturn last year, this year numbers were back up to a recording breaking level. We had around 1025 attendees, and importantly a higher than ever proportion of women. Although 11% is hardly stellar it is much higher than previous years and better than many large open source conferences. This is still an underrepresentation of the number of women in IT, but still a great improvement. Much kudos to Gloria Willasden and Steve Holden who put a lot of effort into promoting PyCon to women developers and creating the Financial Assistance Grant for Women.
Note
UPDATE: Final count for PyCon 2010 attendees was 1106.
This year was the year of alternative implementations, with a lot of focus on Unladen Swallow, PyPy, Jython, IronPython and even Pynie (a fledgling implementation of Python on the Parrot virtual machine). Nice to see that PyPy have just posted some benchmarks showing that they are largely faster than Unladen Swallow and CPython running Twisted. Performance is a hot topic for dynamic languages in general, and there is healthy competition amongst the implementations for speed. One of the things to come out of the Language Summit is a standard repository of benchmarks for implementations to share.
I was responsible for organising the Python Language Summit immediately preceding the conference. I think it went well, but as far as I'm concerned if it wasn't a complete disaster then it counts as a great success! At the summit we spent a lot of time discussing packaging. The upshot of this was a new way of handling the transition to an improved distutils - create a new module called distutils2 that is free to break backwards compatibility and then bring this into the standard library. Tarek has been working on improving distutils over the last year whilst maintaining backwards incompatibility. The problem is that so many tools depend on, extend and monkeypatch distutils in so many ways (including relying on buggy behaviour) that this has been virtually impossible. The new approach, a clean break, is good but means a sudden change of direction of Tarek. He has written this up, including the progress he and his team have already made: The Fate of distutils.
During the language summit Guido also approved 3 PEPs, all important in their own way:
PEP 389: argparse - new command line parsing module
argparse is now in the standard library.
PEP 3147: PYC Repository Directories
The way Python creates and stores its compiled bytecode files (.pyc) is changing.
PEP 3146: Merging Unladen Swallow into CPython (3)
There are still a lot of issues to resolve before the final merge happens, but in principle the merge is now approved. The team, who includes several outside contributors making google employees a minority, need to improve startup time, reduce memory use and also make it faster - but it looks like Python 3.3 will have a JIT!
As with last year the audio visual team did an outstanding job of recording the talks, many of which (but not all at the time of writing) are available to watch online at pycon.blip.tv and the Python Miro Community. Some of the ones I recommend are:
Four powerful examples of composing Python tools
Raymond Hettinger at his best!
-
Easily the star talk of the conference, standing room only. An extremely well presented talk on the Python Global Interpreter Lock by David Beazley.
-
Jimmy Schementi shows off running Python code in the browser with Silverlight - including <script type="text/python">...
-
Dino Veihland shows off the new IronPython integration in Visual Studio 2010, including very cool intellisense that does type inferencing on your code.
There are lots of great talks there, with more arriving, so have a browse through.
This year I had a new toy at PyCon, a portable audio recorder that I used to record a bunch of interviews for A Little Bit of Python. I've recorded some very cool interviews, but they'll take a bit of editing and will go live over the next few weeks:
- Antoine Pitrou - CPython developer and creator of the new GIL
- Paul Hildebrandt - Senior Programmer at Disney Animation Studios
- Frank Wierzbicki - Lead developer of Jython
- Christian Tismer - Creator of Stackless Python, one of the original PyPy developers plus developer of version 2 of Pysco the specializing JIT for Python
- Allison Randall - Architect of the Parrot VM and lead developer of Pynie
- David Beazley - Python trainer and author of The Python Essential Reference
- Jacob Kaplan-Moss & James Tauber - BDFLs of Django and Pinax
- Jimmy Schementi, Dino Veihland, Dave Fugate and Bill Chiles - The IronPython team
- Tarek Ziade - Developer currently fixing Python packaging
- Jean-Paul Calderone and Jonathan Lange - Twisted core developers
- Collin Winter and Jeffrey Yaskin - Lead Unladen Swallow developers
- Maciek Fijalkowski - A core PyPy developer
- Van Lindberg - PSF lawyer, PyCon chair and author of Intellectual Property and Open Source
As soon as any of these go up I'll be sure to let you know.
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2010-03-04 00:07:07 | |
Categories: Life, Python Tags: conference, pycon, videos, podcast, bitofpython
UK TV License and the Common Law Right of Access
The UK, in common with countries like France, has a separate 'tax' to pay for the public television stations. In the UK these stations are run by the British Broadcasting Corporation who also collect the Television License fee. The BBC TV channels are generally of very good quality [1] and so I'm not against the TV license fee (as many people are), but as I don't watch broadcast television I don't have to pay the fee.
Unfortunately the department responsible for collecting the license assume that if you don't pay the fee then you are watching television illegally; they don't even entertain the possibility that you might not need a license. They send threatening letters demanding payment virtually every week, they use detector vans that can tell if you are watching terrestrial TV via an aerial [2], and everywhere that sells televisions is legally obliged to pass your address onto the licensing authority when you buy a TV. Even worse officers from the licensing authority come and visit unlicensed homes with the intention of blackmailing you into buying a license - oops, I mean checking to see if you are watching TV illegally.
Note
The BBC offers all of its programs via the internet for up to a week after they are broadcast via a catch-up service called iPlayer (available in the UK only unfortunately). This is excellent and we sometimes watch this through our Wii. It is well established legally that you don't need a license to watch this, you only need a license if you watch programs as they are broadcast (but you do need a license for cable TV even if you don't watch the BBC channels).
These 'enforcement officers' have no legal authority and no right to enter your house unless you let them in. In the UK if anyone comes onto your property without permission it is trespass, for which the property owner can sue (not prosecute - it is a tort, a civil offence not a criminal one). However, there is a common law 'right-of-access' for people to come onto your property and knock on your door. What is less well known is that you can withdraw this right-of-access from individuals and companies (and therefore all their employees). If you do withdraw this right from the TV Licensing Authority then if any of their officers knock on your door they are guilty of trespass.
If you write to the TV Licensing authority and inform them that you withdraw the common law right-of-access then they will stop sending enforcement officers to visit you (for at least a couple of years anyway). I have no problem telling them to clear off in person, but would prefer them not to hassle my wife.
For those interested in doing the same, here is the letter I sent:
Dear Sir/Madam,
I have no need of a TV licence, and am not breaking the law, and yet I have received continual letters and threats from your company. Your latest missive even included details of a television I purchased, as if to indicate how closely you are monitoring.
That television is in our front room and connected to a DVD player and a games console. It is not used to watch broadcast television. We do not receive any broadcast television, neither by terrestrial broadcast nor by cable nor any other means, and so we do not need a license. I am aware of both the law and our rights in this area.
Your visiting officers will not call at my address. This letter denotes prior written and legal warning that any such visit will constitute trespass and harassment. Normally there is an assumed right of entry to the front door of a property. However this is denied to your employees, since any such act will evidently constitute harassment since prior warning has been given.
Your company will not send me any threatening letters or any other correspondence; you will not visit my property, neither will you visit my home. You may, of course, reply to this letter. Although I have nothing to hide, I resent your intrusion and harassment into my life and the life of my family.
You have now been informed that any such visit or usual threatening letter, or threats of visits, constitute harassment. You will immediately cease. You may, of course, reply to this letter. You will kindly acknowledge in your reply that you have noted/understood the contents of this letter.
All the best,
Michael Foord
My intention with the letter was to not just forestall any visits but also to cease the endless stream of threatening letters. A couple of weeks after sending this letter I got a very terse reply acknowledging that I had withdrawn the right of access. They did 'reserve the right' to use other means to contact me. Sending letters is not a trespass as it is the post office who delivers them (and I'm not withdrawing their right of access). However, I haven't received any other letters from them since...
| [1] | As is the way with publicly run organisations, I'm sure the BBC is bureaucratically top heavy but they do produce some very good TV and technology. On the other hand I've known at least a couple of programmers who have worked there who say the internal politics between departments can be stifling. I guess this is true of many large organisations though. |
| [2] | Many people seem to think these detector vans are works of fiction; but they do work. They can detect the signals radiated back out through your aerial that your TV uses to decode the radio signal. This obviously only works if you use an aerial (and not cable). |
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-12-24 16:52:23 | |
Categories: Life Tags: BBC, television, license, law
New Job with Django and IronPython
Big personal news; I've changed jobs. After more than three years working with Resolver Systems I felt it was time to broaden my development experience. I greatly enjoyed working with Resolver Systems and learned an enormous amount; I'm sorry to leave them but I'm sure they'll manage to cope without me.
I'm now freelance, starting with a contract with a web development firm based in Germany called Comsulting. I first came into contact with Comsulting earlier this year through their lead developer Sven Passig. One of their big customers wanted a web application with the front-end written in IronPython and Silverlight. I did some consulting for them on this as it was their first Silverlight application.
You can hear a bit about what they've been up to with IronPython and Silverlight on the Python 411 podcast that Sven recorded with Ron Jeffries:
I've just been onsite in Germany with them for two weeks but will mainly be working from home. Comsulting's biggest customers are within the German and Swiss media industry and they have several applications for tracking and organising advertising in magazines and websites. It turns out that these media companies really like Silverlight...
We're developing web applications for these companies and after working on the tail end of one project for the first week I started a new project with Stepan Mitt, a designer / developer who also contracts for Comsulting and who happens to be a really cool guy. We're using Django on the server (with CPython 2.5 on Linux) and Silverlight on the client side. I'm converting the Comsulting guys to Test Driven Development, but we still need to investigate the best way to functionally test Silverlight applications.
It's great to be working with CPython again, and especially with Django, but also great to be able to use my IronPython experience. Our Silverlight application communicates with Django via json, so we're using the Django ORM and authentication but our views generate json. I'm sure there will be a blog entry or two out of this.
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-11-14 20:22:38 | |
Categories: Life, IronPython, Python, Work Tags: silverlight, django
Northampton Geek Meet
Well, last night was the inaugural meeting of the Northampton Geek Meet. Nine geeks from around Northamptonshire (in the UK) got together in the King Billy pub to partake of the real ale and geek talk.
Attendees were a mix of programmers and other geeks including:
- @Documentally - Christian Payne, social technologist (!)
- @DaylightGambler - Phil Sorrell, freelance web developer
- @ntoll - Nicholas Tollervey, Python developer
- @ydnab40 - Andrew Bedford, geek truck driver
- @taurig - Roger Dobson
- @voidspace - uhm... me
Plus a few folk who have the good sense not to be on Twitter... We're a ragtag bunch; a few of us who know each other from the London Python meetups, a few of us from Twitter, a friend of mine from university whom I haven't seen for 15 years but who found me on Facebook and is a .NET developer (doing some very cool stuff with micropayments and mobile phones), a guy interested in open source who found me via my website plus someone who heard about the geek meet from a message I posted on LinkedIn. This is the first practical use of LinkedIn I've ever found... Then there was Roger found us whilst visiting Northampton and using the 'find people near me' feature on his mobile Twitter client. I guess all this social stuff has its uses.
You can see us (thankfully blurry) and hear a brief introduction from us all that Christian recorded as an AudioBoo: The First Northampton Geek Meet.
The King Billy was great; decent beer, quiet and with a good lounge so the next one will be there too. Currently we're looking to have the next one on Thursday November 26th. I'll post reminders on Twitter, LinkedIn and the Python-UK mailing list so you've got no excuse for missing it!
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-10-22 15:41:41 | |
Categories: Computers, Life Tags: northampton, geek meet, social media
Pythonista Kiva lending team
Kiva is an amazing organisation. They support individuals in developing countries by making loans for them to develop their own businesses. The movement they are part of is called microfinance and they are making an incredible difference to the lives of many people. What is even more incredible is that Kiva, through its local partners, has made loans of about $90 million with a repayment record of over 98%!
The money from these loans comes from people like you and me, members of the most affluent societies in the world. Although you won't make a profit from participating you are usually protected from currency fluctuations and so are able to do good without it actually costing you much in the medium term. The Kiva website makes it easy to withdraw or relend money as it is repaid and they don't take anything for administration unless you specifically add it to the loan.
A bunch of folk from the Python community have got together to form a lending team. Come and join us:
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-08-31 20:30:24 | |
Categories: Python, Life Tags: kiva, microfinance, lending
Writing a Technical Book
Any day now I will get the first quarter sales figures for IronPython in Action. That will mark the book having been actually in the hands of readers for three months and also be about two and a half years since I first contacted Manning about the possibility of writing an IronPython book for them.
I've written up my experiences of writing a technical book, including my justification (uh, I mean explanation) of why it took so long, the writing process, things I learned and contract advice for the aspiring writer. This is advice I didn't follow myself but wish I had...
Much of the article is specific to my experiences with IronPython in Action - but despite the difficulties (and there will always be difficulties) I still recommend Manning if you really have to write a technical book:
The most important thing I learned was don't sweat the small stuff. This warrants repeating. Don't sweat the small stuff. Many times I knew the gist of what I wanted to say in a passage but couldn't find the words. I would go round and round over a single sentence for fifteen minutes or more. This happened a lot. I learned to just write something and then come back to it later. Often what I had been unhappy about when writing read fine when I came back to it the next day. If I was really stuck I would just leave a placeholder (like XXXX or something easy to search for) and come back to it another time. Letting yourself get stuck drags out the writing process and makes it mentally exhausting. Far better to just write what you have and move on; you're going to be going back over it later anyway.
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-07-13 23:59:13 | |
Categories: Writing, Computers, Website, Life Tags: book, Manning, publishers
Gadgets: Samsung SSD, Sharkoon SATA Adaptor, Mimo USB Monitor and Powermate USB Volume Knob(!)
Over the last few months I've bought a few new gadgets, and they're well overdue a review; so here goes.
As I'm sure you're aware Solid State Drives are hard drives using flash memory instead of mechanical disks; this eliminates the need for spin up, plus makes seek times and data rates potentially much faster and power consumption less. I wanted this for my Apple Macbook Pro, which only had a 120gig hard drive. Advantages for me would be a bigger hard drive, a faster hard drive, and through less heat / power a longer battery life as well.
Fitting it was a royal pain in the *ss. I followed the instructions from this article: Upgrade Your MacBook Pro's Hard Drive. They're pretty good, the only place I deviated from them was that once I got inside my Mac the bluetooth module wasn't on top of the hard drive I was removing. This was a good thing.
The hardest part was levering the keyboard top panel from off the innards. This really didn't want to come off, and it is attached by a ribbon cable to the motherboard so you can't be too violent in your attempts to pry it free. It came eventually. Scraping the ribbon cable that is glued to the top of the existing drive free is also slightly nerve-wracking.
Choosing an SSD is almost as painful as fitting. The current crop of drives are the first that are within the realms of affordable (although still expensive), but many of them suffer from real performance issue once you have written a certain amount of data (random write access becomes far slower than even normal hard drives). This AnandTech Article is essential reading on the subject. It was written before the PB22 came out, and the conclusion it came to is that only the OCZ Vertex and the Intel X25-M are worth having. From what I've read the PB22 doesn't suffer the same problems that plague the earlier drives and it is cheaper than both the Vertex and the X25-M so I decided to go for it.
And as for performance, well. XBench reported (results here) an average of 3x faster than a standard Macbook Pro on all the drive benchmarks. The difference in general is noticeable but perhaps not overwhelming. The most striking change was in launching Microsoft Office for the Mac; it launched in about 3 seconds instead of 12! The disappointing thing is that starting my Windows VM (VMWare Fusion) is not much faster, although shutting it down is (which was already pretty fast). Even worse, booting my Mac up (something I don't do very often) - if you include the fifteen to twenty second freeze on start which arrived with the new drive - took about the same amount of time.
In the end, whilst trying to fix a different problem with another of my new gadgets I reset the PRAM on my Macbook, which fixed it! Now on the once a month occasion I restart my laptop it will happen really quickly. Overall the biggest difference that fitting the SSD made was that I now have a bigger hard drive. Everything is faster but possibly not enough to make it worth the cost, it seems that other than Word most of the apps I start are network or CPU bound. The downside is that after investing in the SSD I probably have to wait another couple of years before I replace my Macbook.
When I ordered the SSD I also ordered a 2.5" SATA adaptor to go with it. I asked the salesman if the adaptor would work with the SSD and he did suggest that buying an SSD and then using it through a USB adaptor didn't sound that sensible. Actually I wanted the adaptor to clone the internal drive of my Mac onto the SSD before fitting it. The nice thing about the Sharkoon is that it has connectors for SATA drives and 2.5" / 3.5" IDE drives. Like many geeks I often have random hard drives lying around and this will allow me to use them. It worked fine (without needing a driver) on Mac OS X, despite not advertising Mac compatibility. It even comes with some funky rubber sheaths for attached drives if you want to leave one connected for anything other than a short period of time.
To clone the internal drive in the laptop onto the SSD I used Carbon Copy Cloner. Cloning a 120gig drive (CCC claimed it would do a block level clone but actually did a file level clone) took hours. It was slightly worrying to see the occupied size of the new drive was about 200meg less than the original - but I imagine this is a consequence of smaller blocks on the SSD and CCC doing a file level clone. Anyway it worked fine.
Mimo monitors make a range of 800x480 pixel USB monitors. I wanted the 740 touchscreen monitor for a home media server project. The 740 was out of stock so I ended up with the 710 and the media server project got shelved (I ditched wireless for my main computer as it was sporadically unreliable and with a wired connection to the desktop no need for a separate server).
The monitor is a fantastic second monitor for my laptop but I only use it when I have a power source. Rather than see it unused I have it attached to my desktop (technically my sixth monitor) showing my twitter stream via Tweetdeck.
This photo shows the Mimo and the Powermate volume control (see below).

It turned out to be an irresistible but expensive toy, quelle surprise. Definitely useful though and in constant use, so it's fared better than some of the expensive toys I've bought in the past (Nintendo DS I'm talking to you).
Unfortunately there is a problem with the displaylink driver and the Mac OS X 10.5.7 update. Some details of the problem here and more here (apparently it is a known issue with 10.5.7 and not the fault of the driver). Uninstalling and re-installing the driver worked for me, but sometimes the display doesn't work if I restart my laptop with it plugged in (remembering to unplug it before restarting does the trick).
This was another toy. Whenever I am at my computer I almost inevitably have a movie playing and this expensive little knob is a volume control. It has much more granularity than using the keyboard to control the volume and I find it surprisingly useful. You can configure different behaviour (e.g. scrolling) for different applications, but I just use it as a volume control.
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-06-15 13:44:01 | |
Categories: Computers, Life Tags: SSD, gadgets, USB, mimo monitor, powermate, sharkoon
Fuzzywuzzy Beard
In my last post I mentioned my fuzzywuzzy beard not once but twice. Here's a great picture of me and my fuzzywuzzy beard drawn by Scott Meyer, the creator of the Basic Instructions webcomic.

You can order your own custom avatar for $10.
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-06-13 20:24:57 | |
Categories: Fun, Life Tags: fuzzyman, Scott Meyer, Basic Instructions, Comic
Hardware and Software Clearout on Ebay
It's been a fun weekend. On Friday I went to see Coraline 3D at the cinema (and I didn't even know that you could watch films in 3D in Northampton UK which is officially the middle of nowhere in England). I haven't seen anything in 3D since the red and green glasses of my childhood (20 years ago which is another reminder of how old I am getting). Both the Coraline and the 3D were awesome. Coraline is by the master story teller Neil Gaiman and is very entertaining.
I spent most of Saturday replacing the hard drive in my laptop with an SSD followed by going to see Star Trek. Apple don't make it easy to fit a new HD yourself, but it was worth it. A subject for another blog entry. Star Trek was great. Any plot that relies on time travel is slightly suspect, but even if the overarching storyline is dubious it was a fantastic cinematic experience.
And as for today... at least partly clearing out my hardware and software. It means I wasn't coding away anything from my backlog, or writing any of the blog entries I owe you, but at least I got something off my list. Anyway, if you live in the UK you should buy my stuff:
- Logitech S530 Wireless Keyboard & Mouse Set for Mac
- Original Apple Macbook Laptop 2.5" 120gig Hard drive
- Microsoft Visual Studio 2008 Professional Retail Boxed
- Microsoft Office 2007 Home & Student boxed with COA
- Microsoft Windows Vista Business x64 bit boxed with COA
- Rogue Trooper PC Game (DVD) - boxed with serial number
- Enemy Territories Quake War PC boxed with serial number
- Quake 4 PC Game (Classic) - boxed with serial number
- Far Cry PC Game (Classic) - boxed with serial number
Like this post? Digg it or Del.icio.us it.
Sod This! Another Podcast
Sod This is a new podcast by well known .NET MVPs, Devexpress evangelists and all round (figuratively of course) raconteurs: Gary Short and Oliver Sturm.
Episode 3 is now up, and it's an interview with me on dynamic languages in general and IronPython in particular. (Before becoming a .NET programmer Gary was a smalltalk developer.)
The interview took place during the BASTA conference in Germany; in a bar, so the audio starts of a bit rough but improves as the interview progresses. I even reveal my mystery past and what I did before programming in Python.
Oh, and just for the record - I was the first Microsoft dynamic languages MVP.
Like this post? Digg it or Del.icio.us it.
Posted by Fuzzyman on 2009-04-15 22:36:22 | |
Categories: IronPython, General Programming, Life Tags: podcast
Archives
Counter...

