Spaces in file names

Want to talk about something that isn't covered by another category?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 170
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK

Spaces in file names

Post by thatkeith » Wed Jul 05, 2017 11:59 am

Bit of an odd one... a colleague who I consider to be normally technically highly astute is adamant that people shouldn't use spaces in file names, ever, and the justification was that "spaces use more memory". This is in the context of 'advice to students' along with lists of basic keyboard shortcuts, how to zip a folder, etc. To me, this is fundamentally flawed. Sure, there are specific situations where spaces in filename and paths *can* cause hiccups, but software creators should build safeguards against this kind of problem anyway. In UX terms this kind of 'cure' is far worse than the perceived problem – not to mention being inappropriate to bother media-industry students about this.

Anyway, apologies for venting... any reactions to the "spaces use more memory" comment? Ignore the fact that we're not working with early 1980s-level memory limits so it would be utterly irrelevant in any normal situation – is it even true?

k
Senior Lecturer, LCC (University of the Arts London)
Technical Editor, MacUser (1996-2015)
President, IVRPA.org

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1992
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Spaces in file names

Post by jmburnod » Wed Jul 05, 2017 12:14 pm

Hi thatkeith,
I believe that "memory argument" is not relevant and " any normal situation " should allows import files contents created by the users without garanties to respect this rule.
best regards
Jean-Marc

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5393
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Spaces in file names

Post by FourthWorld » Wed Jul 05, 2017 3:04 pm

An argument for leaner memory is (and certainly greater performance) might apply with case-sensitive file systems, but I can't think of any reason why a space character (or any other single-byte entity) would require more memory than any other character of the same size.

This may present an opportunity for the organization to review policies related to workplace drug and alcohol use. :)
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 170
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK

Re: Spaces in file names

Post by thatkeith » Wed Jul 05, 2017 3:07 pm

FourthWorld wrote:I can't think of any reason why a space character (or any other single-byte entity) would require more memory than any other character of the same size.
Mmm, quite. :D
FourthWorld wrote:This may present an opportunity for the organization to review policies related to workplace drug and alcohol use. :)
Heh. Well, considering there's a subsidised Student Union bar in the building... ;)
Senior Lecturer, LCC (University of the Arts London)
Technical Editor, MacUser (1996-2015)
President, IVRPA.org

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Spaces in file names

Post by mwieder » Wed Jul 05, 2017 6:22 pm

This may present an opportunity for the organization to review policies related to workplace drug and alcohol use. :)
LOL

Well, look... if I put a space in a filename, that uses up more memory than not putting in a space, no? And if I put in ten spaces, that's an order of magnitude more memory than if I hadn't done that in the first place. And it uses more time to do all that typing as well, so it's a waste of both space *and* time. Pretty soon we'll be opening up wormholes to who knows where and the aliens will be able to come through and we'll have to put on those tinfoil hats for protection and you see where this is going all because of spaces in filenames?

On a different note, I do usually try not to use spaces in filenames because of the need to quote paths from a commandline. And that goes double for folder names. And yes, you do have to script things carefully when dealing with file paths because whether you use spaces or not, your users will do this all the time, and if you haven't coded properly for this things will break.

A long time ago Ken Ray posted a function that I use all the time for quoting. I don't think I have released a single app that doesn't incorporate it:

Code: Select all

function q pText
    return quote & pText & quote
end q

Post Reply

Return to “Off-Topic”