Live data from Hacker News

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

twitter.com

331–340 of 817 posts

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

#331

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…

My favorite filename special character bug was when I implemented CD ripping in 2005, and one of our beta testers ripped a CD with a song called "Have You Ever?". My code wasn't prepared to filter out the question mark on Windows.

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

#333

Earlier quoted context omitted.

> 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?

Or in my case, people for whom English is a second language, or have low education levels. Saying, "who can't understand..." is arrogant, selfish, and an example of why normal people hate people in the SV echo chamber.

SV echo chamber is on your side here - it is very in vogue to denounce anglocentrism. they were defending hieroglyphs and emoji in variable names in that thread about invisible javascript backdoor a day or two ago if you'd like a recent example

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

#335
My first job as a SW Eng was in 1989 in the nuclear industry. Our folders and files were limited to 8 letters. So names were effectively acronyms. It was actually pretty awesome. Clean and concise. Years later, I still remembered the whole folder structure.

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

#336

Earlier quoted context omitted.

Better solution: only allow ASCII, maybe dashes, and up to twelve characters. Problem solved. Enforce this in LDAP. Strict convention is better than flexibility and predicting obscure edge cases that can fail.

only allow ASCII, maybe dashes, and up to twelve characters. Problem solved ...and only hire people from the exact same background as you, who will never have unusual characters or accents in their name. And also make sure not to have any users who aren't exactly like you, and conform to this very narrow requirement. Surely, excluding 90% of the world won't hurt revenue in any way.

Snarky, but I'll take it.

Use strict schema for the hardware interface, networking, physical stuff the user never sees. Microservice names don't need to be non-Latin. Database replicas, infrastructures, etc. And you're not going to piss off employees by giving them ASCII ldap/email addresses.

Use utf8mb4 or similar for storing names. Don't state "first" or "last". I've been through this rodeo too many times. You're not surprising anyone.

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

#337

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…

You get all those space characters working and then some jerk comes along and uploads a file like this: ŗ̶̧̢͓̳͍͙͔̳̻̥͉̭͓̫̟͍̞̭͉͓͉̮̹͍͚̳̹̬͉͚̰͈̘̐̊̾̈̀̒͒̀͛̓̋̔͊̏͘̚ę̴̨̛̣͙̤̟̬̩̟͙͖̥̹̱̱̊͑͗̇̇͛̆̈́̃͋̓̀̔̍̍̌̐͊̎̓̅̀̕ͅģ̴̹̜̘͍̱̑͐̉̌̐̄̊͛̎́̐̌̅̈́͂͑̈́̋̔͂̊̊̒̒̔͛͆̚͘̕͠e̶̙͕̫̳̘͐̾́̑͆̓͂̿͊̊̍͛͐̌̆͗̌̅̅̔͊̂͛͗̅̕͝͝͝͝x̵̢̧̦̫͖̝̥̹͓̬͖̤̩͚̝̫̋̃̅̈́̆͋̌͑́̎̈́̊̾͒̀̒̎̓͛͊̿̓͊̀̍͐̆̚͝͝-̴̨̮̯͖͖̠̜̲̪͕̘͈͖̮̈́̓̐̃́̅̄̏́̍̉̐͌́̔̓̄͋͗̐̕͜͝ţ̴̢̧̖̗͖̞̮̫̦̼̝̺̼̱̳͓͉̜̟̤̲͖̻͙́̌̈̌̈͆̾̄͊̿̏̓͗̈́̕͜ͅh̶̽́͊̎͐͌̆̍̎̏̕͝…

768 characters is too long for macOS it seems. (References online say HFS+ has a limit of 255 UTF-16 characters. Didn't find anything for APFS immediately... edit: same for APFS)

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

#338

Earlier quoted context omitted.

yeah. it's a string.

On POSIX systems file names are not strings, they are sequences of bytes. They might not be UTF-8 or have any meaning. Python3 had to hack around this, they thought they could force everything to Unicode and discovered that doesn't work.

Which makes for fun issues like there's no standard way to display a filename in Unix. A system that's, you know, all about files.

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

#339
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...

Yeah, except that tells me nothing useful... The question is exactly the same: So where do I install this random binary I downloaded from the internet or compiled myself? Is it /opt, /usr/bin, /usr/local/bin, or /bin? Where do I put the dependencies I compiled for this software - /usr/lib, /usr/local/lib, /lib, /opt/lib, /opt//lib, or what?
Post reply on HN