Fog Creek Software
Discussion Board


I have to say, this tickled me to death.

>>>I think this person was trying to say that in the Linux world they don't write setup programs. Well, I hate to disappoint you, but you have something just as complicated: imake, make, config files, and all that stuff, and when you're done, you still distribute applications with a 20KB INSTALL file full of witty instructions like "You're going to need zlib" (what's that?) or "This may take a while. Go get some runts." (Runts are a kind of candy, I think.) And the registry -- instead of one big organized hive of name/value pairs, you have a thousand different file formats, one per application, with .whateverrc and foo.conf files living all over the place. And emacs wants you to learn how to program lisp if you're going to change settings, and each shell wants you to learn its personal dialect of shell script programming if you want to change settings, and on and on. <<<

I laughed and laughed.

BUT, I do wish to say that those ".whateverrc" and "foo.conf" files normally have only two places to live. One is the /etc directory. The other is your user directory. The vast majority of apps pay heed to this standard. Furthermore, there is also the /usr/lib and /usr/local/lib directories for, you guessed it, libs, and /home for the various users.

But oh well. It's really just a matter of what you're familiar and comfortable with. When I first came to the *nix world, I was a tad bit confused, to say the least.


Saturday, December 14, 2002

The thing that I think needs to be pointed out here more than anything is that the systems that a lot of Unix utilities and the general unix paradigm use has advantages!

The majority of arguments for both sides tend to be religious, but it must be considered that the proponents of both worlds are so strongly attached to their sides because there are very real advantages there, and if they overlook the disadvantages, that's common. And the registry does have severe issues (As do config files, but the issues differ).

The point is that while it's easy to dismiss arguments for something because the proponents tend to gloss over the disadvantages is ignorant: You should consider it closely anyway. I know this isn't what Joel meant, but out of context that's what it looks like. Just remember that no product or idea gets so many followers if it doesn't have a few saving graces.

Mike Swieton
Saturday, December 14, 2002

If you want to stay sane on Linux you must use a distribution with a solid packaging system (e.g. Debian's dpkg/apt). Then if you want to install some software you can just type "apt-get install <name-of-package>"; you don't even need to start up a web browser or FTP program. (best of all, good packaging systems will automatically satisfy dependencies like zlib, downloading them if you don't have them already, and will automatically apply updates as the become available).

UNIX ~/.*rc config files have the advantage that they're just filesystem files, so they are automatically shared over a network as long as you've got say NFS running. (whereas Microsoft had to add a whole new bunch of software to get registries shared across a network)

I see the proliferation of config file formats as a mixed blessing. It's nice because different programs need to be configured in different ways (simple key/value pairs, or a hierarchy like Apache's configuration, or a field-based config like fstab or /etc/passwd). The flat text file approach is more flexible than a forced key/value system (sure you can stick binary blocks in the registry - yuck - just look at the cryptic graphics mode registry entries for NVIDIA cards...). I admit the additional freedom of flat-text files has led to a proliferation of slightly-different versions of each syntax (e.g. are comments prefixed with '#' or '//'?). I hope that newer programs will start to adopt standard libraries for these kinds of things (e.g. libPropList for 'win.ini'-like things, or XML for hierarchical things)... Mac OS X has taken a nice step in this direction.

The only serious disadvantage I see with UNIX-style configs is the lack of a change-notification system. Usually you have to restart a program for it to take new changes. (am I right that the Windows registry can send events when something changes?)

Dan Maas
Sunday, December 15, 2002

This is all completely misleading. Given that one can stuff anything in the registry, pray tell what is the difference between that and a .rc or .conf file? For each application both have "non standard" formats to a greater or less extent, depending on the application involved.

Monday, December 16, 2002

If the UNIX program is smart, it will trap signals. Thus, it will be implemented so that it re-reads the conf-file every time someone sends it, for example, SIGUSR1 (xinetd on Linux works this way).

Monday, December 16, 2002

>>Given that one can stuff anything in the registry, pray tell what is the difference between that and a .rc or .conf file?<<

There's only one registry, and it's always in the same format.

(Perhaps I shouldn't feed the troll, but I think it's worth pointing out.)

Brent P. Newhall
Monday, December 16, 2002

The registry is always in the same format, and so are .conf files - they're text. Registry data values can be any one of a number of formats, .conf values are always (as far as I have seen) text. The registry API is always the same, but that is not the same thing. One could say the same about .conf files where the interface is the file handling library of whatever language you are using.

Tuesday, December 17, 2002

Hmm here's the fun bit. Have a look at
and tell me that this is something I can get my mum to do.
No (professional) windows app would be this complicated to install. The whole process described here is a nightmare.

While the mind set shift from registry to text files is easy I think the real point here is that the registry is never supposed to be accessed by an end user. There's nearly always a method of changing it from inside the code, many unix programs require the use of a text editor to change the defaults. Fine for programmers/admins not so good for end users. The down side to this approach is that the registry contents are very rarely documented, thus leaving sysadmins and programming types feeling a loss of control.

Peter Ibbotson
Wednesday, December 18, 2002

*  Recent Topics

*  Fog Creek Home