Live data from Hacker News

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

twitter.com

271–280 of 817 posts

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

#271
Our local development environment has evolved to a complex enough sequence of steps to set up and troubleshoot that I spent 2 weeks creating tooling that you can simply point at source checkout locations and the tool will take care to setup that repo.

It broke on the first try on a jr hire's machine, the source checkout location was `C:\source code`.

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

#272

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 found that some_document_2021-01-01_v03.pdf works best because it keeps the same document next to its other versions alphabetically, keeps them in date order, and keeps them in a sub-day version order.

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

#273

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…

Better solution: only allow ASCII, maybe dashes, and up to twelve characters. Problem solved. Enforce this in LDAP. Strict convention is better than flexibility and predicting obscure edge cases that can fail.

Ah, that's the he enterprise edition.

But then your program will crash hard and unexpectedly when a user decides to save under "~/house plans" or ~/Téléchargements.

I think it's better to exercise this in CI, that's what CI is for.

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

#274

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…

Better solution: only allow ASCII, maybe dashes, and up to twelve characters. Problem solved. Enforce this in LDAP. Strict convention is better than flexibility and predicting obscure edge cases that can fail.

Ugh, we have the 15 character Active Directory limit now with hostnames, and a previous IT administration has imposed a convention that every name had to follow [prod|dev]-[ph|vm]-[service]-[nn]. So basically every production service is prod-vm-owtf-01— you get exactly four characters to actually describe what the machine does. Works great when the service is "jira" or "wiki", but there are a lot that are pretty mystical-sounding, like jkns, jwrk, cntr, hrbr, etc, where you kind of just have to know.

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

#275
post #162

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…

> Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space and/or special characters in it. A former co-worker changed his name in our auth system to include an apostrophe, so that whenever we handled names wrong he'd find it.

One of the systems I built is being used by a group of younger people. I included an emoji in the superuser account name, just to make sure it would work. And to remind me to think more broadly about user input.

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

#276

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…

> Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space and/or special characters in it.

This will also break any code in external tools that are called during the builds of your application and do not handle spaces correctly for whatever reason, thus making it so that you won't be able to successfully finish the build.

Then again, you probably shouldn't be relying on technologies like that, but when you're struggling to keep an old enterprise system alive, causing yourself more problems is not necessarily what you should do.

Still a good idea in most cases, though.

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

#277
post #260

Earlier quoted context omitted.

This legitimately made me laugh out loud in my office. The characters reach up off the screen as I reply to this. They overlay the comment above you. Amazing. How?

Interestingly I get different behaviour per browser/OS. Firefox/Linux clips it to the bounding box of the parent element, Firefox/Mac and Safari/Mac clip it to the line height, and only Chrome/Mac lets it extended further.

Huh, I tried it in Chrome to see how it reacted here and it maintained about the same position as it did in my usual browser, Firefox.

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

#278
post #242

Earlier quoted context omitted.

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.

Except for \Windows\System32\drivers\etc\hosts, of course.
Post reply on HN