News for hackers. Stuff that matters.
Re:Designing better file organization around tags, not hiera... by spicybright on Sunday November 07, 2021 @01:34PM (#29142100)
I've been hearing this for years, but I've never had the mental model for it. Maybe I just have to try it out.

There's a very neat project (can't remember the name, and some details below may be wrong,) that mounts a FUSE filesystem that uses only tags.

Paths have identical syntax to hierarchical ones, only each segment of a path is a tag.

so `/document/taxes/2020` would return a collection of files, but you could also write `/taxes/2020/document` and it would mean the same thing.

The advantage is you can use standard unix tools like ls, mv, cp, etc. as well as R/W using standard programs (like how you'd export an image.)

I'm sure there's edge cases to it, but I always found the idea very neat. Anyone remember what I'm talking about?

Re:Designing better file organization around tags, not hiera... by tacticalmook on Sunday November 07, 2021 @03:38PM (#29143290)
The downside of folders is trying to figure out where things belong in the hierarchy, or trying to update that hierarchy to a new standard.

The downside of tagging is you still need to establish conventions to ensure things can be found again, but enforcement of your conventions is harder.

Exploring, learning, and using an unfamiliar folder hierarchy is easier than exploring, learning, and using an unfamiliar tagging methodology.

But manually searching for something in somebody else's tagged data is easier than manually searching for something in somebody else's folders.

Re:Designing better file organization around tags, not hiera... by tunesmith on Monday November 08, 2021 @12:34AM (#29146359)
It seems that for any DAG, a hierarchy could be derived that would minimized either the number of soft-links, or a weighted score of how many contained files are in a soft-linked path.

And, similar to how a sugiyama graph automatically redraws when an edge is added or removed, a filesystem hierarchy could be automatically restructured to minimize the above scores when files are added or removed from the various folders.

Re:Designing better file organization around tags, not hiera... by johnchristopher on Sunday November 07, 2021 @03:45PM (#29143351)
> The downside of folders is trying to figure out where things belong in the hierarchy, or trying to update that hierarchy to a new standard.

That's why I stick to Documents/{folder1..folder∞} and folders don't have hierarchical sub folders, just contextual folders. Eg: Documents/taxes 2021/{invoices, stuff}, Documents/taxes 2021/, Documents/Cthulluh Roleplaying/{pdf files of characters}, Documents/Covid vaccination certificates,

Yes, it's messy but I don't have the mental burden of a holding a tree in my head or a tagging system.

Re:Designing better file organization around tags, not hiera... by Andrex on Sunday November 07, 2021 @05:27PM (#29144162)
I try not to go more than three folders deep (starting from ~). I don't mind a lot of files in a folder, search helps me with that.
Re:Designing better file organization around tags, not hiera... by johnchristopher on Sunday November 07, 2021 @05:54PM (#29144370)
My current setup is: Documents, owncloud, Downloads, Dev, Media and tmp. No desktop. At work I have an additional git folder.
Re:Designing better file organization around tags, not hiera... by webmobdev on Sunday November 07, 2021 @02:55PM (#29142883)
> I've never had the mental model for it.

This is one way to think about the hybrid model of folders + tags that is currently available:

1. Folders tell you where the file is stored.

2. Tags tell you what is the file.

So basically use the Tags to add more data (metadata) about your files, so that if you forget where the file is, you can still search for it by what is in it. This also slightly helps in easing the burden of trying to figure out where to store a file (e.g. "Do I put a home video in my 'Videos' folder or my 'Personal' folder?" - if you tag it properly, you can put it in either, as you can use the tags to figure out where the video is later).

Examples:

1. In Documents folder - "mom-2020.xls" (tags => docs, tax, finance, mom, unfiled).

2. In Videos folder - "newyear bash.mp4" (tags => video, family, 2021, home).

Re:Designing better file organization around tags, not hiera... by spicybright on Monday November 08, 2021 @02:33AM (#29146833)
Don't think I ever had it explained this clearly to me lol. Thank you! I run Mac os so I might give tagging a try now
Re:Designing better file organization around tags, not hiera... by daenz on Sunday November 07, 2021 @05:19PM (#29144089)
I'm the author of Supertag, which is what you might be talking about. https://github.com/amoffat/supertag
Re:Designing better file organization around tags, not hiera... by remus on Sunday November 07, 2021 @02:05PM (#29142421)
> I've been hearing this for years, but I've never had the mental model for it. Maybe I just have to try it out.

Gmail uses tags rather than folders, nice easy way to have a play if you've already got a google account.

Conceptually, I think of it as basically being able to have lots of different hierarchical folder structures applied to a set of objects at the same time. Or to flip it round, a normal folder structure is like using tags but where you are limited to one tag (the folder that holds the object) per object.

Re:Designing better file organization around tags, not hiera... by thunderbong on Sunday November 07, 2021 @03:04PM (#29142975)
Not exactly. In Gmail, tags are hierarchical.

So, if I have a tag called 'projects', and another tag called 'newproject', the overall tag is 'projects-newproject'.

If I try to see everything under 'projects', it'll only show me the ones tagged 'projects' directly, not the ones under 'newproject'.

Re:Designing better file organization around tags, not hiera... by maxpro on Sunday November 07, 2021 @03:25PM (#29143175)
This is only if you use it hierarchically. No one prevents you from having a tag projects and another tag newproject. Your emails just have both tags assigned and you are good to go
Re:Designing better file organization around tags, not hiera... by OJFord on Monday November 08, 2021 @03:38AM (#29147245)
Sure, but GP's point (and it's something that annoyed me in Fastmail too) is that if you do have an 'hierarchical tag' - which could be in addition to unrelated tags - you don't get the '<sub-tag> is a <super-tag>' that you might expect.

The tags themselves end up in an hierarchy without it affecting the tagged contents.

Re:Designing better file organization around tags, not hiera... by dredmorbius on Monday November 08, 2021 @01:21AM (#29146549)
From a document perspective, yes, you're correct.

From a tagest perspective, and the discovery affordances, there is a significant difference.

Hierarchical tagsets allow you to navigate via tags, affording document discovery by that mechanism.

That becomes more significant as you're working with a larger, richer, and more structured tagset.

Re:Designing better file organization around tags, not hiera... by joshuamorton on Sunday November 07, 2021 @03:24PM (#29143164)
I think what you're seeing is the opposite: tags aren't hierarchical. Tags can be organized hierarchically, for organizational purposes, and you can use rules to ensure that everything tagged "projects-FOO" is also tagged "projects", but the tags as they apply to tagged objects aren't hierarchical.
Re:Designing better file organization around tags, not hiera... by rkagerer on Sunday November 07, 2021 @03:37PM (#29143287)
10 years ago I was prototyping something very similar for Windows.

If I recall, CBFS and Dokan were the closest things you had to FUSE on Windows back then. Alternatively considered emulating a network drive. Like you pointed out, it had to be transparent to your existing software's Open / Save dialogs (although there was some effort to hook the standard ones to give users a place to apply tags when saving).

We've been stuck in the same old directory paradigm for a long time. There are some use cases where the traditional hierarchical approach is desirable (e.g. when you need to "visit" a set of files exactly once, like to browse through a folder to clean it up, enumerate for backup, calculate sizes, etc). But it's a constraint when a file belongs in more than one place.

Re:Designing better file organization around tags, not hiera... by zmj on Sunday November 07, 2021 @08:41PM (#29145388)
There's a Windows component for this now - Projected Filesystem (projfs).
Re:Designing better file organization around tags, not hiera... by sdeer on Sunday November 07, 2021 @01:55PM (#29142313)
You are probaly thinking of https://github.com/cfagiani/cotfs which allows ln but not mv or cp.
Re:Designing better file organization around tags, not hiera... by spicybright on Sunday November 07, 2021 @01:57PM (#29142339)
Ah, that's right. Thank you for the link!
Re:Designing better file organization around tags, not hiera... by p1necone on Sunday November 07, 2021 @10:31PM (#29145919)
My favourite file organization hack is to have a "scratch" folder containing everything that I can lose with no problem. Stuff only comes out of the scratch folder if I know I can't redownload it again and I might need it.

This way I can just wipe the whole scratch folder whenever I want, and there are much less files I actually need to organize.

Re:Designing better file organization around tags, not hiera... by rsyring on Sunday November 07, 2021 @10:46PM (#29145961)
Similar but mine is ~/tmp and I have a cron job that deletes any files/folders over 30 days old.
Re:Designing better file organization around tags, not hiera... by spicybright on Monday November 08, 2021 @02:32AM (#29146822)
Oh man, that's smart. Would you mind sharing that script?
Re:Designing better file organization around tags, not hiera... by ddoeth on Monday November 08, 2021 @04:48AM (#29147643)
You could use something like this:

   find /tmp -type f -mtime +30 -delete
Re:Designing better file organization around tags, not hiera... by marcellus23 on Monday November 08, 2021 @03:36AM (#29147227)
This is what I use my desktop as.
Re:Designing better file organization around tags, not hiera... by mjevans on Sunday November 07, 2021 @06:50PM (#29144744)
At it's simplest, a filesystem can be thought of as a string key (small) to value (large blob) database.

Directories are just a method of breaking the collection into usefully small / specific subsets for humans (mostly) and computers (a secondary but important performance optimization).

There's no technical reason some form of Standard couldn't be added to, or on top of, a filesystem that added tags as an alternate view or foreign index against the data.

The holdup is that there isn't any single standard for adding or searching by tags. The current directory structure is the lowest common denominator and has existed for longer than many of us have been alive. Change is _hard_ and those file open/close dialogues and interface methods still have to work, and they can work, at least for limited numbers of tags or maybe by some addition / removal special path syntax... However then it's stupid hard for the humans. Hard for the use case the tags are supposed to simplify.

Maybe this change can be added to what everyone really needs: a set of GUI calls that work on all the platforms, that isn't writing a damned web-page and using a DLL-hell-bloat bundled web-browser to do the cross platform lifting. Something that can work across all the desktops (as a target) and maybe all the mobiles (as another target) and maybe tablets too (slightly different target, somewhere between).

Re:Designing better file organization around tags, not hiera... by digikata on Monday November 08, 2021 @11:45AM (#29151144)
I think the api that allows for more flexibility of implementation underneath is a hierarchical multi tag system with one root of the tag reserved for the existing filesystem, eg. "fs". Paths on /fs/dir/dir/file could serve as definitive storage reference and a way into the existing filesystem apis, while other tag systems can be imposed by the user in parallel trees of tags - all of which refer to the underlying fs tree under their implementations.
Re:Designing better file organization around tags, not hiera... by 6510 on Monday November 08, 2021 @10:03AM (#29149970)
ahhh you mean like a json api for the browser!</sarcasm>
Re:Designing better file organization around tags, not hiera... by oneplane on Sunday November 07, 2021 @01:37PM (#29142133)
While I don't remember that specific project's name, I do remember that a lot of that was possible because files in a filesystem often aren't just some hierarchical folder structure. There is often a tree-like structure to be able to find a single file quickly amongst many files, but there was no technical reason why it wouldn't also support off-tree indexing based on tags.

I imagine one of the problems you'd run in to is mass updates since deleting a directory with many files in it below a single tree node is very much limited to that part of the filesystem's tree, but doing it with tags causes updates all over the place.

It does remind me of this more metadata-like FS: https://github.com/marook/tagfs

As well as the thing Apple does in Finder where it has a tag database and dynamic 'tag' directories where it shows you everything that was tagged with that tag. Then the search function would allow selecting files based on tags so you can do many-tag searches and only find the files that match all of them. I think that one is based on an in-filesystem metadata stream.

Re:Designing better file organization around tags, not hiera... by jbergens on Monday November 08, 2021 @05:51AM (#29148025)
I think the article was about making it easier for users. It may not be easy anymore if they have to use directories AND tags. Or it may work, if the only files they normally tag are their documents.

Tags have a problem with names. How do you stop users from messing with files that belong to the OS or some application? Should we require that they all have the tags "OS" or "app" on them? Should binaries have the tag "binary"? What happens when the user tries to delete one app but chooses "tag 'app' and name startswith 'word'"? Should all application files named "word"-something from different applications be removed? Should the user have known to use a meta-query with "tag 'app' and tagname:startswith 'word'"?

I do see a lot of problems but of course some things would be easier.

Re:Designing better file organization around tags, not hiera... by 6510 on Monday November 08, 2021 @11:01AM (#29150645)
At least that part of the puzzle is obvious:

Users should never touch system files nor have to look at them. I never want to see any asfawe.sdwae file ever again. Its like keeping power tools in the cup board or having screwdrivers in your utensils drawer. Its like keeping the manual in the washing machine. You open the door and instantly know it's a ridiculous idea.

The user should be able to do what he wants, anything should go, there should not be any bad moves besides deleting their own stuff, they should be able to simply delete everything. Make it a partition with a warning prompt.

Re:Designing better file organization around tags, not hiera... by DurhamPete on Sunday November 07, 2021 @02:07PM (#29142435)
Fuse tagging: TMSU. At tmsu.org.
Re:Designing better file organization around tags, not hiera... by ssivark on Tuesday November 09, 2021 @03:37AM (#29159137)
(Collecting options) Another interesting project that's popped up before is Tagsistant: https://www.tagsistant.net/
Re:Designing better file organization around tags, not hiera... by im3w1l on Sunday November 07, 2021 @09:00PM (#29145492)
This might work for documents but a difficulty I see is how you would handle system files. See, with documents it's fine to always return a collection of files, but for a system file say /etc/passwd, you want to make sure you get exactly (status quo guarantees at most which is almost but not quite as good) one file.
Re:Designing better file organization around tags, not hiera... by jbergens on Monday November 08, 2021 @10:32AM (#29150291)
Just think of the endless possibilities of a node_modules folder replaced with some tags! /s
Re:Designing better file organization around tags, not hiera... by jbergens on Monday November 08, 2021 @05:37AM (#29147942)
Sounds like a really bad idea for tools like mv and rm. Suddenly you have moved or deleted much more than you thought. Unless you support guids or similar also but end users are normally really bad at reading and writing those. It is very easy to mistake one guid for another.
Re:Designing better file organization around tags, not hiera... by natmaka on Sunday November 07, 2021 @08:08PM (#29145211)