Category: Programming

PHP aaaaarrrrrggggghhhhhh

PHP aaaaarrrrrggggghhhhhh

Things I hate about PHP No. 512 (notwithstanding the fact that in comparison to many other things I like PHP): Inconsistency in parameter ordering Say I want to find a small thing in a big thing, like a piece of a string in a bigger string. I can use strpos and you pass in the …

+ Read More

Opacity in Firefox, Safari and IE

Opacity in Firefox, Safari and IE

Internet Explorer has suppored opacity for a long time but it’s also possible to change the opacity of a layer in Safari, and both newer and older versions of Mozilla (including Firefox). The code for setting the opacity of a layer to 50% (in JavaScript) is: For IE/Win: layer.style.filter = “alpha(opacity:50)”; For Safari (pre version …

+ Read More

A new design for this blog

A new design for this blog

It’s taken a few evenings and bits of the weekend, but last night saw the launch of a new design for this blog. What with the categorisation I’d added recently, the right hand column with all the navigation in it was getting a bit cluttered so I’ve now gone 3 column and hopefully everything fits …

+ Read More

More JavaScript haiku

More JavaScript haiku

I first published a JavaScript haiku called ‘Fear of tomorrow’ here. Well, I’ve written some more. Apparently these are more likely to be classed as Senryuu, but what do I know. Anyway, here are some others that I’ve written, with the code first and the way it’s supposed to be read following it, and then …

+ Read More

PHP 4 foreach as references

PHP 4 foreach as references

PHP 4 doesn’t seem to create references for objects in foreach loops. e.g. the following will not change the original objects: foreach($placeholder as $contentBlock) { $contentBlock->setPosition(1); } The value of the position property in the original object will remain unaffected. This is quite rubbish. To get round it you need to get all the array …

+ Read More

PHP 4 annoyances ( = rant)

PHP 4 annoyances ( = rant)

After working with PHP 5 for quite some time now, I’ve had to go back to PHP 4 to develop a CMS for a client’s site where we don’t have much over the hosting environment. Going back to the old version has annoyed me quite a few times already and it’s probably made worse by …

+ Read More

Adding categories to Blogger blogs

Adding categories to Blogger blogs

27th September 2005 update I’m trialling a new piece of software called Caterblogger. It will add categories to any Blogger blog. You can register interest in it on the site. The original post follows below: Blogger is really ease to use and set up, and manages individual posts really well. It’s also useful to be …

+ Read More

Publishing with aspx extension from Blogger

Publishing with aspx extension from Blogger

I wanted to publish my blog with something other than the .html extension and after some experimentation and hunting around I found this:Blogger Forum – Forum The way to do it is to change the main page extension (from index.html to whatever, e.g. index.aspx) and do the same with the archive page. Then you need …

+ Read More

When articificial intelligences collide: Eliza vs Eliza

When articificial intelligences collide: Eliza vs Eliza

This conversation set up between two Eliza clients is quite amusing. I didn’t really know about it before, but Eliza appears to be a computer therapist. It doesn’t seem to do a particularly good job of analysing itself. Eliza vs Eliza Eliza the computer therapist