Aquarionics

Category > web_development

Weaving the silk of the internet

Wednesday 17th March 2004

Mozosaur

In bugzilla, there are 2200 bugs reported between 1970-01-01 and 2001-01-01 that have the status of “NEW”, of which 47 are marked either Critical or Blocker.

There’s a good word for my opinion on this, but it would break my design in Mozilla & Firefox


Monday 29th March 2004

How to make Firefox or Firebird use the new personalised google

Google have just released into beta testing the new ‘Personalize’ interface. From mucking around with it this evening, I have to say that it rocks, but most of the time when I’m using Google, it’s though the Search box in Firefox, so here is how to make that use Google personalisation:

  1. Download this file
  2. Save it into the searchplugins directory of your Firefox install directory.
  3. (Optional) Copy the “google.gif” file that is in the same directory to be called “google-personalisation.gif” (You don’t have to do this, but you get the google icon for it instead of the default magnifying glass)
  4. Restart Firefox

(As far as I know, this also works with Firebird and anything else that has the Mycroft extension installed)


Tuesday 27th April 2004

Comments

So, I’ve redone the commenting form for Epistula to reflect certian forthcoming technological efforts.

Ahh, I love the smell of a crowded new marketplace in the morning.

Smells like failure…

Attachments


Thursday 27th May 2004

Blink bookmarket

This is the code for the bookmarklet that adds things to the "That which is also" section on the front page, People may find it useful (I know I will when I get back to work)

javascript:
link=window.prompt('nLink?',window.location);
title=window.prompt(link+'nTitle?',document.title);
comment=window.prompt(link+'n'+title+'nComment?');
referrer=window.prompt(link+'n'+title+'n'+comment
	+'nReferer?',document.referrer);

document.location=
	'[[BLINK URL]]?url='+escape(link)
	+'&title='+escape(title)
	+'&comment='+escape(comment)
	+'&referrer='+escape(referrer);

Remove all tabs and newlines before use

Those who spoke on this:

gravatar image

Senji:

2004-05-27 22:14 1 hr after the Original Article

HTML Invalid :-|

  • Errors validating /tmp/EP_jLKJ5A: ***
    Error at line 63, character 22: element “PRE” not allowed here; possible
    cause is an inline element containing a block-level element
    Error at line 72, character 5:unknown entity “title”
    Error at line 73, character 5:unknown entity “comment”
    Error at line 74, character 5:unknown entity “referrer”

    (at the bottom of this page)

    Comment Link

gravatar image

Aquarion:

2004-05-28 07:08 9 hrs after Senji

Fixed

Comment Link


Sunday 6th June 2004

PFd4-II Design Diary - Part One: Start of a Brand New World

In the first part of a brand new series, I'm going to document the entire process of getting a web-app working.

I've been promising a new version of PFd4 for a while now. I have also been meaning to learn Python properly, so I've decided to combine these two projects into one handy package.

PFd4 was originally concieved when 2d10 - which my girlfriend and a number of my other friends were playing an RPG on - went AWOL for two weeks. At the time I was staying with one of the players and her (now) husband, who hosts both this site and my main site Aquarionics. So, Girlfriend, Provider of Free Hosting (both real and virtual), and small number of other friends need a web site. At the time I was unemployed, homeless and about to slide into the dark pit of depression, so I took on the project.

I coded the original version of PFd4 in three days flat, including one day designing the data structures, and as such it isn't the greatest piece of coding I've ever done. The interface for the messaging was messy, and it only barely did what they wanted it to do well. Nevertheless it existed until the game ended a couple of months later, and during that time I consistantly promised myself that I would rewrite it. Now I'm unemployed again, although not homeless this time, and I want to learn a new language and skillset, so I'm using this.

The original structure for v1 is here.

These are the design principles for PFd4-II:

Technical

A new name.

I've never really liked the name PFd4, partly because my brain wants to parse it as PDF4. It stands for "Point First d4" (A d4 being a four sided dice) which is a play on 2D10 - the system it replaced - and the fact that it's quick, painful, and RPGish. (d4s are pyramid shaped, if you stand on them it hurts).

python/mod_python

It'll be written in python, built on mod_python, backending onto a mysql database - as the last one did. This is the tricky bit. I am a PHP programmer by trade - though I did both C++ and Java at University - and am just getting into this python lark. Most of the reason I'm doing this now is to learn python.

XML/XSLT

The python will generate XML, which will be fed though an XSLT stylesheet and passed to the user (Actually, I may not even do this to start with and leave the XSLT client-side, it's slightly quicker)

In fact, even quicker would be to generate XHTML by default - rather than an arbitary XML form - and transform from that.

XHTML/CSS3

The XSLT stylesheet will generate XHTML/CSS3 code that degrades gracefully to older browsers (If it isn't already, see above). It may also produce PDF versions of logs etc.

External Access

Allow XML-RPC interface, NNTP, SMTP access etc. Possibly

Gameplay

Campaigns

Games will belong to campaigns. Any number of active games can be in a campaigns. This may involve subcampaigns, though that might be a little too far.

Characters will belong to Games too, rather than campaign, meaning a character can't be in two games at once. I'm open to negotiation on this bit, because whilst I can see that having three characters for "Bob the Avenger" is duplication of effort, having Bob level up in one game and suddenly be levelled up in the other two is silly. This is also an interface problem, since I don't want duplicate names, but if they're in the same campaign - though different games - and they are the same person (Say, Bob The Avenger aged 16 and Bob the Avenger aged 25) that should be allowed (Yes, I do like the idea of Bob the Avenger, why do you ask?)

Voices

When a character makes a "play" they can do it as a 'voice'. So a thief pretending to be the lady of the person whose house she's robbing would be "Bobette the Thief as Lady Fitzdamnation", with Fitzdamnation as the 'voice'. This concept was popular with those who understood it, but complicated to explain. It remains (I like the idea, and it's my system, damnit) but may end up being on some kind of "advanced" system. Plus, I want to be able to use it so that GMs can use it without the players being aware of it, so instead of "GM as Lord Fitzdamnation" you just see "Lord Fitzdamnation". In fact, it's possible that all GM plays would be made this way, and make the GM register a character for any persistant avatars same as anyone else.

Other Players

At an option for the GM, no player should be able to see what other PCs are playing, or even whether a given play is made by a PC, NPC or GM. NPC is the tricky one of those, because PCs and GM characters can - and will - have profiles, whereas small NPCs probably won't.

Artifacts & Encyclopaedia

Every campaign will get an Enyclopaedia where they can put articles (Text (& Images?)) relating to the campaign. GMs will also be able to upload "Artifacts", a file - any type - which groups can view. (Needs to be worked on to avoid becoming arbitary gallery space)

Groups

Characters can be lassoed into groups, which can then be given permissions. For example, if the GM wanted the group to find an article in Elvish, s/he'd upload the file as an Artifact with the group of "Characters who understand Elvish" being the only group allowed access. Inside this group s/he'd put all the characters who - duh - understood Elvish, and only they would be able to read it.

'Play's can also be restricted to a group, or some groups, or a list of people (For example, all those didn't fail an observation roll might see that the carpet by the bookshelf is trapped, nobody else would see that message), though the list of people might be better off as a message. A message then just becomes a play that only the other person can see, which neatly stops me having to write another bloody e-mail replacement.

Tasks:

  • Implement the database
  • Login system
  • first-cut templating
  • User add/admin
  • Campaigns
  • Message Events
  • Games
  • Characters
  • Plays
  • [1]
  • Groups
  • Plays Mk2 (With groups)
  • Character Profiles
  • Encylopaedia
  • Artifacts
  • Design Cut 2
  • Bugfixen
  • Release.

[1] is the point where the system is usable for testing.

Those who spoke on this:


Thursday 24th June 2004

Quick Bookmarklet

What is a bookmarklet? Basically it's a javascripted bookmark that, when you click on it, performs an action. Some might validate the page, some might highlight all the passive verbs in the document, there are loads of them.

This one searches the current site using Google. Install it by bookmarking the following link:

Search this site

Those who spoke on this:

gravatar image

stephen:

2004-06-25 10:50 14 hrs after the Original Article

I love it when people who know what they’re doing do something and then I get it for free and it makes my browsing experience that little bit better. Thanks aq!

Comment Link

gravatar image

Dave the Lurker:

2004-06-25 18:26 22 hrs after the Original Article

This is one of the most useful things I’ve seen on the net for some time.

Comment Link


Thursday 29th July 2004

Evil

So, having seen Thunderbirds (Capsule review: The fact that the plot is microns thick, the acting questionable and the directing iffy is rendered completely and totally moot by the sheer “Oooh, Shiny!” factor of seeing the swimming pool slide back so Thunderbird One can launch. Also: The intro sequence is the best thing ever), I decided to check out the Ben Kingsley (who plays The Hood) Official Site.

DO NOT CLICK THIS LINK IN ANYTHING BUT IE UNTIL YOU HAVE TURNED OFF JAVASCRIPT

Ben Kingsley’s official site is one of the worst travesties of Javascript I have ever had the misfortune to encounter

Turn off Javascript (If you’re not using IE4+) and go there, then view the source. If you go there with JS enabled, you get thrown into an infinate loop of “You need a version 4 browser” alert boxes until you either close the tab or the browser. This is horrible. And god forbid you try to enter with a site reader, or any kind of spider.

Ick.

Those who spoke on this:

gravatar image

Sarabian:

2004-07-29 20:28 3 hrs after the Original Article

So of course I had to click on the link thinking that I could just close the browser when it goes into the loop.

What I forgot was that I’d created a new profile and in this profile, the tabbrowser extension was set to reopen any tabs upon restart.

After the forth kill, I got a bit worried.

After the 7th go, I won the game of clicking the close icon before the page loaded and I was out of the loop.

/me will listen to Aquarion next time.

Comment Link

gravatar image

Peter:

2004-07-29 22:23 2 hrs after Sarabian

Works fine in Opera (no popup), whether I set it to identify as IE6, Mozilla 3 or Opera.

Comment Link

gravatar image

Rory Parle:

2004-07-29 23:43 6 hrs after the Original Article

So you sent them an angry email right? It’s the only decent thing to do. The address is mraproductions@benkingsley.com.

Comment Link

gravatar image

MP:

2004-07-30 08:28 15 hrs after the Original Article

OK… So you are complaining about the website of the evil Hood being evil… Maybe that’s the idea… :-)

Comment Link


Subscribing to LJ RSS friends only feeds

Every LiveJournal publishes an RSS feed and an Atom feed, except those who are already syndicated accounts. The problem is that the main benefit of LJ beyond something like blogspot is the ability to block off some posts to everyone but your ‘friends’.

Much as I distrust the terminology, this is occasionally useful. So, how do you subscribe to a feed and see the ‘friends’ only posts? Like this:

http://username|password@​www.livejournal.com/​users/​exampleusername/​data/​rss?auth=httpd

Magic.

Don’t, whatever you do, do this in something public like Bloglines, or you’ll be storing stuff other people want private in a database over which you have no control and they have no idea.

+(Incidentally, If you add a feed with a username or username & password to bloglines, it’s set as “Private” so nobody else can see it. It’s still in their database, though, so I suppose it depends on how much you trust Ask Jeeves not to be Evil).+

Observations that the first this is equally true to LJ are normally completely ignored.

edited to replace soft-hypens in the long URL with zero width spaces because Mozilla doesn’t support shy and it breaks the layout. I hate the bazaar model when it means that nobody else cares enough to fix a bug. The relevant bug had it’s fifth birthday recently

Those who spoke on this:

gravatar image

Evan B:

2004-12-02 01:10 16 wks after the Original Article

I wasn’t able to get this trick to work…where did you find it documented?

Comment Link Reply to Evan B

gravatar image

Aquarion:

2004-12-03 07:40 1 day after Evan B

To be totally honest, I have no idea. I’ve also been trying to find it this morning, and that didn’t work either. Best I can say to help you is that any RSS reader which uses the IE control to download things will now be broken, since IE stopped supporting the user:password@domain syntax with a security patch.

Which was incredibly dumb of them.

Comment Link Reply to Aquarion


Thursday 26th August 2004

Atom Comments

Looking up your hostname...
Got your hostname.
Welcome to the Internet Relay Network Aquarion
Your host is excalibur.esper.net running tiamat-1.0(04).ylist.hfix via dircproxy 1.0.5
This proxy has been running since Tue, 24 Aug 2004 09:41:55 +0100
nickserv
identify ****
Aquarion sets mode +i Aquarion
Now talking on #eddings
Topic for #eddings is: 'I am A PRODUSER.'
Topic for #eddings set by itagne at Wed Aug 25 08:50:42 2004
Mandy
[10:29] yeah
Mandy
[10:29] occasionally I'll log into the server via the website and delete the crap manually
Senji [10:41] continues to think that feeds should include magic information on how to comment on them, rather than you having to go to the actual entry's page to comment.
Mandy
[10:46] it would be useful, yes
gilmae
[10:46] I'm betting taht will be ATom's Killer Feature
-NickServ-
Password accepted - you are now recognized.
(You Connected)
Aquarion
Er, no. I think that's a really sucky idea
gilmae
almost everything required to do it already exists in Atom, and the last stephas been mooted
gilmae
why?
Aquarion
Mostly because it dictates what I store (and can store) about a person
Senji
Aquarion - why?
Senji
Aquarion - the feature I want is basically a URL.
Aquarion
That already exists in RSS.
gilmae
what else would you demand of the user?
Aquarion
It's what the <comments />element is for.
Senji
<comments />-- no comments? :)
Senji
So it does... :)
Aquarion
gilmae, For any Epistula entry, I store various things from the location from where I posted it, date, time. I could include mood, current music playing, a whole host of things.
gilmae
for comments?
Aquarion
I could also do that with comments
gilmae
you could
Senji
Aquarion's comments have lots of tickyboxes.
Aquarion
The point is that any standardised comments interface wouldn't let me.
Aquarion
And there's that too. It's why any given API cannot do everything, and the Atom API won't ever work fully for all weblogs
gilmae
The comments over Atom would just be a way for commenting for people who don't want to go to your site though, in the same way that the feed is for people to read your posts without going there
gilmae
people who want the frilly bits are going to read the site, and comment there
Aquarion
They can fuck off. If they can't be bothered to go to my site, I don't need their opinion.
Senji also wishes that people wouldn't use javascript popups for comment interfaces...
gilmae
It's been al ong time since *you* were on dial up, eh, Aqn
gilmae
frankly, when I was on dialup, I didn't have the time to sit around for people's designs to load up
Senji
gil - people's designs were too heavyweight then :-P
gilmae
I wanted to read what they said, not see the same design I saw yesterday
Aquarion
Because if it's infinatly extendable, then no one client will support everything, and if it isn't, then I can't store everything I want.
gilmae
obviously, Aqn excepted cause he changes his header image often :- )
Aquarion
gilmae: It's not the design. It's the validation, the optional info (And different sites having different optional bits)
Mandy
Senji - I used to have javascript popups, but then I changed to a better blogging system. :-p
gilmae
Senji, I read about two dozen feeds daily, about another three dozen weekly...even light designs start to add up over that 56K link
Aquarion has about 180 RSS feeds he checks at the moment
gilmae
Aqn: validation? you can still do that over Atom
Aquarion
But I tend not to read them in the aggregator. If I want to read them, I go to the site they came from.
Aquarion
gilmae: Last I saw it, all atom's validation was post effect. I can't say "these you need", and I still can't include my tickyboxes
gilmae shrugs...behaviour differs obviously
Aquarion
I really don't like the homogeneousness that reading everything though a aggregator (or a f/list, for that matter) dictates
Aquarion
I spend a while with my site making it look readable, and having it parsed though a sucky interface negates that
gilmae
don't get me wrong, I'm really trying not to be personal, but that is so arrogant
Aquarion
Yes
gilmae
its a pretty short step to only allowing people to email you if they do it through the client you give them
Aquarion
I'd disagree with that.
Aquarion
My biggest problem with the comment-by-atom thing, and the reason why nothing I will ever write will use it, is that it's an gaping hole with a large sign pointing into it saying "Free google-rank! Point your spambot here!"
gilmae
the only possible response I can give to that is awful, cause it is "It will all be better in the future"ism
Aquarion
When we have jetpacks and a base on the moon, I shall possibly rethink my position
gilmae
but the spec is pretty raw, and I just can't see it going through without the ability to return reponse codes to indicate that an entry doesn't validate, nor can I see it going through without allowing the author to close off comments, either permenantly or on a spam by spam basis
Aquarion
Yes, but that just means we have to run spamassassin on all our comments
Aquarion
And I'd rather not have another pile of "possibly spam" to sort though every week
gilmae
I can't see why something like mt-blacklist can't be used for Atom comments
Aquarion
Me neither, but I don't see blocking spam as preferable to having the hole in the first place
Aquarion considers pasting this conversation into an entry
gilmae
actually, that's very well done, Aqn
gilmae
you just came up with The Perfect Reason for people to write their own blogging engines
gilmae
"Well, I wrote my own so that my commenting system isn't Movable Type's"
Aquarion
Yeah, it's a side benefit :-)
(Slightly later)
gilmae
shall i make a Perfect World statement? :- )
Aquarion
You can, I might even append it to the entry I just posted :-)
gilmae
In A Perfect World, and I accept that this is the same world as the one with Mr Fusion-powered-DeLoreans, you (Aqn) would be able to publish your schema/DTD/whatever of your commenting-frilly-bits, and the Atom client would be able to use discovery to see that you support this functionality and the schema would tell it how to support it
Aquarion
That is indeed a perfect world
Aquarion
Actually X-Forms would solve some of that.
Aquarion
Include an X-Form for the comment - which has validation information - for each entry
Aquarion
And, while we're at it, I want a pony ana castle.

Those who spoke on this:

gravatar image

gilmae:

2004-08-26 09:49 26 mins after the Original Article

You’ve got to have dreams

Comment Link

gravatar image

emma:

2004-08-26 10:08 45 mins after the Original Article

I totally agree with you. I want people to visit my site as well. I spend a lot of time working on it, changing the layout every now and then.

I post almost everything on my LJ as well though, because I it’s a) easy to do with wBloggar supporting LJ and my weblog supporting the blogger API b) because that’s where the most feedback comes from.

It it not A Perfect World :(

Comment Link

gravatar image

Peter:

2004-08-26 10:18 55 mins after the Original Article

>Aquarion
>I spend a while with my site making it look
>readable, and having it parsed though a sucky
>interface negates that

“I spend a while getting the fonts and colours in my emails just right, and telling me to send in plain text negates that”

Comment Link

gravatar image

Aquarion:

2004-08-26 10:42 23 mins after Peter

Your point is well made, but misses the point I was trying to make.

LJ & Bloglines – for example – fuck around with the HTML. In fact, LJ strips it, and only displays tiny bits. Bloglines applies its own stylesheet. People reading the above in Bloglines would find it more difficult, because it uses a definition list and Aquarionics’ stylesheet to make it readable as a coversation (This will work better when I fix the stylesheet a bit more, but I don’t have time right now, hense the direct paste rather than detailed essay). I want people to see it in the most readable way, and the most readable way for this journal will not be the same for every other journal in existance. There is no such thing as a Perfect Design for every journal or weblog, we can just make it the best we can for the content we write.

Also – and this is also what I mean by having the comment-data inline – You cannot – and should never – autogenerate forms. Never not ever. After some consideration, the layout of the commenting form for this site is (I think) fairly logical (I rarely get mis-directed comments anymore). Even if ATOM-Comment did allow me to say “show these check-boxen” (for the email) or “this is a location combo box” or whatever, I’ve no control over the logic and flow of the form. It would be autogenerated, and that’s Not Good.

Comment Link


Mod Rewrite as a virtual hosting environment

So, I’ve now got control of istic.net. istic.net is going to have a number of subdomains, and I don’t really want to muck around with apache every time I want to add one, or get my Friendly Neighbourhood Sysadmin to do so.

Instead, I want mod_rewrite to do it, which it does. I have a virtualhost that handles *.istic.net, and passes it on to the following .htaccess file:

RewriteEngine on
RewriteRule     ^.*.istic.net.*$        -       [L]
RewriteRule   (.*) %{HTTP_HOST}/$1

Which redirects “http://ritual.istic.net” to ”~/sites/istic/ritual.istic.net”, which is what I want.

That shouldn’t have taken as many hours as it did, so I’m writing it down.

Secondly, I’ve moved my braindump – hol.istic.net – to a temporary new home whilst the DNS resolves. By the wonders of my new domain name, it’s temporarily housed at supercalifragil.istic.net which is possibly the best subdomain ever :-)

So, my personal “hire me” site could go to “narciss.isitic.net”, I could move all my open source projects to “altru.istic.net”, set up a site about religion at ritual.istic, head of into the futur.istic and be all m.istic about it and whenever I got fed up with the whole blogging thing and needed to move, I can always go ball.istic.

This isn’t actually far from the plan, which is to move the far flung tin-pot empires of AqCom that are getting lost under five years of journal archives & articles, and move them to their own domains – or subdomains, or sub-subdomains – where they can live happily ever after.

Those who spoke on this:

gravatar image

Rory Parle:

2004-08-30 11:17 11 hrs after the Original Article

Surely that first line just says to leave URLs containing “istic.net” alone, so that the second line doesn’t ever do anything? Given that I’m obviously wrong, I still can’t see exactly what the second line is doing either.

Comment Link

gravatar image

Pingter:

2004-09-01 10:53 2 days after the Original Article

I use:

VirtualDocumentRoot /path/to/%0/

... but that only works if you want all hostnames handled like that. Although I guess if you had separate VirtualHost sections for specific hostnames it would work okay…

Comment Link

gravatar image

Kevin:

2004-09-04 14:40 3 days after Pingter

I’ve had extra hosts declared alongside dynamic hosts like that and it works pretty well. The only thing to remember is the dynamic entry needs to be the default VirtualHost.

Comment Link


ESF's second birthday

In the great and powerful world of weblogs, anything older than a week, that has vanished into the archives, is dead, gone, and will never be seen again.

Well, almost. ESF appears to have reappeared on people’s radar, and since today is exactly two years (and one month, damn) to the day that I released the spec, I thought it might be time for a little retrospective on why it existed, why it still exists, and where it went.

Well, like a small child with a paintbrush, it went everywhere. Plugins and templates exist for almost every major weblogging tool (Including an MT plugin just to create the required date format) and an increasingly scary number of minor ones. There’s even a feed reader for it (Which has, irritatingly, “extended” the format to allow a text description, which is somewhat against the spirit of the format). Oh, and a CPAN module to create and read it. I’m absolutely freaking amazed by all of this. I created the format for two main reasons:

  1. I was annoyed at the syndication wars
  2. Epistula needed it.

The second was the actual reason for all this. I wanted a basic format to include a list the last x items of a section without hitting the database each time. I wanted to use an existing feed format for that, but really didn’t want to touch XML parsing with a sixty-foot pole at that point in the system. Because I was – and am – a *nix Admin, the most natural format for me to put this in was something approaching the classic news/mail format, which has passed data between systems for decades without needing to involve XML. I swapped the colon-separated format of that with a tabbed-based format, mostly because anyone using colons in a title field can be forgiven, but anyone using tabs has larger problems already. Hash marks marking non-parsed items is traditional, and after that it really just built itself.

The two technical decisions it comes under fire most often for are that it sets the mime-type to text/plain and that it uses Epoch time format, both of which I’d probably do differently if I were to write ESF mk2. The mime-type was chosen because it really *is* just a text document, and can be read as such. Also, I’m not sure creating a new mime-type for a tin pot format is at all responsible, and it was never really meant to go as far as it did.

The date is less excusable. When I was doing background reading for all this I saw that for every method of displaying the time, there were three or four variations to be detected accounted for (From the case of the time/date delimiter to the order of the pieces), so I fell back to the one format I felt was most common to all languages, Unix’s default Epoch time. Of course, this doesn’t allow for any kind of time zoning and isn’t actually supported by MT, so in future I’ll stick to the ISO standard (And indeed for Aquaintances Feed Instances – something of a natural successor to ESF, though it never got released – which was a mail/news based format for single articles, I used the ISO standard).

So it’s this first, this hatred of the XML based format wars, that got Epistula published. I fully accept that anger is an incredibly bad reason to put a new specification into the wild, and is the fountain of fuckwittery from which a number of the recent syndication debarcles have spewn forth, and this was September 2002, when RSS 0.92, RSS 1.0 and various variations were appearing, all incompatible, all increasingly difficult to parse (And I really don’t like XML modules), and I didn’t – and don’t – want full content feeds. So I created a brand new format with thin slivers of metadata that shouldn’t ever break the bandwidth-bank, wasn’t ever going to change (Scout’s Honour) and, above all, could be parsed with a regular expression or two.

The problems haven’t gone away. Bloglines’ Web Services Thingy is helping to solve the bandwidth problem, but the more I watch Atom’s development, the more it worries me as it gets more and more complicated, and more and more things that feeds will have because one day something will come along to support them.

ESF is the simplest thing that could possibly work, and that’s why it exists.


Sites of Evil

Today I was going to buy some Sluggy Freelance books for christmas.

I went to Plan 9 Europe, the European distributor for the comics and…

Well, go see. Your mission is to buy the first three Sluggy books without smashing your monitor.

Your time starts now.

Those who spoke on this:

gravatar image

A Nameless One:

2004-12-05 13:04 2 hrs after the Original Article

Well, it’s an appalling interface.

Would it get worse if I registered? I got as far as clicking ‘Buy’ on the first book before I decided that no, unless I actually want to buy one of the books, I wouldn’t be going further…

Comment Link

gravatar image

Bluebottle:

2004-12-05 14:12 3 hrs after the Original Article

AIEEEEE!

Comment Link

gravatar image

Rory Parle:

2004-12-05 14:18 3 hrs after the Original Article

All I see is a big sign saying “we don’t want your business”. Interesting approach to commerce.

Comment Link

gravatar image

Martyn Clapham:

2004-12-05 16:52 5 hrs after the Original Article

The site claims to be the product of people at Lancaster University. Dunno which one, as I’d assume that being in the North West the students at the English Lancaster University would be too flaming sensible to come up with that lump of garbage. BTW, given the current exchange rate, is it worth trying the main Sluggy site?

Comment Link

gravatar image

Aquarion:

2004-12-05 18:06 1 hr after Martyn Clapham

Yeah, but the shipping would mean it doesn’t arrive until after Christmas from the US

Comment Link

gravatar image

Martyn Clapham:

2004-12-05 22:33 4 hrs after Aquarion

Um, yeah, you did actually mention Christmas in the original entry, didn’t you.

Can I blame it on getting old?

Comment Link

gravatar image

Corinne:

2004-12-06 10:27 1 day after the Original Article

Uuuuuh…I …uhh..think it’s quite nifty. Needs a little more organisation to make it functional but I love the idea.

Comment Link

gravatar image

Jester:

2004-12-09 16:37 4 days after the Original Article

Don’t worry about it too much, they’re out of stock on book 3 anyway.

Getting to the books was relatively painless using the full site menu (however, that was the only way I could get to them).

Would it be nasty to write to the comic authors:
Dear Plan9 Europe are going out of their way to stop people buying your books, perhaps you should look for a distributor who wants to make you money.

Comment Link

gravatar image

ruthi:

2004-12-10 23:21 1 day after Jester

No, I think it would not be nasty to email the authors of the comics). It would be helpful and kind.

Then they’ll ask you who they should get instead…

Comment Link


Wednesday 12th January 2005

Putting your code where your mouth is

Since I’m away from work (Ill, but in a “Don’t go too far from the bathroom” way, rather than a “Don’t get out of bed” way) I’ve ended up coding the “Subscribe Me” thing I was talking about this morning.

Including LiveJournal, Radio Userland and Bloglines support, I bring you SubscribeMe

(Try this link for a working example)

Now, if all those famous people who will never ever read this could see it.

Those who spoke on this:

gravatar image

Mags:

2005-01-12 14:58 55 mins after the Original Article

It works!

As I was also signed into Bloglines, it took me straight into my “subscribe to this” dialog. Neat. Although ironically the newly subbed feed didn’t include this post…

Also, I have a question about the LJ feed – how does it which LJ feed it is?

Comment Link

gravatar image

Aquarion:

2005-01-12 15:45 47 mins after Mags

It scans the feeds for the first URL to match the URL you asked for, and returns the right LJ. Since LJ doesn’t let you have two LJs with the same URL, that should work.

Comment Link

gravatar image

Senji:

2005-01-12 15:29 1 hr after the Original Article

Now that is just cool.

Comment Link

gravatar image

gilmae:

2005-01-12 21:22 7 hrs after the Original Article

Brilliant. Now you just need a corny icon, and you’re well on your way to grumpily claiming to be the Father of Auto-Subscriptions.

Comment Link

gravatar image

Murky:

2005-01-22 11:07 1 wk after gilmae

Corny icon supplied.

Comment Link

gravatar image

Murky:

2005-01-22 11:06 1 wk after the Original Article

Aq,

A little note re: the link.

Some folks may wish to know that to avoid the errors associated with &rss2 etc, one can use &rss2 instead.

This resolves to the correct url, but allows the page to validate.

Comment Link


Saturday 5th February 2005

Absolutely relative

CSS would be better if there was an “Absolutely relative” positional statement, which would render the block absolulty, but instead of it being position on the page, it would be to the bounding box of the parent element.

Those who spoke on this:

gravatar image

MP:

2005-02-05 18:35 1 hr after the Original Article

Yes, I’d second that. Also, a more logical syntax for making horizontal lists would be nice…

Comment Link

gravatar image

Rory Parle:

2005-02-05 19:54 2 hrs after the Original Article

Absolutely positioned elements are placed relative to their nearest ancestor that is ‘positione ‘. Positioned means anything with position ‘relative’, ‘fixed’, or ‘absolute’. That is anything other than the default ‘static’. You can get what you want by making the parent ‘position: relative’ and the child ‘position: absolute’.

Comment Link

gravatar image

Aquarion:

2005-02-05 22:39 3 hrs after Rory Parle

Crikey, so it does. And now I can use that to make the postmarks line up without screwing up the line lengths on the fields. Woo!

Now to get the location data working…

Comment Link

gravatar image

Pingter:

2005-02-13 11:06 1 wk after Rory Parle

It doesn’t work in Gecko when the parent element is a td though :-( In that case it is positioned relative to the parent of the table tag (assuming that is position: relative)

Comment Link

gravatar image

Stuart Langridge:

2005-02-06 07:09 14 hrs after the Original Article

There is: it’s called ‘absolute’ :) Absolutely-positioned stuff gets placed relative to it’s closest absolutely-positioned ancestor: normally that’s the body (hence position on the page), but if you nest them them it all works.

Comment Link

gravatar image

Stuart Langridge:

2005-02-06 13:11 6 hrs after Themself

Oops; Rory was there first :)

Comment Link


Saturday 2nd April 2005

Project Scout

Somewhat to my suprise, I have recieved not one, but two patches to open source projects that I run. That is that gilmae submitted a better install document for AqWiki, and John Meadows has submitted a new version of the viewer file for MusicDB

Flush with this success, I’ve started a new project. Well, two. Threeish, really. First, I’ve gone back to the base system that Cantrip and Escape will be built on, which is actually the Epistula execution model rebuilt in python and mod_python. This is almost finished (yay) and is far neater than the PHP version (double yay) but I’m having trouble with one thing. So, pythonites who are still reading this crap: How do I initalise a class where the name of the class is contained in a variable?

Two, and more importantly, how should I have known this?

The third thing is a collision of a few technologies I’ve been wanting to use for a while: XMLTV, SQLite and AJAX, or DHTML, or whatever we’re calling it today, with a dash of new-media SMS stuff thrown in. Basic premise for project Scout is that it sends you an SMS ten minutes before a TV program that you wanted is due to start. It’s a little more complicated than that, but not much (Until you get to the AJAX bits, really). Enough for me to be able to use it to drink even more of the Python kool-aid, while having something more useful at the end than a random philosophy generator.


Monday 25th April 2005

Handing 404s over to Google

This site once won an award from a perl web hackers site – now defunct – for the 404 system.

The system was really simple. If you hit a 404 on this site it would apologise, then redirect you to a google search of Aquarionics for whatever you were looking for. This has worked for a while now, with the apologies getting ever more extravagant and the redirections being turned into google links (Because I hate being redirected places without a chance to stop it).

The latest iteration of this has just been finished (Yay the lunch break). It uses the Google API to display the first ten results alongside the apology. Finally a real use for the thing :-)

The next stage is to automatically wander though the mysql table of my access logs and automagically reply with 410 Gone if it used to exist but doesn’t anymore


Saturday 7th May 2005

Max Width and the mutant GreaseMonkey

GreaseMonkey is a Firefox Extension that allows you to run arbitrary Javascript files on pages from your client. This is cool, because you can do stuff to pages after they’re downloaded to make them work, or cooler, or both.

There are a large number of greasemonkey scripts already written and various people are rewriting more. (Actually, once my NDA runs out – and if my ex-CEO has given up on the idea – I may rewrite the fabled BrowserAngel project in GM)

So, with all that in mind, I’ve fixed something that really annoys me in a few sites I use, and have solved this problem with GreaseMonkey.

One of the problems with most aggregators which display more posts on one page is one of styling. If a single one of the feeds you can see puts in an oversized image, either the entire page/frame – and all the posts on it – is extended somewhere into the far reaches of horizontal-scrollbar-land, or just that post is, with the effect that you see the scrollbars for the rest of the page too. Also, you are probably going to have to scroll around looking for content. And it’s fugly.

One solution to this is the max-width CSS element. If you drop something like max-width: "100%"; into your CSS Style or userContent.css, it’ll force all images to have a maximum width of the area available. The down sides are that either everyone in the world needs to put it in their CSS files – which is unlikely – or you put it into your browser defaults. The latter causes it also to affect unwanted things, like if you view an image on its own there is no way to force it to display at actual size.

Max Width, btw, doesn’t work in IE 1 though 6. Don’t know about 7 yet.

My first solution to this was a bookmarklet which iterated though all the images on the page and made them all max-width: 100%, which works perfectly.

Here it is: MaxWidthifier

The downside is that Bloglines, which is one of the two places I have this problem has a frames interface, the Bookmarklet doesn’t work, because it only applies to the top level frame, not the containing frames. (The site with the problem is LiveJournal. Actually, most of the feeds with this brokenness on my Bloglines feed are syndications of LiveJournals & LJ Communities, but I digress).

So I’ve packaged the whole thing up into a GreaseMonkey user script, which does apply to the framesets, and defaulted it to apply to Livejournal and Bloglines.

Here is the Greasemonkey Script


Saturday 11th June 2005

The Javascript Future Event

So, I’m sitting in the basement of a bar somewhere slightly south of the River Thames at the Javascript Conference Thing. Arriving late, I was consigned to the edges somewhat, as the mass of people has taken over a RAID (That’s Redundant Array of Inexpensive Desktops) in a corner of the bar. We’ve broken up to get more beer, so I’m taking the oppertunity to compose stuff. The Wonder of WIFI not having made it to this basement, I’ll have to post it when I get back. Should have downloaded SubetherEdit before I left, really.

The major subject, as you might expect, is the migration from Document.write and friends over to the Brave New World of DOM-based scripting, and how to get the world to migrate to this from the other in much the same way as the Web Standards Project convinced the world that Tables-based design was no longer acceptable. The fact they managed this is going to help us more than a little, as CSS designs are far easier to Hijax (That’s the new term for Hijacking a page using AJAX, as invented… about 15 seconds ago), but we have something of a public relations mountian to climb to convince the world at large that Javascript isn’t just for mouseovers anymore.

To follow the same path as the CSS people, we need better discussion (along the lines of css-d), better examples (Blue robot, for example) and a figurehead (Dunstan has been nominated God Of Javascript. nobody is yet worshiping. As a matter of fact, he’s sitting in front of me eating a burger, which is ungodlike. It should at least be glowing, or something. Maybe some pineapple as a halo. Anyway. The God of Javascript is attempting to protect his chips from Aquarius.)

Not really sure what I can contribute here, really. Still working on ways we could converse better. Someone mentioned “A List Apart”, and my mind’s gone into invention mode, bringing back from the gumbo of half-formed ideas “B-List Apart”, a sort of Kuro5hin (Probably using Scoop) specifically for web development and AJAX-style articles.

Anyway, the discussion moves on.

(Later, from the train)

We need a mind-shift in the Intranet world. Jeremy Keith suggests a series of back-to-basics articles, to introduce people who want to learn about the Brave New World into it. Someone who’s identity I didn’t catch is going to organise a mailing list.

At this point we kind of split up, those who remained went upstairs and geeked possible ways of solving the OnLoad problem, on which Dean was authoritative. Shortly afterwards, I left.

It was good to meet/see people, and it was good to discuss this. The pub was nice, the food was good too, and there wasn’t a single non-mac laptop on the table.

People Who Were There:

  • Me (Aquarion, Checked shirt, black glasses)
  • Simon Willison
  • Stuart who is Aquarius
  • Dean Edwards of the IE7 that isn’t IE7
  • Jeremy Keith who does indeed have cooler hair than you.
  • Nick Fitz
  • Many, Many other people whose names I didn’t catch, which is going to prove very embarrassing when I find out they are people whose weblogs I’ve read for years.

Those who spoke on this:

gravatar image

MP:

2005-06-11 20:25 2 hrs after the Original Article

Fun things…
Am considering Ajaxing the site I’m working on at the moment, since it would seem an ideal use for the tech – XML based, and needs user interaction to grab data.

Comment Link


Monday 18th July 2005

Dom de dom dom

The announcement is here, the motion has begun. Stuff is well and truly going down.

The Web Action Standards Project DOM Scripting Task Force has been announced (The title is something of a mouthful, but Javascript Cabal is quicker, and WaSP DOM TF is more accurate) and I’m on it, representing the views of people with little time who want big web sites to do cool shit. This means at some point I will do contributory stuff (which is first going to require me getting access to a mail-server that the WaSP mail server hasn’t blocked for being deviantly dynamically IPed) and write articles and stuff, and probably be slightly embarrassed when someone points at a web site that I did (some of) the code for and points out how it’s all been done wrong.

In my defence, part of my reason for being involved in this is that I learnt JS when you were recommended to use document.write() and so I can write articles from the perspective of one who as Seen The New Light, rather than coming out from the darkness.

It’s about doing it right, it’s about doing it so that the users don’t have to notice, and it’s about enhancing the experience of most of your users whilst never ever blocking out the rest of them.

The new age of client side scripting is wandering in. Pay attention at the back.

Those who spoke on this:

gravatar image

Pol:

2005-07-18 22:18 5 hrs after the Original Article

New age of client side scripting?

I think not.

All that’s now happening is that “Thick” client apps are being reimplemented with an additional layer of abstraction below them.

The whole approach isn’t particularly different to any GUI fronted scripting language like say, VB, Tk/TCL, TkPerl or any other.

Web services just aren’t that special – all you gain here is some degree of portability that exists anyway and has done for over 30 years starting with UCSD Pascal and its pCode environment and more recently in Java.

Why not just go the whole hog, shitcan ECMAScript and shoehorn a fully compliant Perl interpreter into every web browser?

Comment Link

gravatar image

Kian Ryan:

2005-07-23 18:32 5 days after Pol

Because then somebody would argue that we shouldn ‘t be running interpreted client side and we should have binaries compilied for all the major platforms and the option to download the source and compile it on the host machine if it isn’t a standard platform.

Comment Link


Wednesday 12th October 2005

Window Onload

One of the things about the DHTML -> DOM Scripting Revolution (which will, obviously, be bloggerized) is moving window.onload events (and, further back, the stuff you used to put into the body onLoad tag. You don't still do that do you?) and turning them into addEvent()s. Except that because the various addEvent implimentations are subtly different from platform to platform, there is a move afoot to create a pattern that works. However, while I will be using that in new code, I still have to work on existing code that I don't have licence to completely rewrite today.

For example, adding new functionality that uses an onLoad event to a page that already has an onLoad event defined, whilst not mucking around with the code of both.

One of the central problems with window.onload is that there can only be one of it (No Highlander references, please), so if you want two things to happen when the page loads, you're somewhat SOL on the second one. The first one is defined something like this:

window.onload = function (e) {
      alert("Fool.");
}

(This is, obviously, not real code. I write software that a couple of banks are using internally, insulting them just for going to the wrong page is somewhat likely to be a career limiting move.)

Later on, we need to do something else too. So the new code does this:

window.onload = function (e) {
      alert("Barl.");
}

(Which is obviously a complex technical term for something banking related. It stands for 'Banking Annotation Reflex Link').

But wait! Now when the page loads it spews a box saying "Barl."! We can't let the user get away with not being insulted, it breaks the spec. And yet if I include them both together in one sourcefile:

window.onload = function (e) {
      alert("Fool.");
      alert("Barl.");
}

Then the functionality will be split! disaster! Someone's crossing the beams!

So we do this:


oldOnLoad = window.onload

window.onload = function (e) {
      oldOnLoad();
      alert("Barl.");
}

Basically, we save the old onload event as a new function (oldOnLoad) and then execute it as part of the new one, So it executes the stuff that is already defined, then the stuff that we want to happen next, and we can keep adding stuff like this until it reaches critical mass, and I give in and spend an afternoon refactoring the whole thing to be more sane. But for now, it works, and clients can be happy.


Tuesday 18th October 2005

Years, Drugs, Webs

So, Three hundred and sixty five days.

Fifty two weeks, at thirty five pounds on bus tickets a week, four and a half hours every working day is… No, I’d better not think about it.

Today is my first anniversary working for EM, and therefore ranks as my longest continuous employment since I had a paper-round. Yay the new economy.

There is a new design for Aquarionics on its way, BTW. Maybe even new content, or something. The design is stuck in limbo since I redesigned it in PSP and then my trial ran out, so I’m waiting until I can justify buying the full product. Or I could use that as an excuse to leap to Photoshop etc.

I bought the new Barenaked Ladies album – Everything to Everyone – last week (Via iTunes. Yes, DRM isn’t ideal, but until we can convince the record industry that there are more honest people in the world than people who will get something for free if they can. While we’re at it, can we convince me too?). It contains a couple of ‘future classic’ type tracks I can see myself listening to for a long time, and there is a track whose first lines are “You’ve never seen as many monkeys in the Daily Mail”, Which even out of context (It’s a song about postcards of chimpanzees) makes me laugh. I’m a sad person.

We have, once again, returned to the classic, battered battlegrounds of the War On Drugz. Every so often the needle of popular culture appears to drift from “liberal” to “conservative”, and the further into time we get the faster the metronome appears to be ticking. Anyway, some of the Popular Press (Who, in a rare display of Actual Humour, refer to broadsheets as the Unpopular Press) have decided that some of the white powder coating the fashion industry must be blown away (possibly in the hope that they can sniff it as it goes past.) and… and… in the great traditions of journalists everywhere, when someone says it better than I do I’m going to use their words instead. From The Friday Thing 2005-09-23 (Which if you don’t read, you should, it’s well worth every penny):

The point being – God, what *is* the point? The point being that
millions of people take recreational drugs in this country and
it’s madness to think of them as criminals. OK, so Moss happens
to work in a particularly stupid-money tiny-talent industry in
which coke-taking is practically compulsory, but frankly, even if
she’d been less lucky in life and had never made it further than
the customer service counter at TKMaxx in Croydon, she’d probably
still burn holes in her pretty little nose of a weekend. Only it
would cost her an awful lot more and would be cut full of chalk
and paracetamol. The point being, for the love of Belushi, in the
name of all that is holy and legally-permissable – it is a little
bit of coke. An inconsequential smudge of bullshit-dust. It is
not important.

Waging a deeply cynical tabloid war on celebrities who take drugs
is a waste of time, and investigating and prosecuting anyone who
take drugs is a waste of time and money. Furthermore, the fact
that Ian Blair took time out from devising futuristic Supercops
to get personally involved in publicly chastising druggy Moss is
madness, particularly as it means that now, if he’s not going to
appear like a hypocritical superloon, he’ll have to make it his
personal business to investigate Doherty, Deayton, Williams,
Walliams, every other catwalk model alive, 90% of all TV
presenters and pop stars, Russell Grant, Prince Harry… the list
is endless. He’s certainly going to have his work cut out for
him. He’ll probably have to bring in the TA to help out.

It’s very simple. Prohibition doesn’t work. The pros and cons of
various drugs don’t and shouldn’t come into it. The fact is,
people take drugs. They always have and they always will. The
least we can do as a society is educate people as to the risks
and ensure that if they do take them, at least they’re getting
stuff of a certain purity, and in r