I am not exactly a programmer. What is the .DS_Store file for?
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
__MACOSX folders hither and yon.
DS DS DS D-not gonna work here anymore, anyway.
Just gitignore that. Same for dot idea and whatever vscode adds, if anything
Use this so that the things you need to share do get shared.
.idea/*
!.idea/codeStyles
!.idea/runConfigurations
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
Note: I haven't checked the vs code ones in depth, the list might not be perfect.
I personally strongly advise against committing IDE junk to version control. Assuming your IDE workspace defaults are "sane" for the rest of the contributors is not a good practice.
If your whole team uses the same IDE, what's wrong with commiting things like run configurations and code styles? I agree in general, but a wholesale ban on it is very cargo culty to me. There can be legitimate times to do it.
I elaborated on it below. Your team will grow and shrink. No guarantee that each developer will bring the same IDE. This is especially true for open source projects.
If it works your team, no need to be dogmatic about it. Just be careful about what you put there and agree on a set of sane defaults with your team. Your project should build and run tasks without needing a specific IDE.
.vscode
doesn't store cache or any trash like that, so if you're including all settings, tasks, etc, you can probably just include everything.
The only thing to keep in mind is to only add settings, extension recommendations, etc that apply to all your collaborators and aren't just personal preferences. A few good examples are formatting rules, task definitions to run the project, and linting rules that can't be defined somewhere else.
Linting rules and scripts should never live in an IDE-specific directory. I should not need to know your IDE configuration to run scripts and lint my files.
I have yet to come across a language that requires configuration to be stored that way. All modern languages have separate configuration and metadata files for use cases you have defined.
As for workspace defaults, whatever IDE configuration works for you is not guaranteed to work for others. Shoving extension suggestions down their throat each time IDE is booted should not be a part of your source code, as IDE extensions should not be needed to run your code.
Ya, but that .idea is not inserted in eleven thousand sub folders.
It's not, but I still prefer not pushing my config on others, or others pushing theirs on me.
honestly - while a Mac is certainly less painful to use than winshit, putting rubbish files recursively into each(!!) accessed folder, on all thumbdrives ever inserted, that's something Jobs deserves to burn in hell for.
I am not familiar with MacOS, but that seems like a nightmare. What is the purpose of these files?
Iirc they're indexes for the system wide search feature, Spotlight
Is there a valid reason not to store that [[anywhere else]], ideally in Spotlight's data?
Maybe. There are many ways to move files and directories around without using Finder, at which point all indexed data about those files and directories will be stale. Forcing something as core as mv
to update Spotlight would be significantly worse, I think. By keeping the .DS_Store
files co-located with the directory they index, moving a directory does not invalidate the index data (though moving a file without using Finder still does). Whether retaining indexing on directory moves is a compelling enough reason to force the files everywhere is probably dependent on whether that's a common enough pattern among workflows of users, and whether spotlight performance would suffer drastically if it were reliant on a central store not resilient against such moves.
So, it's probably a shaky reason at best.
You'd want that, but a lot of programs do that, both in Windows and Linux.
e.g. The .directory
files with the [Desktop Entry]
spec by freedesktop.org
Dolphin has the option to enable/disable the feature
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
Helps a bit.
As much as they love to sue people, I don't understand why Nintendo doesn't go after Apple for trademark infringement, so that they're forced to finally come up with a better method of storing folder attributes.
Because it's not marketed as a product. Apple isn't trademarking "DS".
I'm pretty sure Apple has been using those files since before Nintendo released the DS.
This is probably not a relevant counter point, just a(n un)fun fact, but Nintendo put in a patent for throwing a capture ball at monsters after Pal World was released and Pal World has to change some stuff (though I'm not sure if they're doing it to avoid going to court because they're concerned or if they're being compelled).
And emulation is legal too, but that doesn't stop Nintendo.
Not sure they'd be stupid enough to go after someone as big as Apple though.