somat 11 days ago

I find the windows registry a fascinating mystery, why does something that sounds like such a good idea (hey lets put all the config into one place, a database for configs.) end up being so miserable to be around in practice?

As a good unixaphile My conclusion is that it is because now you have two trees, a main database tree that has excellent ergonomics and tooling(the filesystem). and the registry tree where all the access patterns are special and different and the tooling sort of sucks.

I feel this article could make the same conclusion about the main filesystem if it wanted to. But I do note that because the main filesystem is not the redheaded stepchild tree, any problems with it tend to be fixed.

As a humorous footnote, I really appreciate the plan9 mindset, that single minded devotion to "The One True Tree" that when they wanted a web browser they said "hey the DOM is a tree structure. throw it in the filesystem" those glorious crazy bastards.

https://man.cat-v.org/plan_9/4/webfs

2
cedws 10 days ago

The reason the registry sucks is the same reason desktop operating systems generally suck: it isn’t sandboxed. Applications should not have a global view of the system and other applications. They should have their own container where they can do stuff, like write registry keys, write files, do stuff with whatever is exposed to the container. When the app is removed, everything inside that container goes with it. Of course, this is how mobile operating systems work, and they’re rock solid compared to Windows.

When you remove an app on Windows a bunch of garbage just gets orphaned on your system to the end of time.

hulitu 8 days ago

> When the app is removed, everything inside that container goes with it.

We don't work that way. Applications must stay there and remember their configuration. What an i** thought is a good idea, to make me redo the configuration, every time he has an update ?

pathartl 10 days ago

I've been working a lot with older games and a big issue I see is developer discipline.

Take LOTR: Battle for Middle Earth II Rise of the Witch King: https://www.regfiles.net/registry/the-lord-of-the-rings-the-...

Not only does it have "Electronic Arts/Electronic Arts", the same game doesn't even follow its own standard!

Surely it's just that one game right? Nope! Here's the Sims 3 https://www.regfiles.net/registry/the-sims-3-steam-registry

And Battlefield 1942 on Origin https://www.regfiles.net/registry/battlefield-1942-ea-origin...

There's also developers that throw everything they can in HKLM when HKCU is almost always more appropriate.

It was also complicated with the introduction of WoW64, and then the introduction of the VirtualStore. Don't get me wrong, segmenting off all of those prevented a ton of potential collisions, but I feel like there's a more elegant way to handle it. Personally, I've been working on writing a library to hook every registry call and read from a text config file instead.