No computer - no internet
Not having a computer also means that I don’t have internet access outside of work.
I say this just to make it look like I’m still updating the blog.
Not having a computer also means that I don’t have internet access outside of work.
I say this just to make it look like I’m still updating the blog.
The Matrix was quite a good series of films. But without any extra interpretation left most viewers reasonably underwhelmed.
Well see what you think of this theory.
It’s specifically about the second movie, The Matrix Reloaded (there is a link to one about Revolutions too) but I think the second is where the most understanding is required.
It also has a prediction about what could happen in the third movie (it was written before it was released) and I think I like it more…
Google are now offering $1 for anyone you get to install Picasa (their clever photo organisation software thing) as part of their AdSense referral program.
So first, go install Picasa and then come back and go join AdSense so you can benefit yourself. And if you haven’t already, get Firefox: You can get AdWords if you want but I doubt you’ll spend enough to get me anything.
BackBase is another AJAX toolkit. This one is different though. It’s not really an AJAX toolkit, more a toolkit powered by JavaScript taking advantage of AJAX.
The clue is the price. Yes it has a price - $2000 to be exact. There is a “community edition” that is free for personal use though. Anyway, I don’t have time to run down all the features but basically it defines a whole new bunch of tags allowing you to create complicated content in a declarative HTML style way. These tags are then translated into proper XHTML on the fly by the back end JavaScript engine. Since the clever work is actually handled by the browser, you’re free to use whatever you like on the server (PHP, Ruby) including static HTML pages - outputting BXML is no different to outputting HTML. In fact BXML has a very ASP.NET feel to it and embedding BXML into an XHTML page along with ASP content could have the ultimate cleanness about it (syntax isn’t one of my complaints about ASP.NET).
It should be noted that Microsoft are working on Atlas which could be something very similar but I haven’t looked into it… It all seems very clever.
My new computer has still yet to arrive. I was expecting to be able to write a hands on review of MCE by now.
From a theoretical programming point of view, JavaScript is immensely cool. You can do some amazing things with it. Although I’m not entirely sure whether you should.
For example I had a bunch of elements on a page I needed to update using AJAX. I needed a function I could pass the URLs and ids of elements to replace with those URLs and then have it perform each replacement in turn (I’ve seen IE have problems with simultaneous AJAX requests).
First I replace a simple replace_id function that accepts three arguments. An element id, a URL to GET to replace its contents with and finally a function to be called when it’s all completed.
And then things got silly.
function chain_replace(urls, ids) {
id = 0;
next_id = function() {
if (id < = ids.length) {
return function() {
replace_id(urls[id], ids[id++], next_id());
}
}
};
next_id()();
}
Now the next_id()(); bit towards the end should be a clue that something a little odd is going on. But I must confirm that this code does actually work. With enough arguments it might make the browser explode with some sort of call stack problem though…
Finally someone in the mainstream agrees with me.
There is a section in PC Format magazine that says cooperative play in upcoming games will be a bigger part. Coop gaming, especially in first person shooters is tremendously fun. I spent a lot of time playing Duke Nukem 3D and Doom coop on my PlayStation. Very few games after that supported coop modes (although I realise that it brings some complicated design issues).
I’m getting a new computer. Well most of a new computer. And I’ve been considering whether to get Windows Media Centre Edition or not.
The first two versions of MCE were rather lacking but after reading a lot I’ve decided 2005 is actually quite cool.
Good question. One I didn’t know the answer to until recently. It’s Windows XP a with range of new utilities for working with video, music and images (as well as bits of hardware associated with them) all wrapped inside one interface. The idea is to have your computer as the hub for your whole home entertainment system.
The most useful component is the built in DVR software (sometimes called Personal Video Recorder or PVR). Plug your TV into your TV tuner card and Windows can record stuff straight to your hard drive. But of course most TV tuners come with software to do this. Well MCE does it better to be honest. And you can also get a hardware bundle (ready built systems come with it) that includes a IR blaster. Basically it’s an infra-red transmitter you stick to the front of your set top box (Sky, cable, whatever) to allow your MCE computer to change channels.
The lowest quality recording takes up between 1Gb and 1.5Gb per hour. Reasonable hard drives these days are about 200Gb which gives you about 100 hours of video (leaving space for other stuff). Not really suitable for storage but it does allow you to burn things to DVD. Most of the time. The software apparently supports any content restriction specified in incoming media and won’t let you copy such content of the computer that made it.
MCE is actually Windows XP Professional underneath. It took a while to confirm (most references are vague about whether it’s XP Home or XP Pro) but I did find a page on Microsoft’s website saying it’s XP Pro. This means you can do everything with it that you can normally do with a PC.
One final note… you could always install MCE on a Mac.
I decided to take my idea for nicer searching in Wordpress one step further. Now if you try to get to a page that doesn’t exist it automatically redirects to the search page. So http://www.oliverbrown.me.uk/galaxia will return search results for “galaxia”.
If you want to do it yourself, you need to do two things. First you need to redirect error pages to a custom PHP page so add the following line to the top of your .htaccess file: ErrorDocument: 404error.php Now you need to create 404error.php and make it redirect to the search page by adding the following to it: header('Location: http://' . $_SERVER['HTTP_HOST'] . '/search.php?s=' . $_SERVER['REDIRECT_SCRIPT_URL']); After doing this it had me thinking about status codes. By default that will generate a 302 Found HTTP status code. A bit of reading led me to decide that 303 See Other was a better response since the request might correspond to a page in the future (and presumably a relevant page) but for now should be redirected. 3XX are somewhat confusing.
Anyway if you want that behaviour, add this line too: header('Status: 303 See Other'); Finally, you should think a little before implementing this since any random page accessed could now be cached by proxy servers and search engines etc. since the server is no longer sending a 404 Not Found code.
I recently bought a book about ASP.NET: Pro ASP.NET in C# by Apress, mainly because when I was looking for jobs there were lots of ASP.NET jobs advertised. And I have to say I have no idea why. Part of the problem may be that is book isn’t very good (there are bits of vague contradictions and a general obsessive (and inaccurate) preachiness about it) but I think there are major limitations to ASP.NET.
Firstly the inability to post to a different page. Who the hell decided that was good idea? I know it can be faked but that’s just silly. And you can only really have one form on a page. Well you can only have one “rich” form that ASP.NET can access in a clever and high level way.
I’m assuming people will disagree with me (if not, why is it so popular). If you do, please explain why ASP.NET is supposed to be so amazing because I don’t see it…
Updated - Clarifying my position on ASP.net