[sword-devel] Shorter book name abbreviations

Chris Little chrislit at crosswire.org
Sun Sep 19 13:03:00 MST 2010



On 9/19/2010 7:55 AM, Jonathan Morgan wrote:
> I was talking about interpretation, not presentation (and so I think was
> the user, given they were talking about minimising the amount they have
> to type).  I agree that the short name presentation is fine as it is.
> Do you know of any harm caused by adding additional interpretations?

Ah, sorry for my misunderstanding. In that case, adding new 
abbreviations isn't particularly bad. It will increase the average 
processing time for every book name lookup, but not drastically. (Our 
book lookup search uses a binary search algorithm, so it's O(log n). 
Adding more abbreviations increases n.)

If there are actually any reasonable 2-letter abbreviations that aren't 
already covered by the lookup algorithm, we should add them. But it 
should be confirmed that they won't already point to the expected book 
value. I have a feeling there's already a bit of unnecessary data in the 
book abbreviations array. (E.g., if we had both "PS" and "PSA" 
indicating Psalms, the latter probably wouldn't be necessary in the 
array, since the binary search picks "PS" in the absence of "PSA" if you 
try to look up "PSA", if my recollection is correct.)

So... more abbreviations wouldn't be bad, but let's be certain that they 
are necessary.

--Chris



More information about the sword-devel mailing list