Quora argues about Windows registry



  • Why doesn't MacOS have a registry? Is it a good thing? A bad thing?

    Interesting comments, that would have surely devolved into a flame war if Quora had a way to link comments.


    Because the inclusion of a monolithic "registry" might possibly be one of the worst engineering decisions of the twentieth century (hyperbole, but true).

    Children who read nursery rhymes are well aware of the risks of putting all your eggs in one basket. The engineers who came up with the global registry were not.


    MacOS is based on Unix (BSD Unix) which doesn't have, and doesn't need a single overall registry. Neither does Linux. Neither does Solaris. Neither do any other enterprise-class operating systems.

    And don't say Windows is an enterprise-class operating system. It was designed as a desktop OS.


    Because a registry is a totally brain-dead non-solution.

    It's basically a really rotten database, hidden, slow, proprietary, with no way to back it up, log or revert changes. And no consistency constraints, you can put anything anywhere with any value with no quibbles from the registry.

    And since it's separate and hidden from the file-system, it doesn't get backed up most of the time. And of course since any program can make changes in it at any time, it's basically impossible to back it up in a consistent way.


    Which is better? Until recently managing multiple unix based systems meant manually modifying either scripts or config files. Easy, but laborious when you have a lot of them and you only want to modify a a few values in the config file of each system.

    This hasn't been the case with systems since windows 2000 and even with NT. Companies have pushed out configurations for years - with a minimum of fuss - using group policies.


    ...


  • The Windows Registry is both the boon and bain of Windows. A boon because "everything is in one place" and a bain because it never gets smaller; stuff does not always get removed; Duplicate "keys" (for which Windows is the worst offender: So it gets bloated and fragmented and becomes an infinite series of self reference "lookups": Thus defeating any advantage of having to only load one file (INB4: I know, the modern-day Registry is now several files).

    The Registry is also a :barrier: to "stand alone" programmes.



  • I personally dislike it, but I acknowledge it is probably pretty useful for administration of a corporate network.


  • :belt_onion:

    There are ways to do that on systems without registry. Of course, the main problem is there's no unified interface for doing such things, meaning it never gets done, because that's work.

    Also:

    :popcorn:



  • On nix, it's probably something like, keep all the various configuration files and templates in version control on your machine, and then use puppet/chef/ansible to distribute the changes.


  • :belt_onion:

    For user level settings you could also have all /home directories on an NFS somewhere and have a script that copies the defaults from a template somewhere when you create a user.

    Actually, that sounds pretty easy. I wonder if there's something that does that already, and if not, why?



  • Yeah.

    I believe that configuration files should be separate and distinct. I.e 1 file for one application OR 1 file for "networking" etc.

    The former is obviously easier, the latter should now be achievable. The Windows .ini file had the right idea in having sections etc. but the task of locating and registering all the ini files was probably beyond the performance capability of the machines.

    It should be possible for a configuration file to be registered, and then an "app" that can look at all Network Sections, or just 1 Configuration (and anything in between). But that would require a change in philosophy and "working practices".

    And as we all know, that ain't gonna happen because it would upset the Users too much if we change the rules of play



  • @loose said:

    and bain of Windows.

    bane.

    Bane.

    BANE.



  • BanE

    bANe

    bAnE

    BaNe

    BAne

    baNE

    There, that should cover all the major variants :stuck_out_tongue:


  • :belt_onion:



  • I've heard of playing the "air guitar", but air snatch and jerk....



  • The masked man?


  • sockdevs



  • I think things can suck for 2 reasons: the concept is bad, or the implementation is bad.

    The concept of the registry can be debatable (what's the advantage over the file system?) but the implementation is just terrible.

    It's an obscure binary format that can only be edited with regedit, so if that one program fails you you're out of luck. The names are mostly meaningless, there's no documentation, no way to add comments, invisible "hard links" between folders...


  • Discourse touched me in a no-no place

    So. Uh.

    This person:

    Which is better? Until recently managing multiple unix based systems meant manually modifying either scripts or config files. Easy, but laborious when you have a lot of them and you only want to modify a a few values in the config file of each system.

    This hasn't been the case with systems since windows 2000 and even with NT. Companies have pushed out configurations for years - with a minimum of fuss - using group policies.

    knows how group policies work, right?

    They're fucking pushed registry settings (among a handful of other things. Mostly registry settings.)


  • :belt_onion:

    Well, they kinda have the point in the sense that at least you're pushing one file / using some kind of registry API and it Just Works™. Mac should be fine-ish for this as well, but Linux is a bit of a mess.

    Now, if it's all one distro and everything is regularly updated, it's workable. But heavens help you if you have a mix of distros...



  • @Onyx said:

    it Just Works™

    As in "It only just works, barely" or "it works, no we won't tell you how, it just does, stop being so damn nosy?"


  • :belt_onion:

    Also, yes.

    Look, there's plenty of Linux trolls around these days, I'm on a vacation, ok? :stuck_out_tongue:



  • The Registry was invented because people were destroying their Windows installations by mucking around with the win.ini file that was used in older releases. By making it an opaque binary, they achieved their goal of forcing applications to use APIs when accessing the content. So the file itself doesn't (usually) get corrupt.

    But they apparently never stopped to consider whether it makes sense for all configuration, system and application alike, should be crammed into a single system-wide database. win.ini made sense for the first releases of Windows, because Windows was an application, and the ini file was the configuration for that application.

    I will never understand the logic behind embedding every setting for every application into that same file, instead of encouraging each application to maintain its own separate config file. There's certainly no need for this. Other OS's (Linux, Mac, and most others) don't do this and they seem to work just fine, thank you.



  • @David_C said:

    I will never understand the logic behind embedding every setting for every application into that same file, instead of encouraging each application to maintain its own separate config file. There's certainly no need for this. Other OS's (Linux, Mac, and most others) don't do this and they seem to work just fine, thank you.

    Strangely enough, I do remember mucking about in several *.ini and *.conf files on Windows. .NET uses XML files, by the way.

    Plus, the registry is not a "file" any more. Unless you want to tell us that PostgreSQL is a "file".



  • @cartman82 said:

    Why doesn't MacOS have a registry? Is it a good thing? A bad thing?

    Classic Mac OS has a folder named Preferences in the System Folder. There are files in this folder that contain configurations. An application will typically create a file in there (with a name that makes it obvious which application the file is for) and there are a bunch of files for various system settings (typically one for each major feature-area.)

    Mac OS X expands the concept in order to accommodate a multi-user environment. There are three "Preferences" folders now - /System/Library/Preferences to hold settings for OS-global settings, /Library/Preferences for application-global settings and ~/Library/Preferences for per-user settings. As with classic Mac OS, there will typically be a single file in here per application and system service.

    In the Mac OS X world, they also standardize preferences a bit by defining a ".plist" file format which is an XML (or binary representation of XML) file for storing/tracking values, and the files are typically named with a DNS-like name (e.g. com.yoyodyne.widgetsupreme.plist) to make it easy to match applications to files.

    This approach means that if an application or system service's settings ever get corrupt, you can quickly identify and delete its preference files. At the next restart, the app will use its default configuration. This is a lot better than hacking around with regedit or requiring specialized repair utilities.

    In the UNIX/Linux world, it appears to be much more ad-hoc, although there are definitely commonly-used idioms. Typically, system-wide settings will be stored in a per-application file (or directory) in a global location (somewhere under /etc, /var, /usr/local/etc, /usr/share or a few other places.) Per-user system settings will be stored in a per-application file (or directory) in the user's home directory. Settings files in home directories normally begin with a dot (.) to hide them when the user doesn't explicitly ask to see them.

    I think the UNIX/Linux approach has the same benefit as the Mac approach - you can reset an application's settings to its default by deleting its preference files (at least the per-user file - deleting the global prefs files may create problems.)

    Which is better? I'll leave that to others to discuss. I have my preferences, but other people usually don't agree with me on things like this.



  • @Rhywden said:

    Strangely enough, I do remember mucking about in several *.ini and *.conf files on Windows. .NET uses XML files, by the way.

    Plus, the registry is not a "file" any more. Unless you want to tell us that PostgreSQL is a "file".


    Some applications do/did provide their own files. But most did not, and Microsoft's guidelines encouraged applications to define their own private sections within win.ini.

    And yes, I know the registry isn't a single file. That's why I called it a database. In the text you quoted, I was referring to the win.ini file, which Microsoft wanted everybody to use, even back in the days of Windows 3. I am well aware that the internal organization of the registry database has changed over the many years since Win95, but that doesn't change the fact that it is a single opaque database that controls almost every aspect of every system service and application.

    Nobody has ever been able to explain why it is necessary to do this, and it has been the cause of a great many problems over the years.


  • BINNED

    Windows registry is /etc, and /sys mounted on a bad file system.

    @cartman82 said:

    On nix, it's probably something like, keep all the various configuration files and templates in version control on your machine, and then use puppet/chef/ansible to distribute the changes.

    Windows registry is not just configuration, there are parts that kernel populates (like /sys)


    systems that do not have registry end up emulating it using key-value-store like etcd, because it is useful.

    IMO, the only problem with Windows registry is the snowflake file system.



  • Uh, why exactly are you griping this much over Win.ini?

    In case you lost your calendar, it's late 2015.



  • Why does my presenting a bit of historical background offend you?



  • You'll notice that people who don't know anything about network administration are against it, and people who do are for it. (And in fact, non-Microsoft network OSes like Netware and OS/2 had registries, too, guyz.)

    This is because the Registry is useful for a lot of features that most people don't touch. But if you do, there's literally no other or better way to accomplish them. (OS X ain't got shit, for example, nor does Linux... in those OSes you just dig around for 342746237,432462 config files all in different formats and there's no protection for apps running multiple instances or apps that overwrite the settings and basically it sucks.)



  • @David_C said:

    Why does my presenting a bit of historical background offend you?

    Because you're projecting that bit onto the present, doing the usual rargle-blargle-It-was-20-years-ago-and-I-still-can't-let-go.



  • @cartman82 said:

    On nix, it's probably something like, keep all the various configuration files and templates in version control on your machine, and then use puppet/chef/ansible to distribute the changes.

    Oh Lunix machines, how do you tell the OS that a bit of configuration data is system-wide and not user-only? How do you handle race conditions if the same app is running under multiple users, and both want to change a system-wide configuration?

    Because to me it seems like the Registry solves a lot of problems that Linux people just kind of shrug and reply, "I guess we just hope that won't happen! Derp derp!"

    And yes those situations are rare, but this is a thing called: PROFESSIONAL SOFTWARE ENGINEERING where you do things properly so even extremely rare conditions don't cause the system to barf up a lung.



  • @cartman82 said:

    > Because a registry is a totally brain-dead non-solution.

    It's basically a really rotten database, hidden, slow, proprietary, with no way to back it up, log or revert changes. And no consistency constraints, you can put anything anywhere with any value with no quibbles from the registry.

    And since it's separate and hidden from the file-system, it doesn't get backed up most of the time. And of course since any program can make changes in it at any time, it's basically impossible to back it up in a consistent way.

    Sounds like a person who knows nothing about the registry.

    Looking on my own machine, I can go into the %SystemRoot%\System32\Config directory and not only see the system registry hives, but also a bunch of log files for each of them. (Note: You need to elevate permissions to view this directory's contents.)

    I can also look in %USERPROFILE% and see NTUSER.DAT and two of its logs, which is the CURRENT_USER part of the registry.



  • @Weng said:

    knows how group policies work, right?

    Right: about 457,034,43274623 times better than the Unix-based example he provides.

    @Weng said:

    They're fucking pushed registry settings (among a handful of other things. Mostly registry settings.)

    Yes, but at least:

    1. Individual settings can be locked-down once set via the permissions system (Unix can only lock down entire files)

    2. You don't need to research and learn a different file format for EVERY SINGLE APP (Unix has zero standards for what format the settings are in-- OS X is a bit better here)

    I mean nobody's going to say Group Policy is the miracle solution to all problems ever. (For one thing, it's terrible at handling apps ported from Linux that store their settings all in the wrong places and wrong formats and-- oh wait, Linux people are porting their fucking SHITTINESS to Windows along with the apps, awesome.) But it's sure a hell of a lot better than the alternatives.



  • @blakeyrat said:

    Oh Lunix machines, how do you tell the OS that a bit of configuration data is system-wide and not user-only?

    User stuff is owned by the user and stored under his home directory. System stuff isn't.

    @blakeyrat said:

    How do you handle race conditions if the same app is running under multiple users, and both want to change a system-wide configuration?

    I don't know. I assume that in the case of a file, the last to write persists. What does the registry do?



  • @David_C said:

    I will never understand the logic behind embedding every setting for every application into that same file, instead of encouraging each application to maintain its own separate config file.

    Windows is a network OS. Even Windows 9X was designed to run as a client to a corporate network.

    Let that sink in.

    Keep processing it.

    Keep going, think about all the implications.

    *ding!* you now realize The Registry (or something virtually identical to it) is necessary for that system to work!

    The reason OS X and Linux don't have a Registry is because they also don't have the network OS features of the Windows ecosystem. They have pale shitty imitations of them, at best.



  • @Rhywden said:

    Uh, why exactly are you griping this much over Win.ini?

    In case you lost your calendar, it's late 2015.

    It should be obvious: because win.ini was the "root of all evil." It was never a good idea to encourage every application in existence to add sections to win.ini; Applications should generally maintain their own configuration in separate configuration files. In a by-user system, the files should be organized by user, perhaps in the "appdata" structure. The advantages of such a structure from the perspective of isolation should be obvious; the downsides are relatively minimal.

    But from the beginnings of Windows 2 (at least, not familiar with Windows 1) Microsoft encouraged the use of the one configuration file to rule them all. It's not hard to see why they did that, either: it was because the result was one file that ruled them all. (I suppose you could make a case it was a "growed up" config.sys, but content of the latter was always tightly regulated. Win.ini content was not.)

    The result was a win.ini file in the megabyte range, easily corrupted by a stupid application so it wouldn't work for any other application, and confusing to the max.

    So, was Microsoft's solution to correct the broken strategy and go to a more manageable per-application file configuration? Of course not: their solution was the database to rule them all, which they call the registry. The structural problems have gone away, because everything has to go through regedit or the Windows API. But the profusion of junk; the confusion in structure; the monolithic versioning; and the exposure to malice by misbehaving apps (apps that want to become your default browser, for example)...bad as ever.

    And all the problems trace back to win.ini, so no wonder it draws a gripe or two.



  • @boomzilla said:

    User stuff is owned by the user and stored under his home directory. System stuff isn't.

    Right; but my point is: if I need to edit a bit of configuration that applies to all users (say: the location of a network printer), but I also need the individual user to be able to override this information selectively, how do you accomplish that?

    The Registry makes cases like that fucking trivial.



  • @blakeyrat said:

    Windows is a network OS. Even Windows 9X was designed to run as a client to a corporate network.

    95/98 didn't even have a TCP/IP stack : https://support.microsoft.com/en-us/kb/138789

    And you could login without a password by pressing "Cancel" on the login dialog, and you got administrator right.

    A network OS :joy:



  • @TimeBandit said:

    95/98 didn't even have a TCP/IP stack : https://support.microsoft.com/en-us/kb/138789

    Yes?

    @TimeBandit said:

    And you could login without a password by pressing "Cancel" on the login dialog, and you got administrator right.

    Ok?

    @TimeBandit said:

    A network OS :joy:

    Joy? That emoticon is "joy"?



  • Not every application has to do that. In fact, there are a pair of user profile directories to store configuration data in. There is even a special method (.NET version) to fetch the directory name for known folders.

    The two special folders for configuration files are:

    • FOLDERID_LocalAppData / LocalApplicationData for computer specific data (i.e. things that reference a particular machine's directory structure or hardware setup)
    • FOLDERID_RoamingAppData / ApplicationData for data that can apply to this program on any computer

    Since 2007, there is a third appdata folder for applications that run in a lower security context, but most applications won't use it.



  • @blakeyrat said:

    Joy? That emoticon is "joy"?

    Yes. The joy of laughing out loud when you read the stupid bullshit some people write.



  • Indeed. So your link states "How to install the TCP/IP stack from the Win95 CD-ROM" and you make "does not have a TCP/IP stack" out of that?

    If you said: "TCP/IP was not pre-installed" that would have been honest. Your statement? The same bullshit you just laughed about.



  • From memory, the first release of Win95 didn't have it on floppy (Yes, 32 floppy !), you actually downloaded Trumpet Winsock (but not from the internet, obviously) : http://www.trumpet.com.au/index.php/downloads.html



  • @TimeBandit said:

    From memory, the first release of Win95 didn't have it on floppy (Yes, 32 floppy !), you actually downloaded Trumpet Winsock (but not from the internet, obviously) : http://www.trumpet.com.au/index.php/downloads.html

    Was Windows 95 even on floppy disks? The original, right-after-it-came-out version I had was on CD.



  • Then maybe you shouldn't have included Win98 in your statement. I also don't quite get this infantilistic joy out of stating: "Hey, look, 20 years ago they missed that particular piece of technology - even if at that time the general public very much was not interested in that one."



  • According to Wiki, it was 13 and OSR 2.1 made that 26.


  • :belt_onion:

    @blakeyrat said:

    Right; but my point is: if I need to edit a bit of configuration that applies to all users (say: the location of a network printer), but I also need the individual user to be able to override this information selectively, how do you accomplish that?

    By OpenDesktop standard, system-wide preferences that can be overridden by the user should go to /etc/xdg/appname, while user-level settings go to ~/.config/appname (where ~ means "this user's home directory, usually /home/<username>).


  • BINNED

    Only that most of the time it is /etc/appname and user-level settings some times ~/.appname. As much as Linux kernel is great, the distros have been a pain, each with special snowflake configuration. At least with systemd and fewer distros they now are mostly sane (Fedora, Debian, Ubuntu).


  • :belt_onion:

    That's why I said: by OpenDesktop standard.

    Assholes who don't use it are, well, assholes. Also, probably using a toolkit that doesn't provide a standardized way to read and write settings or ignoring it, because assholes.


  • BINNED

    It is mostly assholes calling other assholes assholes. Because assholes cannot agree on any standard but their snowflake asshole standard.



  • What does "xdg" stand for? INTUITIVE!

    But hey, at least a standard exists. That's honestly more than I expected. How many applications follow it, maybe 0.005%?


  • :belt_onion:

    @dse said:

    It is mostly assholes calling other assholes assholes. Because assholes cannot agree on any standard but their snowflake asshole standard.

    That's what you get when having to deal with humans in general. It's not like the same groups do that on other OSs as well... Oh, wait...

    @blakeyrat said:

    How many applications follow it, maybe 0.005%?

    I have 168 items in my ~/.config directory. 48 other hidden directories in bare ~ which is what 99.9% of those who don't follow it use.

    So... slight advantage for the "good guys" on my system at least?



  • How many do you have in /etc/xdg? You know, THE THING WE WERE TALKING ABOUT.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.