loge.hixie.ch

Hixie's Natural Log

2005-04-17 18:27 UTC Threads

I can't wait to see who will be the first to have a browser that can render the Acid2 test correctly. Another question (and I expect the answer to be quite different) is who will be the first to ship an official release build that renders the test correctly.

There's been some debate about the correctness of the bottom line of the test. It's part of one of the CSS aspects of the test, so hopefully we'll address that problem on Tuesday's CSS working group teleconference.

One of the things that the Acid2 test totally doesn't test is the DOM. I think for Acid3 (whenever that comes) we're going to have to address that.

Another thing that Acid2 doesn't address is the CSS inline box model. David actually tried addressing that in an "inline acid test" back when Acid1 (the box acid test) first came out, but although he created a brilliant test, varying and unpredictable font metrics meant the test could only be truly tested with the Ahem font.

Acid2 had the same problem. We couldn't test inline box model aspects in any kind of detail because unpredictable font metrics meant there was no way of achieving a pixel-perfect look with inline boxes around.

One solution is to simply use the Ahem font, of course, and that's what true CSS tests do. The Acid2 test isn't a true test, it's more of a demo, aimed at the public. As a true test it is terrible: it mixes a bazillion things all at once. Debugging that kind of test is a nightmare. Opera engineers, for example, aren't working on fixing the Acid2 bugs directly: instead, I spent an hour or two minimising the Acid2 test into eleven separate real test cases, which show the real bugs our latest code has with Acid2. These are the test cases that Opera engineers then work on.

Since Acid2 is aimed at the public, it has to work on most default installs. And, sadly, OS vendors don't ship the Ahem font by default, so we can't use it in tests aimed at the public.

Talking about minimising testcases, a few weeks ago I gave a number of courses, at work, on how to create testcases for rendering bugs. It was an interesting experience. Basically I just did my normal QA job, creating testcases out of pages that weren't rendering correctly, but with a projector, an audience, and while giving a running commentary. I felt a bit like a performance artist! Apparently these courses were well-received.

I've been tempted to write a book on how to create test cases for Web browsers, but I figure I probably personally know half the people who might buy the book, and am only one degree of separation from the rest, so it probably wouldn't be worth it.

It's also really hard to explain. Hence why those courses I mentioned just consisted of me showing people how I did it, instead of telling them how to do it. Teaching by example works much better for this kind of thing, I think.

Either that or I suck at teaching. Or both.

Eh, I probably just suck at teaching.

Moving on, I recently bought Power Grid, a game I've mentioned before. We played it with six players on Friday. It was great. Oddly enough, this time the ending didn't seem quite so sudden. Maybe it was because there were so many players, or maybe I'm just getting used to it.

I've also played 1856 a couple of times these last few weeks. Haven't been doing so well, but I'm definitely getting better. The last game I played we were all people who'd played multiple times, so I didn't feel in the least bit bad about playing a very dirty trick right at the start: I performed a hostile takeover of someone's first company, in the first stock round. It's a lot easier to run a company that has five shares' worth of capital straight away, rather than one that has just two or three. I ran the company without loans the entire game, and only withheld dividends three times (which, in retrospect, was my downfall: I shouldn't have withheld at all).

The biggest problem was that that strategy meant I couldn't decide which company to start, and I just had to use what was available and affordable. That turned out to be London & Port Sarnia, which in my opinion is a suboptimal company to start with.

Speaking of trains, I now have a Web interface to my model trains. It's pretty cool. I have a little Perl script running on one laptop which is running a little TCP/IP server that speaks a very simple line-driven proprietary protocol I invented. This script takes commands from the incoming TCP sockets and converts them into output for the serial port (which then connects to the trains), and takes input from the serial port (from the track sensors) and sends messages to all the connected sockets. The Web interface is then just a Web page that uses two CGI scripts: one which opens a persistent connection to that aforementioned server and just converts all the messages into JS commands that the Web page then uses to update its UI, and one which just opens a connection to the train server, pipes one command to it, and closes the connection.

I've also written an IRC bot interface to the train server, mostly as a proof of concept.

Since Stargate is on hiatus these days I've had to find other shows to watch. I've been watching Lost and Battlestar Galactica. Lost is driving me crazy. It has the potential to be really good, and the potential to fall spectacularly flat on its face. Let's hope for the former.

Battlestar Galactica hasn't impressed me that much. I first watched the miniseries, and was hugely impressed by the three-and-a-half minute single shot at the start, but it was downhill from there.

I've been reading a stack of books recently (something that Alex mentioned in his post about our trip to Prague last month).

My favourite music at the moment is the Incredits track from the The Incredibles soundtrack CD. That notwithstanding, on Saturday I dropped over at Club Clave for a while, where I met, and briefly danced with, one of the people I go to classes with. I think it would probably be more fun to go with more people I know, though.

All of this is just to say that I'm trying to write my paper for my X-Tech presentation and finding it hard to express what I want to say, so instead I figured I would write a lot of nonsense here and delay the actual paper writing some more. Sadly the papers are due tomorrow.

Actually, that reminds me: I saw a presentation by Bjarne Stroustrup Friday afternoon which was quite heart-warming. He was talking about the next version of C++, and the running theme throughout his presentation was "we have to keep backwards compatibility". Apparently, he, and his peers on the C++ committee, are having the same problem that faces us with WHATWG: we consider it completely obvious that the most critical thing about any new features is that we remain compatible with existing content and that our new features fail gracefully in old UAs, but we are continuously having to deal with people who consider backwards compatibility to be of minor importance at best.

This is the point I'm trying to make in my paper, and the theme that will be running through my presentation.

2005-04-15 23:47 UTC Comments requested on CSS custom control draft

We recently released another draft of the spec that will eventually turn into a way for CSS authors to create custom controls and do other clever things like reorder the content of their pages or make their pages more dynamic without throwing lots of script into the mix: XBL.

We have some issues, for example how to bind elements. Comments are urged. Send them in!

2005-04-06 00:40 UTC The ABC Railway: Photos from the early days

So! As I mentioned, I went out and bought some track and rolling stock for my model trains. People have been bugging me for pictures so I had a go at making some using a low-end USB camera I got free with my Dell laptop a few years back.

Oncoming train: Looking down the track at night, two lights stare back at us!

My series Re 421 and series Ae 6/6 electric locomotives: Two beautiful locomotives with powerful lights.

My Re 421 stopped on the yard lead while classifying the Knie train: A solid blue electric locomotive with "cargo" painted on the side, coupled to a flatbed carrying a Knie semi trailer and a brown boxcar.

The Knie train cars have stunning levels of detail.

Freight waiting at the freight yard: My coal truck and my other brown boxcar have lots of detail as well.

My BR 362 Diesel switching engine pulling coal from the a/d track: A short but still very detailed red locomotive coupled to the same coal truck.

Freight in the classification tracks: A short gray hopper and a short brown flatbed, a depressed well flat car with semi truck trailer, a gray flatbed, the three Knie cars, and long cars carrying wood cargo.

The wood cargo cars in closeup: You can see accurate lettering down to the car's serial numbers.

My Re 421: Again, beautiful detailing sets this locomotive apart.

The overall layout: Lots of track in the corner of the room.

There are several more pictures if you want to browse.

I'm quite happy with my actual layout, although I really need ten times more room to make it truly usable. I spent a few days during the Easter break studying how to make a decent freight yard, and so I was careful to include an arrival/departure track (with its own run-around), an engine services track, a team track, a long yard lead, three classification tracks off the ladder, a repairs-in-place track, and a run-around for the yard lead. There are decoupling tracks in appropriate places and my switching engine (a short red BR 362 diesel) has telex decouplers so it can decouple anywhere as well.

In addition I have three "towns": Avon, Bath, and Cuba. They are connected by a two-track mainline.

Cuba is a small end-of-line station with its own small classification yard. It has an a/d track, a yard lead, a run-around, engine services, and two classification tracks, but the whole thing is much more compactly built than the main yard and doesn't have a dedicated switching engine. (At least, not yet.)

Avon is simply a two-siding affair. It's very primitive, to the point where if you go into the first siding when you arrive, you actually have to pull back out into the main, then reverse back into the second siding, then reverse again to leave the station. I'm not expecting that siding to get much use.

Bath is built from the remnants of the pieces of track and points I had after building the yard, Avon, and Cuba, and frankly bears more resemblance to John Allen's Timesaver puzzle layout than to anything you'd find in the real world. It's also mostly built out of curved track, which makes coupling with freight there a real pain.

All the points (turnouts) as well as all the locomotives have built-in digital decoders, so I can control the entire layout via a computer interface. I've set up a little Web-based application to run my trains, it's pretty sweet. I'll talk more about that some other day, though.

Pingbacks: 1 2 3

2005-04-02 12:53 UTC Foothold

Today I bought some track.

Pingbacks: 1

2005-03-20 17:30 UTC Call an apple an apple

Several years ago, HTML was invented, and a few years later, JavaScript (then LiveScript, later officially named ECMAScript) and the DOM were invented, and later CSS. After people had been happily using those technologies for a while, people decided to call the combination of HTML, scripting and CSS by a new name: DHTML. DHTML wasn't a new technology — it was just a new label for what people were already doing.

Several years ago, HTTP was invented, and the Web came to be. HTTP was designed so that it could be used for several related tasks, including:

People used this for many years, and then suddenly XML-RPC and SOAP were invented. XML-RPC and SOAP are complicated ways of executing remote procedure calls on remote hosts using a structured set of arguments, all performed over HTTP.

Of course you'll notice HTTP can already do that on its own, it didn't need a new language. Other people noticed this too, but instead of saying "hey everyone, HTTP already does all this, just use HTTP", they said, "hey everyone, you should use REST!". REST is just a name that was coined for the kind of architecture on which HTTP is based, and, on the Web, simply refers to using HTTP requests.

Several years ago, Microsoft invented XMLHttpRequest. People used it, along with JavaScript and XML. Google famously used it in some of their Web pages, for instance GMail. All was well, another day saved... then someone invented a new name for it: Ajax.

It's psychotic! People keep creating new ways to refer to existing technologies. The worst of it is it's really confusing to those of us who develop these technologies! The other day a reporter contacted some WHATWG members to ask what the relation between Ajax and WHATWG was. That was the first time I heard the name. And now everyone is talking about Ajax as if it's some sort of new technology, despite the fact that people have been using it for years.

So I have a request: could people please stop making up new names for existing technologies? Just call things by their real name! If the real name is too long (the name Ajax was apparently coined because "HTTP+XML+HTML+XMLHttpRequest+JavaScript+CSS" was too long) then just mention the important bits. For example, instead of REST, just "HTTP"; instead of DHTML just "HTML and script", and instead of Ajax, "XML and script".

Pingbacks: 1 2 3