What's the fattest Subway sandwich?

April 3, 2007
4 comments Misc. links

What's the fattest Subway sandwich? Can you guess what the fattest sandwich is, that Subway sells, out of these?

  • Cheese Steak
  • Chipotle Southwest Cheese Steak
  • Italian BMT
  • Meatball Marinara
  • Chicken & Bacon Ranch
  • Spicy Italian
  • Tuna
  • Subway Melt
  • Veggie Patty

Truncated! Read the rest by clicking the link below.

ZYB - crap name, brilliant app

March 31, 2007
0 comments Mobile

ZYB - crap name, brilliant app I've been using ZYB for a couple of days now. The reason is that since I lost my Palm Treo 650 I've had to use a Sony Ericsson i810w as a replacement which means I can't import my old contacts from Palm Desktop.

ZYB does two things: sync your contacts and sync your calendar between the zyb web app and your phone.

They support loads of different/popular phones (sadly not the Palm Treo) and if your phone is supported you download a little Java app that deals with the synchronization. Now I can add/edit/remove contacts and calendar events using the ZYB web app which is much more convenient than the tiny screen tiny keyboard phone.

Truncated! Read the rest by clicking the link below.

Is peanut butter the proof that evolution doesn't happen?

March 29, 2007
5 comments Politics

Is peanut butter the proof that evolution doesn't happen? Hmm. Of all the stupid things conservative Christians and other fundamentalists make up, this must be near the top. Apparently, the fact that no new life is created in any jar of peanut butter means that evolution does not happen. WTF? Are you nuts?

If you're still thinking at this point: no, this is not a proof against evolution.

The question why life started in this corner of the universe is still an interesting question, but refuting evolution is naive and plain outright stupid. If you base your morals on arguments and counter arguments for and against things you will pretty sure see an overwhelming dominance of proof for evolution everywhere. The fact that this video was made is quite scary.

Stop the non-sense! Evolution is still here to stay.

Learning about ATFolder's security

March 22, 2007
0 comments Plone

I just learned something interesting about ATFolders in Plone. For the non-Plone readers, an ATFolder is Plone's take on a normal Zope Folder but based on Archetypes instead. To begin with, Plone overrides the function manage_addFolder which means that if you do context.portal_url.getPortalObject().manage_addFolder(...) in Plone you get an ATFolder instead of a normal Folder. Fair enough.

The problem I had was that ATFolders override the manage_delObjects() function not only is it's security defined in the container, it also does a security check within. I don't know why but I'm sure there's a reason. What this means is that you can't use some_at_folder.manage_delObjects([...]) in External Methods and expect no Unauthorized errors.

I solved this security problem I had by instead creating a normal Zope folder by doing it this way instead:


portal_root = self.portal_url.getPortalObject()
adder = portal_root.manage_addProduct['OFSP'].manage_addFolder
adder('PlainZopeFolder')

Associative arrays

March 21, 2007
1 comment Web development

For hard cord Javascript developers this comes as no surprise but if you, like me, do all your work in Firefox (of course with Firebug installed) then you need to keep a close eye on the correctness of your Javascript syntax because Internet Explorer will have some difference ways of thinking about it. Here's what I learnt the other day. This works perfectly in Firefox:


var person = { age:27, name:"Peter", };

But if you run that in IE you get "Expected identifier, string or number".

I know that SQL raises syntax errors on trailing commas but Python sure doesn't and I like that.

What a pointless rant this was. More like a note to self that might hopefully help someone else some day.

correct.html
incorrect.html

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.