Is there an official convention for naming private fields in VB.NET? For example, if I have a property called 'Foo', I normally call the private field '_Foo'. This seems to be frowned upon in the Offical Guidelines:
"Do not use a prefix for field names. For example, do not use g_ or s_ to distinguish static versus non-static fields."
...
I know most people have code review and standards in place, but I work at a place with poor standards. I'm not saying that my code is flawless by any means, but I find the code my fellow members submit is totally lacking of structure, standards, naming convention, etc. Whole code blocks that have been replaced are still left commented ...
Sometimes a labeled break or continue can make code a lot more readable.
OUTERLOOP: for ( ;/*stuff*/; ) {
//...lots of code
if ( isEnough() ) break OUTERLOOP;
//...more code
}
I was wondering what the common convention for the labels was. All caps? first cap?
...
I've got a group of inter-related classes that are all overridden together to create a particular implementation. I'm wondering if it is a good idea to enclose the interrelated subclasses in a namespace.
For example purposes, consider the following namespaces and classes:
namespace Protocol
{
public abstract class Message { }
publi...
I'm trying to write a RegEx for a code generator (in C#) to determine a proper class or package name of an AS3 class.
I know
Must start with a letter (capital or otherwise)
any other digit can be alphanumeric
cannot have spaces
Is there anything else?
...
For example:
root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 });
or:
root.Nodes.Add(new TNode() { Foo1 = bar1,
Foo2 = bar2,
Foo3 = bar3 });
...
What rules do you use to name your variables?
Where are single letter vars allows?
How much info do you put in the name?
how about for example code?
what are your preferred meaningless variable names? (after foo & bar)
why are they spelled "foo" and "bar" rather than FUBAR
...
Because of a space-issue I have to make 'single-character-links' for crud actions:
In characters I would symbolise:
'delete' with character x
'add' with +
…
How would you symbolise 'change' ?
...
If I'm not mistaken - the conventions of ASP.NET MVC seem to want me to do the following for a controller view.
Thats to day I create 'Products' directory into which I place my 'Index' view. I then create a 'ProductsController' and create an 'Index' method on it which returns a View. Returning just View() with no arguments will go and f...
I have some classes generated from WSDL files by the Axis Framework. In one of these classes, there is a generated method
public com.initechsystems.www.initech7.initechbo.Organization createOrganization(com.initechsystems.www.initech7.initechbo.Organization org) throws java.rmi.RemoteException {
//(... snip ...)
_call.setProperty(org....
Hey,
Knowing an edge is defined by both initial and final vertices,
How do you call edges coming from and to a vertex ?
For now, I name those incoming and outgoing.
Thanks.
...
I work with several developers in India and one of our biggest difficulties is their naming of variables. At first I was very frustrated and couldn't understand why they wouldn't just properly name things (was it laziness?) However, I realized that they probably aren't used to naming variables, becausee all of the code they read is in En...
I have noticed a lot of companies use a prefix for their database tables. E.g. tables would be named MS_Order, MS_User, etc. Is there a good reason for doing this?
The only reason I can think of is to avoid name collision. But does it really happen? Do people run multiple apps in one database? Is there any other reason?
...
Hi
I recognize that an email address can basically be indefinitely long so any size I impose on my varchar email address field is going to be arbitrary. However, I was wondering what the "standard" is? How long do you guys make it? (same question for Name field...)
Thanks,
Mala
update: Apparently the max length for an email address is...
Hi. Is there a Visual Studio plug-n or add-in which allows you to check code formats and conventions. This would include checking the indention, spacing,line spacing, casing of function names or variables, check if pascal case or camel case, etc. Anything which relates to coding convention. And of course we are allowed to set these. And ...
I have the following definition.
far int* near IntegerPointer;
Does this mean, a pointer placed in 'near' memory pointing to a integer placed in far memory area.
Can anyone please clarify.
...
is it acceptable to use ThreadPool in a library?
because that obviously might cause some unpleasant problems if the user of your library is using ThreadPool as well (due to ThreadPool being a static class of course)..
what's the convention?
...
Hello,
Do you know how to use the naming conventions in mysql database? I've downloaded a mysql sample database.
Here it is:
CREATE DATABASE IF NOT EXISTS classicmodels DEFAULT CHARACTER SET latin1;
USE classicmodels ;
DROP TABLE IF EXISTS customers ;
CREATE TABLE customers (
customerNumber int(11) NOT NULL,
customerName ...
Which convention would be preferred and why (include some pros and cons of one over the other)?
This:
<company>
<employees>
<employee />
<employee />
<employee />
</employees>
<buildings>
<building />
<building />
</building>
</company>
or this:
<company>
<employee />
<...
Hello everybody,
I've got a question concerning nasm and its linkage to C++. I declare a litte test function as
extern "C" void __cdecl myTest( byte i1, byte i2, int stride, int *width );
and I call it like this:
byte i1 = 1, i2 = 2;
int stride = 3, width = 4;
myTest( i1, i2, stride, &width );
the method only serves to debug assembl...