Mailing List Archive


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

Re: [tlug] linux@example.com How many widely can we do that?



Michael Bitker writes:
 > On Mon, Oct 26, 2009 at 1:59 PM, Stephen J. Turnbull <stephen@example.com> wrote:
 > > Michael Bitker writes:

 > Can you give me a better reason than the smell? Cause it's a pleasant odor
 > to those of us coming from the Windows world.

Using GNOME may smell of lavender and lace.  I have no opinion on
that.  (I don't use it, probably never will.)  It's the backside that
emits the stink, as usual: the APIs and UIs for interacting with the
tools, especially configuration.  If it works, fine, but if not, GNOME
is an unholy mess of interacting modules with interfaces by Rube
Goldberg.  Usually documented by an automatic tool that turns .h files
into prose.  (I kid you not.)

Let's compare the configuration UIs.  Here's my .gitconfig (bending
over backwards to be fair to GNUMB: git has a *terrible* reputation
for user-*un*friendliness):

-------------------------------------------------------------------------------
[user]
	name = Stephen J. Turnbull
	email = stephen@example.com

[push]
	default = matching
-------------------------------------------------------------------------------

Wow, that's amazingly difficult to read, isn't it?  Remember, this is
the *worst* that a traditional-Unix-style program by a competent
developer has to offer.  (You certainly can find really horrible
config files.  sendmail.cf is a well-known example.  But machines have
gotten faster and we've learned how to do config better since that was
designed in the early 80s or maybe even before.)  In fact, the above
is the well-known "Windows .ini" format, and it has been adopted by
many new projects in the last few years.  Python and Perl have
standard modules for parsing and manipulating these files, I would
suppose Ruby and maybe PHP do too.  Variations on this theme are used
by applications like SSH, too, but the "ini" format is (deservedly
IMO) becoming popular.

I was going to offer an OpenOffice config file for comparison, but
that would be rude: in three tries I hit three binaries.

Here's ~/.gconf/desktop/gnome/url-handlers/https/%gconf.xml:

-------------------------------------------------------------------------------
<?xml version="1.0"?>
<gconf>
	<entry name="needs_terminal" mtime="1250484912" type="bool" value="false"/>
	<entry name="enabled" mtime="1250484912" type="bool" value="true"/>
	<entry name="command" mtime="1250484912" type="string">
		<stringvalue>/usr/bin/firefox %s</stringvalue>
	</entry>
</gconf>
-------------------------------------------------------------------------------

Hey, that's actually quite readable if you're an XML geek.  But note
that this does only one thing: it makes Firefox the app of choice for
handling HTTPS URLs.  The .gitconfig does three different things.

Also note mixture of idioms.  Because deeply nested XML is a stench in
the nostrils of righteous hackers, GConf handles this by creating a
deeply nested structure of sub-configuration-directories.  So the
fragment above is *meaningless* unless you know the name of the
containing file!


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links