AJAX seach on 404 error pages

August 1, 2005
0 comments Web development

This might not be new but I haven't seen it before. If you come across a page that doesn't exist on www.invms.co.uk it will show you a nice error page like so many other websites do, except that the IMS 404 error page is a bit more advanced. First of all it deconstructs the requested path and prepares that for a site search. This "suggest searchterm" is then also used to make an AJAX search (using tw-sack) asyncronously inside the browser but then only on the title of the various pages it can find.

The advantage of doing an AJAX search instead of a server-side search is that the page loads faster. First it loads the important message ("Page not found"), then as an added bonus it shows some additional help. It also means that all those portscanners and other phishers (who don't use webbrowsers to do their scanning) don't cause lots of excessive searches on the server.

To test this, go to a page that doesn't exist like http://www.invms.co.uk/Literature/foobar or http://www.invms.co.uk/IMS-Select-Funds/IMS-Select-Income-FundXXX

Truncated! Read the rest by clicking the link below.

Just Oracle and IBM?

July 31, 2005
0 comments Linux

Something seems wrong with this journalism:

"A report by Gartner Group showed that Oracle has 81 percent market share of Linux relational database software in 2004 compared to IBM’s 17 percent."

What? Is only 2% of all Linux users using MySQL, PostgreSQL, Firebird, Ingres, Interbase or MaxDB? (see: a longer list of more obscure linux relational databases)

Ok, let's turn it around. Perhaps they only mean paid-for relational databases. Can it still mean that only 2% of all relational databases on Linux are completely free??

Release package file size

July 29, 2005
1 comment IssueTrackerProduct

Release file sizes I've made a quick graph showing how the releases of the IssueTrackerProduct increases steadily in size with every new version. Since the first release, 10 months ago, the release package has more than doubled in size. Much of that is due to the new templates that have been added and some icons.

Is this a positive trend? Yes of course! A lot of the new code isn't just additional fancy features. Sometimes it takes a couple of extra bytes just dealing with stuff under the hood that has no impact whatsoever on the interface. The actual numbers aren't really a measure that can be used, but what is really important to notice is the solid and steady growth. This year has been very busy for me with work but I've always tried to squeeze in a bit of open source work too in the mornings, evenings and lunch breaks. I wish I could focus more on the IssueTrackerProduct but so far we haven't come up with a direct way of getting rich on it so it still remains just a "hobby" for me an my company.

\B in Python regular expressions

July 23, 2005
0 comments Python

Today I learnt about how to use the \B gadget in Python regular expressions. I've previously talked about the usefulness of \b but there's a big benefit to using \B sometimes too.

What \b does is that it is a word-boundary for alphanumerics. It allows you to find "peter" in "peter bengtsson" but not "peter" in "nickname: peterbe". In other words, all the letters have to be grouped prefixed or suffixed by a wordboundry such as newline, start-of-line, end-of-line or a non alpha character like (.

Truncated! Read the rest by clicking the link below.

London bus 26 from Hackney

July 21, 2005
0 comments

Just wanted to say that I'm safe from the bombings again. Little is known at the time of writing this but apparently there had been an emergency on the bus 26 (amongst other things) going from Hackney to Waterloo. The scary thing about this is that that is "my bus". When I don't cycle to work (most days), it's the number 26 bus that I take to get to my office. Damn terrorist! I'll never sympatise with you in any way if you continue to use violence like this to state your goals :(

Interesting NHS error message

July 21, 2005
2 comments Web development

If you go to a page on www.chooseandbook.nhs.uk that doesn't exist, like this one: http://www.chooseandbook.nhs.uk/ajdoaijdjdad you'll get an interesting error message. The title is a stroboscopelike marquee text that flings across the screen. It's very frustrating to look at because it's a million times more animated than it needs to be.

BUT a fun thing about it is that it flashes by from left to right, right to left; like a the universal body language of waving your finger or turning your head to indicate NO. I remember that Red Hat used to have on it's display manager log in, that it shakes horizontally if you enter the wrong password. I liked that. It made sense and was not intrusive since it stopped quite quickly.

Anyway, it's an interesting to solution the NHS has taken to display this error message. I'm not going to forget it.

Kung Fu in Clapham with Richard

July 17, 2005
2 comments Kung Fu

Richard Wagstaff, Kung fu instructor of FWC Clapham My good friend Richard Wagstaff has started a kung fu club in Clapham (south London). At the club they do Fujian White Crane Kung Fu which is a soft hard style (not a hard soft style). This is Richard's first setup in the area and I can assure you he's good at it. If you're in the area, do go down to Soho Gyms and give it a try. The club is affiliated with my club in Islington. Richard is, like me, a student of David Courtney Jones

Classes are held on Monday and Thursday evenings. Visit his club website for more info on exactly when and where.

SmartDict - a smart 'dict' wrapper

July 14, 2005
9 comments Python

For a work project we needed a convenient way to wrap our SQL recordset, instance objects and dictionary variables to share the same interface. The result is SmartDict which makes it possible to assert that access can be made in any which way you want; something that is very useful when you write templates and don't want to have to know if what you're working with is a dict or a recordset.

This doesn't work:


>>> d= {'name':"Peter"}
>>> print d.get('name') # fine
>>> print d.name # Error!!!

Likewise with some instance objects or record sets, this doesn't work:


>>> d = getRecordsetObject()
>>> print d.name # fine
>>> print d.get('name') # Error!!!

Truncated! Read the rest by clicking the link below.

Rent a chest

July 12, 2005
0 comments Misc. links

Rent a chest This entrepreneurial bloke called Chris (from North Carolina, USA) takes requests for messages to be written on his chest for $20. Then he paints the message on his chest and shows the images online. Clever!

Have a look at this flickr album. Why didn't I think of that??

Drop down selects that learn

July 10, 2005
4 comments Web development

Drop down selects that learn A very common thing on the web with forms is that you have a drop down with lots of options that gets used often. It's a very convenient little widget that is used a lot on the web.

I've been thinking about a possible way to make these a big more user friendly by pushing the most popular options towards the top. By doing so, most selects will require little scrolling. Obviously the implementation depends a lot on the application. As a good example, look at the two drop downs on http://www.xe.com/ucc/ where the most common choices (EUR and USD) appear at the very top of the list.

In many cases you can't reorder the options within the drop down because the order might be alphabetic or something like "Not at all, Not very, Fairly, Very". Suppose most people select "Fairly", it would still not make sense to reorder the options to be "Fairly, Not very, Not at all, Very". But, let's instead focus on those that can be reordered to help the user.

Truncated! Read the rest by clicking the link below.