Background
In a C# command-line app I'm writing, several of the parameters have "yes" and "no" as the possible values.
I am storing their input using the Enum type shown below.
enum YesNo
{
Yes,
No
}
Which is fine - the code works. No problem there.
NOTE: Yes, I could store these as bool (that's how it used to work). My ...
Is there any tricky way to use Java reserved words as variable or method names?
...
I have a "thin" (SOAP) API that only knows how to set and get entities in the underlying system.
I am about to to create a "rich" API that encapsulates the "thin" API and implements the logic that is required for complex operations that entail getting and setting several entities in specific order.
Example: The rich API will be respons...
why are we using
for (int i = 0 ; i < count ; i++){ }
why the i
why not
for (int a = 0; a < count; a++){ }
I do it, you do it, everyone does it but WHY?
*edit
I found out an old saying about FORTRAN which is more funny than correct which says "god is real, everything else above is an integer".
"god" would be a variable name s...
I am working on a project that is slowly getting larger and larger and the number of active threads used by many different processes is increasing. Lately, I have been taking a closer look at the running threads in the debugger and I have noticed that a lot of my third party libraries have given very poor names to their threads - Timer-0...
When building an application, is there any meaningful difference between the idea of "Find" vs "Search" ? Do you think of them more or less as synonymous?
I'm asking in terms of labeling for application UI as well as API design.
...
What do you call a form with two list boxes and buttons to move the list box items from one to the other? I've always called it a "switch list".
...
What do you call an Average that does not include outliers?
for example if you have a set:
{90,89,92,91,5} avg = 73.4
but excluding the outlier (5) we have
{90,89,92,91(,5)} avg = 90.5
How do you describe this average in statistics?
...
Say I have this table:
Person table
--------------
PersonId
Address table
------------
AddressId
PersonAddressId
where PersonAddressId is PersonId and the foreign key. Is there any type of database violation in renaming the foreign key? It can become very confusing to work with when they have different names.
...
I am using a Generic Class as a Response Data Contract. All is good and this is streamlining the design of my WCF service significantly.
Each request is given a standard response object with the following signature:
Status (Enum)
Message (String)
Result (T)
Below is the Response Class:
[DataContract]
public class Response<T>
...
I am designing a new product for my team to develop at my corporate job. I feel the project will pave a new direction for my team. I am creating a presentation to sell the idea; however, I am having trouble naming the solution. Have you ever named a product before? What attributes helped you name your idea? Is a catchy acronym important?...
I'm having some problems to come up with a sane type naming scheme for our new line of applications. I want to follow the .NET Framework Developer's Guide - Design Guidelines for Developing Class Libraries, but I'm starting to wonder if that's such a good idea.
I'd like to use the Company.Product.Feature namespace scheme as a basis.
Pr...
Yet another argument with a friend of mine. Consider this code:
class User < ActiveRecord::Base
has_many :groups
def in_group?(group)
groups.include?(group)
end
end
class Group < ActiveRecord::Base
has_many :members
def add_user(user)
members << user
end
end
My opinion is that these methods add extra unnecessar...
At work we're having issues with different people wanting/suggesting different names for a new project. It's changed 4 times in the last 2 days.
What processes do people go through when naming internal projects? How do you work as a team to come to a conclusion for a project name?
To make this a little clearer, the question is HOW do y...
Which is your preference?
Let's say we have a generic Product table that has an ID, a name, and a foreign key reference to a category. Would you prefer to name your table like:
CREATE TABLE Products
(
ProductID int NOT NULL IDENTITY(1,1) PRIMARY KEY,
CategoryID int NOT NULL FOREIGN KEY REFERENCES Categories(CategoryID),
Pr...
I'm trying to encapsulate some functions from the C socket library into my own C++ class. I'd like to define a member function that uses the same name as its corresponding C function, but with a different signature. For example, I'd like to write the function
ssize_t MyClass::write(const void *buf);
which makes a call to
ssize_t wr...
We are starting out a new project where I work and one of the things being talked about is the name of the product. The rest of the company seem to place great importance on the domain name being available eg. [product].com. I am saying that it does not matter as [product].[companydomain] or [companydomain]/[product] are just as good and...
Hey Stack overflow
what's better? nNodes or nodeCount
...
At our office, we are having heated discussions regarding naming some arguments in our public API.
Everywhere we are providing getters to lists of some kind, we want to be able to limit results (for pagination).
Ie: getPosts/getNews/getUsers/.../ should be able to return items 0 to 25, 50 to 100 etc.
So, we need two parameters. First ...
I need a method helping me, to reach variables named like "comboBox1", "comboBox2" etc each by each in a loop. I'd like to change code like:
//proceed comboBox1
//proceed comboBox2
//proceed comboBox3
//proceed comboBox4
//proceed comboBox5
//proceed comboBox6
Into:
for (int i = 1; i < numberOfBoxes; i++) {
//proceed comboBox(i)
...