naming

How do you call a string that matches /^\w+$/?

Strings that match /^\w+$/ are quite common. For example many authentication systems use that pattern to validate usernames. I'm wondering if a term exists that identifies this kind of strings. I've been thinking of the term "alphanumeric" but is a string alphanumeric if it contains an underscore? ...

Is it acceptable to have types with the same name, in different namespaces?

I see 7 types all called Error within the same codebase. Is this acceptable? My instinct says that having types with the same name in different domain contexts is OK, but it makes ambiguities increasingly likely when dealing with the "mother solution". ...

Is this still an adapter pattern?

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...

What is c++ equivalent of JNDI?

Is there anything equivalent to JNDI in C++? I am not just looking ldap related libraries. I am interested to know the equivalent API's/Libraries available in C++. Common API for look-up, where implementation can handle against DNS, LDAP, Registry, FileSystem, DB. ...

Naming of `pure` function in Control.Applicative

Why is the function for lifting a value into a functor named pure in Control.Applicative? ...

Naming throw-away identifiers of global scope

Sometimes, when using macros to generate code, it is necessary to create identifiers that have global scope but which aren't really useful for anything outside the immediate context where they are created. For example, suppose it's necessary to compile-time-allocate an array or other indexed resource into chunks of various sizes. /* P...

Do you see any way to shorten this class name?

I have a class called PriceStep. I keep a list of PriceStep objects in a class called PriceStepSearchSpace. Now I am required to have different PriceStepSearchSpace objects for different products and I need to keep them in some sort of a dictionary. I called this new class PriceStepSearchSpaceRepository. Can you think of a simpler/short...

Is it a common practice to re-use the same buffer name for various things in C?

For example, suppose I have a buffer called char journal_name[25] which I use to store the journal name. Now suppose a few lines later in the code I want to store someone's name into a buffer. Should I go char person_name[25] or just reuse the journal_name[25]? The trouble is that everyone who reads the code (and me too after a few week...

Naming website strings

There are 2 types of strings in any website: Shorter with no formatting (menu items, section titles, labels...). Longer with formatting (content). If you have to store these 2 types of strings in 2 different database tables, how would you call these 2 tables? ...

What are Best Practices for Maven Modules Naming?

Assuming that we have a project named project and modules module1 and module2, earlier I tend to use the following naming strategy: -- project -- projectModule1 -- projectModule2 Now I use another: -- project -- project-module1 -- project-module2 What are best practices for Maven modules naming? ...

How to set ReSharper variable naming rules so that it allows underscores?

Hi, Whenever I use a variable name that stands for a primary key as int pk_MyObject = GetPrimaryKey(myObject) ReSharper complains about the pk_MyObject and offers me to rename it pkMyObject. How can I add a new rule to ReSharper so that it does not complain about variable names such as xx_YYYYY ? ...

name an array with a variable (PHP)

I have a script i am writing. it parses through a list of scanned (barcoded) items and pulls data about the items. It also needs to count how many times each item was scanned. The part number is called $partselect. Ideally, I would like to store them in an array called $count with the format of $count[$part] = (number of times it's been ...

Help me name my class

Okay, first, here's my rather poor diagram... It's worth noting the "Name Me" class may be listening to more than one RequestNotifier It's safe to assume all Work Items that are put on the Work Queue are taken off the work queue by something else not shown and are processed exactly the same. The only difference between the work items...

What is the client representation of server objects called?

I've got an object that is running on the server: class Foo { List<string> whatever; } This object is mirrored on clients using some transportation method: class ClientFoo { List<string> whatever; // synced to server } How is such a client library usually called? I thought about ClientEndpoint, ClientLibrary, LocalObjects, ...

Good readable testnames in c#

I read in FsUnit that the following are valid method/classnames in F#: [<TestFixture>] type ``Given a LightBulb that has had its state set to true`` ()= let lightBulb = new LightBulb(true) [<Test>] member test. ``when I ask whether it is On it answers true.`` ()= lightBulb.On |> should be True Is there a way to have...

The list of common GUI elements.

I need a glossary with graphical examples of elements accompanied by their (I hope) standardized names. Is there some centralized resource or every framework/platform out there has it's own naming conventions? ...

How to access the NUnit test name programmatically?

Is there some global state somewhere that I can access the currently-running test name? I have tests which output files into a directory and read them back in. I'd like each test to create a directory to play in and then clean up after itself, and I don't want to push that name in (I'd have to make it unique, and then make sure each tes...

Is naming variables after their type a bad practice?

I'm programming C++ using the underscore naming style (as opposed to camel case) which is also used by the STL and boost. However, since both types and variables/functions are named all lower case, a member variable declaration as follows will lead to compiler errors (or at least trouble): position position; A member variable named po...

How widespread are Actionscript3 naming conventions?

In 90% of the example projects I see for ActionScript / Flex I notice the following two coding conventions: 1) private member variables with getters/setters start with an underscore as in "_credentials" and 2) interfaces start with the letter "I" as in "ISessionInfo" Coming from the Java world, I find both of these conventions unnec...

doesPythonLikeCamels

Are Java style camelCase names good practice in Python. I know Capilized names should be reserved by convention for Class names. Methods should be small letters according to good style, or actually I am not so sure. Is there PEP about naming? COMMENTS: Sorry for camels :) , I learned from answer PEP8, that my title is actually properly...