We're all familiar with naming conventions in R (if not: Venables & Smith - Introduction to R, Chapter 1.8). Regular expressions, on the other hand, remain terra incognita and the most hated part in my programming life so far ... Recently, I've officially started JavaScript recapitulation, and I'm trying to create precise RegExp to check...
I have a property "EntityID" in a class. Resharper (5.1) says
Name 'EntityID' does not match rule
'Methods, properties and events'.
Suggested name is 'EntityId'.
But IMHO according to the naming conventions in the Design Guidelines for Class Library Developers. 'EntityID' should be perfectly fine:
Do not use acronyms th...
Hi all,
Just as there is a naming convention for the Observer pattern (or rather, a naming convention for events in languages such as C#) using Event/Handler passing EventArgs and such, are there naming conventions that you use to easily highlight other patterns in your code?
edit: I originally wanted to ask about the Strategy pattern,...
I guess that most factory like methods start with create. But why are they called "create"? Why not "make", "produce", "build", "generate" or something else? Is it only a matter of taste? A convention? Or is there a special meaning in "create"?
createURI(...)
makeURI(...)
produceURI(...)
buildURI(...)
generateURI(...)
Which one would...
What are the naming conventions you use for application domain model classes and presentation layer classes? Postfixes/Prefixes to distinguish the aim of the class from the first sight:
For example information about the person that is returned from DAL can be
public class PersonEntity
{
public Guid Id { get; set; }
public SexType...
I have this weird problem as to how to name objects of a class.
For example, consider the class:
>>> class DoSomething:
pass
What should I call the object of this class? do_something or what? Since I came out of the learning stage, I used to use x, y or z or whatever came to my mind. But now since I am learning to write prop...
Hi,
What is the thinking behind objects named x-context (e.g. SPContext in Sharepoint, HttpContext in ASP.NET)? I would assume these objects just have methods and properties to cover everything regarding the current request (as per the two examples above), or in the case of an OrderContext object, contains details about the order relati...
I have implemented a notification bar at the top of my web page. When the user performs an insert,edit,delete. My messages are
Successfully inserted // insert or create
Successfully updated // update or edit
Successfully deleted // delete
Is this ok. Or any other suggestion from user point of view
...
How would you name a package who's sole purpose was to extend another module so you could apply roles to it? I need a package that extends (sub classes) Template::Context with Moose So I can then create roles and traits to apply to it, but I don't know what to name this package (class). Any advice?
...
Hi,
I stumbled upon this class and was wondering if XYZAdapter might be the correct name. I know how the adapter pattern works, but this solution is a bit different: Instead of implementing the DataTable interface and mapping the appropriate method calls, im creating a new DataTable object by copying the values and expose this object. T...
I quite often see the following naming convention used in java code.
class SomeClass {
private final String name;
public SomeClass(final String name) {
this.name = name;
}
}
This seems a little odd to me. First off if you happen to misspell the variable in the method signature it will still compile...
class SomeC...
This situation probably is not entirely uncommon to some of you: you have some functionality to put in a class but the perfect name (*) for that class is taken by one of the classes in the System namespace or other namespace/class that's not yours but you're using/importing.
(*) By perfect I mean small, concise and clear names.
For ins...
Hello,
I am trying to configure a jdbcRealm in GlassFishV3 using existing tables that have a naming convention other than "users" and "groups"; the realm does not appear to work unless the tables are named this way. My question is, why the limitation? Is there a work around other than renaming my existing tables?
Thanks,
RG
...
as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff?
...
The following class shows something similar to a real use case. It returns always the same instance for the same thread.
public class LookingForName {
private static final ThreadLocal<Something> threadLocal =
new ThreadLocal<Something>(){
@Override
protected Something initialValue() {
...
Hi All,
I'm using the Code Contracts classes in the System.Diagnostics.Contracts namespace to define some contracts for my objects and I'm wondering how others name their contract classes when the contract is defined against a base interface. Let me illustrate with a small example:
[ContractClass(typeof(AnimalContract))]
public interfa...
Hello, this question is about best practices. I'm implementing a 3D interval Kd-Tree and, because of the recursive structure of the tree I would be tempted to create a unique class, KdTree to represent the tree itself, the nodes and the leaves.
However: elements are contained only at leaves, some general tree parameters (such as the ma...
How should columns in a database table that have a PK/FK relationship be named? Should their names contain a reference to the table they are in? Consider the examples below. Each employee has an ID which is a FK in the salaries table.
/* Employees Option 1*/
CREATE TABLE dbo.Employees
(
EmployeeID INT PRIMARY KEY,
EmployeeFir...
Say I have 5 UIImageViews, named
image1
image2
image3
image4
and image5.
And I have 5 buttons, which have their tag values set to the corresponding images that overlay them, so 1 - 5.
If button 1 is pressed, I get the tag value like so
NSNumber buttonNumber = [sender tag];
I then want to perform some methods on the corresponding...
Hello Stackoverflow,
I am quite a new Zend Framework user but I am not new to PHP or Programming. I have been going through the code to try and get to grips with how everything slots together. One of the parts I have been looking at is how classes are Autoloaded in the system. I can see that:
Zend_Application_Bootstrap references Zend...