← Back to team overview

ubuntu-accomplishments-contributors team mailing list archive

Re: Bug found in import_accomplishment script

 

Hi Rafal,

No doubt comma is better than space. I was questioning if it's
_good_enough_. And maybe it is. Probably it is. I raised the question
because it's always easier to make these kind of changes as early as
possible, before there are gazillions of users and accomplishment
files that need to be migrated at once.

But sure comma seems like a fairly good choice. In any case, after you
guys make this change, I'm thinking of using the separator pattern
\s*,\s* when parsing the accomplishment files.

Cheers,
Janos


On Thu, May 31, 2012 at 12:05 AM, Rafał Cieślak
<rafalcieslak256@xxxxxxxxx> wrote:
> 2012/5/30 Janos Gyerik <info@xxxxxxxxxxx>:
>> Are you sure comma will be future-proof-enough though? Just a thought,
>> I dunno...
>
> It is sure it will be more proof than a space - for in cases where a
> value is a human-readable text (category, for example) spaces may be
> used to separate words. A comma ensures that the .accomplishment file
> will be always easily readable. (Accomplishment IDs use '/' character
> as a special char, and ':' has special meaning for subcategories).
> Even if in the future a comma would fail to work everywhere, because
> of some values being allowed to contain a comma in it's value (can't
> think of any particular example at the moment), such fields would then
> contain full sentences, as commas would never be required for use in
> another context (or, to be more specific, in any other context they
> can be substituted by any some other character). So problems would
> only potentially emerge when working on full sentences - which is
> unlikely, and even then we might wrap whole sentences in, for example,
> [ ] brackets. This leads me to conclusion that commas are a fairly
> good choice.
> I hope that the above makes sense, and that I helped you to understand
> the decision ;-)



-- 
Janos Gyerik
http://titan2x.com/


References