Hacker News new | ask | show | jobs
by fmbb 17 days ago
> For example, I would argue that for someone with no experience, figuring out how to copy a file from one folder to another is easier in Windows Explorer than learning how to use cp.

I don't believe this.

If you find a person (well, two I guess for this experiment) with no computer experience and want to teach them how to copy files, your first step will be teaching them what is a file and how they are organized in the computer.

Explaining what a file is takes the same amount of time for both cases (we can ignore how devices and processes are files in Linux and how files in Windows contain many data streams and extra metadata).

In both cases you need to teach them the file system is hierarchical and folders can be nested and can contain files.

For Windows you have to teach them how to double click to open folders. They can double click "My Downloads" to see their downloads. They can double click "My Music" to see their music files.

For the CLI you have to teach them that `ls` can list the contents of a directory. They can `ls Downloads` to see their downloads. They can `ls Music` to see their music files.

For Windows you then teach them they can open multiple windows (assuming you want to copy from one folder to another folder). And you teach them they can click, hold and drag and drop a file to move it (but sometimes it will be copied when they do that) and they can hold in Control while dropping to copy the file to the destination instead. Or you teach them they can use Ctrl+C to mark a file for being copied and then navigate to the destination and use Ctrl+V to copy the file. Or you teach them to right click for the right click menu, and that "copy" means "mark this file for being copied", and that a right click in the middle of a window displaying the target folder lets them select "paste" which means "copy the marked file here".

For the CLI you teach them `cp Downloads/foo.mp3 Music/` copies foo.mp3 from their downloads to their music directory.

The CLI is also infinitely easier to help newbies use over the phone!

3 comments

Look I’m a big fan of having CLI interfaces, and they can definitely let you do things that you just can’t do (or are extremely difficult to do) with a standard desktop gui. But at the same time, the GUI means they never have to learn that `cp Downloads/foo.mp3 Music /` will give them a cryptic error that Music can’t be found. Or that if they’re already in the Downloads directory then they need to instead type `cp foo.mp3 ../Music/`, or that they’re going to need to figure out the special way to tell the computer what they mean when they want to do `cp Downloads/foo bar (feat. baz and the fizzbuzzes).mp3 Music/` and that doesn’t work when they type it in.

The initial explanation of the happy path might be slightly longer to teach drag and drop or right click copy and paste for files, but that happy path will also deal with a lot more scenarios in the exact same way than the happy path cli commands will.

My mom struggled to understand the concept of copying and pasting when she got her first computer at home, with Windows. It was more than 20 years ago, but I think the idea that you need to copy in one place, then go to some other place and paste there, still sometimes confuses her in the context of files, even though she does not have any issues with that when copy-pasting texts.
> The CLI is also infinitely easier to help newbies use over the phone!

I vaguely recall a scene from https://en.wikipedia.org/wiki/Who%27s_the_Boss%3F about this. "Click on the icon that says 'Word'..."