Is there a naming convention how to call the file where authors will be listed? - naming-conventions

I remember that Evil Martians (known Russian developers team) tried popularize some approach for this aim. But can't find anything about this now.

Related

Are there specific grammar rules for naming variables?

I am creating an ontology for urban systems. For instance if we have the variable that indicate the size of the population I would name it (using the so called camel notation) sizeOfPopulation. The length of the street as lengthOfStreet. Is there a specific or standardized way of doing it?
There is no correct answer to this question because it's extremely subjective.
Programming Style, Coding Conventions and Naming Conventions.
You are probably familiar with: Tabs versus Spaces?
TL;DR: Choose a style with your team or for youself, and be consistent. Look at strictly managed open source code for ideas, eg: Qt, ChibiOS, Linux.

VBA Module naming conventions

A quick question about Naming of VBA modules. I've posted this in a few related posts but they are old and evidently unobserved at this point and have gotten no responses. So I ask it here. When naming a module in VBA it defaults to the name "Module#". I usually just add my name to it such that it becomes "Module_MyCodeName". Is it ok to remove the "Module#" name altogether and make it just "MyCodeName"? I've seen many naming things but nothing that actually says "Why yes! You CAN remove "Module" and it will not affect the functionality." I know it's a basic basic basic question but I really don't know. Maybe just a brain fart or something.///
I would suggest the Lezynski prefix m-. Unless you are developing VBA in a team (which you shouldn't) it shouldn't matter though.
I can only imagine how and why you would use mFormating and mGlobalVariables (by the way do consider the CamelCase convention when naming your elements).

Why some developers prefix variables with the word "my"?

I've noticed some of the developers on my team tend to prefix their variables with "my" (i.e. "var myHello = 'Hello World'). These aren't instance variables or anything, just regular variables that reside within a method.
Is there any significance to this naming convention? To me it comes off a little "newbie-ish" -- as if they just graduated from their LOGO class. But these are seemingly seasoned devs so I could be way off.
I totally disagree with you. leaving the fact that judging a person's skill by variable names imply that he's newbie aside, some teams have code standards other than you're used to. For your information - in PERL if you didn't know there's a reserved word my variable and it has nothing to do with coding standards. Maybe he had no better name for that class which is already implemented in the system but he wants to keep things simple? Besides, maybe he likes to reference himself to the code he writes?

Common variable names in different languages

I see a lot of different styles of variable names used in different kind of languages. Sometimes these names are lowercase and using underscores (i.e. test_var) and other times I see variables like testVar.
Is there a specific reason why programmers use different variable name styles in different languages?
It's really just the convention for that programming language.
For example, most Java programs use camel-casing (testVar) while a lot of C programs use _ to seperate words (test_var).
It's completely the choice of the programmer, but most languages have "standard" naming conventions.
As Wiki says :
Reasons for using a naming convention (as opposed to allowing programmers to choose any character sequence) include the following:
to reduce the effort needed to read and understand source code;1
to enhance source code appearance (for example, by disallowing overly long names or abbreviations).
Also there are code conventions in companies that care about readability of their code.
This simplify the code sharing between programmers and they don't spend time to understand what means variables name "aaa" and "bbb".
There is no real reason. Each language and sometimes even platform can have varying naming conventions.
For instance, in .Net TestVar would be seen if it was a public class variable. In C++, testVar would probably be opted for. In Ruby, test_var, etc. It's just a matter of preference by the community and/or creators.
I urge you to follow language standards. I work on a team that has had many developers working on the code over the years, and very few standards have been followed. The majority of our code is nearly unreadable. I have been working on a standardization project for the last several months. It has been very difficult to enforce and get buy-in. I'm hopeful that people will come around as they start seeing the benefits of easy to read code.
For naming conventions/standards keep this in mind:
Follow team/company standards
Follow language standards
Follow the style that the program is already using
Do whatever you want (Not really - if you don't have standards follow
your language standards/conventions.)

hints for naming methods

We all know that classes/objects should represent things
while methods/messages should represent operations (verbs).
But how to pick the right verb?
I've heard one "rule for method naming" is to
imagine some completely different implementations and then
simply pick name that is general for all of them.
EDIT: I also know that methods should be named as closest to domain as possible.
(means after intention not after implementation)
What others do you know?
I like to try to name things so that a given line of code would make as much grammatical and syntactic sense as possible, even to a non-programmer. (One of the reasons why I love lambda so much in my .NET code. It's like making new words from Latin roots, you just keep chaining things together.)
There's a pretty good article here on naming classes and methods when building a repository, for example.