Web


Software Engineering& Web15 Jan 2008 06:20 pm

I was playing with selenium to try testing a web app I work on earlier today, but ran into the following error pretty much straight away…

input [error] Unexpected Exception: message ->
  element.ownerDocument.createEventObject is not a function
…

From a bit of digging, it looks like the current version of Selenium (0.8.3 as of Jan 15, 2008) isn’t compatible with mootools.

The mootools forums have a fairly simple patch to fix the issue.

Apparently Selenium is checking for the fireEvent method, normally only available in IE, but which mootools adds to other browsers. As a result, mootools thinks it’s running in IE, and tries to call createEventObject, which really is only available in IE.

Having made it over that hurdle, selenium is looking like quite a nice tool.

Software Engineering& Technology& Web31 May 2007 01:37 pm

Google Gears (Google’s toolkit for off-line web applications) looks really cool (thought it’s a pity it has to be installed as a plug-in and there are a lot of “We have nothing to announce at this time” type responses floating around. A lot of people seem to be asking about things like conflict resolution etc. which is being left as an application concern for now. The few web developers around seem to be underestimating the amount of rework which would be required, but for new web applications it looks like it will be quite easy to produce a radically better off-line experience.

Maplets look cute, but I’ve not really played with maps much, so it doesn’t seem to radical to me. The ‘coming soon’ mention of AdSense for maps is interesting - looks like you’ll be able to make a call with your id and a number of ads to display and have them shown along with whatever other map content your maplet/mashup is adding.

Food’s been pretty good, got a very cool notepad which has a picture of the earth on the cover then zooms in as you tilt it forward.

…And why do they always have conference name tags designed so they turn backwards accidentally so easily. Surely it would be simple to attach it to the lanyard at two corners rather than just at the centre…

Technorati Tags: , , , ,

Web22 Oct 2006 02:32 pm

It’s a real pity that none of the decent mapping sites in Australia seem to offer directions. (i.e. Zoom In or Google maps)

whereis.com does seem to give semi-decent directions, but has poor looking maps, and the interface is horrible by comparison (though they’re attempt at dynamic zooming is quite amusing). The other problem with whereis is that it’s impossibly to email someone a link to one of their maps without paying for it, which seems rather silly.

I imagine it would be quite challenging to generate good driving directions efficiently, but then, it would also be difficult to build the maps in the first place I imagine. Anyway, here’s hoping the other guys get the directions working sometime soon, or whereis gets it’s interface act together.

On the other hand, perhaps there’s one I haven’t heard about yet.

Web13 Sep 2006 06:40 pm

I’ve been running into some problems porting a perl based CGI program from Linux to windows lately. The key issue is that when running perl in taint mode, you must set the PATH environment variable to some known string prior to doing anything which executes another common (exec, system, backticks etc.). The problem is that clearing the path means that perl is then unable to find the cmd.exe shell when running on Windows.

I’m not all that up on Windows programming in perl, but it seems that adding in any particular path (say C:\WINDOWS\system32) isn’t likely to work if Windows is installed in some unusual location. Unfortunately avoiding the shell processing (by passing a list of arguments to system or exec rather than a string) isn’t looking like it’s a viable option either, at least in the short term, so I’m more or less stuck.

I’m sure there’s some sort for clever trick for solving this, but Google has not turned up anything obvious. Perhaps, as a last resort, there’s some way to find out where Windows is installed through the registry?

Update

Thanks to Victor for his suggestion about the registry. What I ended up doing was looking at the SystemRoot environment variable with some code along the lines of the following.

delete @ENV{qw(IFS CDPATH ENV BASH_ENV PATH)};
if ($^O =~ /win/i) {
            # Perl must be able to find cmd.exe, so add
            # C:\WINDOWS\system32 to the path
            $ENV{'SystemRoot'} =~ /([A-Z]:(\\[A-Za-z0-9_]+)+)/;
            my $system32_dir = catdir($1,’system32′);
            $ENV{’PATH’} = $system32_dir;
}
exec($command);

If anyone has suggestion, or just knows for a fact that this will fail in some case, please let me know (in the comments).

Technorati Tags: , , ,

Web05 Mar 2006 05:18 pm

Bigger organisations have long since taken the job of designing websites away from technical staff, but smaller ones still have a tendency to lump all the ‘computer related’ tasks onto whatever technical people they might have.

Here are a few classic excuses for not putting effort into building an information architecture for a small company website.

1: We don’t have time

So do you have time to build a web site at all? You need to ask yourself what exactly the goal of building the website is, and hopefully come up with an answer which is centred around the expected end users. Unless you have time to build what these users want, then there’s really no point in building anything at all.

If you don’t have time to work out what to build, you certainly don’t have time to build it.

(more…)

Web13 Feb 2006 07:47 pm

Cookies are great and all, but I was thinking the other night that it would be nice if there was a way to store state purely in JavaScript land.

If only JavaScript needs them there really no reason to send bits of state back to the server, and you might imagine this sort of mechanism might even afford some small degree of privacy (though it wouldn’t be hard to write JavaScript to pass the info back I suppose).

Anyway, is there any such mechanism for storing state information which is preserved between pages (and browser sessions) but is only normally available to JavaScript?

Technorati Tags: , ,

Web11 Feb 2006 10:40 am

So far this month, Googlebot has hit kstruct 521 times, downloading a total of 2.8 megs, where as MSNBot has 496 hits for a total of 11.32 megs.

That means that, per hit, MSNBot is loading about 23.3k of data, where as Googlebot is loading about 5.5k (and Yahoo slurp is similar with 4.5k).

My question is (being far to lazy to go and actually look at the raw logs myself), what’s MSNBot doing differently that it should be downloading over four times more data per hit?

My guesses would include MSNBot not understanding some ‘content not changed’ hint or being more interested in images and PDFs than the others, but I’ve no idea if that’s even close.

[Update: Looks like I'm not the only one to have noticed.]

Technorati Tags: , , ,

Personal& Technology& Web28 Jan 2006 08:06 am

So, Google is censoring search results on their Chinese site, presumably because the Chinese government asked them to do so. Lots of people (mostly Americans) seem to be very upset about this.

Putting on my devils advocate hat for a moment…

Just because Americans happen to equate censorship and ‘evil’ doesn’t mean everyone does. From the Chinese government’s perspective, ‘evil’ could very well be defined as assisting Chinese citizens in accessing material the government considers inappropriate. That, in fact, would be why they have made doing so illegal.

As an international company Google is going to be faced with many situations where what happens to be considered evil is going to vary from society to society. How they try to resolve this with their ‘do no evil’ policy will be interesting to watch.

Technorati Tags: , , , ,

Web14 Jan 2006 08:02 am

There’s an interesting comment on Jared Spool’s Site Maps and Site Indexes, Revisited (a follow up to What about Site Maps and Site Indexes?) that site maps might help search engines ‘easily spider your site’. While I agree that site maps might make a good seed/starting point for a search engine, I don’t quite see how any crawling engine is going to be taken seriously if it can’t cope with a sitemap-less site. Getting a good starting point can useful in a multi-domain crawl assuming you only want one connection per domain at a time because it allows you to get up to the maximum number of threads quickly, but this isn’t usually an issue with individual sites.

That said, I find sitemaps very useful for a search engine related reason. Sitemaps very often reflect the expected navigational search queries, so they provide a good set of test data if you want to evaluate your search engine’s performance on navigational queries. We do this sort of analysis quite often as part of customer demonstrations. Grab the search results for each of the sitemap link names, and see where the page linked in the sitemap comes up, then compare the results between search engines.

Of course, navigational queries aren’t the only aspect of a search engine to consider, and this is unlikely to justify maintaining a sitemap for your site, but I for one will be disappointed if they lose popularity.

(And for reference, no, I wouldn’t often use a sitemap myself. I have occasionally resorted to them when looking for something I’m sure should exist after basic navigation and search have failed, but thankfully that’s not too often)

Technorati Tags: , , ,

Personal& Web05 Jan 2006 08:59 pm

DNS changes are currently working their way through the internet, and if you’re seeing this post, you’ve got the new site.

In short, the changes this time are :

  • Moved web hosting to TextDrive, which I’m so far very happy with. The site was previously on webconexion, who I haven’t been overly happy with.
  • Moved DNS hosting from webconexion to easyDNS. Once again, I’m very happy so far.
  • Upgraded to the new WordPress 2.0 which has a much prettier admin interface and a comment spam blocker which I’m hoping will save ma a bit of time.
  • Changed the blog theme to a tweaked version of ShadedGrey. I’ll probably tweak it further when I have the time.
  • Fixed up the pretty URLs whcih I could never quite get working previously.
  • Updated the IB Notes site to the latest version of MediaWiki and also fixed up it’s pretty URLs.

I think that’s about all for now, but there are probably a few other tweaks I’ve forgotten along the way there.

Technorati Tags: , , , , ,

Next Page »