Live data from Hacker News

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

twitter.com

41–50 of 817 posts

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

#41

I'm hardly afraid but I just think it's poor ergonomics. Same as the move from xset m 0 0 to xinput --set-prop 'pointer:Logitech USB Receiver' 'libinput Accel Profile Enabled' 0, 1 Everything seems to be going this way in Linux land. Longer names, harder to type names, camelcase names, spaces... I'm looking forward to an OS that treats command line ergonomics as a first class feature and where camelcase & spaces are…

I could infer a lot about the second and what those params mean and what they do. The first one is some magical incantation.

Sure. One could also make "move-down-one-line" be the incantation to move the cursor down a line in vi, but I prefer j.

Ergonomics isn't all about making everything self-descriptive for someone seeing the thing for the first time. It's about making things comfortable to actually use. If it's so long and complicated that you can't even remember how to do it, it's not very comfortable to use. Even if I could remember, xset m 0 0 is still far more comfortable.

And fwiw you still don't know what 0, 1 in accel profile do; you need to look that up or take a wild guess, and if you want to use that command, you'll also have to know how to look up the device because chances are yours is not the same as mine. So it's not any less magical in the end, just more verbose.

The "cool" thing about the xinput command is that you don't even find accel profile in the man page. You gotta look elsewhere if you want to understand what it is and what it does and what the parameters are.

xset m? Yes, that is documented in the man page.

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

#43
post #24

Earlier quoted context omitted.

What's wrong with camelCase? It's easier to type than snake

There's a tendency away from snake_case and towards kebab-case in things you interact with via CLI. Even moreso towards nocase. Programs like Powershell eschew ease of use in CLI for readability in scripts.

Snake_case is problematic for including filenames in TeX also. This is a big no for me, even if I find it more readable than the other.

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

#44

One of the main reasons why Windows used "Program Files" and "Documents and Settings" was to force the programs (and programmers) to deal with paths with spaces. And you know, for the most part it kinda, more or less worked out although of course even today you will find programs that ask you to install them in a folder without spaces in the path.

The main culprit for space issues is stuff relying on BAT or CMD files, where escaping variables seems to be a black art.

Sadly such set includes loads of Java programs. If only SUN had shipped a standard way to generate isolated exe files in 1998... but they worked under the presumption that you'd have a JVM already there, because distributing that monster was difficult in dialup times, so you could just hand people a jar; and the enterprise market did not care, since they had webapp servers. Sadly it's an "optimization" that became obsolete very quickly but wasn't rectified until it was too late (java 9+).

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

#45
post #33
post #25

Looks like I'm in the minority. I always use spaces and non-ASCII characters in filenames. In many languages it's a requirement. For example, in Romanian, there are 8 words that collide with „fata“ if you remove the diacritics (fata, fată, fața, față, făta, făță, fâța, fâță). Given that we have to use diacritics, spaces don't seem like a big deal.

Hmmm, I thought I was fluent in Romanian (born there and lived there for 26 years), but I only know 5 of those 8 words...

That doesn't seem unusual. Only the first 5 are very common.

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

#46
post #33
post #25

Looks like I'm in the minority. I always use spaces and non-ASCII characters in filenames. In many languages it's a requirement. For example, in Romanian, there are 8 words that collide with „fata“ if you remove the diacritics (fata, fată, fața, față, făta, făță, fâța, fâță). Given that we have to use diacritics, spaces don't seem like a big deal.

Hmmm, I thought I was fluent in Romanian (born there and lived there for 26 years), but I only know 5 of those 8 words...

According to Google Translate the first two are "girl" and the rest are "face". =)

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

#47
post #22

This is a UI/UX problem that I only face when dealing with shells and shell scripts. Never had any issues when spawning processes from within languages/runtimes that support sane argument arrays. sh , bash and cmd.exe are shit. The shell needs serious rethinking.

I see that there are lots of comments about problems of TAB-completions with filenames with spaces in this comment section and I am frankly puzzled: both Bash and cmd.exe actually TAB-complete those perfectly fine, inserting quoting where it's needed.

I seem to remember bash losing preferred escaping when TAB-completing, but can't reproduce it now with 5.0.17.

Eg. you'd type `ls -l "Spaced [TAB]` and it would turn it into `ls -l Spaced\ Name`. I remember similar annoyances with other special shell characters (eg. single quotes, dollars, slashes), but that all seems to behave sane now.

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

#48
Shells are indeed the main culprits for the continued fear of spaces, but not the only ones. A lot of programs that deal with "metadata" which will then generate database tables and stuff like that, still struggle when working with any sort of special character. And the same for anything that, behind the scenes, just feeds text into regexes.

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

#49
post #5

Slightly off topic but I find myself stuck at being "please for the love of god don't use spaces in git branch names" old. Anno dazumal this might not even have been an issue and I'm just cargo culting.

And on that topic, git branches are case sensitive but windows filesystem API isn't. Git branches are materialized on the filesystem as files and directories.

If people actually abuse git branches being CS, odds are good they're also abusing CS in the repository content.

The linux kernel is one of the offenders, if you check it out on Windows or macOS (which supports CS but remains CI by default) you'll immediately get garbage in netfilter, because it's an habitual user of having different files with names identical but for the casing e.g. xt_TCPMSS.h and xt_tcpmss.h.

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

#50
post #24

Earlier quoted context omitted.

What's wrong with camelCase? It's easier to type than snake

There's a tendency away from snake_case and towards kebab-case in things you interact with via CLI. Even moreso towards nocase. Programs like Powershell eschew ease of use in CLI for readability in scripts.

> Even moreso towards nocase.

Nocase (did I break a rule by writing it that way?) seems great when you're enmeshed in the domain and you can see the implicit separators, but then someone looks at your naming from the outside and you're guaranteed to have an 'expertsexchange' in there somewhere.

Post reply on HN