Live data from Hacker News

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

twitter.com

241–250 of 817 posts

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

#241

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 use this style:

2021-01-01_what-happened_who-did-it_possible-reason

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

#242

Earlier quoted context omitted.

And yet they introduced C:\ProgramData in later versions.

Imagine if they made programmers put 64 bit DLLs in a "System32" directory and 32 bit DLLs in a "SysWoW64" directory. That would really keep 'em on their toes!

Programmers should never put DLLs in those folders... Or even ever touch them.

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

#243
post #23

Earlier quoted context omitted.

Not if you are careful (a bit like "$@" vs $@ in shell scripts). Edit: replace $@ with quoted version which actually changes the behavior (I was wrong that the difference is between $* and $@).

I don’t think it’s fair to claim that any Make implementation supports spaces: there are too many fundamental bugs and breakages, so that lots of rather important Make functionality is off-limits if any of your file names will have spaces. https://www.cmcrossroads.com/article/gnu-make-meets-file-nam... explains the situation in GNU Make in 2007 (and I don’t think it’s changed since then, though jgrahamc especially co…

That's a fair point, thanks!

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

#244

Earlier quoted context omitted.

yep, I still don't use spaces. I also don't use uppercase characters. Just underscores or hyphens.

Sometimes I break the rule and use uppercase but never spaces.

I’ve had issues with git when changing a filename, if the only change is the casing.

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

#245
I like to store data on USB flash drives. After being left to mature for a few years in a humidity and temperature environment, you get some really interesting and complex byte streams where your original file names used to be.

Often they are not even valid UTF8 which, when you uncork the filesystem for the first time in a decade causes the most delightful crashes. The more years the better the aroma.

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

#247

Earlier quoted context omitted.

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.

I wish they did "User Files" instead of "Users" too, because so much software breaks on the home area having a space in it. Not least, it makes writing scripts for various shells and getting the quoting rules right an absolute pain as well...

Huh, spaces. There's way too much software, especially on Windows, that breaks when there are Cyrillic characters in a path. I'll let you guess how I found out.

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

#248

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've recently shifted sharply toward the dash from the underscore. I find it more readable, and it doesn't require the shift key. However, I do find it useful to use underscores to create groups, e.g. test-001_2021-10-11.log. Including hours, minutes, seconds is still awkward.

Brother in arms. I just posted similar thing below.

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

#249

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…

> 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 consider spaces “unusual” I would say you haven’t encountered a single average user in your lifetime. Spaces in file-names is the single most common thing people have, outside programming environments.

As a x-plat developer, the only platform where I (still) regularly encounter these kind of bugs are platforms where solving problems through scripting is common, like Linux, where the primary means of operation is through stringly-typed statements getting parsed and processed in a untyped-fashion. It's not very reliable.

On Windows people more often use “real APIs” (because scripting doesn't really work as well), but then these problems just goes away.

Pros and cons, I guess.

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

#250
post #113
post #86

Earlier quoted context omitted.

The shell ought to be able to help with that. There's no need to remember if it's --conf or --config if you can press --conf . One of the things I like about Fish is that by default it can tab-complete program options and also shows a one-line description of what each of them does. (It grabs that info from the man page).

So much of computing is dedicated to solving problems that could be omitted.

Seriously. Just get up from the computer and go do something else. /s

We computer people are truly an odd bunch.

Post reply on HN