7 ms·
Why do programmers do this? What thought process leads to someone thinking this is a good idea?
by Memosyne 8y ago
Why do programmers do this? What thought process leads to someone thinking this is a good idea?
- saagarjha 8y agoIt’s a convenient place to store user data that works across platforms.
- reaperducer 8y agoIt’s a LAZY place to store user data that works across platforms. FTFY. If you don’t want to follow the spec, keep your program’s data in your program’s directory. If another program needs the data it can follow the $PATH, or ask the user. Even better, ask the user at first run. You know, when asking people to accept some Byzantine EULA, license, and permission to track their grandmother.
- __david__ 8y agoYour program is installed in /usr/bin—you can't write to that directory (nor should you).
- Epskampie 8y agoIn a way a users settings are ‘personal files’, so it can be argued they go in home.
- lytedev 8y agoExcept isn't there a specific directory for such things now in $XDG_CONFIG_HOME? Or is this not standard at all? Either way, $HOME/.config makes perfect sense to me!
- AnIdiotOnTheNet 8y agoWe didn't always have the XDG standards, they were bolted on later and consequently a lot of devs ignore them.
- eknkc 8y agoIt is safe. Everybody does it, there is .gitconfig, .ssh etc so one more would not hurt. Until there is 500 dotfiles, some long forgotten.
- geggam 8y agoManage your system. Do not expect someone else to manage it for you.
- IshKebab 8y agoThat's an intellectually lazy thought. If everyone had that attitude we wouldn't have modern society at all (grow your food, don't expect someone else to grow it for you).
- geggam 8y agoLinux has been and is a tinker OS for folks who know wtf they are doing. As time progressed it has become easy enough folks who dont know what they are doing can use many of the distributions. Those folks are destroying what used to be a wonderful intelligent linux community.
- KyleJ61782 8y agoYou realize this is the definition of gatekeeping, right?
- geggam 8y agoComputer "engineering" is the only unregulated engineer I am aware of because of the damage they can do to society. It is time we started doing that
- kiallmacinnes 8y agoI don't even know what to make of this comment. Nobody is forcing you to interact with those "new users", if you don't like them, ignore them. Frankly, if everyone had your attitude, your Linux community will be dead and gone in a few short years as time progresses, and your old users pass away. I've been a Linux user for a long time, I and many other long time Linux users do not share this persons opinions. New Linux users, keep coming, the vast majority of us are not elitist.
- michaelmrose 8y agoIn order to have per user settings you have to have one dir per user. For practical purposes and security it ought to be somewhere only user has access it. Optionally it would be nice if you could back up all user settings and files in one place. The logical conclusion is that it ought to live somewhere in home which meets the above criteria. Its obviously cleaner to store data in $XDG_* but keep in mind that some of the apps creating said files are actually older than linux and certainly older than such standards. From dev and user perspective it would be nice to have them updated to follow the standard but in practice the practical effect is nil so lots of stuff doesn't bother.
- bo1024 8y agoI developed a utility for my own use and found an answer to your question. When the program starts up, it needs to know what its configuration is. This is not stored in the code. So it has to find its configuration data somewhere. Ideally, you'd let the user configure where they want the config file. But then the program has to read the config file to find out where the config file is, and it doesn't know where to look. (So it seems like you pretty much have to put config data in the same place on every computer, or use environment variables.) If you don't know about the XDG Specification in the article (I didn't), a $HOME/.myconfig file is by far the simplest and most robust solution.