Live data from Hacker News

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

twitter.com

801–810 of 817 posts

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

#801

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…

I'm with you. Terseness is paramount. I could never overcome my repulsion for Java and ObjC because of that. On the other hand, I fell at home with crazy RegEx that look like line noise to most people.

I hate .methodNameAsLongAsMyArm as well, but there's the opposite extreme:

As a beginner, I liked short variable names. When I came back a few months later, I learned my lesson. Years later? easier to just start over.

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

#802
I have come back to this thread, which I have spotted and forgotten something like two days ago, to say that just like a minute ago one of new Jenkins jobs that I added failed because I named the item using space and some custom Gradle/Maven magic tool failed to load one of its own auto generated files (I could tell that space was the culprit because error message printed only second half of item name).

How can I not be afraid of spaces if this happens like every other day with every other custom tool ...

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

#803
post #746
post #728

Earlier quoted context omitted.

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

I assume you mean that the Windows API (standard for Windows apps) is case insensitive, but if using the WSL (Windows Subsystem for Linux) it's possible to get case sensitivity: https://docs.microsoft.com/en-us/windows/wsl/case-sensitivit...

Even if you're not using WSL, you've always been able to turn on case sensitivity via a registry key. This has not been recommended in the past due to possible issues with windows itself as well as third party software. This history is mentioned here[0]. Everywhere that mentioned a registry key seems to be referring to windows nfs server, not to general file access, however I know that SFU (Services for Unix) installer had an option to do so, so it's certainly possible.

As of sometime in 2018, fsutil can set specific directory trees to be treated case sensitive in Windows 10 without setting it for the OS. This ability is mentioned here[1]

[0]: https://devblogs.microsoft.com/commandline/per-directory-cas... [1]: https://docs.microsoft.com/en-us/windows/wsl/case-sensitivit...

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

#804
post #168

Earlier quoted context omitted.

There is no guarantee that the short name has that. In fact on a lot of German Windows installations it was PROGRA~2.

Well, on my disk PROGRA~1 is "Program Files" and PROGRA~2 is "Program Files (x86)", so still works :)

And on mine (Windows 11) "PROGRA~3" is "ProgramData"

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

#806

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…

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.

There was a short path name IIRC like prog~1

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

#807
post #460

Earlier quoted context omitted.

I see and applaud your use of the underscore there, but I must reject the premise! work/client/project/2021-11-11-file.ext is more or less how I lay stuff out. I’d say client/project is a folder level distinction (arguably dates too). [EDIT] Realistically most of the stuff under is git repos and I usually make a “home” repo where I keep org files for tracking hours, notes, and resources related to the engagement.

I'll be the opposite voice: the file system isn't for precise organisation, it's just for storing. For organisation, the ideal thing to use is tags. Since most file systems don't have tags and using software for that would be a pain, the best way to do this is to list the tags in the file name.

I've always thought that personal files, photos, or any other kind of just needed more connections between them to improve my information retrieval experience. That's how I had become a Zettelkasten evangelist. I believed it would be the cure for the information overload disease of our era.

But life made me use Emacs org-mode more and more, and I'm now in love with tags. Retrieving information has become so easy, especially with org-mode's tags inheritance, that I hardly think making connections between headings or notes is necessary anymore[1]. And I believe that applying tags to filenames (a la Karl Voit [2]) will create the same effect

[1] A Zettelkasten-like system is still unbeatable imo when it comes to ideas repositories, i.e. a second brain you can talk to and get new insights. It's just not that great for personal knowledge management or project management.

[2] https://github.com/novoid/filetags

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

#808
post #726

Earlier quoted context omitted.

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.

Yup, their UI sucks when it comes to sync errors.

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

#810
post #306

Earlier quoted context omitted.

It corrupted text or "Zalgo" text, it relies on diacritics. See this answer on stackoverflow: https://stackoverflow.com/questions/1732348/regex-match-open...

I disagree with calling it "corrupted." We're not tricking the browser into trying to render garbage bytes that are actually the middle of a jpeg or something. It's actually valid Unicode. It's an edge-case which is not seen in regular usage, but it's technically following all of the rules.

It's just the way it's called, not a statement of fact.
Post reply on HN