[sugar] Journal integration design for Measure Activity

Eben Eliason eben
Sun Oct 21 17:09:48 EDT 2007


> 1) Since many logs are going to be associated with one logging session, what
> is the best way to pack these log files and associate with the journal?
> Should one make a .zip file of all the log files ?

I think a zip file is a great choice, with the contents being a flat
list of text files which could be individually viewed if opened on
another system or pulled apart with a forthcoming "Bundle" activity.
(And perhaps, later on, by dragging individual logs out of Measure,
creating their own journal entries.)

> 2) There are other details associated with each logging session - like what
> is the time interval of logging selected while the log was made etc. which I
> have been writing down within each log file itself in the first few lines,
> should I follow the same practice ?

This is an interesting question.  If you want to create the text file
in such a way that these parameters read nicely if it were viewed as
plain text, we could continue doing that.  Otherwise, the more
standard means for doing this will be to include such info in the
external metadata for the entry (If they are zipped, I guess you would
need to keep an array with the info for each file...for that reason,
perhaps keeping it in the files makes sense.)

> 3) It may also be possible that within a session of Measure, no logs be
> made. However the user have selected some settings with which he/she was
> making some measurements. For example DC/AC mode, gain setting and a  time
> base setting etc. The user may want to resume such a session from the
> journal. How should such details be handled ? Do I need to write them down
> into a text file ?
> The settings comprise of states of 3 toggle buttons and 2 sliders.

These are global to the session, and definitely deserve to be
implemented as external metadata as mentioned above.

> 4) There is really no need for periodic saves in Measure. How should one
> stop them ?

I'm not sure I agree with that.  Do you resave each time a new log is
created?  Otherwise, one might lose a log if the activity crashes or
the machine powers off before the activity is stopped.  Likewise, even
if you save out logs as they are made, the user may change the state
of various settings that could also be wiped out.

Other than that, I would assume (?) that the activity only prompts the
activity to autosave, right?  Could the activity keep a dirty flag
around and ignore the save request when that bit isn't set?  Perhaps
that's a good guideline for all activities, to prevent unnecessary
writes to the flash.

> 5) Tags and Description - How does one describe the tags and description
> fields associated with each journal entry of the activity ? I currently see
> them blank and would like to put in meaningful information there.

This is a question for Tomeu, likely, but I would mention from a user
perspective that you should only write to these fields when they
haven't been user modified.  (Well, you can always append tags...)
Once the description field has been user modified, I wouldn't want to
alter or erase the kids own comments.

- Eben



More information about the Sugar-devel mailing list