Re: Naming Conventions

Is this Visual Basic ? Looks like it to me, correct me if I am wrong. My instructor advised our class to use the most descriptive naming convention, while keeping it brief.

Like :

dim intBeansdim intPots etc...

*Note: ("dim" in this example is the dimension (< I think it stands for dimension) command, creating variables Beans and Pots, for anyone reading this that isn't necessarily familiar with Visual Basic)

He said that using CamelCase was fine, but he preferred something short and sweet, so instead of:

dim int dayCountYesterday

he would suggest for clarity

dim int countYest

or something really short and sweet for programmers that may look over the code after the program's creation, just in case the programmer that created the code wasn't doing the revising personally.

So to shorten this up, I think that using what makes sense at first glance matters more than being strict with naming conventions. Conventions should be considered, but ultimately you could try my instructors idea, MathsIsFun. My instructor by the way used to work for Google. So I guess that he must have learned a few good ideas while working there.

Re: Naming Conventions

As I look at Ricky's example, it looks like you two are talking about either C++ or Java with the { 's. I am not sure what naming conventions you should use, MathsIsFun, in regard to either of those languages. I am teaching myself some Java, and I like it so far.

Re: Naming Conventions

Re: Naming Conventions

my lecturer always says give it a name that means something because it will be easier to understand when reading over, in functions the first letter in the word should be in lower case but after that to have them startin with an upper case letter e.g getLengthOfArray(). he also believes that member data should start with m_ eg m_Data

Theres only 10 type of people in the worldThose that understand binaryAnd those that dont