another RFC for trip handling

Dirk Hohndel dirk at Hohndel.org
Sun Aug 26 17:23:05 PDT 2012


Sorry about the phone email response...

Linus Torvalds <torvalds at linux-foundation.org> wrote:

>On Sun, Aug 26, 2012 at 3:28 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>
>> It then creates time based groups and stores them in the XML file as
>> something like
>>
>> <trip number='12' date='2012-08-23' time='09:25:31'>
>>   <location>San Diego, CA, USA</location>
>> </trip>
>
>I haven't looked at the code yet, but do you really want to make the
>trips give the *minute* they start? That sounds a bit crazy.

It's useful as it tells you which dive is the first one in a trip... But I agree, it seems a bit weird. I can look at reworking this to only trigger on the day.

>How about just making it a starting day. And make the location be an
>attribute, so that you can do it like
>
> <trip number='12' date='2012-08-23' location='San Diego, CA, USA' \>
>
>which will be a whole lot more readable in the xml file.

It will mean less sharing of code in the XML handling, but that shouldn't be an excuse to not have the right format.

>Btw, what's the point of the trip number? That seems like a totally
>meaningless number. I get the feeling that it is left-overs from when
>you indexed things by integers..

Not at all! It's the number of trips in a dive. You were the one that abused the number field to hold that and I decided to write it out for consistency checking.

>
>So just a
>
>  <trip date='2012-08-23' location='San Diego, CA, USA' \>
>
>sounds like the right data format (code we can easily change later,
>data formats should be something we strive to get right from the
>start. Sure, we can fix them up later too, but it's just better to do
>it early rather than late)

I kinda like having the number in the XML, but don't feel all that strongly about it.

/D

-- 
Sent from my phone.
Please excuse my brevity and text prediction errors


More information about the subsurface mailing list