I've just started using Python and I was thinking about which notation I should use. I've read the PEP 8 guide about notation for Python and I agree with most stuff there except function names (which I prefer in mixedCase style).
In C++ I use a modified version of the Hungarian notation where I don't include information about type but o...
Quick question: I'd like to hear your thoughts on when to use "State" versus "Status" when naming both fields such as "Foo.currentState" vs "Foo.status" and types, like "enum FooState" vs "enum FooStatus". Is there a convention discussed out there? Should we only use one? If so which one, and if not, how should we choose?
...
Which extension should I choose for my HTML files and why?
...
While trying to cleanup an application's API, I found myself scratching my head...
What should I call the variable for a user's name "username", or "userName"?
...
I find myself creating a significant number of wrapper classes, purely because I want to mock out the behaviour of
Classes that don't lend themselves well to the RhinoMocks isolation model (for instance like DirectoryInfo or WindowsIdentity)
Native Win API methods (I normally collect all the methods I need into a single class and wrap...
I often see Java class names like
XmlReader
instead of
XMLReader
My gut feeling is to completely upper case acronyms, but apparently many people think differently. Or maybe it's just because a lot of code generators are having trouble with acronyms...
So i would like to hear the the public opinion.
How do you capitalize your class...
I'm assigned to a large project that is going to be done in Java and viewed by a few programmers on the team. I want the code to be readable and understandable, and so want the naming convention to suite everyone that reads it.
I'm wondering if I have to use the Java naming convention in order for other people to view it and understand ...
I have a model named "clothing" which I want to be the singlular (one piece of clothing). By default, rails says the plural is clothings. Right or wrong, I think it will be more readable if the plural is "clothes".
How do I override the plural naming convention? Can I do it right in the model so I don't have to do it over and over?...
Hi there,
I was curious what do you use as iteration names and how much iterations do you have? What is the best set of names for iterations which will also be simple enough to explain to the customer.
EDIT: lets say that my iterations are 5 weeks long each.
cheers
Perica
...
Was discussing over lunch why several ports of languages to the .net framework are prefixed with 'Iron'.
e.g.
IronPython
IronRuby
IronLisp
IronScheme
IronPHP
Anyone out there know?
(language list sourced from http://www.dotnetpowered.com/languages.aspx)
...
Which nouns do you find yourself putting regularly at the end of your classes?
For example, I have a habit of sticking Info onto classes that pass information around but don't do a great deal:
ImportInfo
SiteInfo
Or for Coordinating classes:
UserManager
SecurityManager
I end up using Builder quite often for string related classe...
Possible Duplicate:
count vs length vs size in a collection
Am I overlooking a semantic difference between "Length" and "Count", or did perhaps some implementation detail in the .NET Framework require different names for these similar concepts? Given the close attention that was paid to naming and everything else in the framewor...
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?
...
What is quote ' used for? I have read about curried functions and read two ways of defining the add function - curried and uncurried. The curried version...
myadd' :: Int -> Int -> Int
myadd' x y = x + y
...but it works equally well without the quote. So what is the point of the '?
...
I have seen many different naming schemes and extensions used for PHP files that are basically just classes. Some examples:
myClass.php
myClass.class.php
myClass.class
What is the difference, and which is better?
...
Since C++ lacks the interface feature of Java/C#, what is the preferred way to simulate interfaces in C++ classes? My guess would be multiple inheritance of abstract classes.
What are the implications in terms of memory overhead/performance?
Are there any naming conventions for such simulated interfaces, such as SerializableInterface?
...
This question is a little silly, but sometimes it's tough to figure out how to name things correctly. The conversion will parse a config file into XML and vice versa. I want to call the program MyCompany.Config2Xml, but the program also needs to be able to "Xml2Config".
...
I need a good variable name for a boolean value that returns false when an object is the last in a list.
The only decent name I can come up with is 'inFront', but I don't think that is descriptive enough.
Another choose would be 'isNotLast'. This is not good practice though (Code Complete, page 269, Use positive boolean variable nam...
A lot of C++ code uses syntactical conventions for marking up member variables. Common examples include
m_*memberName* for public members (where public members are used at all)
_*memberName* for private members or all members
Others try to enforce using this->member whenever a member variable is used.
In my experience, most larger c...
What are the most common naming conventions in C# for classes, namespaces and methods? Is it common to have getter/setter style methods as in Java?
...