News for hackers. Stuff that matters.
Re:How Intuitive Are Macs Really? by klodolph on Monday May 24, 2021 @10:45AM (#27264933)
First, not going to claim that macOS is "intuitive", because my in my experience, "intuitive" usually means very different things to different people.

As a long-time Mac, Windows, and Linux user... I'll say that there are plenty of random broken things on the Mac, but there are also a few nice things that work very consistently on the Mac, but you'd never think to try them because you're used to them not working on Linux or Windows. So if you have been using Linux or Windows a long time, you will probably find macOS frustrating, just for the reason that it is different from what you are used to, and not because there are fundamental flaws with macOS or Windows.

Just an example of a couple simple things that are easy on a Mac, but hard on Linux/Windows: saving a file to a specific location. Let's say you have a Finder window open, and an unsaved document open in an application, and you want to save the open document to the folder that's open in the Finder.

1. You could go to the app and hit save, bringing up the save dialog, and then drag the folder (perhaps from the icon in the title bar) into the save dialog. This moves the save dialog to point to that folder.

2. You could save the file somewhere else, and drag the file (perhaps from the icon in the title bar) into the folder.

3. You could save the file on the desktop, and then move it into the desired folder.

I have not really ever figured out a nice way to do this on Windows. I often end up having to navigate through save dialogs on Linux and Windows and it seems unnecessary. Windows certainly doesn't let you move files that are open, which is a frustrating restriction when you run into it.

> Why is it that when I click Finder, nothing actually opens?

It brings Finder forward, and opens a new window if there are no Finder windows open, which is the same behavior as other Mac apps.

> Don't even get me started on the sort options. What kind of file manager applies a Sort view to every single directory, instead of the one you actually set the Sort view to?

Command J lets you set the view options, it's per-directory and includes sorting & grouping. Per-directory options don't do anything in column view. I'm not sure what you're doing, so I don't know what's missing. I switched to column view in the early 2000s and only occasionally switch to list view when I need to sort a massive folder by file sizes (which, unfortunately, requires command-J and checking "calculate all sizes", which is not something you'd know to look for).

Re:How Intuitive Are Macs Really? by MattRix on Monday May 24, 2021 @11:40AM (#27265643)
In Windows I would copy the folder path from Explorer and paste it into the save dialog and press enter, which will cause the save dialog to go to that folder.
Re:How Intuitive Are Macs Really? by tonyedgecombe on Monday May 24, 2021 @10:52AM (#27265038)
Those proxy icons are brilliant. I only discovered them a short while ago but use them all the time now. It’s a shame they are hidden in Big Sur.
Re:How Intuitive Are Macs Really? by FabHK on Monday May 24, 2021 @11:20AM (#27265383)
I suspect the fact that they appear when you hover around there, ie occasionally move, could make them more discoverable.
Re:How Intuitive Are Macs Really? by robertoandred on Monday May 24, 2021 @12:25PM (#27266291)
100% agreed. You really notice their absence in apps that lack them. cough / vscode / cough
Re:How Intuitive Are Macs Really? by AnIdiotOnTheNet on Monday May 24, 2021 @11:37AM (#27265604)
> You could save the file somewhere else, and drag the file (perhaps from the icon in the title bar) into the folder.

In RiscOS, drag-n-drop saving was the norm. You were not presented with a dialog, just an icon you could drag wherever you wanted the file to go. To me, this seems like a much more logical way to work with the desktop folder/file metaphor.

Re:How Intuitive Are Macs Really? by Ayesh on Tuesday May 25, 2021 @12:58AM (#27272731)
> 1. You could go to the app and hit save, bringing up the save dialog, and then drag the folder (perhaps from the icon in the title bar) into the save dialog. This moves the save dialog to point to that folder.

I don't think drag and drop is the most intuitive, but it's way worse with Windows. I think there are at least four iterations of those Open/Save windows (dating to Windows 95).

A tool called Direct Folders [1] adds a recent menu that shows all open folders and revenge, making those windows slightly more usable

1: https://www.codesector.com/directfolders

Re:How Intuitive Are Macs Really? by bsanr2 on Monday May 24, 2021 @11:32AM (#27265539)
>You could save the file somewhere else, and drag the file (perhaps from the icon in the title bar) into the folder.

You can do this in Windows. Save the file, open the save dialog again, drag the file icon to the Explorer window with the folder you want open. Hold shift to toggle copy/move.

Re:How Intuitive Are Macs Really? by klodolph on Monday May 24, 2021 @11:40AM (#27265632)
Don't you have to close the document first?
Re:How Intuitive Are Macs Really? by TurningCanadian on Monday May 24, 2021 @11:47AM (#27265754)
Not on Linux
Re:How Intuitive Are Macs Really? by klodolph on Monday May 24, 2021 @01:10PM (#27266964)
I was unable to reproduce your success. I just tested in GEdit, it failed, just as I expected.

I could move the file, but this broke the association with the open document. I saved to ~/test.txt, then moved it to ~/Documents/test.txt, and saved a second time. The second time I saved it, it saved the file to ~/test.txt, which is incorrect and useless. Now I have two files, but no action I took as a user should have created two files--moving a file should not create a second copy, and saving an open file should not have created a second copy, so why should moving and saving create a second copy?

On Windows, you typically get an error message, because you can't move an open file. (Not all applications keep the file open, so this doesn't always happen.) Personally, I think that enforcing exclusive locks is the worst, most significant design flaw in the entire history of the Windows operating system.

Only on macOS do you get the nice, expected behavior... it does not matter if you move a file while it is open in an application. When a file is open in an application, the open file is associated with the file, not with the pathname. You can rename a file in the Finder or reorganize a bunch of files in the Finder (or do the same in the terminal) and it does not matter whether those files are open in any applications. You can reorganize files in the Finder, and then when you save open documents, they save to the new location, not the old one. If you rename files in the Finder or rename a bunch of files with a script in the terminal, the windows for open documents you renamed will update their titles to match the new names.

The problem here is that (opinion time) the standard filesystem API is a really terrible interface. What you want is some way to create durable references to files. File handles can do that, but only while your application is open. Paths can do it while your application is closed, but the reference is lost if you move the file. On macOS, there's a standard API which provides something more persistent than file handles and more durable than paths. I think they're called "bookmarks" now, but they used to be called "aliases".

Re:How Intuitive Are Macs Really? by ubercow13 on Monday May 24, 2021 @01:44PM (#27267409)
Unless I’m misunderstanding, 1, 2 and 3 all work the same way on Linux, at least in GTK and I think Qt too
Re:How Intuitive Are Macs Really? by klodolph on Monday May 24, 2021 @02:30PM (#27267972)
I think you're going to have to provide some more details, because I'm trying 1, 2, and 3 in GTK and I can't get ANY of the three options to work.

1. I have a folder open in Gnome's "Files" app. I can't drag it into the dialog--there's nothing draggable. I could go up a level to the enclosing folder, drag the child folder into the save folder, and then go back down a level to the child folder... these extra steps seem a bit unnecessary. So it's doable, but clunky.

2. I saved a file in GEdit somewhere else. How do I move it? There is nothing to drag. On macOS, there is an icon in the title bar of the window (called the proxy icon) that can be dragged where you like.

3. I saved the file in GEdit on the desktop as ~/Desktop/file.txt, then moved it to ~/.../.../file.txt. Then I made some more changes in GEdit, and saved it again... now I have two files! GEdit was not aware that the file had moved, and when I saved it, it created a second copy of the file, which is unexpected and wrong.

If this is working for you, perhaps you could share the exact steps?

I think one of the problems here is that on Linux, there is no real way to drag an open object... you can only drag things out of containers, but you can't drag things without first opening the container. For example, you can't drag an open folder into a save window, you have to first open the parent folder. You also can't drag an open document into an open window, you have to open the parent folder. There's not even a clear way to do that--on macOS, you can command-click the name in the title bar of the window and select the parent folder from the drop-down... not saying this is intuitive, but it does work which is a massive step up from not working at all.

Re:How Intuitive Are Macs Really? by ubercow13 on Tuesday May 25, 2021 @03:45AM (#27274034)
With 1 I think you're right, but you can also drag any file in the folder and it will just locate and highlight it in the GTK filepicker, not actually open it, which achieves the same thing. In Thunar I can also drag the currently open folder (or any parent) from the breadcrumb bar, but this doesn't work in Dolphin.

With 2 and 3 - yes you're right I didn't realise that was how it worked on macos! Those are both interesting features I haven't seen elsewhere. Although I think 3 would be possible to implement say in gedit, as the inode of the file you save shouldn't change when you move it in the file manager, everything in Linux is usually path-based so this might be kind of unexpected.

Re:How Intuitive Are Macs Really? by klodolph on Tuesday May 25, 2021 @05:28AM (#27274729)
On macOS, there's something which I think is called a "bookmark" these days but which used to be called an "alias", and it's used to record a reference to a file. It's basically a data structure that contains a bunch of metadata for a file, so if the file moves, there's a fallback process which locates the file and updates the data structure with the new metadata. It's fairly simple as you'd expect, although it's much more than just an inode. The data structure can just be an object in memory or it can be serialized to a file on disk.

You could implement this yourself on Linux, for sure, but it's been around on macOS since System 7 appeared in 1991 and everything uses it.