Getting Dabs.com to Repair My Laptop (via the Courts)
Some time ago (about four months) I blogged about my difficulties with Fujitsu and Dabs.com; trying to get them to repair a laptop that failed.
The short version is that the DVD drive fell out of the laptop a few months after I bought it. This wasn't actually a problem until it stopped working as well - almost a year after I bought it. Unfortunately, due to moving house, it was just after a year since I bought the laptop when I took this up with Dabs.com and Fujitsu. Because it was a few days outside of warranty they both refused to fix it.
I warned Dabs [1] that I would take them to court if they refused to repair the laptop and they ignored me. Well, the story just got longer and stranger...
In my previous blog entry about this several of my American readers seemed to think that Dabs' response was reasonable - after all the laptop was outside warranty. This leads me to believe that consumer law is a lot stronger in the UK than it is in the US. In the UK, if someone sells you something, it has to be fit for purpose and not suffer from manufacturing defects - which includes a requirement that it stay working for a reasonable period of time. If something stops working then the fact that the manufacturer or retailer offers a limited warranty (limited in time or liability) does not reduce their legal responsibility or your statutory rights (UK Sale of Goods Act).
The balance to this is that if you report the problem after some period of time (for expensive goods six months seems to be the accepted limit) then it is up to you to demonstrate that the problem was pre-existing [2].
As the drive first fell out within a few months of us buying the laptop (and it had never suffered any damage - despite Dabs claiming I must have damaged it) it seemed obvious that the problem was a manufacturing defect of some kind. In this situation the UK law is pretty clear - Dabs should have repaired the drive (or replaced or refunded the laptop) and the warranty is irrelevant.
Because I was fairly confident of this I decided that I would take Dabs.com to the small claims court (the County Court in England). The whole procedure was pretty straightforward, and correspondingly interesting. It is the first time I have done this as an individual [3].
The first step is to send a 'letter of action' to the company, stating exactly what you want and giving them a timed deadline to do it and warning them that you will proceed with a claim if they don't.
Having done that (and received no response) I then filled in the court paperwork, asking for three hundred pounds compensation for the repair of the laptop. The fees for this are thirty pounds which will be added to your compensation if you win.
The paperwork requires a summary and a full version of your case. You can provide whatever paper evidence you want along with this, and refer to it in the full version. I had kept all the letters and emails I had sent and included them all in my description of the saga (including the part where they first agree to repair and then tell me it must be my fault).
These papers are then sent to the defendant (Dabs in my case) and they have fourteen days to respond.
They ignored this as well - and so I was allowed to ask for default judgement. Yesterday I received a copy of the default judgement, which was an order for Dabs.com to pay me three hundred pounds compensation plus thirty pounds cost.
Hurrah you might think. Kind of. That was the longer bit. Now it gets odder.
The same day as I received the judgement from the court I also received an email from Dabs.com giving me a returns number for the laptop (and no other communication). This was a bit confusing, but I wondered if they had decided to do the right thing and offer a repair or a full refund.
After exchanging several incredulous emails with them, it turns out that they are claiming that the three hundred and thirty pounds compensation the court has awarded me is a refund - and that if I don't return the laptop to them (at my own cost naturally) then they will invoice me for it!
Naturally this has no merit, but it looks like the story isn't over yet. sigh
In the meantime I intend to write this story up for some of the UK computer magazines. More people need to know how Dabs treats their customers and that you can get compensation if you take things to court.
For those interested in the details, here is the summary of my claim:
Dabs.com plcNational Logistics Centre, Wingates Industrial EstateWesthoughton, BoltonBL5 3XUThe claimant is claiming 300 pounds for the repair of a laptop that he purchased from Dabs.com. Shortly after purchase the DVD drive fell out, and later stopped functioning altogether - rendering the laptop unusable. Without ever seeing the laptop they are claiming that the failed drive was caused by physical damage and refuse to repair or replace it. The laptop has never suffered physical damage that could have caused this, and the problem can only have been caused by inadequate internal fixing.
The full details (minus the supporting paperwork of course):
In January 2007 I bought a Fujitsu-Siemens laptop from Dabs.com (Document 1). Shortly afterwards (within two months of receiving the laptop - but I don't know the exact date) the DVD drive from the laptop fell out, but continued to work. The laptop has been used almost entirely in the house by my wife, and has never suffered any physical damage that could have caused the drive to fall out (both before the initial failure and since). The only possible explanation is that the drive had faulty or inadequate internal fixing when it was purchased.
We continued to use the laptop, but didn't discover that the DVD drive had stopped functioning (making it impossible to install software on the laptop) until December. Due to pressure of work and moving house I didn't report the failure (to the manufacturer as instructed on the Dabs.com website) until January. (see document 2).
It took Fujitsu a month to decide they wouldn't help (see documents 3, 4 and 5).
I then contacted Dabs.com by email and their website contact form. Initially they offered to collect and repair the laptop. (See documents 6, 7 and 8.)
They then (without ever seeing the laptop) suddenly decided that the problem was caused by 'physical damage' and refused to repair it. (See documents 9 & 10.)
I contacted them several more times to try and resolve this, but they simply stopped replying. (See documents 11, 12 & 13.)
On 29th April I sent them a letter of action informing them that they had 14 days to arrange repair, replacement or refund of the laptop or I would proceed with court action. They have never replied. (See document 14.)
I have been informed that the replacement of the drive and connector will cost 300 pounds, including labour and carriage. This is the amount I am claiming from the plaintiff (plus costs).
As the laptop is not fit for purpose without a working DVD drive, and it is caused by a manufacturing fault, it is unacceptable that Dabs.com refuses to honour their legal obligations under the Sale of Goods act.
If you have kept the supporting paperwork, the process is not too onerous. I wonder how this will play out. I half suspect that they only want to issue me an invoice so that they can sell 'the debt' to a debt collector. If it ever goes to court they wouldn't have a leg to stand on. A nasty trick anyway.
| [1] | The sad thing is that under a different account I have spent quite a bit of money with Dabs over the past two years. |
| [2] | I am not a lawyer etc (i.e. ignore everything I say and do your own research)... The word 'demonstrate' in that context probably means that burden of proof on you is to show 'in the balance of probabilities' (i.e. you don't have to prove beyond reasonable doubt). |
| [3] | I've been involved in a small claims court claim to try and recover some money from a customer in a previous job - actually having to attend the hearing as it was contested (but I had nothing to do with the paperwork for this case). We lost for a very interesting reason. The judge (or magistrate - I forget) seemed to agree that the customer probably owed us the money, but due to an ambiguity in the paperwork our computer produced he held that we hadn't proven it. As we were taking him to court, the burden was on us to prove that he owed us the money. |
For the sake of good old google, Dabs sucks and Dabs.com sucks too.
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 2008-08-28 23:43:58 | |
Paths with Spaces on the Mac
Part of the power of systems that inherit a legacy from UNIX is their rich and flexible scripting system. Many desktop applications use this somewhere under the hood - either providing wrapper scripts as part of the application or even to implement core functionality.
A disadvantage of this is that it is much easier to make your application sensitive to (i.e. broken for) paths that contain spaces - simply forget to put quotes in the right places.
This is a problem that afflicts Windows less, simply because a Windows programmer is less likely to implement core functionality by delegating to the shell. Additionally the default home directory and install path for applications both have spaces in them [1], which apart from being annoying when you do use the command line also means applications are more likely to be aware of spaces in paths.
Of course 'shelling out' is a technique that can work cross platform, and the only time [that I can remember...] I had a problem caused by quoting errors in shell scripts on Windoze was the PyLint shell script [2].
The core of Mac OS X is based on BSD, and so it is a modern UNIX 'variant', which makes it much easier to develop cross platform applications that run on Linux and Apple Macs.
The X11 server that comes with Mac OS X is developed separately as the XQuartz project. I recently tried to use some application that depended on a more recent version of X11, so I installed XQuartz. Which promptly broke X11 completely for me...
As you can doubtless guess, the reason XQuartz broke is that my user profile is on a drive with spaces on it. It seemed completely obvious to me that when I added a second drive (and moved a bunch of stuff onto it) it should be called 'Second Drive'...
It took a while to work out the problem (the error log showing the broken path was a good clue) and the solution was to use an updated version of the startX script that will be fixed in the next release.
I had a nice email from one of the developers suggesting that having paths with spaces in was a bad idea. This seems odd to me - if your application can't handle spaces in paths then your application is broken and it isn't the user's fault. All programmers on UNIX type systems should work from paths with spaces on to make sure their applications can handle them... (Maybe only as a punishment if shell quoting bugs are found in their scripts / programs.)
Still, I assured him that the only program I had ever had a problem with was XQuartz and I was worried about potential problems caused by renaming the drive.
Of course I was wrong, XQuartz wasn't the only program I've had problems with due to spaces in the paths. A couple of weeks ago I reported that I couldn't get FileZilla to work on my machine, and that no-one else seemed to have the same problem. Guess what it was actually caused by...
Naturally by the time I worked it out and reported it, it was already fixed...
Oh, and I do use the command line quite a lot on the Mac and no the space doesn't tend to annoy me - shell completion is nice.
| [1] | Good old 'Documents and Settings' and 'Program Files'... |
| [2] | When I started at Resolver Systems my boss installed Python into 'Program Files'. |
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 2008-08-04 11:28:58 | |
Categories: Computers, General Programming Tags: mac, shell, scripts
Updating 1st Gen iPhone to Unlocked and Jailbroken 2.0
Around October of last year a bunch of us at Resolver Systems got imported iPhones and promptly jailbroke and unlocked them. The unlock process at the time was fairly arduous, so most of us have been running the OS version 1.0.2 since then.
When the iPhone 3G came out I was sorely tempted, but my phone contract isn't up until next year. So last Sunday, when I should have been doing more sensible things like making edits to chapter one, I spent a frustrating few hours upgrading my first gen iPhone from 1.0.2 to 2.0. The first two hours were spent trying things that didn't work, so in case I save anyone two frustrating hours here's how I did it.
This is a Mac only solution. It was made complicated by the fact that the jailbreak we used rewrote the baseband to do the unlock. In order to upgrade I needed to fully 'revirginize' the phone, including restoring the baseband firmware.
The steps are pretty straightforward. It did take two hours, but most of that was unattended. To do the 'virginizing' (including restoring baseband) I followed the hackthatphone flowchart:
I started at the Downgrade to 1.0.2, jailbreak and activate step. This requires the 1.0.2 OS, a specific version of iTunes (7.4.2) and a specific version of iNdependence (the Mac hacking software). Fortunately the flowcharts gives links to all of these.
In order to install the older version of iTunes you'll need to blow away MobileDevice.framework. I would also rename your iTune library folder so that you can rename it back once you have reinstalled the latest version of iTunes again.
Whilst I was running iNdependence it would periodically hang on me. Killing it and restarting it worked fine (and is the advised solution in the README!) - so long as you see the screens shown on the flowchart you know you are going in the right direction.
Once I had restored 1.0.2 and the original baseband I could upgrade back to iTunes 7.7, which promptly offered to upgrade my iPhone to 2.0. This failed (but downloaded the 2.0 OS image) as my SIM card wasn't supported - it needs to be an O2 SIM and needs to properly activate again.
This is where the PwnageTool comes in. I used PwnageTool 2.0.1, but you will also need bl39.bin / bl46.bin, which are easy enough to find via google. Some people have had problems with this, so at your own risk...
I followed a neat (and short) video tutorial on using the PwnageTool expert mode: PwnageTool Expert Mode
This creates a custom OS image for you that iTunes can 'restore' to your phone. Once loaded it activates and unlocks the phone and includes an 'installer like' application called Cydia. There is a new version of installer in the works, and many of the applications for jailbroken 1.x iPhones are still being ported over: Installer 4.
The new OS is great, with some nice touches like you can always see the last character in a password text box. This is useful because even though I am getting used to typing on the iPhone (I prefer texting on the iPhone to an ordinary mobile phone with a numeric keypad) it is hard to be 100% accurate. I've not noticed any bugs, but there is the occasional pause when opening applications.
As for applications, well. With 1000 apps in the AppStore, most of them are crap. Of the ones that aren't, or may not be, crap - most of them don't interest me. Even so, there are still some very interesting ones and they are a huge step-up from the 1.x apps.
I have only paid for two applications:
-
I've only just got this. So far it looks fantastic.
Solitaire
This is the version of Solitaire that I used to play a lot (for free) as a jailbroken app on my previous version. It's very cheap (about $5) and has had two games added. It has actually lost a couple of features for the Klondike game I play (I don't use the others), but it is still very good. Solitaire and as an iPod is all I was using my iPhone for before this upgrade - now it's my main phone.
I also have a few free apps. My internet connection on my phone (an extra ten pounds a month for allegedly unlimited internet use with Orange) doesn't get switched on until next Saturday. It will only be after that that I work out which applications are really useful. The ones I am using so far are:
Twinkle
Twitter client, very nice.
JirboBreak
A 'breakout' style game. It has a nifty control mechanism, an on screen thumbpad - you roll your thumb left and right to control the paddle and the game pauses if you take your finger off the screen. It took me about three games before I really got the hang of it, but it's a great implementation of breakout and very addictive.
Stanza
Nice ebook reader with online repository of free books to download. Good stuff from Cory Doctorow included!
The Facebook App
Straightforwardly good.
The google app
This just redirects you to Safari for most things - but it does include google chat.
I've also installed MoPhoto and ShoZu for uploading images to Flickr and Facebook (etc) and viewing them as well. I haven't really tried them much to see if I really need them. Naturally I also have a terminal from Cydia and will be trying this technique (3proxy) for tethering an iPhone internet connection to a laptop (mine is edge rather than 3G but still worth it).
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 2008-08-03 20:32:17 | |
Diagramming on the Mac
One of the annoying things about writing a book is having to create my own diagrams. This was something I wasn't expecting when I started the project, I'm a good writer but awful at producing diagrams.
Thankfully a colleague, Jonathan Hartley, stepped up and helped me.
Here's one of my original diagrams, a 'hedgehog diagram' I produced with 'Paint' (I was still running Windows at home at the time - later I upgraded to Paint.NET which is a much better program but didn't improve my skills):

Here is Jonathan's rendering of the same diagram:

To produce them, he used Open Office Draw. I'm now working on chapter 15 (Embedding IronPython in C# and VB.NET using the DLR Hosting API), and thought I'd give it a try myself.
I used NeoOffice, which is a Mac port of Open Office, and it looks very good. I did try Inkscape, even upgrading my X11 install to the latest version of XQuartz, but it just refuses to run.
Here's, my first attempt:

It's certainly better than my earlier attempts, but I think it still needs some magic from Jonathan.
Several people also recommended OmniGraffle, which looks good, but is not cheap and isn't cross-platform. Given my skill level I think OO offers me everything I need.
Whilst we're on the subject of Mac software, I've also been using a few new programs recently.
-
Having created the diagram in Neo Office, I used Pixelmator to edit the Tiff graphics file. I think I got Pixelmator included with one of the recent MacHeist bundles. It seems like a very capable program for basic image editing.
-
Yet another Open Source video player. I've been trying to play some high quality mkv (Matroska) files encoded with H.264. Neither Quicktime nor VLC (usually excellent) could play it. MPlayer isn't as polished as VLC, but plays them fine.
-
Nice little program for image viewing. Much nicer than Preview (which is part of Mac OS X and great for PDFs).
-
A shiny commercial Subversion front end. I'm trying out the demo version. It seems great so far. I also tried Versions (also in Beta), but it doesn't let you work with existing working directories (you have to checkout through the Versions UI) - so I didn't get very far.
-
Nice FTP, SFTP (etc) client for the Mac. Again, commercial but worth it. I couldn't find another client that had a '2-pane' UI, except for FileZilla which just refuses to work on my computer. It dies with an odd error [1] that few other people seem to have, and the fixes suggested for them doesn't work for me.
-
A new and very funky physics engine from a Japanese developer. Absolutely pointless, but very fun - and very slick on the Mac (and Windows).
-
A CHM reader. The CHM (Compiled Help Manual) format for documentation is popular on Windows, and with reason as if well done it can make for very usable docs. Chmox hasn't been updated for a while, but seems to work fine.
| [1] | fzsftp could not be started. fzsftp is in the Filezilla package and I tried setting the suggested environment variable. 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 2008-07-06 17:25:21 | |
Categories: Writing, IronPython, Tools, Computers Tags: apple, drawing, diagrams, mac, openoffice, video
Error'd: To help protect your computer...
I feel very protected...

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 2008-05-22 14:14:39 | |
Categories: Computers, Fun Tags: error, dialog, windows, microsoft, picture
Dabs.com and Trying to Get My Laptop Fixed
A couple of weeks ago I blogged about trying to get Fujitsu-Siemens to honour the warranty on my laptop. The laptop DVD drive fell out and (then later!) stopped working altogether. Unfortunately I reported the problem two days after the warranty expired and Fujitsu stated that they no longer had any obligation to help me and referred me back to Dabs.com where I purchased the laptop from.
Under UK consumer law (which I believe is stronger than in the US), good have to be fit for purpose and be free from manufacturing defects. If an item doesn't meet this standard then you have recourse to the small claims court for redress; against the person who sold you the item (Dabs in my case rather than Fujitsu). Reasonable wear and tear do not give you cause for redress, but offering a time limited warranty does not remove these obligations - whether or not they are discovered or reported within the warranty period.
I went back to Dabs.com and explained the situation. At first they said they would arrange for the laptop to be fixed and gave me a number to ring. This turned out to be the number for Fujitsu-Siemens - who still refused to help. I guess that Dabs hadn't actually read what I'd told them in the first place, because on 'discovering' that Fujitsu weren't going to fix the laptop they claimed that I was responsible for the damage:
Please be advised that the warranty agreement is now void due to physical damage which has been caused to the goods in question - whilst under your duty of care. We are unable to draw any other conclusions from the information that has been presented to us. If you have any further information that you can offer regarding this matter, then please do email it to us and we will investigate the matter further.
My reply went last week, along with copies of the letters to Fujitsu:
Please note that there are no external signs of any 'physical damage' that could possibly have caused this. The likely cause is inadequate fixing internally.
I have owned several laptops that have been subjected to heavier use (this laptop is almost entirely used by my wife in the house - (a fact she will readily attest to) and none of them have suffered any major faults - let alone the CD drive falling out!
So far I've had no response and it looks like I will have to take this to court. Fortunately I have friends who are solicitors and can give me free legal advice.
I'm a bit disappointed that Dabs are letting it go this far though.
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 2008-04-21 11:22:55 | |
What Fujitsu-Siemens Think 'Customer Service' Means
Executive summary: don't buy a Fujitsu-Siemens laptop if you anticipate the possibility of ever having to use the warranty. In January 2007 I bought an Amilo Pa1510 laptop to replace an ageing IBM Thinkpad T30 - a move that was a mistake in any case as the Thinkpad was the better machine...
After about six months the DVD drive started to fall out of the laptop. As it always worked fine when slotted back in I wasn't too worried. Soon after that I switched to a Macbook Pro anyway and the Amilo became my wife's laptop. As she didn't use the CD drive it wasn't a problem - until December when I was away and the drive now doesn't work at all.
Straight after that we moved house, and I finally contacted the Fujitsu help desk on January 22nd, which turned out to be two days after the one year 'limited warranty' expired. The 'customer service' man on the phone told me I would have to write in. Which I duly did. On the 3rd of March I received a reply to my letter of the 24th of January. Here is the salient part of the reply from Sue Young on their 'help' desk:
I do occasionally hear from customers who like yourself are outside the warranty period - be it a day, a week a month or even longer - and have experienced a failure that they would like us to fix free of charge. We would dearly like to assist these customers as we are no unsympathetic (sic) but as a business we have to question the practicality of this.
They may not be unsympathetic, but they are bloody useless. The laptop failed in a serious way inside the warranty period, but I reported it two days late and they refuse to honour the warranty. I wrote another letter surprised that they didn't feel a moral obligation to repair their failed laptop and reminding them of the UK consumer law. It ended:
As I'm sure you can understand, for an item that cost so much I can't let Fujitsu get away without living up to its obligations. I will be eagerly awaiting your response and documenting this conversation on my blog. I have to say that so far I am disappointed with the level of 'customer service' offered and couldn't recommend in good faith anyone purchasing a Fujitsu Siemens laptop if this apparently simple problem can't be resolved.
I will be taking this up with Dabs.com, where I bought the laptop from. In the past I have found their customer service very good but have never had to resolve a problem like this with them.
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 2008-04-06 22:47:43 | |
Categories: Computers, Life Tags: fujitsu, siemens, laptop, gadgets
Apples, Django is Wired and Faster Python
Just a collection of interesting links from the intarwebz today:
Report: Mac sales up 60% in February
The report shows growth in Mac unit sales up 60 percent from 2007
In dollar terms, NPD has Apple capturing a full 25 percent of the U.S. computer market last month.
Wired Magazine: Expired-Tired-Wired
Expired: ASP.NET - Tired: PHP - Wired: Django
Issue 2459: speedup loops with better bytecode
A patch for CPython that speeds up for and while loops through better bytecode. The same technique promises to improve list comprehensions and generator expressions as well.
Python-safethread: Python 3 without the GIL
This is a big-assed patch and I wouldn't rate its chances of making it into the core too highly - but it is a damn impressive project.
It allows you to compile a version of Python without the GIL (requires changes to C extensions of course). There is a performance cost for single-threaded code, but allows multi-threaded code to scale across multiple cores.
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 2008-03-25 18:24:33 | |
Categories: Python, Computers Tags: apple, mac, wired, concurrency, performance
SFI Conference: Erlang, Ruby and Java (and Concurrency)
A week before PyCon [1] I was at a very different conference: the Academic IT Festival organised by three universities in Krakow, Poland. I was also accompanied by my erstwhile colleague, Jonathan Hartley (who has currently abandoned us for Mexico to get married.) You can read his write-up in case you don't believe mine...
For a student conference this was fiercely well organised, with a fantastic array of speakers (myself and Jonathan not-withstanding). It was great to meet (amongst many others):
- Chad Fowler, author and prominent member of the Ruby community
- Maciek Fijalkowski who works on PyPy
- Joe Armstrong, the creator of Erlang
- Gilad Bracha, one of the architects of the JVM
The conference is free and open to all, and around half the talks are in English. Krakow is a beautiful city, so if you have the opportunity to be there next year then take it [2].
I'd like share with you some of the things I learnt at the conference.
Chad Fowler

Chad is a great guy, I had a great time eating kebabs with him at one in the morning in Krakow. He is also a great speaker and I'd love to be as confident as him before speaking.
I've gradually been learning more about Ruby, and Chad filled in a few more gaps for me. One interesting point was that the Ruby community generally sees Rubinius (a kind-of-equivalent of PyPy for Ruby) as the future of Ruby. Currently the VM is written in C, but they aim to develop a static-subset of Ruby so that the VM can be maintained in Ruby. This an idea originating, I believe, in Slang for Smalltalk, but also seen in RPython for PyPy.
I would love to see the future of Python in PyPy. Maintaining Python in Python sounds much more fun than maintaining it in C, but also I see it as the only viable path that can lead us away from the GIL and reference counting.
I also learned that in some ways Ruby is more restrictive than Python. For example you can't change the type of objects (which you can do in Python by assigning to __class__), or the bases of a class (by manipulating __bases__ on the class). Being able to change the type of an object is one of the requirements Gilad Bracha has of a dynamic language, of which he is a big fan.
Maciek Fijalkowski
Maciek is one of the PyPy developers. He first got involved through the google summer of code. He emphasised that one of differences between the PyPy team and the Python core developers is that while the Python-Dev team are fanatically interested in language design (which is good news for Python users), the PyPy team are much more interested in remaining language agnostic and producing the best possible VM.
There has been a sea-change in PyPy development recently. In the past PyPy has been a fantastic project for producing a wealth of not-quite-working-but-really-cool side projects. As a result PyPy has been at the 'nearly working' stage for a long time. They have recently pruned the codebase of anything unmaintained or that was blocking development. Some really cool things (like the ability to write CPython extensions in RPython) have gone (possibly to return), but the new focus on solidifying and completing the core is great.
Unsurprisingly though, the core Python developers, who have no familiarity with the PyPy code base, don't see it as a 'replacement' for the code base of CPython which they are very familiar with. Hopefully, as the JIT integration improves, PyPy will become more of a viable alternative in the not-too distant future. (Something I see as being potentially important to the concurrency with Python story.)
Maciek is also interested in the Resolver Systems Ironclad project, to see if parts of it could be reused to bring compatibility with CPython C extensions to PyPy - something that otherwise could be a barrier to adoption.
Joe Armstrong
Joe Armstrong is an eccentric Englishman living in Sweden. He started his talk with a look to the future for computing. Modern computing has long been based on the Von Neumann Architecture. In recent years programmers of sequential programs ('normal' programs, which Joe quaintly calls 'legacy' programs) have seen their code get faster and faster as CPU clock speeds have improved (despite the fact that Intel clock speeds are largely fiddled anyway).
That has now started to change. To reduce power consumption, and maintain the ever decreasing proportion of a chip that can be reached in a single clock cycle, clock-speeds are starting to drop and processors are gaining more cores instead. Sequential programs that can only run on a single core will start getting slower rather than faster.
Single chips with hundreds of cores, the power of a super-computer, have already been produced experimentally by chip manufacturers (who aren't keen to sell them and wipe out their market for selling many processors for supercomputers). Joe has a project which is close to getting funding for blowing sixty MIPS cores onto an FPGA.
Threading with locking, as a concurrency solution, is very difficult (but not as painful as it is often painted by the Python community - particularly if you take care with your design). Some alternatives exist, like Transactional Memory (which when implemented as Software Transactional Memory without hardware support has performance costs) - but although this technique scales over multiple cores it doesn't scale over multiple machines.
Another alternative is the functional programming language Erlang. By using lightweight processes (which aren't OS level threads or OS level processes but run on top of a scheduler in the VM) and removing mutable state, Erlang programs scale to multiple cores or multiple machines as part of the language design.
Concurrency is going to be ever more important and Erlang is very trendy at the moment. It is used by ejabbared which in turn is used by Twitter and there are some very interesting 'massively distributed hash table' projects likely to surface soon.
In CPython, because of the Global Interpreter Lock, even threaded applications don't scale across multiple cores. The GIL is supposed to make writing C-extensions easier, but it is an interesting design choice to make aspects of Python more suited to writing C than to writing Python. The Python community normally touts Process based concurrency as a better alternative. However, with a clean design you can limit the locking needed for multiple threads, and where you use threads for doing large calculations (and so have a lot of data to marshall back and forth) the costs of using multiple processes are great. Naturally Joe Armstrong things the answer is for us all to write in Erlang.
Interestingly, the work Chad Fowler has been doing recently has involved Ruby-without-Rails and Erlang. He says that writing Erlang test driven has been 'interesting' and has tended to make them use more processes (where in Python or Ruby you would expect TDD to make your code more modular). He is not sure whether this is a good thing or not, but it seems to be working for them.
Gilad Bracha
Gilad was one of the architects of the Java Virtual Machine, and also involved in Strongtalk, the phenomenal Smalltalk JIT that effectively became the Java hotspot JIT.
Random Aside: .NET vs Java
It was very interesting to talk to some of the Microsoft .NET guys at PyCon about '.NET vs Java'. Their take was "they have the better JIT while we have the better garbage collection".
Gilad knows a lot about optimising dynamic languages. He firmly believes that dynamic languages can run as fast as statically typed languages, the reasons that it doesn't happen is that all the people who know enough about the subject are being paid to work on other things (this is rocket science he says). One of the things that Maciek emphasised in his talk was that you have more information for optimisation about a dynamic language at runtime than you do for optimising a statically typed program at compile time.
Now that Gilad has left Sun (he is now working on a hush-hush project that involves creating a new language called Newspeak built on Smalltalk), he is happy to talk about the mistakes made with the JVM! (Unfortunately the slides aren't available.)
His talk was full of great quotes, and it is a shame that I can't remember them all. They include:
The problem with software is that you can add things, but you can't remove them. So it bloats (this is why his language is called Newspeak - in the book 1984 the language Newspeak was regularly revised to remove words).
Java has nine types of integer, and none of them do the right thing.
(C# is basically no better before .NET enthusiasts get excited.)
For example, 'Integer' has a public constructor and you can create new ones for the same value that aren't equal to each other!
You don't have auto promotion to big integers (Python longs), so you still have to know in advance how big the results of your calculations are going to be.
The basic problem comes from having primitives that aren't 'objects' and the consequent boxing and unboxing. A decent JIT can apply optimisation without needing to have primitives that aren't objects.
Programs possible from languages with a static type system are a subset of all the programs that can be written. For some people this is enough.
Don't listen to your customer
Although it sounds like it, I don't think he was knocking agile processes of involving customers in the design. He was more saying don't let your customers tell you how to do things.
Static type systems are an inherent security risk.
This last point is an interesting one, as security is one of the things that type-safety is supposed to be able to bring. He explained it with a justification followed by a story:
Formalising real-world type systems is very difficult. In order to formalise them, the authors of most type systems simplify them by making some assumptions. In practise those assumptions turn out to be wrong. Even if your formalisation is fully correct in theory, it is only safe if the implementation has no bugs...
Gilad told the story of a bug in the Java Mobile Edition type verifier. The byte-code has a 'jump' instruction, and the two conditions for the jump instruction are that the target exists and that the type-state at source and target agree. In Java ME, the type-state is tracked separately, and the type verifier only verified the type-state and forgot to verify that the target exists. A Polish programmer discovered that he could construct bytecode that would pass verification but could jump into data. He could then do things like overwrite the length of an array and effectively peek and poke into memory (on a Nokia phone). Using the type information in the operating system, he was then able to reverse engineer the whole Nokia operating system...
Gilad thinks the answer is for everyone to use Smalltalk of course (he also likes Self). He isn't too polite about other languages:
- On Ruby: The performance is pathetic
- On Python: I can't take seriously a language VM that uses reference counting
- On Erlang and improving performance through concurrency: what Joe didn't say is that Erlang isn't exactly fast...
Gilad's latest blog entry on monkey-patching is well worth a read. Jonathan and I are sort-of-quoted as 'the-pythoners'.
| [1] | France now has its own PyCon as well, the third PyCon in Europe: PyCon FR 08. |
| [2] | And if you would like to speak there, then Konrad would like to hear from you. |
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 2008-03-24 20:23:43 | |
Categories: Python, General Programming, Computers Tags: erlang, ruby, java, smalltalk, pypy, concurrency
Catchup plus More Mac Musings
Sorry for the lack of posts, I've been playing catchup. I've just finished the first draft of a 4000 word article on ConfigObj for the Python Magazine. I've also done a 500 word article on IronPython for the MSDN Flash UK newsletter. Ironically the 500 word article (on a whole programming language) is slightly under the word limit, the 4000 word article (on a module for handling configuration files) is slightly over the word limit... Don't worry I'll be sure to let you know when they're both available to read.
After the 1.0 release, we've been working hard over at Resolver Systems. We've been working on 1.0.1 which should be released any day now. For this release we've focussed on usability defect fixes and have managed to close out all the ones we scheduled plus a few extra (and one or two new features and performance enhancements along the way). We're still deciding what major features to work on for version 1.1, but whilst the boss is making his mind up we've been focussing on improving the speed of importing spreadsheets from Excel, improving recalc speed and reducing memory use.
Several people responded to my last blog entry with links to Mac OS X clients for Subversion. It looks like there are plenty! None of them are quite as good as TortoiseSVN for Windows (which sets the bar pretty high), but I'm getting used to the command line.
One of the major failings of the Mac OS X interface is that application menu bars appear at the top of your first monitor. If you have multiple monitors this puts the menu for applications a long way away. The best way round this I have found so far is a combination of DejaMenu (freeware) which brings up a context menu with a keyboard shortcut and Steermouse ($20 shareware) that can assign keyboard shorcuts to mouse buttons! Hardly ideal.
Oh, and one final thing - another Python snippet. This one discovered by Andrew Dalke as he pokes around in the dusty corners of Python's grammar:
... pass
...
>>> eggs()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in eggs
TypeError: 'float' object is not iterable
Using tuple unpacking in the function signature (which will disappear in Python 3) it is possible to create default arguments in functions that raise exceptions when you try to use them!
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 2008-02-21 23:38:18 | |
More Pyglet and OpenGL
Today I've been switching my desktop environment over to the Mac. I've also moved all my important files into a subversion repository, which makes switching easier. This is the first blog entry on the Mac, but it doesn't count because wxPython crashes on Leopard and I'm running Firedrop under Parallels.
Anyway, all that has nothing to do with this blog entry.
Jonathan Hartley has been furthering his Pyglet exploration.

Co-incidentally, Sylvain Hellegouarch has also posted some examples of working with OpenGL, from IronPython, to the IronPython Cookbook:
- OpenGL - Initializing Context With GLFW
- OpenGL - Rendering a spinning triangle with GLFW
- SDL for 2D Graphics with Zoom
These examples use the Tao Framework which is a classic example of a project where their about page tells you nothing about the project...
Back to the Mac. Mac OS X binaries for the latest version of Mono (1.2.6) includes a prebuilt MonoDevelop. Unfortunately it isn't at all usable on Leopard. On my MacBook Pro it won't compile a trivial projects and mangles lines as you edit. On my Mac Pro it wouldn't even launch. Oh well, early days I guess. I also experimented with VMware Fusion as it supports 64bit operating systems. Unfortunately it doesn't support 64 bit bootcamp partitions and as I have paid for Parallels I'll stick with it for now.
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 2008-02-16 23:27:40 | |
Categories: Python, IronPython, Computers Tags: pyglet, opengl, graphics, apple
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


