Re: glib's role in the units policy game



On Sat, 2010-03-27 at 02:44 +0100, Benjamin Drung wrote:
> Hi,
> 
> I am sending this mail to gtk-devel list to catch as many ideas and
> opinions as possible, if you not already following bug #554172 [1].
> 
> Ubuntu has now a units policy [2] and I want to implement it, but I am
> still not sure what the best way is. The solution should not be Ubuntu
> (or GNOME) specific. Please read my blog post [3] and comment there or
> here.

I don't see this as a problem that's solved with an API. No reasonable
set of guidelines are going to read:

 Always use power of 10 units in all circumstances
 Always use power of 2 units in all circumstances

So, an API couldn't consist of a single function and an config switch.
It would need to be an exhaustive list of all possible places that a
size might be used - disk sizes for fixed and rotating media, file
sizes, data transferred on a network, raid stripe sizes, memory sizes,
application memory usage, memory and disk quotas. And so forth and so
on. Then what happens when some app author hits a situation that isn't
covered by the extensive list? Are they going to submit a proposal for
an addition and wait 12 months for it to appear in distributions? Are
they going to pick the closest match even if the results seem
inappropriate? Or are they going to pick an arbitrary enum value that
gives the result they want. Almost certainly the last.

An API is a poor substitute for a compact, well-written set of
application guidelines. Guidelines are usable for everybody, no matter
how they are implementing their program. Guidelines allow the
*application* designer to use human intelligence and judgment to figure
out the best balance of consistency with the environment and suitability
to the use case. (Applications have designers too, sometimes they are
the same as the author, sometimes not.)

And where do this sort of application guidelines go for GNOME? (*) 
In the HIG. Getting additions into the HIG isn't always as easy as it
should be, but if a proposal has been made and its languishing then the
solution is to fix that, not to try and work around it with an API. 

Now, whether it makes sense for GLib to have an API that allows an
application author to explicitly request a power-of-two size or a
power-of-ten size is a different question. It probably does, but that's
just a convenience function.

- Owen

(*) I know you said that you don't want this to be GNOME specific.
But if you want consistent applications, then you need a group of
application authors that agree that their apps should be consistent. 
You can certainly push KDE and GNOME to adopt the same basic set of
principles of GNOME in this one particular area.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]