Python Programming, news on the Voidspace Python Projects and all things techie.
SPV Unlock at the Voidspace Shop
SPV C500 / C550 development process for unlocking your mobile phone handset for any network AND application unlocking allowing installations of unsigned software (such as backup apps, games and third party software) and writing your own applications. This is the official ORANGE unlock method.
With this process your handset will be able to take any SIM on any network  and any software. Only £4.99
- The process is completely reversible.
- Normal HTC Typhoon unlocking service price £20
- Works with the latest ROM
To purchase, or for more information, visit the Official SPV Unlock Page.
|||Sometimes called SIM free.|
Breaking out into the World Wide Web
At work our internet restrictions have varied several times. This means I've had lots of experience at trying to break through censoring firewalls that block access to parts or most of the internet.
I have written an article documenting the various tricks I've learned, some of which are quite novel. It may be useful for anyone in a similar situation who still wants to browse the internet :
I thought I'd share my favourite jokes with you. Two are a bit geeky (my apologies in advance), but the first should be funny for everyone .
A young couple are visiting Spain. They have been recommended a particular restaurant that evening. The restaurant is situated near the bull fighting stadium and the house speciality is the testicles of the bull from the previous evening's fight.
They sit down, and the young man boldly orders the house speciality. To his surprise, the waiter brings him a plate with two shrivelled, and distinctly undersized, objects placed in the centre.
"What's this ?" he asks. "Well", explains the waiter, "Sometimes the matador wins, and sometimes the bull wins"...
The next two are geek only jokes, but very funny if you get them. The second one had me especially frustrated trying to find someone I could tell it to who would understand :
Spoilers in the footnotes.
There are only 10 kinds of people in the world. Those who understand binary and those who don't... 
Heisenberg was out driving on the freeway one day. Lost in thought about quantuum matters far beyond the understanding of us mere mortals, he was blissfully unaware of the fact that he was way beyond the speed limit. In due course he saw the blue flashing lights behind him and he pulled over.
The traffic cop got off his motor cycle and indicated for Heisenberg to wind down his window. "Do you know how fast you were just going ?" the cop sternly asked. "No" replied Heisenberg, "But I know exactly where I am"... 
|||When I was young I had an encyclopaedic memory for jokes, with one archived for virtually every situation. These days I only seem to be able to remember the naughty ones. So either my head is now full of more important things, or I'm getting old.|
|||10 is binary for two.|
|||Heisenberg formulated a principle that is now a foundational plank of quantuum physics. He stated that the more precisely you know a particle's velocity the less precisely you know its position - and vice versa.|
Well, tomorrow (hopefully) I find out about the Python job. Thanks to a heads-up on this blog by another candidate, I also applied for a position with Jamkit. They use Zope to provide CMS systems for charity websites.
Unfortunately I applied very late in the process. They (seemed) to like me but also felt that there wouldn't be enough development in the job to keep me satisfied. Perhaps they're right. sigh It's still disappointing though.
The prevalence of Zope makes me think that I should be more active in looking for work in this field. So if you know of any jobs working with Python or Zope  in London or the Northampton area, get in touch.
My CV is online here.
I would also consider an IT Support role that enabled me to develop my skills in some of the following technologies :
- HTML / XHTML / CSS
- Web Services
Utterly unrelated good news. Stackless Python has now been ported to Python 2.4.2.
This is good because there has been little visible progress on this project for a while. Almost certainly the advent of EVE Online enabled the port.
|||I've not used Zope before, so we're talking junior developer here.|
Movable Python News
I thought I'd keep you up to date with how Movable Python is doing.
It's still selling slowly but steadily. Including copies sold before the pre-release I've now sold around fifty copies. Since the c't review, and resulting blog entries , most of the recent buyers have been German.
One or two of these have had corporate email addresses, so perhaps some more work might come from them.
In theory this makes me a Micro-ISV.
In his introduction to Micro ISV - From Vision to Reality, Joel Spolsky writes :
I have a crystal ball, and can now tell you [...] exactly how much money you're going to make during the first month after your product goes live.
In the first month, you are going to make, [...] about $364, if you do everything right.
That's pretty much what I made.
Maybe I should take this up full time then.
Today was the first day that someone bought a version of Movable Python that isn't for Python 2.4. I have just sold a copy for Python 2.3.
I'm slightly surprised that no-one has gone for the Python 2.2 version for compatibility testing. I use it for testing CGIs for 2.2 compatibility. A lot of cheap hosting accounts only offer Python 2.2 for CGI and I like to keep my scripts working with that.
As soon as a 2.5 alpha installer becomes available, I will release Movable for Python 2.5. That will allow you to play with it without having to install it.
SlippedStream is also doing well. It's a nice mini application that I distribute for someone else, but I didn't expect to sell many.
|||By the way, most of the Movable Python code is platform independent, except for the fact that it uses py2exe. I would be interested on collaborating with anyone wanting to create a Mac version using py2app.|
More French Articles
Two more of my articles have now been translated into French. That means that French Pythoneers can read all three of my http articles in their native tongue.
The articles were translated by Gerard Labadie and the HTML markup done by Thomas Labadie (11 years old).
The Joy of Programming
For some people programming is a job, a dull number crunching nine to five thing. For others it's a hobby, an interesting pastime to tinker with.
For some of us, whether as job or hobby, programming is more than that. It's a challenge, a medium of expression, a framework to think in, to build things and be creative, our craft. These are the hackers.
Wherever you fit on this spectrum, there are certain feelings and experiences common to all programmers.
This post is about four common responses that hacking produces in me from time to time. When taking on any large(ish) programming project, the details may vary but the chances are that you will find yourself in one these situations. Recognizing these feelings can help you see through to the other side, and not be fazed.
New Concept: Blank Bewilderment
This is the feeling that comes with working in a field or area that you've never dealt with before. Every field, whether it be web protocols, databases, threading or metaclasses has it's own jargon and idioms. Your immediate response to trying to fathom out this tangle can be blank bewilderment.
This can be even more true if involves reading existing code. Code inevitably jumps around, and trying to follow branches and method calls (especially on classes with inheritance) can soon exhaust your mental stack .
Inevitably though, within a few days (or at worst weeks) the new concepts will feel like old territory and you will wonder what the problem was.
I remember this feeling when I first encountered classes in Python. I was coming from not having done any programming for ten years, and had never come across object orientation before. My article Introduction to OOP With Python was written as a result of this.
Good Idea: Initial Enthusiasm
I've encountered this virtually every time I've come up with a new idea. New ideas usually come in the abstract, as an ideal or some problem you think you can solve neatly. Gradually a framework for implementing congeals from the  fuzzy cloud and you determine to do it.
The initial idea will then seem crystal clear. The heart of your program is already written in your mind, with only the details to work out, and it all seems so simple.
Not long after starting to hack your idea into place, the pesky implementation details become more convoluted and difficult than you imagined. The central idea probably is as good as you thought, with maybe a few edge cases to sort, but the framework around your idea will always take longer than expected.
The initial rush of enthusiasm can soon wear off, and a small project can spiral into a minor mountain of code and modules. Persistence will pay off though, a good idea is still a good idea.
Bug Hunting: Sheer Frustration
This is probably the least favourite experience of any programmer, but soon familiar to anyone who has written code. In this extract from a longer article, Brian Hayes mentions what is possibly the first time any programmer experienced this feeling.
Most bugs can be tracked down and eliminated pretty quickly. There will always be one or two that evade you though, usually those mission critical ones that are timing dependent and only show up in obscure circumstances. They absolutely have to be fixed, and they must be somewhere in code that you've looked over eight times and are certain must be correct.
Frustration and despair will be your surly companions at these times, and the task seemingly hopeless. The only way you won't find the problem though, is if you give up. Inevitably you will find the bug, probably in a line you've read many times already, and finally squashing it is a great feeling.
Big Project: Numb Passivity
Having a large project to get your teeth into can be great, especially if you have the time to devote to it. Sometimes though the task can seem too big. You realise that to get the shiny GUI (or web interface) in place, there are a huge number of libraries to write, data formats to create and test, and hundreds (if not thousands) of fiddly excruciating details you haven't even started to think about.
Faced with this mountain of things to achieve, numb, screen staring, web browsing passivity is a perfectly natural reaction. You don't know where to start and as soon as you try and think of one aspect a hundred more jump unbidden into your mind clamouring for attention. The sheer size of the task has paralysed you.
The truth though, is that it's a mountain you can scale, and probably one you've scaled before. Systematically break the task down into smaller units and pick one to break down into even smaller tasks. As soon as you have a manageable problem to face, you have something to crack on with and inexorably the mountain becomes an artefact.
|||One good suggestion that I've not tried, is to write flashcards as you follow the code to represent your 'mental stack frames'.|
|||Often the core implementation technique comes as part of the idea.|
Categories: General Programming
On Friday I had a job interview. This was for a job working in London, programming with Python. Jobs programming in Python are rare enough, but this could be very interesting.
They've chosen Python for what seems like a very good reason, besides its sheer elegance and flexibility of course.
The interview was five hours long. They are a small and young team, with currently three developers. They use pair programming. Because of this, it is particularly important to them that everyone in the team gets on and is able to work together. So I had a half-hour/forty-five minute interview with each of the programmers before doing some programming with two of them.
None of them asked me any personal questions . They all asked me about design patterns.
It's impossible for me to gauge how well the interview went. My lack of an academic programming background showed up, and my diagrams of program structure were ropey to say the least. The rest went better, so I think I'm in with a chance.
The two core developers (well, the two who've been doing it the longest) come from a C++ and a Java background and are relatively new to Python. As a result I was able to point out a couple of minor features of Python syntax that at least one of the developers hadn't come across before.
They are all intelligent guys, and seem straightforward enough to get on with. Pair programming looks like an excellent development methodology, along with the other development choices they've made. I'd definitely like to get the job, but I'll find out on Thursday.
Hopefully my strengths, Python experience, creative intelligence and strong productivity, came across and I'll have good news for you then.
|||One of them came close when he asked me one question about my time at University.|
Like many people, when I first installed Firefox I played around with an enormous number of different extensions. After a while I settled on a few that I used regularly. The number that I used was surprisingly high though.
Now that I have to re-install everything, I also have to re-install all my extensions. Needless to say I didn't keep a list of the ones I use.
This entry is a list of all the Firefox extensions I'm using currently. It may be interesting to someone, but it's also a convenient list that I can refer to if I have to do this again. sigh
Of course. I use the pagerank display and various other features.
Very useful, at least if you use Del.icio.us.
Adds a menu and a toolbar with various web developer tools.
Allows to choose if you want to view a PDF file inside the browser (as PDF or HTML), if you want to view it outside Firefox with your default or custom PDF reader, or if you want to download it!
I almost never want to view a PDF file in the browser.
View and manage downloads from a tidy statusbar - without the download window getting in the way of your web browsing.
A notifier for Gmail accounts.
Notifies you when updates are available for your extensions and themes. Allows quick access to your extensions and themes and the ability to check both types for any updates. Easily configurable for automatically installing updates when available and checking for updates when Firefox starts.
SwitchProxy lets you manage and switch between multiple proxy configurations quickly and easily. You can also use it as an anonymizer to protect your computer from prying eyes.
I sometimes run several localhost servers as proxy servers. This lets me easily switch between them.
This extension adds the following features to tab browsing in Firefox :
- Close button on each tab. Different styles available.
- Focus last selected tab when closing tabs. Also have the option to give preference to non-visited tabs.
- Recently Closed Tabs list on the tab bar context menu. Remembers browsing history for each tab.
- Context menu option to open selected text in a new tab.
- All of the features can be enabled/disabled separately using the Options dialog.
The most useful of these is adding a close button to each tab.
As I'm not currently doing much web development (which will probably change soon), the only web development extension I have installed is the standard one. At some point I will probably install the HTML tidy extension, live headers, and a few others.
The Nightmare Continues
My windows nightmare is blossoming into full scale disaster. Actually, it's not that bad; just pretty bad.
I recently bought a bluetooth device and a webcam. Neither worked satisfactorily. The webcam needed a windows update and the bluetooth had a whole forest of problems that came with it.
It's over two years since I installed XP onto this machine, and some of the bluetooth problems seemed to be caused by the previous network this computer was attached to.
All in all (and on the advice of my lawyer ), I thought that a fresh install of Windoze might be in order. Unfortunately, I didn't think this through properly before doing it. doh
Ok, so I now have to re-install and re-configure all my applications. Not too bad, at least my data preserved ? Well, my outlook data is all on my PDA and my emails are all still in the Documents and Settings folder of my previous login.
It is at this point that the universe decides it has a grudge against me. My PDA has another wobble requiring a hard reset. My contacts and calender disappear with a faint digital whimper. At around the same time my cheap UPS  decided to give up the ghost. I'm not sure what my computer was doing when the power was unceremoniously whipped away from it, but when I powered it up again XP was forced to recover every single file on the hard drive. That took a long time.
When I finally get back in I can access the data in the Documents and Settings folder for all the previous logins except mine. "C:\Documents and Settings\Voidspace" is not accessible, Access is Denied. aaaaaaarghhh...
I wave fondly goodbye to my emails (mainly archived in gmail anyway) and any hope of retrieving my calendar and contact data from outlook.
I'm not sure if this was a windows oddity, or maybe just a consequence of the UPS death. Unless I can find a way round this problem, I may never know.
As if all this wasn't enough, we've just moved onto a wireless network for the internet. I was directly plugged into a 10Mega-Bit connection, and the new connection is extremely ropey. I'm sure that can be resolved, but it's currently a touch frustrating.
Re-installing windoze did resolve the webcam problem and made my network configuration a bit more straightforward. It didn't fix the bluetooth problem, so perhaps the belkin device is faulty.
|||Which was invaluable when I lived in a remote(-ish) farmhouse susceptible to brief and not-infrequent-enough power cuts. When I bought the UPS I didn't realise that the battery in it wasn't re-chargeable.|
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 License.