Live data from Hacker News

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

twitter.com

91–100 of 817 posts

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

#93

I am also that age, and kebab-case is the best case for filenames. 2021-01-01-some-important-document.pdf gives me the warm fuzzies. On the off chance that some more differentiation is needed, throw in an underscore and a whole new world opens up

I go one step further: 2021-11-11_client_project-name.ext

2021-11-11_client_projectName.ext is also OK. But underscore separates fields, hyphens for space replacement.

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

#96

If putting spaces in file names makes you queasy, try punctuation - especially punctuation like semicolon or ampersand or single quote that's meaningful to shells and such. Also, emoji.

You don’t name your files with extensions && rm -rf?

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

#97

Earlier quoted context omitted.

You state that as if that were objective.. but that's not my subjective experience at all. Somehow I have a hard time remembering these long names, (is it --conf or --config or --config-file or --config-path? -c would've done it for me. --set or --set-prop or --set-property or --prop or --property?), and I need to look them up in a man page anyway, and I make more typos typing them, and shell completion rarely works…

the most used options for properly written tools have both short single char option like -c and long-form version --config if you need verbose self-describing option. If you are using cli tools of github written by a random person, then no wonder you will see non-standard approaches to UX.

PowerShell takes an interesting approach in that it accepts any truncated variant of a long-form flag as a short form, provided it isn't ambiguous (i.e. if the interpreter can't decide which long-form flag to expand a short-form flag to.)

For example, if a command features a "-ConfigFile" flag, valid short-form variants include "-C", "-Co", "-Con", "-Conf", and so on. But if the command featured an additional flag "-ConfigURL" for example, the aforementioned short-form flags would be ambiguous.

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

#98

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.

And that was a good idea, if only Microsoft also fixed the CreateProcess function, Windows would be somewhat sane in this regard. But somehow nobody seemed to think of it. Seriously, look at it:

https://docs.microsoft.com/en-us/windows/win32/api/processth...

The arguments are a single string. So you want to pass parameters with spaces in them? You've got to add quotes and stuff all of that into a single string. Instead of doing it in a more sane manner, like oh, the arguments to main().

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

#100

I had a guy in my team use forward slashes in filenames. Terrible idea, caused all sorts of weird issues.

But nice for testing. I spend a few month on Windows while doing a Django project and found a number of bugs no one else discovered because they used Mac or Linux.
Post reply on HN