Horus Kol

11:22 pm, August 13, 2009 - RSS Google Chrome: Default Reaction to 404 and Site Issues

When I write my own websites and frameworks, especially when they’re using rewritten URLs, I setup the sites to have their own 404 pages, so that people know that the site is there, but that there is a problem with the link they followed.

This just makes sense – since you can’t guarantee that incoming links are correct, and getting a generic 404 error page can make people think that you just don’t have a site at all – whereas seeing a branded error page, maybe with suggested places to find related content on your site, or at least some recourse to indicate a problem to a suitable site contact.

A History Lesson

Now, search engines, browsers and other agents, don’t understand page content, so having a framework simply replace the content with the ‘error’ message isn’t enough to let them know there’s a problem. For that, you should use HTTP response codes – which is where the ‘404‘ actually comes from as this is the numeric code sent to identify a ‘page not found’.

Many years ago (before the days IE6, if you can imagine such a dark age), many sites didn’t really setup these 404 pages (although, a significant proportion still don’t – but the majority do). Instead, rather poor and cryptic default error messages were sent from the web server, which would mean next to nothing to the average user.

So, back then, browser developers would replace almost anything sent from a server that wasn’t accompanied by a ‘good‘ response code with a ‘friendly’ message – usually on the lines of a more expansive message, and even a link to a search engine in some cases.

Most site and framework developers are now, and have been for some time, properly handling URL address and other errors, and the need for browsers to provide the ‘friendly’ message was pretty much removed.

Google Chrome – A little behind?

This, at least, has been my experience with the major browsers for the past few years – they don’t obfuscate what the server is doing.

Until Google Chrome came along, at least. It turns out that Google like their new browser to do what most others stopped doing years ago. On receiving the 404 code from the server, the browser’s default behaviour is to ignore any further content and replace it with Google generated suggestions and search form.

Now, I can see why Google would like this behaviour – any chance to channel someone through their search engine is a chance that someone will follow an advertised link, and then Google get money.

This default behaviour can be turned off from the browser’s options, but it isn’t exactly obvious what is happening nor is the option labelled clearly enough that I was not forced into a short round of ‘click and see if that works’. It is also quite naughty, I think, because there is no indication that a site/server actually responded and that its just a page not found.

Let’s see what Google say.

10:56 am, July 3, 2009 - RSS XHTML2 Being Closed in Favour of X/HTML5

As Jeffrey Zeldman puts it in his recent blog post – XHTML is dead, kinda.

W3C announced a few days ago that the XHTML2 working group will likely be closed down by the end of the year, and focus will be shifted to the development and polishing of the HTML5 standard (which also offers an XML flavour).

To me, this is a quite welcome change – it never made much sense to me to have two competing standards for documents, especially when all the original XHTML standard did was to enforce strict syntax rules (which are rather arbitrary given what is actually allowed under XML itself). This tightening up could easily have been dealt with in HTML4.1, say – and with less problems with Internet Explorer (which is still having problems dealing with properly served XML/XHTML documents even after 9 years).

Now, with the HTML5 development, it all comes back together into a single standard again. Sure, there a few differences between HTML5 and XHTML5 – but less than between HTML4 and XHTML1.1. These differences, however, a easily overcome by applying some of the restricted behaviour allowed in XML documents to HTML (things like not using document.write() and so on).

Anyway – hopefully, this dropping of XHTML2 will result in a better developed combined standard, and this will help browsers to move towards adopting that new standard as soon as possible.

9:02 pm, January 22, 2009 - RSS Blank Sheets and Focus of Attention

About the worst thing about any project – especially one that is being spun out of your own head – is that you are almost always at square one, with a blank sheet, and an empty SVN repository.

It’s the same as writing something like this post – or any other creative work. Unless you have a clear objective, you can’t really set a direction. Without a direction, you can’t make those first steps.

Of course, in starting a project, you generally have a bit of an idea on the outcome – but you should always set down what your objectives are. Then you can figure out the steps needed to reach those objectives. And once you have those steps, you can work out everything this else.

So, I’ve gotten past the blank sheets by knowing what I want to get out the project – and the only problem left is the focus of attention that the work requires.

Focus of Attention

Lately I’ve been dabbling in Python, which is pretty nice language, and quite fun (a lot of the documentation is written in a familiar rather than over-technical way). But, the experience has been frustrating as well.

After spending time investigating various methods and solutions, I kept hitting on issues with limitations in a particular solution, or scarcity of documentation of another.

I ended up spending more time looking for documentation than I did making any kind of progress (and a lot of the time, I wasn’t even moving forwards).

One major block, I guess, is that I spend 40 hours of my week working on PHP solutions (and sometimes PERL, but only in order to patch or extend an existing script) at the office,  and jamming in another language just wasn’t happening.

So, I took the decision the other night to use and develop the skills I have, and then focus my attention on the work needing to be done instead of reading, reading, reading.

And so, in one 2-hour session, I made more progress than I had done in the whole previous week.

Experience

That’s really the key, when you think about it. I’ve been at PHP since 2002, and clocked up thousands of hours of knowledge and experience along the way. I’m still learning it – sometimes time constraints on projects don’t always let you spend the time to find the better solution – but all that experience does add up.

So, for at least a while longer, I’m going to be a PHP developer.

9:11 pm, October 14, 2008 - RSS All-Change

The more observant among you might have noticed a change in the the site.

Given the rather stalled status of the blog development for Horus Kol, I’ve decided to take something off the shelf which gave me access to the features I was after. I decided on WordPress, as I’d had a little experience with that when I trialled it for my Random Tweak site. I had also had a look a couple of other alternatives, such as b2evolution, but they were either lacking in functionality, or were a bit too nuts and bolts (yes, I’m a developer, and I eat nuts and bolts for breakfast, but I’d much rather be posting on a personal blog and developing something else rather than continually tweaking something from off the shelf).

So, here we are. Getting the template to work took all of about an afternoon, and that was starting from zero knowledge on how to do it. No doubt, I will be making adjustments and pasting patches on the paintwork over the next few weeks.

I have added a gallery plugin, which I still need to tweak before I start showing any pictures off, and I have also found a neat little map plugin, but I want to play with that first before I can see how it might be useful. All of that will have to wait, however, since I’m tired and I don’t want to be cranky at the office tomorrow.

6:14 pm, August 31, 2008 - RSS Random Tweak

Well, I’ve “launched” a new site… Random Tweak

Although, this one is just a WordPress blog at the moment with a few extras.

I’ve been wanting to start up an article/tutorial site for a while, in order to give me a platform which I can point to when I want to show off to clients. I decided that instead of holding off until I get the system I use for my Horus Kol blogs all nicely polished and professionalised, I would make use of the rather smart WordPress system for now.

So now I can publish on one site, while continuing the polishing work on another (although I have to admit that I’ve been pretty slack on my out of hours working, and not really done a lot in the past couple of weeks).