Live data from Hacker News

Why the Windows Registry sucks technically (2010)

rwmj.wordpress.com

101–110 of 342 posts

Re: Why the Windows Registry sucks technically (2010)

#101

"2. Hello Microsoft programmers, a memory dump is not a file format" This is exactly how Office file formats worked in the good old times. Made things faster (no parsing).

For this particular version of software, compiler, and computer architecture, yes.

After the first major upgrade, there's likely to be a whole lot of parsing involved.

Re: Why the Windows Registry sucks technically (2010)

#102
post #63

Earlier quoted context omitted.

I hate this fanatical love of the UNIX way. I really hate that as of today Windows is the only non UNIX OS. I trully believe that this fact set us back. No more exciting new OSes only boring unix.

I get where you're coming from, but I think the biggest pro for the "UNIX way" is that text on a filesystem extremely accessible. You don't need a specialized tool to read & modify configuration, you just need a text editor. And while there's no standard for how the data is structured, it's usually pretty easy to figure it out from context. I think it's also really easy to underestimate all the tooling built around t…

Windows and macOS dominate because 99.9% of users do not care about the difference between registries, file systems, text or binary tools, UNIX-like, POSIX, etc… none of these things matter to them! They just want to use a computer and get on with their life.

If you lament this as a programmer, build applications that only work on your OS of choice, make them so good or take a dependency on a feature not available with macOS or Windows so that it can’t be ported, and then you can show the world the light of the UNIX mentality or whatever.

Re: Why the Windows Registry sucks technically (2010)

#103

I really appreciate when people use technical facts to criticize something, like with this. It is a well written take-down of the implementation of the Windows Registry as of both today and 2010. I suspect if the concept of the registry was created today it would look more like a database (e.g. Sqlite), although organizing it like a virtual FileSystem does have a certain appeal, and unfortunately I don't know of a da…

I'm a big fan of the macOS method where there's an OS API to manipulate the user defaults (as its called) but they are actually just stored as files in a standardized format (usually XML). You get the pros of the standardization and the pros of user manipulation (like easily deleting the corrupted settings of some app by removing one or two files)

Re: Why the Windows Registry sucks technically (2010)

#104

Earlier quoted context omitted.

I can’t and shouldn’t be able to write to /etc as an ordinary or guest user. Er-readying values isn’t done usually with apps. You can get corrupted files if two instances fight for the same file. If that’s your thing, please use mongo. Also, please provide support to all the users. Lastly, if you messed up certain configuration or data files, your system won’t boot either on ANY system. Sounds like you’re just one of…

Point about /etc is that it’s just one part of “configuration”. There’s no /etc for users. That’s why we get all these dot.dirs. At least some apps use ~/.config/

.config/ and .local/ are the de facto /etc for users, but there is the set of XDG_ environment variables that are intended to fill that role.

Re: Why the Windows Registry sucks technically (2010)

#105

Earlier quoted context omitted.

> The UNIX way is undeniably more flexible since it isn't a virtual filesystem, it is just a filesystem. Unix simply doesn't have a "way" in that regard, other than a loose convention to put text files in "/etc". Every application comes up with its own format. Parsing that file is application-specific. Updating a value in a text file means re-writing the whole file again. It is a technically-inferior approach that ha…

I hate this fanatical love of the UNIX way. I really hate that as of today Windows is the only non UNIX OS. I trully believe that this fact set us back. No more exciting new OSes only boring unix.

The problem is that UNIX, while it reeks, it's good enough for most people to not care about it.

Plan 9 was supposed to be the better designed UNIX all around and it did not even dent it. It wasn't significantly better that UNIX to displace it.

http://www.catb.org/esr/writings/taoup/html/plan9.html

> We know what Unix's future used to look like. It was designed by the research group at Bell Labs that built Unix and called ‘Plan 9 from Bell Labs’.[154] Plan 9 was an attempt to do Unix over again, better.

> The long view of history may tell a different story, but in 2003 it looks like Plan 9 failed simply because it fell short of being a compelling enough improvement on Unix to displace its ancestor. Compared to Plan 9, Unix creaks and clanks and has obvious rust spots, but it gets the job done well enough to hold its position. There is a lesson here for ambitious system architects: the most dangerous enemy of a better solution is an existing codebase that is just good enough.

Re: Why the Windows Registry sucks technically (2010)

#106
post #39

A point being overlooked by article and commenters: the records in the registry probably use in the order of 10-100 bytes each, while every actual file takes up at least around 1024 (EDIT: maybe more like 4096?) bytes. Putting tiny 'files' into a special format is a no-brainer on the older computers that existed when the Registry was first created. I am assuming this was one of the motivations to create the Registry…

Extracted from the "Rationale" section of https://en.wikipedia.org/wiki/Windows_Registry 1) Since file parsing is done much more efficiently with a binary format, it may be read from or written to more quickly than a text INI file. 2) Strongly typed data can be stored in the registry, as opposed to the text information stored in .INI files. 3) Because user-based registry settings are loaded from a user-specific path…

Almost nobody mentions another rationale or use case: the registry is accessible from kernel mode. This makes it, in addition to the other things, kind of analogous to sysctl.

Re: Why the Windows Registry sucks technically (2010)

#107

Earlier quoted context omitted.

I can’t and shouldn’t be able to write to /etc as an ordinary or guest user. Er-readying values isn’t done usually with apps. You can get corrupted files if two instances fight for the same file. If that’s your thing, please use mongo. Also, please provide support to all the users. Lastly, if you messed up certain configuration or data files, your system won’t boot either on ANY system. Sounds like you’re just one of…

Point about /etc is that it’s just one part of “configuration”. There’s no /etc for users. That’s why we get all these dot.dirs. At least some apps use ~/.config/

"$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."

https://specifications.freedesktop.org/basedir-spec/basedir-...

Re: Why the Windows Registry sucks technically (2010)

#108
post #82

"2. Hello Microsoft programmers, a memory dump is not a file format" This is exactly how Office file formats worked in the good old times. Made things faster (no parsing).

> Made things faster (no parsing). And simple. I parsed a wav file for the first time awhile ago and it was surprisingly refreshing how easy it was to parse. I just made some C structures in the format of the specification, and I could just read the file incrementally into different structs. This is way simpler than writing a parser and then marshalling data back and forth between an internal format and the configura…

Wav files aren't a memory dump, unless you consider any file output to be a memory dump; certainly, not in the sense that old OLE (ha) files were.

Re: Why the Windows Registry sucks technically (2010)

#109
post #68
post #20

> This is a far cry from /etc/progname.conf in Linux. Some of these arguments are not really in good faith. First, this isn't a technical issue with the registry, but with how it's been used over the years and never "refactored" - a distinct issue. Second, I dare you to run "ls /etc" and claim it's not a mess... Besides, most of the post is how anyone with a text editor and admin rights can bork/hack the machine. As…

> Some of these arguments are not really in good faith. First, this isn't a technical issue with the registry, but with how it's been used over the years and never "refactored" - a distinct issue. Second, I dare you to run "ls /etc" and claim it's not a mess... I'd suggest that last bit is not uttered in good faith. 20+ years ago you could install the Microsoft Office suite on the Microsoft OS du jour and you'd find…

I'm sure MS has enough issues with backwards compatibility. Can't imagine handling multiple registry implementations on top of it.
Post reply on HN