Making a Choice
Posted by stephen on Saturday, 25th February, 2006 @ 14:54
Arrgh! I'm kinda frustrated right now about which Python web framework to use. I know I indicated a couple of days ago with the launch of my new look home page that I've decided upon Django. But now I'm starting to change my mind. The big problem here is the stability (in terms of API) of both Django and TurboGears.
I've setup RSS feeds for my images in Plone which makes getting them out and into a nice new app a piece of cake, so I created a model in Django to hold the information and was immediately confronted with a Traceback because of some bugs in the magic-removal branch I'm using.
The problem here is that I can't work for now using this branch, and the alternative is the trunk development code. If I use that, in X weeks time I'll have to refactor when magic-removal makes its way into trunk. There's no real schedule for when this will happen and there's not been much dev activity on either version, so I feel a little stuck on the Django route at the moment.
This week TurboGears released version 0.9a1 which I've been waiting for for a little while now. And it looks pretty nice, so I'm tempted to rebuild the home page stuff with that. One of the big pluses for TG is that it makes use of other projects like SQLObject, so the basic APIs for working with data aren't going to change much between now and 1.0. And I've always preferred the Zope TAL like XML templating of Kid in TG to Django's approach.
What I really want is a mix of these two projects, the URL mapping and free admin system of Django with the Kid templating, MochiKit AJAX library and stability of the database API of TurboGears. Theoretically with a bit of work this is actually achievable, if somewhat unsustainable with both projects in a state of relative flux.
So I think my conclusion's going to be that I will rebuild the homepage in TG and see how that goes. Learning both frameworks can't be a bad thing and if anything, it'll hopefully put me in a better position to choose one when I need something for a serious project.
On a completely different topic, if you haven't already after my previous post, go check out GeekBrief.TV, it's really fun, and will only consume 3 minutes of your life every few days. Cali's lovely, if I liked girls, I'd definitely like her :)
A little bit better
Posted by stephen on Thursday, 23rd February, 2006 @ 20:26
Having spent some time thinking something wasn't quite right, and after hearing from my boss that he didn't like the blue, then hearing the same thing from Dave, I thought I'd best do something about it. Dave had mentioned the site being a chocolate brown colour and purple colour (I thought it was more of a blue), and simultaneously we both made reference to Cadburys chocolate. So I nipped over to their site and have blatantly stolen the hex colour reference for their purple.
After a little bit of Photoshopping and choosing a tone that's 30% brighter to make a gradient I have a result, and I'm quite pleased with it really. I've also shed a whole swath of CSS related to the sidebar and replaced it with the standard post styling, which I think makes things look a little more consistent.
As Tom suggested, it seems I'm trying to go all Web 2.0! All I need now is some AJAX, some tags and some rounded off corners!
On a side note I'm really glad I've been using Subversion for this, it's made life so much easier, and I totally recommend you use it for everything texty that you might change regularly.
What do you think of it now? Let me know!
Django Endeavours
Posted by stephen on Thursday, 23rd February, 2006 @ 03:30
If you're visiting my RSS feed you probably won't notice that anything has changed. Except the Intel Macs posting has been moved up to the top of the pile (well, below this one when it's posted). Sorry about that, it was missing a <p> tag! If you're viewing the RSS feed, just this once take a look at the website the old fashioned way.
I've decided to start from scratch and rebuild the site in Django. In part I'm doing this to get more flexibility than Plone offers me. But mostly because it's a good way to start learning Django. And because I've coded the page from scratch, it's also helped me get a better grip on CSS layouts. There's no tables here! I should probably remove the XHTML compliant logo at the bottom though, as apparently it isn't since the real blog content got loaded in!
Things are working in a rather unnecessarily complicated way right now, just how I like it! Mod_rewrite is mapping requests for ^/$ to the running Django server (which should only really be used for development apparently) and the rest is rewritten to the Plone instance as usual. So if you click any of the internal links you'll be back in the old site.
My plan is to migrate a bit at a time. I'm even using Subversion to manage the Django part of the site, which has proved very useful. As time goes on more of the site will exist inside this layout. No doubt I'll excitedly be keeping you posted when such events happen. It might not be for a few weeks though, I'm currently waiting for the unstable development branch of Django I'm using to be merged back into the trunk (it brings big API changes, which is why I'm not using the trunk version right now).
This of course means that, at least for now, I've decided to go with Django over TurboGears. A rather out of the blue decision in some ways. It was triggered by me learning more about Django and then seeing some really hideous TurboGears code that put me off it somewhat. That, and the Django automatically built admin system is great!
By the way, I've not actually migrated the blog yet, I've just written a quick bit of code that loads in the RSS feed from the Plone site and renders it in the new layout! How many other web technologies can I use to serve a single page I wonder?!
Let me know what you think of the new design, criticisms and suggestions will be just as warmly received as any positive comments regarding my rather underdeveloped design skills. I've been starring at it for so long to get to this point that I've lost any sense of how good or bad it looks.
Link Log - 19th Feb 06
Posted by stephen on Thursday, 23rd February, 2006 @ 03:16
In a break from my usual blogging style I've decided I've seen so much cool stuff in the past few days I just have to do a link log. So in no particular order...
- Urban Extreme Gymnastics - and you thought gymnastics was for girls or men in pink leotards. I wouldn't say that to these guys.
- XGL on Ubuntu HOWTO - amazing interfaces, courtesy of OpenGL (ala Mac OS X) make their way to Linux, thanks to Novell. And Ubuntu are early adopters.
- Contrary to a previous blog of mine, I'm coming to the conclusion that vlogging, video podcasts or whatever are actually pretty cool. Though I did notice most of the geeky ones are fronted by attractive young ladies... MobuzzTV, GeekBrief.TV and Diggnation.
- And if you're an Apple fan, check out macTV. Loads of cool old Apple ads and product introductions (the original iPod, Newton, etc) and some fun media references.
I'm sure there's stuff I've forgotten. But hey, I've got gigabytes of server space to fill yet. You lucky people.
UPDATED: I had to add this one too, it's amazing how a trailer can completely change the tone of a film. Shining.
Intel Macs: First Thoughts
Posted by stephen on Thursday, 23rd February, 2006 @ 02:57
It's certainly been a mixed experience upgrading to the iMac Core Duo. So I thought I'd fill you in on a few of the ups and downs of the first few hours with this beasty.
It's a beautiful machine, though of course the case design hasn't really changed since the iMac G5 (iSight). I'd read yesterday that it was surprisingly light, so I wasn't expecting it to be quite as heavy as it is! Perhaps they were discussing the 17" model, or perhaps the original G5 model was even heavier. Either way, it's certainly no bad thing, it's a very sturdy machine and floats perfectly on it's stand.
Front Row is very snappy compared to my experience of it on my PowerMac G5, which may not have been the optimal environment for it. The remote is very small and light and usable, though I can't help feeling it lacks the tactile qualities of my TiVo remote.
I've got my old 17" LCD plugged into the mini-DVI port courtesy of the adapter from my PowerBook. I'm not sure why they couldn't fit a full DVI header on the back. The only thing it does do is make all the ports looks small and neat. Perhaps that's good enough a reason. Extended desktop is working perfectly, so for the first time in a year or so I'm using two displays again. It's shocking how dull the picture is on my old screen compared to the iMac.
On to the software. Booting is incredibly fast as has been noted elsewhere. I think a big part of this perception though is that the screen on the iMac comes on instantly because the RAM check is so much faster. It takes both my PowerBook and PowerMac a long time to activate the display while OpenFireware counts out the bytes.
Once booted, everything's pretty darn snappy. Most programs seem to start WITHIN the first bounce of the dock icon. That is, if they're native programs. My experience of PPC programs isn't quite as stellar. They feel relatively 'sticky' and less responsive. Luckily the PPC apps I need aren't dependant on reacting quickly, so I'm not too worried.
Most of my life is spent in Terminal, Safari and TextMate, all of which are native, so my overall productivity hasn't taken a hit. I'm running beta builds of Camino and VLC until there are stable releases for x86. That's not to say the PPC stable builds don't run, they do, just within that layer of treacle.
Ironically, one program I haven't been able to make work is Azureus, the BitTorrent client. The reason it's ironic is that it's a Java program! So it should run anywhere. There's two versions, one with some actual Mac-specific code and one that's a pure .jar. Neither will even contemplate starting for me.
I should mention that I skipped the Migration Assistant. I don't like the idea of it on a PPC Mac, I prefer starting clean and filling in the gaps as I need. And on an Intel Mac I have a feeling it could be a very messy experience.
For example, any POSIX terminal program, such as Fink or MySQL doesn't get pumped through Rosetta, so simply fails to work. MySQL have a build for OSX x86, so that wasn't a problem and I'm using DarwinPorts now to get the rest of the Linuxy goodness.
My next issue is to do with plugins. There's a DivX beta available for QuickTime that currently has awful feedback, so I think I'm going to hold fire on that one for a little while. I'm not sure if the Flash plugin is native or not, but what I do know is my attempt to install Shockwave was fruitless. So those little bits of the web constructed in the aforementioned product will remain invisible to me for now, at least on this machine.
To conclude, this machine flies for native code. Now comes the patient waiting game of the early adopter as the applications slowly filter through to Universal format. Fortunately I tend to use nice little bits of $30 software by nice little companies. And these guys have got their act together. But then they've not got years of legacy code in their products, which I think is why the quality is usually somewhat higher in my experience when compared to the 'larger' applications from the 'traditional' vendors. If you're a non-graphical web developer, this machine rocks.
It's an odd situation really, but one that isn't exactly alien to Apple. In my experience Apple are great at providing a simple, seamless computing experience (as much as anyone can right now). And I can't help feeling this switch to Intel mars the experience somewhat, albeit due to lack of third party support rather than a problem in Apple's own products.
Furthermore the real problem here is that they've converted the consumer end first with the iMac. And I think it's fair to say that the average Apple consumer user has come on board at least partly because of the 'Apple experience'.
It's a tough one, and I guess they've done the best job they can. At least I can honestly say that in terms of the Apple components I'm still using a top quality product, in both hardware and software terms. And maybe that's all they can hope to reasonably achieve given such a major task.
Something rather funny appeared when I installed MenuMeters (which is native). I found the report on my CPU rather amusing:

Have Intel just been steadily overclocking the humble 486 all these years?
Innovations
Posted by stephen on Saturday, 18th February, 2006 @ 01:34
I'm really looking forward to the release of Windows Vista. Hopefully by then it'll be installable on my new iMac Core Duo. I only wanted the nice case, not this horrible Mac OS X thing.
Look at all the cool, innovative new features that I'm sure are just going to completely change how I use my computer. My favourite is definitely the 'Memories' management showcased in episode three...
Growing Pains
Posted by stephen on Thursday, 16th February, 2006 @ 13:42
Within a few hours of my last post the Camino projected released version 1.0 of their browser as a Universal binary. And just now I found these instructions for getting the Azureus BitTorrent client working on Intel Macs which has done the trick. It seems like life gets a little easier every day!
Except when it comes to wireless networking. I've encountered a rather annoying problem where any meaningful amount of data transfer over an Airport connection results in rather spikey performance. Copying a large file I initially saw transfer of around 4Mbyte/sec, which is way higher then I've ever seen before. Then it stops completely for a few seconds, then it resume at a couple of hundred Kbytes/s. Needless to say it can't even fulfil the full potential of my broadband connection, let alone moving files around the local network.
And it seems I'm not the only one with this problem, I've seen lots of messages on the Apple forums about it. In the exact same spot my G5 and my PowerBook perform flawlessly. The problem occurs with my Airport Express or my Mac Mini doing Internet sharing.
It's possible the explanation is that the Intel chipset used for wireless often activates a power-save mode that most access points don't cope with very well. On a Windows computer it's possible to check a box to deactivate this power saving feature. Unfortunately the same is not true of OS X. But that does leave the hope that Apple can fix this in software.
To get around it I've made a hole in my bedroom floor and passed an Ethernet cable downstairs behind some heating pipes and on to my switch. Very 20th Century! It's not exactly a solution for everyone though, especially if the same problems are encountered with the MacBook Pro.
There's one advantage at least, I can transfer files at around 12Mbytes/second now!
The Other Upgrade
Posted by stephen on Tuesday, 14th February, 2006 @ 12:06
My trusty PowerMac G5 has served me well for about two years now. Which of course means it's time to replace it. I've had a look on eBay and ?700 seems to be about the right price for it. It's nice that Macs hold their value well.
It's also very useful because ?700 will take a big dent out of this...
Simple things...
Posted by stephen on Monday, 13th February, 2006 @ 19:33
I've just had a look at this video linked to from Slashdot, so you'll have to be patient if it's running a bit slowly.
It's a demonstration of a multi-point touchscreen interface. Usually touchscreens are only able to process inputs at a single point. In this case the technology accepts inputs from many different points. And it's incredible how much such a simple feature can completely revolutionise our interaction with a computer. At least I think it does.
And on a follow up to yesterday's post... why did EV1 decide to reboot my machine at around 5.15pm today for no specific reason when I've not got everything booting automatically again yet?
Upgrades
Posted by stephen on Sunday, 12th February, 2006 @ 22:05
It's been a rather frustrating weekend geek wise. But good otherwise.
Continuing the Stephen Fry love in that is me at the moment, last night I finished reading Making History. And I only started reading it on Thursday night, so it must have been good (and indeed it was). Can definitely recommend it, an exploration into what the world would be like if Hitler had never been born (spoiler: different, not better).
I'm really enjoying this reading business, as my slowly filling TiVo can prove. And I seem to have sped up somewhat over the course of two books. It's almost like I'd forgotten how to read non-geek or non-journalistic prose.
Anyway, the reason I managed to get through so much was two very late nights and then yesterday being stuck in front of the computer for 7 hours or so occasionally prodding neuron2 (the server this site and many others are hosted on) whenever it was available.
I'm not sure quite what took it down in the first place, there wasn't anything in the logs to indicate a problem. Unfortunately, upon reboot things didn't progress much further than "Uncompressing kernel". For a while now EV1's serial console server has been inaccessible to me, so it took me a little while to even find this out.
Then I discovered that my DNS secondary didn't agree that being a secondary to the domains on the server was one of it's jobs, so even other sites not directly hosted became unavailable.
Long story short, a new disk has been added with the stock RedHat install and I've mounted my RAID set and chrooted into it and got everything running again in a very temporary fashion. A couple of attempts to get the original Debian install booting natively have failed, and without the serial console I can't find out why.
Unfortunately EV1's system admin guys aren't in again till tomorrow morning, so the serial console won't be working again till then, which means I can't do much until then.
Annoyingly they'll want to whip out either the new disk they put in or the original master disk within 48 hours of yesterday's titsup.com event. I don't really want to be taking the machine down during the day in attempts to make it work, there would be many phone calls!
Fortunately because I've got a two-disk server and am using Software RAID, so I can kick out the old master from the RAID set and have them remove it this evening. Then when things hopefully start working properly again the new disk can be assimilated into the RAID set and be nicely Debianified.
Other notable upgrade headaches include Quills, the blogging product I use for Plone. I moved from 0.9 beta 2 to the final release a couple of days ago and didn't actually notice that it completely broke the archive along with the ability to read blog posts individually.
I managed to track it down just now to my customisations of a little bit of code that deals with said archive and posting display. As I don't make use of the categories feature I'd removed some code that deals with displaying a post's category. Because of the way Plone works, I'd effectively taken a whole wedge of code from the beta version and told Plone it should use it in preference to that which was installed by the original product. Obviously there'd been a few changes to the final release. Never mind, fixed now and I'm sure no one noticed. Especially not with 12 hours downtime yesterday!
I'm hoping one day to actually stop using Plone and start using something of my own devising, along with some other stuff I really want to build to bring in a few pennies. But I'm currently waiting with baited breath for Django and TurboGears to reach version 1.0 so they won't make changes that break anything I might try to build now. Then finally I might be able to choose between them. Oh well, at least I can be content that my website is Python powered now, albeit with a thick layer of gooey Zopey fudge on top.
Another non-geek upgrade is my front door. Not longer is my house fronted by a draft-enabling, minimally-secure bit of wood. Now there's a lovely bit of no doubt environmentally damaging uPVC which seems to make to the whole thing air tight. And there's now enough big bits of metal that slide into other bits of metal to keep any insurance company happy.
There's another upgrade too, but I'm not going to tell you about that. Well, not yet.
Recently Reading
Posted by stephen on Sunday, 05th February, 2006 @ 23:56
"Strange the ways in which loyalty to one's parents can show itself: never when they are there and when they would cut off a finger to see the tiniest scrap of evidence of filial devotion, but always when they are miles away. I visited a boy's parents one Sunday for tea when I was eight or nine and saw that they used Domestos in their lavatory, not Harpic which we used at home and I remember thinking poorly of these people because of it. We were Vim, Persil Fairy Liquid and RAC, other families were Ajax, Omo, Squezy and AA and one pitied them and felt slightly repelled: didn't they realise they had got it all wrong? Fierce pride in one's parents' choice of bathroom scourers, withering contempt for their opinions on anything concerning life, the world and oneself."
Stephen Fry, Moab is my Washpot.
Improved Webmail
Posted by stephen on Sunday, 05th February, 2006 @ 01:00
Every now and then I find it necessary to resort to using my web-based email service. Usually if I'm not with my laptop or if I can't get anything except web access on the network I'm on.
For these times I have setup SquirrelMail on my server. I know quite a few users with accounts on my mail server make regular use of the service too. Trouble is, it's pretty hideous to look at and to use.
So today I've installed a brand new web based email system that'll run side by side with SquirrelMail. It's called RoundCube and it's pretty darn excellent, as long as you're using a recent browser.
It's currently in the fairly early development stages, but seems to be working well from the limited use I've made of it. If you've got a mail account with me you can try it out yourself, and feel free to use it instead of SquirrelMail. Be warned it may be buggy for now though.
You can find it at:
https://secure.neuron1.com/webmail/
As usual you'll need to accept the self-signed SSL certificate and you can login with your normal username and password. If you've got lots mail it may take a couple of minutes to log in the first time. But it builds a cache in it's database, so successive logins should be much quicker.
Make sure you Personal Settings - Identities and edit your name and email address so that message come from the right place! You can even setup multiple identities if you've got a whole domain with me and want to send messages from other addresses.
Let me know what you think. I'll try and stay current as new versions come out and hopefully it'll be backwards compatible.

Laptop Surgery
Posted by stephen on Saturday, 04th February, 2006 @ 19:02
On Sunday I picked up my tiny Sony VAIO that I'd lent to Aaron after he moved over here in September. Sadly it had been plugged in during a rather severe storm and was unable to power up. With much hope of a burnt out fuse I tried a different mains lead. Unfortunately this was not the culprit.
A quick poke with the multimeter and it seemed to be the power supply that's the problem, so hopefully the laptop itself would be OK. A little Googling found me a new PSU, for ?51. Of course this little VAIO features an entirely non-standard connector into the laptop doubtless made from unobtainium.
Fortunately it has only two pins, and a + and - sign on the connector to indicate which is which. A couple of minutes on ebay looking for '16v 2.5A' found me a single result, a Fujitsu laptop PSU for ?9.99.
So I thought it worth the risk. Certainly a less depressing waste of money if it turned out the laptop itself was fatally wounded too.
Come Wednesday evening and I have a jiffy bag waiting behind my dustbin where the postman usually leaves things rather than carding me. I also came home to my photos ordered through iPhoto leaning against the door. A convenience for both the postman and myself, but one that carries with it a few risks I feel.
Luckily, even though I wasn't home from work till after 9pm, both items were still dutifully present and dry. The photos had come out beautifully, even at the larger sizes. I can thoroughly recommend the built-in printing to any Mac user who's fond of their digital photography.
A little later, and after a successful hunt for my wire strippers, the surgery began. The Fujitsu was certainly more stout and less comely than the original Sony unit. This had the benefit however of the DC lead being made of a nice, thick and well separated copper pair in thick black plastic.
This approach was far too brutish and uncouth for the VAIO DC cable of course. An altogether more svelte purple cable that upon incision revealed a fine centre core within a thin plastic sheaf, surrounded by an encircling copper layer. A further multimeter examination revealed that as suspected the inner core was the positive terminal.
With bare wire now showing from the more industrial DC cable of the Fujitsu supply, another probing proved positive was the cable with the thin white line.
A little stripping and squeezing and mangling resulted in a rather tenuous connection and so, for want of a soldering iron, I searched for some black electrical tape. But it had unfortunately been swallowed up somewhere in my many piles of things and could not be found. So sellotape sufficed and the connection was now a little less meagre.
Not one to get ahead of myself (a trait not borne out of natural discipline but bitter experience) the AC cable was connected and the DC connector pins were probed once more. That ?6 expenditure in Maplins was definitely paying off. And sure enough, 16v or thereabouts was eagerly awaiting a task and travelling in the appropriate direction.
All that remained was to plug it into the VAIO. And so with much trepidation I inserted my purple end into a slightly darker purple hole. And nothing, no fireworks, no surging orgasms of light from the charging LED. How disappointing.
With my need for instant gratification left wanton, fate chose to let me down easy. A few seconds later, after current had surged through the many circuits and built up sufficiently in all the right places, an understated blink of the charging LED seemed to wink at me as if to say 'only joking'.
