W3C home > Mailing lists > Public > w3c-wai-er-ig@w3.org > February 1999

Re: Betsie Source Code Released

From: Silas S. Brown <ssb22@cam.ac.uk>
Date: Wed, 24 Feb 1999 07:38:07 +0000
To: Wayne Myers-Education <wayne.myers@bbc.co.uk>
CC: w3c-wai-er-ig@w3.org
Message-Id: <E10FYtK-00059a-00@green.csi.cam.ac.uk>
Hi,

I've looked at your sorce and despite the fact that I don't know Perl, I 
can get a rough idea of what's going on.  Well I must say you're very
adventurous to let just anyone download and redistribute it - I didn't 
want to do that with my access gateway because I thought there would be 
zillions of versions all over the web, many of which are really old.  I 
don't mind people downloading it and keeping up to date, but I get 
nightmares about being adversely judged on code I wrote years ago....

Having said that, there have been a few people who asked me for the 
location of the source, downloaded it, and disappeared.  This leaves me 
quite concerned as I have no idea what's happened (not to mention the 
fact that their versions are now out of date already).  And I'm still 
looking for permanent homes for my gateway - I'm just a student, here 
today gone tomorrow, with most things I do forgotten....

(This is not to say the gateway's useless.  It's very useful to me as 
I'm partially sighted myself.  I believe that people should be given 
maximum configurability in an interface, since everyone is different, 
and this is the main point of my gateway.  I'm just no good at getting 
anyone else interested in what I do.  I want to do research in universal 
accessibility when I graduate but nobody will take me.)

You've hard-coded a lot of details into Betsie (such as exactly which 
font size to used) whereas I've gone for lots of options.  So Betsie 
might be more suited to people who are new to computers and get 
bewildered by lots of options, whereas my gateway might be better for 
those who like to spend time fine-tuning their preferences.  I think 
both approaches have their applications and can certainly co-exist. 
(Before anyone quotes me out of context, I must quickly add that there 
is no excuse here for an application or an operating system to be 
unconfigurable.  The thing about web gateways is that there are easily 
selectable alternatives - you just go to a different web page.  With 
operating systems this is not the case - if you can't use Macintoshes 
then you can't work for any employer that exclusively uses Macintoshes, 
nor can you run any program that only runs on them.)

It's amazing how few people are interested in hosting something that 
essentially lets others use your computer at no benefit to you.  This is 
why public proxies keep closing down (and this could be a major problem 
in Y2K, when parts of the Internet could go up and down like yo-yos, 
source packet routing isn't usually honoured and in the absence of 
public proxies there will be many black holes).  I've asked the RNIB and 
they say they might be interested but they're sitting on it (they've 
been very busy for the last few months).  I don't suppose you'd like 
to put it on the BBC's server would you?  And who manages www.w3.org 
anyway?

Anyway, about the source.  One of the main differences between us is 
that your program is designed primarily to help with access to a 
particular site, whereas mine is designed as a gateway for the whole 
web.  It therefore needs to be able to cope with just about anything the 
web can throw at it - and if the web throws something at it that it 
can't cope with, I have to fix it.  For example, my gateway can cope 
with the following but Betsie can't, and there are pages out there that 
are really like this (or like part of it):

(14 lines of HTML follow)
<HTML>
<HEAD>
<META NAME="Description" CONTENT="Look > < > >">
<STYLE blah blah blah>
</HEAD>
<BODY>
<!-- comment >
<  
      APPLET  SRC="hello.class" >  <      /
APPLET>
<TABLE><TR>
<TD><A HREF="test.jpg">test</TD><TD>hello</TD>
</TR></TABLE>
</BODY></HTML>

This contains a style sheet (untouched by Betsie and hence can override 
all font choices; access gateway has an option to remove it), spaces and 
new lines at the start of an APPLET tag (Betsie processes the applets 
before it remove the spaces, so it won't remove that applet), an 
old-style comment (if the string --> does not occur in the document then 
you should treat > as a comment terminator), and the < and > signs 
within quotes in a tag (which may confuse your tag parsing).  It also 
contains the common idiom of using /TD to terminate a link; when Betsie 
removes the /TD, the link goes too far because it isn't aware of this.  
Also, the link is to a graphics file, which Betsie is unaware of and 
tries to redirect through itself.

Besides coping with this rubbish, my gateway is also meant to be more 
configurable and has a wider range of types of processing that it can 
do.  As a result of both of these things, the code gets more complicated 
(as I expect you've found out) - your Perl is about a tenth of the size 
of my C++.  If you expand Betsie to cope with more Web gizmos and laxer 
HTML (which you'll probably have to do if you want it to be able to cope 
with some of the sites that are out there), you may well find that the 
whole thing gets slower.  Not only is Perl an interpreted language, but 
the way you've done string parsing seems to introduce countless passes 
through the document.  For example, you pass right through the whole 
document removing surplus spaces from tags, and you pass through again 
to remove applets, and so on.  I don't know much Perl but this is 
probably a natural side-effect of the language.  If it's given a big 
document, that can mean quite a chunk of processing.  I take it the BBC 
have a good high-end server then!  I just make two passes, the first one 
finding out anything it needs to look ahead to find out (such as whether 
there's a META redirection), and the second doing all the work and 
generating the output.  And C++ is a lot faster than Perl.

The obvious advantage of Perl is its relative saftey, but I'm pretty 
sure I know how to write secure C++.  I agree that putting code written 
by a C++ novice on a web server is asking for disaster, but the gateway 
isn't like that.  (If anyone wants to try crashing my gateway, feel free 
to have a go and let me know how you get on.)  There comes a point when 
you can't implement everything in a scripting language.

By the way, I'm not sure what you were saying about Java security.  When
it's absolutely necessary for me to get to Java applets, I can check the
"enable applets" box in my gateway and it seems to work fine (it just
re-directs the code URL to point back to the original page).

Regards

-- Silas S Brown, St John's College Cambridge UK http://epona.ucam.org/~ssb22/

"I know of no way of judging the future but by the past" - 18th century
 American statesman Patrick Henry
Received on Wednesday, 24 February 1999 02:38:01 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Thursday, 9 June 2005 12:10:32 GMT