Live data from Hacker News

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

twitter.com

721–730 of 817 posts

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

#721

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.

That annoys me every time I use a Windows system. It was a terrible decision, especially since both the command prompt and the new powershell doesn't accept like bash a backspace before a space, you have to quote the whole path! I get that most users on Windows don't use the shell, but as a developer I do a lot, and every time it's a pain (no wonder they added the WSL in Windows after the failure of Powershell...)

Why would they accept a backslash? Backslash is a path separator on Windows. In most Windows programs, you don't even need to escape the space - arguments can contain spaces and it will understand it, like `notepad My file.txt`

The escape character on PowerShell is backtick, and on cmd it is caret. You don't need to quote everything.

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

#722

I never put spaces, and won't go over 32 characters, preferably less than than 16. even when sending a file to my grand mom. that's how deep rooted the trauma is. and yes, it remains an issue with some parsers and what not.

I still find files on the internet that my browser can't download because too many characters :(. Edit: can't save, downloading works.

This is a Windows-only issue AFAIK. It's the same reason why people decide to put their projects in something like C:\dev

Apparently it's quite easy to reach the 260 chars limit

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

#723

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…

Today I learned that You cannot install Tailscale on windows if installer is inside path with non-latin chars.

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

#724
post #640
post #632

Earlier quoted context omitted.

Spaces are a pain in the ass when you're using CLI so I'd rather enforce a no space policy

Most shells will behave just fine if you put a quote (single or double) before anything that has a space. A small extra step but something you get used to if you spend a lot of time in the cli.

Escaping spaces is a pain. I have to do it every day.

I set up symlinks which help navigating around but then the relative paths are wrong for git.

No thanks.

Friends don't let friends put spaces in paths

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

#725

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!

They already hamstrung themselves with LONG because DWORD just wasn't good enough and now long can't be 64-bit either.

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

#726

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…

And yet OneDrive WP t allow fir spaces before or after a file name.

I spent hours trying to figure out why an entire folder suddenly stopped syncing. Turns out I accidentally added a hidden space to the end of a folder name.

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

#727

Earlier quoted context omitted.

> kebab-case I hadn't heard that before and I love it.

Google considers it too violent apparently. In one of their recent changes to their style guide, they started recommending "dash-case" instead. https://developers.google.com/style/word-list#letter-k

Tbf, dash-case is more descriptive. Kebab doesn't mean skewer everywhere

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

#728
post #228

Earlier quoted context omitted.

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

I've had issues when moving between Window/*nix file systems, where Windows file names are case insensitive and *nix systems are case sensitive. Build script works fine locally on Windows, but then chokes in *nix test server, as it's effectively a different path.

file names aren't case insensitive, it's the windows API that is

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

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

So do I. I have a language, and I'm not afraid to use it. My computer should speak it just as well as I do.

There's a server at work that name with a non-ascii character. I've run into compatibility issues lots of times where I can't connect. I prefer to just use English with ASCII and be happy

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

#730

If I'm going to use the file in the command line, I won't use spaces, since I don't know what sick bug I might encounter.

I avoid spaces because they make tab completion more cumbersome in bash.

100% this
Post reply on HN