Invalid dives

Dirk Hohndel dirk at hohndel.org
Mon Mar 18 08:50:18 PDT 2013


Ďoďo <dodo.sk at gmail.com> writes:

> Dirk,
>
> you are right in terms of multi-valued dive type. But I would not mix a
> dive type (ice, shore, boat, training) with the dives which should be
> ignored/hidden. All of them can be internally represented with let's say
> one integer (32-bit, is it enough? 1 bit for one type, they can be of
> course combined, 31 types of dives 1 bit for invalid/hidden ;))
>
> Dive type from my point of view is something, one should be able to set
> withing "Edit dive" dialog. Invalid dive should be possible to tag without
> going in to "Edit dive" and it should be doable for multiple dives. After 1
> click they simple disappear from the dive list as they do now. Yes, one can
> tag several dives as ice dives as well but I think invalid/hidden dive and
> dive types should not be mixed.

I don't see why this should not be mixed. Their use is identical. You
may want to show all ice dives. Or not show ice dives. Or not show
ignored dives.

And since you can combine the tags you can have a shore dive that's an
ice dive and a foto dive and an ignored dive.

> BTW, name "invalid dive" was just a first shot, it can be called "hidden
> dive" or whatever ....

The nice thing about my implementation idea above is that the user can
even pick the name they want to use for such a dive. Whether it's
invalid or ignored or hidden.

We just need to maintain the matching from bit number to string - which
is something that could be put in the <settings> section of our data
file.

Seems elegant and straight forward to me. And solves more than one
problem.

> O.K. So I will modify for me the code to use just one bit for the invalid
> withing 32bit a send the correct version of 'git diff'. It is my first
> usage of git so sorry for the previous reverse version

No worries. just ask if you need help.

/D


More information about the subsurface mailing list