Re: [ljc] Quick poll on hyphens vs underscores

From: andrew
Sent on: Wednesday, January 23, 2013 8:14 AM
If they truly are your feelings, then you're in for a treat when i work out how to post my question:

"which is your favourite character encoding  scheme?"



On 23 January[masked]:26, Jon Hatfield <[address removed]> wrote:
This discussion has had me on the edge of my seat. I thought I'd had some exciting experiences in my life, like losing my virginity, seeing some of my favourite bands at download festival and various drunken binge-a-thons with friends, but they pale in comparison to the ultimate question - hyphens or underscores?! With each new reply that comes through, my heart starts beating fast and the hairs stand up on the back of my neck.

I would say underscores for multi-word SQL table names and either for folder names (camel case for Java classes as per convention).

Cheers,
Jon


From: [address removed]
To: [address removed]
Subject: RE: [ljc] Quick poll on hyphens vs underscores
Date: Tue, 22 Jan[masked]:51:32 -0500


I agree with your comments but with the precondition of a more complex context.
By a more complex context I mean naming conventions regarding not only files and folders but Java code, XML etc.
As you say you wouldn't expect a single answer to the question in such a context.

However, that's not what the poll is about as it says "In particular the naming of generated software artefacts".
This puts it in the "naming conventions for files and folders" category.

I guess "in particular" could be interpreted in different ways:
- including but not exclusive to the naming of generated software artefacts
- exclusive to the naming of generated software artefacts

Perhaps I should have been more explicit in that I meant the latter case which simplifies the question.

It is simplified because the poll does not question your naming conventions for Java constants, variables or classes.
We're all aware of the JavaBeans specification therefore such a question would be patronizing.
Similarly, XML naming conventions is not brought into question.

So for those reasons and in the interest of not going off on a tangent, the poll is a simplification.

Alas, the question still may open up a can of worms.

Regards,

Edin


From: [address removed]
To: [address removed]
Subject: Re: [ljc] Quick poll on hyphens vs underscores
Date: Tue, 22 Jan[masked]:46:22 -0500

I have to agree with Richard on this one.  It is a terrible oversimplification.

I would like to have a discussion, however.  I don't expect there to be a single answer, but I would love to hear some perspectives.

Here is my nuanced opinion:
  1. Naming conventions are essential.  There should be a clear convention in place that everybody should follow.
  2. I like to have multiple conventions.  A_CONVENTION_FOR_CONSTANTS, aConventionForVariable, AConventionForClasses, a-convention-for-xml, a_convention_for_files_and_folders, etc.  The reason for this is that you often have to mix them all up, and the use of different conventions makes it easier to see what is what.  addressLine1=xpathExpression.get("customer/current-address/address-line-1") is easier to read.
  3. I like to have a clear set of transformation rules so that when a document talks about "The customer's marital status" I know that in Java is till me Customer.maritalStatus and in XML customer/martial-status.
  4. Readability is still the most important factor.  If a transformation rule leads to something that looks bad, then it should be ignored and something that is easier on the eye choosen instead.
  5. These rulles should not be enforced to stringently.  If your rules are good and well communicated they will be adopted easily.  If there is resistance then something is wrong.  Find out the problem and get the right rules rather than trying to crow bar things though.
  6. Once you do have a goodIn the end you may have 1 or 2 dissenters with a minority voice insisting on there own way of doing things.  They're just going to have to conform.
This is just my preference.  I'd love to hear how others prefer to do it and why.

Regards, 



Ged

On 22 January[masked]:40, Richard Warburton <[address removed]> wrote:
Being a bit of a perfectionist I tend to pay attention to detail and one of my pet hates is a lack of or bad naming conventions.

Specifically on the subject of hyphens vs underscores.  Personally I prefer hyphens and hate having to press shift in order to type an underscore.  It doesn't take much more effort but I just find a hyphen to be more legible as well as easier to work with on the command line, it flows better.  I wonder if there are others for whom the underscore is an annoyance?!

Anyway, I've set up two very quick polls and would appreciate if everyone reading this would cast a vote.


If you have any further comments after casing your vote then please reply on here.

It should go without saying but I'll say it anyway, please don't cheat by casting your vote more than once.

I'm sorry to say but this is a terrible topic of debate.  Things like this are arbitrary.  Other than rules of syntactic validity it doesn't matter.  You may claim one way is 'easier to read', but in reality this is a purely personal prejudice - no different from deciding that you want to paint the walls of your house lilac or that you're more attracted to blonds or brunettes.

One of the more productive ideas from big A agile is to decide what your values are.  This determines what is important to you and what you should your time on.  Minor syntactic niggles have never been high on my values list and I'm yet to hear any argument beyond the level of self-rationalising absurdism as to why one character is more valuable than another outside of false cognates and relationship to a known domain.  This seems to fall into neither category.

regards,

  Richard Warburton





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Richard Warburton ([address removed]) from LJC - London Java Community.
To learn more about Richard Warburton, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Ged Byrne ([address removed]) from LJC - London Java Community.
To learn more about Ged Byrne, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Edin Hodzic ([address removed]) from LJC - London Java Community.
To learn more about Edin Hodzic, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jon Hatfield ([address removed]) from LJC - London Java Community.
To learn more about Jon Hatfield, visit his/her member profile

Our Sponsors

  • Our Blog

    Read the latest news from the LJC

  • RecWorks Ltd

    Fixing Tech Recruitment using the Power of Community

  • jClarity

    Java/JVM Performance Analysis Tools & mentoring for Java related matters

  • LJC Aggrity

    Our LJC Aggrity site contains blog posts from our members

  • LJC Book Club

    Our Book club with book reviews from our members

  • Devoxx UK

    Java Community Conference, in collaboration with the LJC 12/13 Jun 14

  • SkillsMatter

    "Host, help organise, promote, film many of our meetings."

  • Packt Publishing

    A publishing company specializing on specific technologies and solutions

  • Java.Net

    We are an official Java User Group recognised by Oracle's JUG program

  • JRebel

    Free 3 month J-Rebel license.

  • O'Reilly

    40% discount on printed books and 50% on e-books.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy