Zope Image to filesystem image

March 16, 2007
2 comments Zope

Today I bumped into a nasty challenge when trying to copy a Zope image from ZODB to the filesystem. The reason why it wasn't easy was that Zope splits the file up into chunks if it's upload size is more than 65Kb (2^16 bytes) which I guess it does for being able to "stream" the file back into the browser when viewing the image instead of sending one large blob.

So, this didn't work:


>>> imgobj.meta_type
Image
>>> open(temp_file_path,'wb').write(imgobj.data)

...if the data is big because sometimes imgobj.data is a string (the binary data) and sometimes is a ImplicitAcquirerWrapper that you have to iterate over.

Truncated! Read the rest by clicking the link below.

Earl Grey or cheap tea, does it really matter?

March 13, 2007
1 comment Wondering

Earl Grey or cheap tea, does it really matter? All of this week and last week I'm working at a client's office in west London. So I've been away from the sanctuary of our office now for a while. At my usual office I have bought some nice Twinings Earl Grey tea bags. Definitely a favorite of mine.

When I started working at this office last week I had to resort to a difference tea that tastes less good. The first couple of cups were all a disappointment but addiction to caffeine probably pulled me back into the kitchen for more cups as the days got on. I drink about 4-5 cups per day and at this stage I don't even remember what good tea tastes like. I actually enjoy this cheap tea just as well.

Because one drinks such vast amounts of tea the taste just becomes what it is and it's only when you change from a quality tea to a cheap tea that you notice the difference. The question is then, as long as you stick to the same tea does it really matter if you drink fancy Earl Grey or cheap industrial tea? Surely the health factor is negligible but the price difference isn't thus going for a cheaper tea would be smarter? And by drinking cheap tea, when you a precious afternoon tea at the Ritz you're going to enjoy the tea even more.

Or should I be stoned and lynched for wasting thinking time on this?

Kung fu in Twickenham

March 9, 2007
0 comments Kung Fu

Yesterday I went down to Nick Fielding's new Kung Fu club in Twickenham to train because this week I've been working for VSO in Putney (southwest London). His venue is a big church hall with a very nice floor and a nice atmosphere too.

Finding the place was easy because it was near the Twickenham train station but as always happens, when you actually get near the street and house number you're looking for you get a bit confused so even though I found the street quite quickly I did actually make a hell of a detour around the block the church hall was on.

Nick and I have been training under Dave Courtney Jones and Dennis Ngo in the City & Islington club since about 2001 I think and I genuinely believe Nick is going to do well as an instructor. The classes in Twickenham have only been going for about two months but he's already got plenty of people coming regularly.

If you're reading this kung-fu-students-of-Twickenham, hello, thanks for welcoming me on my visit to your club. I hope we meet again at competitions or camps at Dennis.

Aussies in London - What are you doing here?

March 2, 2007
1 comment Books

Aussies in London - What are you doing here? I've just finished Dylan Nichols book called "What Are You Doing Here" which is a funny little book about Australians in England (London especially), why they came, what they do here, what influences they bring with them and why they keep coming and last but not least what gets them to go back home.

Dylan is a good friend of mine and I book my signed copy at his book launch a couple of weeks ago. A lot of my friends here in London are aussies and reading this book will only help me understand them and possibly whats going on in their head. Reading this book has given me some profound understanding about Australians' feelings about coming here that I didn't understand before.

Truncated! Read the rest by clicking the link below.

JetBlue a good and bad website

February 22, 2007
0 comments Web development

JetBlue.com in Firebug It started with this letter of apology on the corporate site of jetblue.com which was quite impressive. Discarding the content I liked the design and the simplicity of the navigation.

I then tried the flight booking interface and was even more impressed. It was intelligent and fast and since I was just goofing about to test rather than to book I accidently selected 30th of February as my return date and a Javascript alert box popped up and prompted me of a my misstake and corrected it. All very impressive since so many airline booking forms suck badly these days.

Then I clicked to go to the homepage and noticed how my Firefox almost froze and started stuttering. Even though the homepage fits on one screen and hasn't got much information it took 11 seconds to download it completely! (apple.com takes 4 seconds, peterbe.com takes 2 seconds on this WiFi connection I'm at)

Truncated! Read the rest by clicking the link below.

Sedo.com - any good?

February 12, 2007
1 comment

Has anybody used Sedo.com to try to convince a domain namn owner to sell his domain name? They charge $69 for this service but it doesn't sound like they're going to do much.

Or does anybody have some good advice for how to negotiate to buy someone else's domain name. The domain name I've got my eye on is a .co.uk and was registered recently but is not being used; just a redirect to a splash page about a new site due to be launched soon.

Vista voice recognition and Perl

February 9, 2007
7 comments Misc. links

Vista voice recognition and Perl This is probably one of the funniest clips I've seen since the last one that made my laugh out loud.

http://www.youtube.com/watch?v=QkD90ZV07zo

The guys is trying to write a Perl program in notepad and the Vista voice recognition program is not helping. It's amazing that they guy doesn't give up. In fact it's actually quite impressive how he continues to struggle on. Enjoy!

UPDATE

This clip has been removed from YouTube unfortunately. Does anybody know where else it can be found?

Comparing REAL values in PostgreSQL

February 7, 2007
0 comments Linux

Long story short, if you need to compare floating point numbers against columns defined as REAL you need to first cast them to NUMERIC in PostgreSQL. And to compare equality between two numbers with different amount of significant figures you have to use ROUND().

Truncated! Read the rest by clicking the link below.

A Flash interface that doesn't suck

February 4, 2007
2 comments Web development

A Flash interface that doesn't suck cbeau.ca or "Retouche Photos Retouching" is a neat little online gallery showing what can be accomplished with photo retouching of models and other photos like that. What's interesting about the gallery is that the interface is great. It's done in Flash and I'm often disappointed and very rarely amazed by Flash interfaces. I still love Flash games as a user interaction medium and the Flash video players have worked a zillion times better than Quicktime, Windows media or Real player.

Most Flash interfaces are just annoying. Thinks flash, blink and move away from your attention. Nothing ever looks the same so you never learn how to use the interface. Also, a lot of Flash interfaces are slow to load and once loaded you rarely get content but just decorative fluff that you don't really need.

This is an exception though. They even clearly mark out which photos you've clicked on. (I guess they've read and taken in Jacob Nielsens books). The interface is fast and obvious and there is very little else of distractions from what you're there to see.

To all Flash developers out there: Keep up the good work! Don't use Flash when HTML is better even if it's less fun to develop. Look at sites like this for inspiration.