::scr Ramblings of a Classic Refugee or How I Learned To Stop Worrying and Love OS X

Alaric Snell scr@thegestalt.org
Wed, 6 Feb 2002 10:39:33 +0000


On Wednesday 06 February 2002 01:23, you wrote:
> On Tue, Feb 05, 2002 at 04:50:24PM +0000, Alaric Snell wrote:
> > 1) The exact bit sequences used to express the fact that my email address
> > is alaric@alaric-snell.com, my web site is at
> > http://www.alaric-snell.com/, and I would like some pizza are surely only
> > of minor importance to a programmer working with this information
>
> True in that case, but not true of all data.  To a games programmer, for
> example, the exact bit-sequences that make up the colour coding for this
> particular sprite are useful to know, as without that knowledge you can't
> do cunning tricks with the palette to make sure sprites cross over each
> other in visually pleasing ways.

Yup. It's good to have access to low level details when you want them, but 
not otherwise.

> >                               Encodings should be handled by I/O
> > libraries, dammit, not made into big complex towering bastards like XML
> > that you can't help but have to work with directly!
>
> You mean that no-one has yet written the appropriate libraries to make it
> easy.

The problem is that this may not be possible except in very limited domains - 
XML has too much stuff that isn't formally specified, requiring human 
intervention in many things :-(

Eg, there is no definition mapping from XML to native data types like there 
is for CORBA and XDR and ASN.1 and Java serialisation and friends. So you 
have to deal with it at the DOM level, otherwise you discard potentially 
vital information.

> > 2) Binary files are small and fast. Computer power and storage are not
> > free. Most places where I've worked have had to buy lots of servers to
> > deal with the load to their web sites. If they could shave 10% off of
> > that, it'd be a lot of money. Not enough to hire a programmer to re-code
> > everything in assembly, no, but enough to justify them using an efficient
> > encoding library instead of a messy one, all else equal.
>
> Yes and no.  When you have division between operational people and
> development people, which you really do need when you're big, it is
> important that the ops people can grok exactly what the developers are
> doing.  Easily editable formats provide this.  Especially when the
> ops staff are on-call and having to fix things using nothing more than
> a phone.  There's a delicate balancing act, and there is no universal
> panacea, whether it be XML, plain-text, binary formats, or anything
> else.

XML isn't that easily editable. The non-technical people where I work refuse 
to touch it, no matter how we try! So they ask us to perform menial editing 
tasks for them :-(

They need XML Spy or something. But if we're to use editors for everything 
and never touch the stuff 'directly', why bother what the bit format is?

> > 3) The benefits of being able to hand-edit data in Notepad are often
> > overstated.
>
> and often understated.
>
> >              There is nothing 'magically readable' about text; tools for
> > editing and viewing it just happen to come installed with the system
> > instead of having to be added.
>
> The fact that those tools are universal do, in fact, make text universally
> editable and viewable. 

Almost... there are very few UTF-8 editors out there :-)

> > In a text editor I can really easily screw up a data file...
>
> You can really fuck things up with ANY tool.  Do not blame the tool for
> your inadequacies.  Of course, it is possible to make tools which stop
> you shooting yourself in the foot.  The price of that is frustration and
> increased time, because they force you to work in prescribed ways.

I don't think so... An image editor will let you make the image ugly, but 
it'll never let you generate something that isn't a valid image. And yet 
although I may prefer the model of some image editors over others (always 
happier with Paint Shop Pro than the Gimp, for example), I just choose an 
image editor that works the way I want rather than editing the thing in hex!

Constraining the output to be a valid member of some format is orthogonal to 
enforcing a way of working.

What I'm talking about is *semantic* editing as opposed to *syntactic* 
editing. Editing an XML file in Notepad is syntactic editing. Editing it in 
XML Spy is semantic editing. Likewise with PNG files, just substitute the 
Gimp for XML Spy!

ABS

-- 
                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software