Option for Camel Case in topics - please?

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Peter Sanders
Posts: 35
Joined: Tue May 24, 2005 3:16 am
Location: Perth

Option for Camel Case in topics - please?

Unread post by Peter Sanders »

Hi

Ooooh! Should I risk asking this after reading some of the posts in my search for camel/proper case topics?

At the risk of "offending" some purists :D I would *really* like to see a CamelCase option for topic IDs.

Personally I find that the use of underscores substituted for spaces a waste of characters and insome cases (mine I suppose) tend to "lengthen" the topic ID (the proportional space is much narrower than the proportional underscore :D ).

I doubt there is this option already as I could not find any reference to such a facility. I would like to request this as an option for a future release (point upgrade maybe) - sometime next week would be good :D :D :D
Kind rgeards

Peter
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Option for Camel Case in topics - please?

Unread post by Martin Wynne »

Peter Sanders wrote:At the risk of "offending" some purists :D I would *really* like to see a CamelCase option for topic IDs.
Hi Peter,

If by that you mean you want upper case characters in the topic ID, this is completely out of order because the IDs are used as file names. To be reliable on the internet file names should contain only lower case a..z, 0..9 and underscores. Nothing else. If you don't stick to those rules sooner or later they will come back and bite you.

Martin.
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Hi Peter,

Could you define "CamelCase" please? I haven't seen that phrase here in the US.
Just curious.

Thanks,
Dean
User avatar
Jim Huskey
Posts: 54
Joined: Tue Jan 17, 2006 4:09 pm
Location: Universal City TX
Contact:

CamelCase

Unread post by Jim Huskey »

I'm curious too, so I check Wikipedia (it MUST be true!)

CamelCase, camel case or medial capitals is the practice of writing compound words or phrases in which the words are joined without spaces and are capitalized within the compound.

Examples:
camelCaseLooksLikeThis
lowerCamelCaseLooksTheSame
UpperCamelCaseLooksLikeThis

Even If this isn't exactly right, at least it's plausible.

Peter, can you confirm?
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Code: Select all

Examples: 
camelCaseLooksLikeThis 
lowerCamelCaseLooksTheSame 
UpperCamelCaseLooksLikeThis
Doing this in Help & Manual would be pointless. All topic IDs and filenames are automatically downcased to all lower case on export for maximum compatibility with Unix/Linux servers. The rationale is that all links are also downcased, and if everything is downcased you know it's going to work everywhere. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Re: Option for Camel Case in topics - please?

Unread post by Simon Dismore »

Martin Wynne wrote:To be reliable on the internet file names should contain only lower case a..z, 0..9 and underscores. Nothing else. If you don't stick to those rules sooner or later they will come back and bite you.
Are hyphens [0x2D] OK in file names too?

Simon
User avatar
Jim Huskey
Posts: 54
Joined: Tue Jan 17, 2006 4:09 pm
Location: Universal City TX
Contact:

CamelCase

Unread post by Jim Huskey »

Tim,

I was just trying to figure out what he meant when he referred to "Camel Case". Interesting concept but not doable for topic IDs.

I'm happy with the current way things are done. The program's been outstanding for me. :D

Thanks for the excellent work on the forum!

Jim.
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Jim,
I was just trying to figure out what he meant when he referred to "Camel Case". Interesting concept but not doable for topic IDs.
Don't worry, I realize that, your text was just a good example for my explanation. And thanks for your kind words...

Simon,
Are hyphens [0x2D] OK in file names too?
To be quite frank that's something I'm never entirely sure about, but since I never see them in URLs I would tend to be careful as I suspect that they may cause problems on some systems. The basic rule of thumb should really be 0..9, a..z, _ and $ and nothing else. And the $ is really only for special cases in HTML Help and WinHelp, not for general web use.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Option for Camel Case in topics - please?

Unread post by Martin Wynne »

Simon Dismore wrote:Are hyphens [0x2D] OK in file names too?
Hi Simon,

Well I wouldn't use them. Any form of punctuation is out if you want ultra-reliable. And there is no reason for it -- folks often confuse a file name, which is purely symbolic, with the title of the document it contains.

The hyphen/dash/minus sign is ok in internet domain names (where an underscore isn't), but that's not the same as a file name. Mighty confusing though! Whose idea was that? :x

Martin.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Unread post by Martin Wynne »

Tim Green wrote:but since I never see them in URLs
er... http://helpman.it-authoring.com

:D

Martin.
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Unread post by Simon Dismore »

Hyphens are often used in domain names ... e.g. http://www-935.ibm.com. Having dug into the www specs, I believe hyphens in file names are OK too, per RFC 1630, RFC 1738 and the current W3C URI BNF.

The OASIS Guidelines for Filenames, URIs, Namespaces, and Metadata prefer hyphens to underscores, but do not allow URIs to begin with either character. Microsoft says that hyphens and underscores are valid in URLs ....but has reported problems with both these characters in Web Services URLs.

If anyone has encountered a situation where hyphens in file names have caused problems, I would be interested to hear about it.

Thanks in advance

Simon

BTW: It would be technically possible for the H&M BB-Help compiler to convert CamelCase IDs to lower_case_underscore_separated file names dynamically (like Ruby on Rails, which also maps singulars to plurals in models). I don't think this would be advisable for Help and Manual: it would make it harder to review output pages and conflicts with useful Zoom Indexer search ranking techniques.
Last edited by Simon Dismore on Wed Feb 14, 2007 12:46 am, edited 1 time in total.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Unread post by Martin Wynne »

Simon Dismore wrote:If anyone has encountered a situation where hyphens in file names have caused problems
Hi Simon,

A common problem occurs if you quote such URLs in emails to less-savvy computer users. Their email client fails to parse it to a clickable clink, usually stopping at the hyphen or other punctuation. You then get an email back saying the link didn't work, and why don't I test such things before sending them?

Where's the problem? a..z, 0..9, underscores. 37 characters to choose from. Why would you need more? A file name is merely a symbol.

Martin.
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Unread post by Simon Dismore »

Martin Wynne wrote:A common problem occurs if you quote such URLs in emails to less-savvy computer users. Their email client fails to parse it to a clickable clink, usually stopping at the hyphen or other punctuation. You then get an email back saying the link didn't work, and why don't I test such things before sending them?
I agree - that is a very compelling real world reason not to use hyphens in anything that can be permalinked. The current frameset/frame model in H&M doesn't make topic URLs visible in the address bar, but that could change at any time, and there are already ways to copy URLs e.g. by right-clicking a ToC node. So many thanks to Martin for that important insight ...yet another example of the exceptionally good signal-to-noise ratio in this forum.

Simon
User avatar
John Waller
Posts: 827
Joined: Thu Apr 20, 2006 9:34 pm
Location: Adelaide, South Australia

Unread post by John Waller »

A common problem occurs if you quote such URLs in emails to less-savvy computer users. Their email client fails to parse it to a clickable clink, usually stopping at the hyphen or other punctuation. You then get an email back saying the link didn't work, and why don't I test such things before sending them?
I agree this is a valid reason not to use punctuation in URLs too.

As a complete aside: i sometimes use free online services such as TinyURL and Shrinkster.com to make extremely long URLs tiny, unbreakable and portable e.g. send via email to novices.
Joe Caplan
Posts: 7
Joined: Mon Sep 26, 2011 8:57 pm

Re: Option for Camel Case in topics - please?

Unread post by Joe Caplan »

Back to Camel Case. The reason that an option to use camel case would be important is when using H&M for CHM or Web Help files and programming in .NET and other languages.

In general, naming conventions used in programming have a specific set of best practices to follow. Programming constants do not use an underscore or hyphen (that is Camel Case). It is the standard in .NET and constant names that are done with best practices use camel case.

H&M might create a topic ID constant like this:
Visual Topic Name: My Big Topic Section
H&M Constant: My_Big_Topic_Section

Camel Case would look like this:
MyBigTopicSection

Lowecase letters for the web, yeah, I get that too. But camel case is a programming standard and it would be nice to have that option in the setup where we can specify the prefix to the constant names. Just another option for camel case and maybe another option for all lower case constants.
Post Reply