219 reputation
15
bio website
location
age
visits member for 3 years, 4 months
seen Apr 4 at 12:45

You can reach me at frerich(DOT)raabe(AT)googlemail(DOT)com.


Feb
15
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@DanielB: You can use plain file locking mechanisms (e.g. open a file with exclusive access). If each setting is its own file, you can have very fine grained locking.
Feb
14
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@Secure: I didn't think you were trying to convince me, I meant to express that I'm not convinced that the disadvantages weigh heavier than the advantages. I'm grateful for the concerns you raise (in particular because they are orthogonal to what other people suggested). I'm collecting the advantages, disadvantages and hope to be able to write a useful blog article based on this. And thanks for teaching me that "listen to the frogs" thing, that's new to me. :-)
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
As for the power user use-cases: I think those advantages you give for a single text file "Copy, move and rename of files, a text editor, copy and paste" apply to file system trees just as well. Except that you don't need a text editor in many cases, a simple "echo foo > settings/windows/yoyomode" may be enough. Copying files and directories around, which would be the equivalent of copy & pasting text, is a common operation as well.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
Thanks for these aspects, but I'm not convinced. Integrity check? Not relevant in practice, I think. The vast majority of programs I know doesn't even bother storing a cryptographic hash of configuration files. Robustness? I'd argue that having a user tinker with some text file which needs to adhere some specific format (say: an INI file) is no less dangerous. Easy to forget a quotation mark, or to forget escaping one. Backing up a file system subtree is hardly more difficult than backing up a single file.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@whatsisname: As for XML - that certainly has other issues. Try embedding binary data. Try to deal with concurrent access to the file. Imagine the diffs which can occur if different XML parsers are use with different ideas of indentation (great fun when maintaining such configuration files in version control systems).
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@whatsisname: Anybody who ever looked a non-trivial configuration files, possibly n * 10kB in size, knows that the 'single file' doesn't actually scale very well. Furthermore, a file listing allows you to use different ways to view the configuration, i.e. via a graphical browser, or just the files in a certain subdirectory. File systems solved this problem already. And if you are familiar with Linux, you may have noticed that being able to do something like echo 1 > /proc/sys/net/ipv4/ip_forward can be quite nice.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
@RossPatterson: Well except that the Windows registry doesn't actually use the file system directly but rather builds a hierarchical configuration file on top of that (according to this answer).
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
+1 for providing an example of the project which does something like that.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
In fact, having a single (possibly big) file can be quite obnoxious with version controlling as well. Depending on the file format, you can get conflicts all the time if there is more than one party changing the configuration. Having finer-grained files (and relying on the locking which your operating system already provides) helps with that.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
Indeed, what Gatling does appears to be pretty much what I had in mind! So maybe it's not that bad an approach as the other answers make it look. +1 for mentioning that.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
You usually can't have two settings with the same name in the same group of INI files either. As for sharing - wouldn't this just be a matter of symlinking or so? I concur with the other concerns you raise though, +1 for that.
Feb
13
comment Is it plausible to use a filesystem-based configuration format rather than an INI file?
About seeing them all at once - I can just (possibly recursively) list all files, no? And backing up/version controlling the configuration doesn't seem difficult to me either. Just check in the entire directory tree and/or rsync the directory. Not much more difficult than checking in/backing up a single file. I agree with your second and third points though. The lack of 'meta data' is dissatisfying.
Nov
30
comment What would you do if your client required you not to use object-oriented programming?
@Andres F.: I didn't claim that by 'functional' he meant my second C example. I was just pointing out that some people consider it to be OOP while others wouldn't. So before starting an argument, it would be good to avoid any misunderstandings. Maybe there is no disagreement in the first place. Maybe the boss, since he said that he's not familiar iwth OOP himself, assumes that OOP has certain properties (just like the OP apparently assumed functional programming had certain properties).
Oct
13
comment How do you handle ever-growing piles of issues to be resolved “somewhen”?
+1: Some good advice here, I'll keep this in mind when talking to my colleagues.
Oct
13
comment How do you handle ever-growing piles of issues to be resolved “somewhen”?
The 'first contact bugs' idea is not bad; somebody else already suggested something like this, calling them 'Janitor Jobs'.