5:16, Friday October 17th, 2003 • feeling jubilent • no comments
I've just been writing a bunch of documentation for some of the behind-the-scenes classes in wwWebflow using Javadoc. Javadoc is pretty neat and I very much like seeing my own classes through the lens of those familiar looking pages. I particularly like the fact that because Javadoc reads the code and automatically documents the public interfaces, all the what is already provided and I only have to provide the why.
4:08, Friday October 17th, 2003 • feeling insensed • no comments
Ah Emusic. Unfortunately they've realised that their prices are ridiculously low. I mean, $10 a month for as much music as you can download. It's changing to 40 tracks a month at the end of this month. So I'm downloading fast.
But the client's being a bastard! I think they must be really heavily loaded by people panic downloading like me. I'm getting loads of timeouts and stuff. Worse than that, of 372 tracks downloaded in the past few days, 144 are zero bytes. Even worse, as I listen to tunes I'm finding some are just truncated. A nine-minute track that's 700k? I think not. Pain. In. The. Arse.
I totally forgot to write about Louise's birthday - don't take that to heart Louise! We had a really nice day. I bought her a pretty big bouquet of roses and thistles. They were very pretty and the whole thing was lovely. It was the first time I'd bought flowers and also the first time Louise had been bought flowers.
I went to a nice looking shop on Munster Road and confessed my ignorance and bought the flowers. When I went back to collect them I got to watch the guy making the bouquet, which was pretty good.
The reason I mention this is that they're just starting to drop. A week is a pretty good innings. The thistles will keep going for a while yet.
The rest of Louise's birthday was cool too, we went for a meal at the Chop House. It was nice because lots of people came. I got us a bit lost though, assuming that Bermondsey tube would be nearer to the restaurant than London Bridge and being very wrong. Louise wasn't overly impressed.
After the meal we went to see David Blaine. We had nothing to throw and the whole thing was pretty dull really. We left quickly and sat in the flat while Miles drank port and Adam had rum. I tried to motivate people towards poker, but it was late.
18:19, Thursday October 16th, 2003 • feeling enthusiastic • no comments
Today Mat found London Bloggers Tube Map. A site where you can catalogue your blog according to your nearest tube station and view others in your area. There are 644 people registered already, which is pretty cool.
Given my burning desire to make new friends in London, I've decided to try and arrange a meeting for Fulham and nearby bloggers. This basically means sending an email to everybody listed under Fulham Broadway, Parson's Green, West Brompton, Putney Bridge, Gloucester Road, Earl's Court, Hammersmith, Baron's Court, West Kensington and perhaps even South Kensington. Each of these tube stops is within walking distance of here. South Ken is probably a good twenty or thirty minute walk, but that't the furthest.
There are quite a lot of people in the area. I hope some of them will come out for a meetup. I may have to lure them with beer, we shall see.
0:34, Thursday October 16th, 2003 • feeling relaxed • no comments
I tried to make Tempura tonight. It sounded like a good idea. I made some batter and chopped some vegetables. I was talking to Louise and I told her what I was making and she said that I wouldn't be able to deep fry the vegetables in olive oil, which is the only kind of oil we stock. Nuts I thought. I resorted to shallow frying and this didn't really work out. The batter didn't crisp properly and clumped instead of thinly coating the vegetables.
The recipe I followed included a sauce for dipping in. That was pretty good. Soy, some honey and some vinegar and it was really tasty. Lucky really.
I made the Tempura because I fancied a change, but it wasn't that great and I probably won't bother again as it's quite a bit of work for just some vegetables really.
After reading LShift's NMK case study I started reading one of their references, Modeling Web Interactions. This was an interesting research paper that looked at two problems in developing web software. The first was the problem of getting the right input from forms, the second was the problem of users opening secondary windows and following two paths through a system, resulting in one becoming out of date, because the server only stores one set of data.
The second is a tricky problem without a great solution. They recommended time stamping the forms. At least this way if the user does submit an out of date form this problem can be caught and the user warned. However, they suggest no technique for recovering from the situation.
They also don't really take into account security problems. E.g. anything sent to the client becomes mutable and anything received from the client can't really be trusted. This is an impossible problem really, but it directly contradicts some of the things required to combat the above issue. If infomation is stored on the client then there's no risk of that page becoming outdated as the server has no state and simply relies on the client to do that. However, if that state is untrustable...
The other problem outlined in Modeling is more interesting and their techniques more applicable. They discuss the problems of forms not matching the programs required to process the data and the problem of multistage conversations between user and system. Whilst they provide little in the way of solutions for the second part, they find a radical solution to the first. They create a programming language which is type checked with respect to web forms. A form definition is created and as a form-consuming program is installed on the server it can be checked against that form definition for correctness. The authors advocate creating type-checking facilities for all the languages used in web programming, which is obviously slightly useless. However, I think that their idea can still be applied.
The simple way to do it is with a code generator for your favourite language. The generator takes a form definition and produces objects/functions to first of all create an instance of that form and secondly handle the form when it is submitted. This generation ensures consistency and also allows for validation etc to be built in easily, preventing mistakes and retyping the same fucking validation routines. This is an easy and safe way to statically check forms. However, two problems arise.
Firstly the HTML output by the object can't be decorated very easily. Solutions here include generating XML that is then transformed by a configurable snippet of XSLT or by exposing the output form HTML tree to editing somehow (probably via a DOM like mechanism). XSLT is best as it's much easier to add a large amount of extra markup, as is required with a commercial web page.
A more serious problem is that of forms which vary dynamically. E.g. a shopping cart form will have a quantity and an ID field for every item in that cart. A statically created form can't replicate sections and the processor object can't retrieve and check the data. The solution here is to be able to define possibly repeating sections in the original form definition and to create a form generator that can dynamically repeat the right sections. The processor will be similarly specialised. The only tricky part is communicating between the generator and the processor the number of repetitions that have been created. The generator, or simply the tally, can be stored in the state, but care must be taken to ensure that the form coming back in conforms to the pattern sent out.