Remote Pairing with Copilot and Skype
Today I was due in at work, but engineering works between Northampton and London meant that there were no trains (which I didn't discover until I got to the station). I would have quite happily stayed at home and spiked, but Glenn was actually in the office and we couldn't think of enough for two of us to spike. At Resolver we practise Pair Programming, and all production code has to be paired on, so we decided to experiment with remote pairing.
We used Skype for the audio, which was straightforward.
We considered using a collaborative editor, like Gobby. We decided in the end to try screen sharing as it would be more flexible. Additionally, I didn't have a full build environment and copy of the subversion tree we were working on (and a collaborative editor would probably require me to have the files being edited).
I discovered this Jon Udell blog entry on screen sharing tools, but in the end we decided to give Joel Spolsky's Copilot a try.
It is based on VNC and is really easy to use. A day pass costs $5 [1] (I paid with Paypal) and then both 'sides' download a 736kb client and run it. That's it, no messing around with IP addresses or configuring routers and firewalls, just run the client and you are sharing a screen (the session id is encoded into the client you download - very clever).
Both Resolver and I have a pretty good internet connection, and the screen sharing was very good. There was a bit of a lag, but less than the VNC clients I've used - even when the connection is only across an intranet [2].
It was a great experience. The audio connection was seamless and it really felt like 'pairing'. We worked together on the problem, and were both able to 'drive' (control the keyboard). We even completed the user story!
As there is a Mac client (no Linux client I'm afraid) I could pair program Resolver without having to use Windows! Obviously a non-propietary solution would be even better than copilot, but I can't see one being as easy to use.
I really enjoy working at Resolver, but I can't see myself doing the two hour commute (each way) indefinitely. If I could work from home this would be my dream job.
On a totally different note, I've received my Moo Cards (and they're great) and an Eee PC with 8GB flash drive and 1GB memory [3]. I've also been watching The Muppet Show and The Cosby Show, both of which were childhood favourites and still hilarious - as you would know if you were following me on Twitter.
| [1] | They also have a subscription model but the rates aren't very good compared to a 24hour pass - even just for eight or nine hours straight use. |
| [2] | I later tried it with Andrzej with him using the Mac client. As his home network connection isn't so good the lag was more noticeable but still acceptable. |
| [3] | I know. I cancelled a previous order, but My Boss got one and it looks really nice. The lure of the bigger drive and memory was too much for me. |
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-12-27 22:55:07 | |
Categories: General Programming, Work, Tools
IronPython Studio: Problems, Victory and Compiled Binaries
After much pain I have finally got IronPython Studio working, fortunately it was worth the effort.
IronPython Studio is an IDE based on the Visual Studio Shell. Visual Studio 2008 allows you to create (and freely distribute) applications built on top of the Visual Studio shell, and IronPython Studio is an 'example' of this - so the source is available to play with if you have the full version of Visual Studio 2008. Whilst I haven't abandoned what I consider to be more featureful Python editors like Wingware's Wing IDE, IronPython studio does have a few tricks up its sleeve that makes it useful for IronPython development.

The first trick, which I didn't appreciate until I got IronPython Studio working properly, is that it produces compiled binaries from IronPython projects. It comes with both WPF and Windows Forms designers which generate Python code. You can either use that code directly [1] or compile the project into an executable.
Last but not least, IronPython Studio has debugger support - including setting break points in IronPython code. As conventional (!?) Python debuggers don't work with IronPython this could come in useful (despite my general antipathy towards debuggers there are times when they are invaluable).
So why did I have such problems getting IronPython Studio working? Partly poor instructions and partly down to the fact that I have had several versions of Visual Studio installed on this XP box (ranging from Visual Studio 2003, through several versions of 2005 and 2005 express up to 2008 betas and 2008 express).
Just in case anyone else has difficulties, here are the problems I had and how I overcame them. (Thanks to the guys - especially corysama - over on the IronPythonStudio forum).
First of all the installation instructions aren't massively clear. The steps you need are:
- Download and install the Visual Studio X redistributable from: Visual Studio Extensibility
- After you run the Install for the MS VS 2008 Shell Isolated Mode Redistributable, you must then go to the folder ("C:VS 2008 Shell RedistIsolated Mode") and click on: "vsshellisolated_enu.exe" to actually install the redistributable runtime.
- Install IronPython Studio
After doing this I found that attempting to build a project gave me an "Object reference not set to an instance of an object" error (a particularly frustrating and hard to track down exception whenever we have encountered it in Resolver).
The readme that comes with IronPython Studio (which of course I didn't read) actually explains this. You need to register the IronPython CodeDom provider for the compilation to work (as explained by Aaron Marten on the VSX team).
Unfortunately for Windows XP these instructions are just plain wrong (being charitable I assume they are for Vista and they have just forgotten that most people still want to run XP!). The instructions tell you insert the new XML "Under the root <configuration> node" (in machine.config). Instead you should place it between the <system.web> and <system.serviceModel> nodes. The config XML will look like this:
</providers>
</roleManager>
</system.web>
<system.codedom>
<compilers>
<compiler language="py;IronPython" ...>
</compilers>
</system.codedom>
<system.serviceModel>
<extensions>
By now I had completely screwed my system and even attempting to use the WPF designer gave me the following error:
The Microsoft.VisualStudio.Internal.WPFFlavor.WPFPackage, Microsoft.VisualStudio.WPFFlavor,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
({B3BAE735-386C-4030-8329-EF48EEDA4036}) did not load because of previous errors.
For assistance, contact the package vendor. To attempt to
load this package again, type 'appenv /resetskippkgs' at the command prompt.
Needless to say appenv doesn't exist, but with a combination of clues and guesswork I figured out that it was referring to the studio executable. Running IronPythonStudio.exe /resetskippkgs restored the designer.
After this I was now getting a really weird error:
Could not load file or assembly 'IronPython, Version=1.1.0.0... or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Now it is failing to load IronPython at all when I attempt to build! It turns out that it has located the IronPython assemblies that were installed along with the Visual Studio 2005 SDK - which were an older version! I haven't actually solved this problem (it must be picking up the location from some environment variable or registry entry set by the VS 2005 SDK), but manually copying the right assemblies into the build directory fixes it and I can design and debug to my heart's content. phew
| [1] | Although if you aren't compiling then the code will need a bit of tweaking - for example you will have to add calls to clr.AddReference to manually add references to the assemblies you are using. |
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-12-20 15:11:03 | |
Categories: Python, IronPython, Tools, Hacking
Mooching Books with BookMooch
I've been reading occasional entries on the Zen Habits Blog. One suggestion was that you can reduce your number of unnecessary possessions (something that resonates with me) by getting rid of books that you aren't going to read again. I've been wanting to try out BookMooch.com for a while and this gave me the push I needed.
BookMooch is a site for trading books. You keep an inventory of books you are willing to send to other people and a wishlist of books you want to receive. Sending books gains you points, and receiving them costs points. The site seems to have a critical mass of members that makes is worthwhile. Most books I am interested in, even if there aren't necessarily any copies currently available, have been traded several times. As a web based service it obviously has a high percentage of geek users, so even tech books seem to be pretty readily available.
Last weekend I listed about fifteen books I didn't need to keep, and by Monday five of them had been requested. Great.
So why is this on my techie blog?
Well I first came across BookMooch from some fliers at the last PyCon. I've also seen several references to the creator of BookMooch (John Buckman) giving talks at Python meetups. I can't find any references to what language / framework BookMooch is built with. Anyone know?
Of course BookMooch has an API if you want to play around with book trading / availability data. There are also frequent updates on the BookMooch blog listing new features, so BookMooch seems to be growing and improving fairly quickly.
The service is free, but makes money from Amazon affiliate links on all the books, which is a cool unintrusive business model for a useful (and environmentally friendly) website.
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-11-01 14:44:25 | |
ReStructuredText Tools
ReStructuredText is a lightweight text markup for writing documentation. It's a fantastic way of generating PDFs, LaTeX or HTML from plain text. There are no shortage of text markups, but ReStructuredText is particularly good. The goal of the creators was to create a WYSIWYG markup, so that documents using ReST are easily readable as text (and as a result the markup syntax is easy to learn).
I use it in this blog, and with rest2web to maintain most of my website(s). The Python documentation is also now written in ReST.
Recently there has been a rash of tools coming out that support ReST.
Rest in Peace

Rest in Peace is a ReStructured Text editor. It has a browser pane so that you can see the results of your document whilst you edit it. It's still an early version but worked very well whilst I was trying it. There is a new beta just out as well:
It needs Python 2.5 and has the following dependencies:
RST2A
Which I assume means ReStructured Text to anything. This is a webservice / website that converts ReStructured Text to HTML / PDF, and lets you choose the output style.
Pandoc
Pandoc is a Haskell library for converting between markup formats. It can read and write various markup formats, including ReST. It can even read HTML and turn it back into ReST!
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-10-20 23:45:21 | |
New Programs: Popfile and Better Gmail
I've just discovered two new programs that are already invaluable, so I thought I'd share.
Popfile is a bayesian spam filter that acts a POP proxy server. It is easy to setup and as well as classifying mail as spam it can classify incoming mail into as many categories ('buckets') as you like. The reason for using it is that Thunderbird's spam filter is crap - it lets about 10% of my spam through, and when I get several hundred a day that is way too much. After only three days (and 484 emails), popfile is already better than Thunderbird. The popfile docs say that it needs about 1000 emails to reach maximum efficiency. The Gmail spam filter is excellent, but the client is not as responsive as Thunderbird and lacks many of the features - so there is no need to suggest it.
However... what I do use Gmail for, is as an email 'archive'. The search is much better than Thunderbird's and I keep a copy of everything in gmail. Better Gmail is a Firefox extension (actually a set of compiled Greasemonkey scripts as a single Firefox extension). It integrates Google Reader into the Gmail interface, so I only need one tab open for both, and the 'Super Clean' skin is very nice. It does a few other useful things, like forcing an https connection even if you forget, so well worth installing.
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-08-28 19:26:44 | |
T-Mobile, Web'n'Commute and Lost Productivity
I have a(nother) new gadget, a Huawei 3G USB Modem. The vital added fact is that it came free with a T-Mobile Web'n'Walk subscription which will set me back the best part of thirty quid a month.
In one fell swoop this has destroyed my commute as a time of productivity, as I now have access to the internet. sigh
The terms and conditions aren't too restrictive: I can use up to 3gig a month, which is fine for the email and browsing I do whilst on the train. It is a 3G modem, but will fall back to GPRS if 3G isn't available (suck on that iPhone!).
Setting it up was annoying though. I use it with my Mac laptop and at first it just plain refused to do anything. The worst part was that when I let Windows (through Parallels) control the device it worked fine, so I knew it wasn't a hardware or SIM problem.
However, I was astonished when I rang T-Mobile support. First off it was an '0800' number, which are free from landlines but cost a fortune from mobile phones. When the guy at the other end heard I was having problems with a Mac, the first thing he did was offer to phone me back after he went a got a Mac so he could take me through it. Sure enough he phoned me back in a few minutes and walked me through setting up the device.
It turns out that in the included Mac instructions they miss out a vital step. When logging onto the service you need to enter the username user and the password password. This is done for you from the Windows client which also has a nice traffic monitor which is missing with the Mac. Still, it works fine now. It's a shame that finding someone from a cellphone company who is knowledgeable, friendly and helpful is a shock - but that's the way it is. It would have been better if all the information had come with the device, but I can't fault their customer service. As I explain in my article From Problem to Profit, helping customers through difficulties is actually a great opportunity to win loyal customers.
At home and work I access my email via POP. I don't like the latency of IMAP as it makes the client unresponsive. Thunderbird with POP is much more responsive (and has more features) than Gmail, before you suggest that.
My mobile connection is pretty good. It drops out about every fifteen minutes or so, which isn't bad for a train journey replete with tunnels and hills. I use IMAP because I don't want to download all my emails onto my laptop and then not be able to access them from work. (I still want to be able to delete them though, so POP that leaves them on the server is out.) Thunderbird and IMAP, with a slightly unstable connection, is very annoying. It won't let you save drafts if it doesn't have access to the drafts folder on the server, you delete things and then move focus to another email - and then it jumps your focus back after it has done the delete. Horrible user interface choices. Oh well.
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-08-28 19:25:42 | |
Wing 3
I do most of my Python development with the Wing IDE. This is a great tool, and I use it both at work and for my personal projects.
Wing 2 doesn't have very good support for running files with non-standard executables - like our custom executable fro Resolver. Fortunately the scripting API is very easy, so we have developed a set of scripts that add this feature plus a bunch of other stuff we wanted.
It was the thought of converting all these scripts over that has kept me from trying the alpha versions of Wing 3. I shouldn't have left it so long.
Wing 3 has a new feature - 'OS Commands' that do exactly what we want in this department. It also has an integrated test running tool which looks very interesting. Over the next few weeks I'll play with it some more and convert some of our scripts over (although John at Wing promises me that the API hasn't changed much...).
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-07-07 01:35:12 | |
HTML, RSS and Romanian Cookery
It's not often I tangle with HTML, but every time I do I regret it.
The first was for work, autogenerating some tables. Did you know that the border attribute on the table tag is not the same as the border that you can control from CSS? Actually, you probably did, but I didn't.
The html tag attribute switches on and off the grid which surrounds every cell in the table. The CSS border rules control a different border around the whole table, you can also control borders around the individual 'td' and 'th' elements. I need to control both of these, and it is annoying that I can't do it from CSS. Although Javascript seems to be acceptable these days...
Secondly, I've been working on a website for my wife's Romanian recipes: The Other Delia. It's probably the only website I've created which doesn't suck.
The only wart is that a font size of 1.2em means something completely different to Firefox and IE. This affects the width of the tab above the left column. sigh
Whilst we're on the subject of this website, I need a tool to easily generate some simple RSS. I'd like to create an RSS feed for the recipes, so that people can easily see when Delia adds new ones. I'd prefer a program to a library...
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-05-24 00:13:49 | |
Categories: Website, General Programming, Tools
Mocks Aren't (Just) Stubs
Ah... posts like this are easy.
This is an entry by another 'blogging colleague' of mine, Jonathan.
It's a closer look at the Martin Fowler article mock objects aren't stubs, and how it might apply to our work at Resolver. Like him I'm not sure that the sort of replay patterns (and behaviour verification) that he describes would be particularly useful to us.
I think there is an initial abstraction that we can make, for the automating of creating our stubs and building in state testing. With a very simple class to start with, we could then see what further abstractions from our common testing patterns [1] come naturally from that.
| [1] | We already have a simple but useful Listener class. This is used for 'methods' on our stubs, and will tell us if, how many times, and with what arguments it was called. We can also set a return value. Building this functionality in would be easy. |
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-04-22 23:17:49 | |
Categories: Tools, Work, General Programming
Web testing with Selenium, and Random Python Stuff
Andrzej attended a Skills Matter talk on Selenium tonight. It sounds like a very useful tool, and he's written up the talk (which includes some sound general advice on functional testing [1]):
On the subject of writing, Andrew Kuchling has written a new piece of Python advocacy:
It includes examples of embedding Python and extending [2] Python, and also of using Jython and IronPython (hey, I even get a mention).
There is a new Python related market on Inkling:
This is an old one, by Martin Fowler. On how mocks (for testing) are more than just stubs.
We use a lot of mocks when testing, but usually they are little more than stubs of a few lines. For a long time we've thought it ought to be possible to abstract some good patterns out, and perhaps use a mock library.
Perhaps this article will help me to understand how mocks can be more than just stubs. Giles (the boss) prefers us using stubs than the idea of switching to a general purpose mock library. Mock libraries can automatically provide some of the methods and attributes from the classes you are testing. With stubs you only provide the ones you want, so any attempt to use other aspects of the object API will fail (and alert you of behaviour you weren't expecting or testing for).
| [1] | Which we could possibly use to speed up our functional tests at Resolver. Currently our tests do most things functionally where possible. It sounds like it is actually reasonable to switch to doing the well tested things programmatically for the rest of the tests. |
| [2] | The Python C API, SWIG, BOOST and SIP. |
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-04-19 00:31:52 | |
Ruggedized Devices and the Top Ten New Smartphone Technologies
There are two new articles in the Science & Technology section of Voidspace. These are:
Top Ten Smartphone Technologies
A close look at the top ten up and coming technologies for smart-phones and mobile devices. From flexible displays, to 3D accelerators, to fuel cells; there are interesting changes afoot in the world of communications.
-
If you're anything like me, then any new and cool gadget comes with a risk that it will soon die from being dropped, squashed or otherwise destroyed.
This article is a look at some of the cutting edge rugged mobile devices, with a review of their features and the pros and cons. There is some impressive looking gear shown here.
These articles are both written by Rene Tse. I particularly like the article on rugged mobile devices. I'd love to get a new PDA [1], and I even kept my last one for two years without breaking it, but having one that can cope with rain and klutz-induced-disaster would be a big bonus.
| [1] | I'm particularly tempted by the HTC Athena which is now available in the UK. Luckily for my pocket, my current contract doesn't expire for another few months. |
Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.
Posted by Fuzzyman on 2007-04-03 17:36:30 | |
For buying techie books, science fiction, computer hardware or the latest gadgets: visit The Voidspace Amazon Store. If you're looking for a new techie job, try the Voidspace Tech Job Board. This is part of the Hidden Network of technology and programming jobs.




IronPython in Action