Live data from Hacker News

I'm “still afraid to use spaces in file names” years old

twitter.com

561–570 of 817 posts

Re: I'm “still afraid to use spaces in file names” years old

#561

Earlier quoted context omitted.

"Persistent Temp" should be /var/tmp. "Persistent Temp" is also an oxymoron.

> "Persistent Temp" is also an oxymoron. It's not an oxymoron to have files which are temporary but not limited in scope to a single power cycle. For example, you could have a long-running process which you want to be able to resume if it's interrupted; /var/tmp would be an appropriate place for the state. The data is temporary because it will be deleted once the process is finished, but you wouldn't want it wiped ou…

Except that the FHS says that "data stored in /var/tmp is typically deleted in a site-specific manner", and as an application vendor you have no control over that site-specific clean frequency. On all my systems, /var/tmp is a symlink to /tmp and that has never caused any issue.

Re: I'm “still afraid to use spaces in file names” years old

#562

Define " space ". Is the Hangul filler we talked about yesterday a spacing character? Is the zero-width non-breaking space a spacing character? What about the typographic spacing characters? You should better be very afraid of using spaces in filenames. You should do everything you can to support them but you have to know you'll invariably encounter countless cases where you'll have this or that tool that won't work…

> I still live in a world where I cannot name a song from the french group L'impératrice with an eacute in the filename or my car's media system will display garbage (it's running QNX and I don't know which filesystem).

I have an Android phone and I tell MusicBrainz Picard to save all files with ASCII-only names and Windows-compatible names for the ones that get sent over to the phone. Basically for this reason. Sometimes it's players on Android itself, but even more frequently, whatever bluetooth radio I'm connected to freaking out with non-ASCII characters.

Re: I'm “still afraid to use spaces in file names” years old

#563

I work on a complex desktop application, and it's been astounding the number of bugs that have appeared over the years triggered by spaces and other unusual characters in file names. If you do anything with subprocesses or path processing, it's absurdly easy to hit in a thousand different ways, over and over again. Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space an…

Someone should provide the OneDrive/SharePoint people some of this religion.

Mysterious character requirements that do not conform with Microsoft’s OS limits, limits on tbe fully qualified pathname length, etc.

Re: I'm “still afraid to use spaces in file names” years old

#564
post #320

Earlier quoted context omitted.

This is what I want from Linux. Sensible & guessable names for newcomers to figure out where to put files and programs. It's frustrating having to spend time to decide whether I should install a program in /var or /opt or /usr. What do they even mean! So, I disagree with this convention altogether and use /apps or ~/apps now.

Behold! https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standar...

I feel like it just highlights the problem of how antiquated and confusing linux terminology that so many of those reference "single-user mode", used to refer to booting into root, when the vast majority of computing devices a given user will interact with only have a single actual user, making this a confusing and almost meaningless distinction to someone not already intimate familiar with linux.

Re: I'm “still afraid to use spaces in file names” years old

#565

I work on a complex desktop application, and it's been astounding the number of bugs that have appeared over the years triggered by spaces and other unusual characters in file names. If you do anything with subprocesses or path processing, it's absurdly easy to hit in a thousand different ways, over and over again. Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space an…

Somewhat related to injecting unusual characters, in my experience in localization efforts:

Inject a Turkish 'I'. I don't know how to type or paste it here, but picture an English lower case 'i' that is upper case. It is a splendid way among many to shake out some loc bugs.

Re: I'm “still afraid to use spaces in file names” years old

#567

Earlier quoted context omitted.

It doesn't even have to be complex, often basic automation tasks fail with spaces and special characters. Honestly, treating a file system like a natural language processor is a bad idea. Besides at this point with how digital we have all become who can't understand... thisismyconfig.txt vs this is my config.txt or this_is_my_config.txt ...i've forced myself to stop using spaces, character, and even cap. They are all…

> thisismyconfig.txt vs this is my config.txt or this_is_my_config.txt Just wondering, what is the readability of this for people who are dyslexic?

I'm not sure, but my gut instinct is that it wouldn't help. Dyslexia rates are much lower in China, so if I suppose we could start naming files with Chinese characters (on systems that support Unicode). It would take a bit to get used to, but eventually we'd develop a pidgin language for when we talk about software, much like how if you overhear Chinese or Vietnamese developers they will mix in English words like "linked list" into their sentences, because there's not a more natural sounding alternative.

Switching to Chinese would also help eliminate the spaces issue.

Re: I'm “still afraid to use spaces in file names” years old

#568

I work on a complex desktop application, and it's been astounding the number of bugs that have appeared over the years triggered by spaces and other unusual characters in file names. If you do anything with subprocesses or path processing, it's absurdly easy to hit in a thousand different ways, over and over again. Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space an…

Seems like MS had the same idea according to an answer in the link: > Microsoft intentionally made programs install to C:\Program Files on Windows 95+ to force programmers to deal with spaces in filenames.

Then they made poor APIs so that you have to do this to get it correct:

https://docs.microsoft.com/en-gb/archive/blogs/twistylittlep...

In nix at least you can call execve or other APIs that take a char argv[] and the whole problem is largely solved and you don't need to quote things.

Re: I'm “still afraid to use spaces in file names” years old

#569
post #453

Earlier quoted context omitted.

This is what I want from Linux. Sensible & guessable names for newcomers to figure out where to put files and programs. It's frustrating having to spend time to decide whether I should install a program in /var or /opt or /usr. What do they even mean! So, I disagree with this convention altogether and use /apps or ~/apps now.

Oh, my young friend, you have no idea what POSIX has done to you. "While no one sane would put newlines in directory names, such corruption of the results could lead to exploitable vulnerabilities in scripts." http://www.etalabs.net/sh_tricks.html

He he.

Want to see true craziness? POSIX file names are just a bag of bytes. They don't even have to be text, they can be anything (almost), there's no standard text encoding:

https://lwn.net/Articles/325304/

And in typical Open Source fashion, someone actually claims it's a feature: https://lwn.net/Articles/325398/ because hey, you 99.999% percenters can suffer so that I, 0.001% percenter can implement my wacky system.

https://xkcd.com/1172/

Post reply on HN