Linus Torvalds torvalds at linux-foundation.org
Sun Oct 16 15:18:26 EDT 2011

On Sun, Oct 16, 2011 at 5:59 AM, Henrik Brautaset Aronsen
<subsurface at henrik.synth.no> wrote:
> Would it be an idea to use UDDF [1] as subsurface's native XML format?

No. UDDF is ugly as hell. It's another of those "totally unreadable
mess of crappy XML" formats, made doubly worse by being complicated
and horribly specified. It does all the things that are signs of bad
formats: makes each date component its own XML thing, doesn't list
units, lists totally idiotic and irrelevant information
("<O2>0.21</O2>"? Who th f*ck cares? It's air. You don't bother to say
so - talk about the cases where it's something *else*, don't bother
saving default information in a stupid format, for chrissake!)

Compare the following snippets:







  <dive number='267' date='2011-08-04' time='10:23:09' duration='52:45 min'>
    <depth max='22.4 m' mean='15.012 m' />
    <temperature air='28.0 C' water='26.0 C' />
    <surfacetime>45:00 min</surfacetime>
    <location>Molokini Crater: Aquarium</location>
    <notes>Nice long calm dive.</notes>
    <cylinder o2='32.0%' size='11.1 l' workpressure='206.843 bar'
description='AL80' start='197.9 bar' end='43.69 bar' />

and ask yourself: which one would a sane person use? Which one
actually says what units the numbers are in? Which one can be parsed
by both a human and a machine?

In other words: which one tells you *more* in fewer lines and more readably?

I've looked at a lot of dive log XML from different sources. And they
are all absolute *crap*. The subsurface format may not be perfect, but
it's a lot closer to that than UDDF.


More information about the subsurface mailing list