Give meaning and explanation with the fewest number of characters in a form that is most accepted by your team or community at large.

learn more… | top users | synonyms

-1
votes
1answer
57 views

Term to describe pre-canned objects for use in testing

There's a common term to describe a collection of pre-created objects that can be used in testing. It's on the tip of my tongue but I can't think of it, nor does google help. e.g. If I'm testing a ...
0
votes
0answers
55 views

Correct name for expression tree merging

Suppose some n-ary tree, representing some expression: A and (B and (C or D)) or (B and (C or E)) A / \ B B / \ / \ C D C E And consider ...
0
votes
1answer
35 views

Name for an ancillary executable [on hold]

I'm a stickler for naming conventions and for their consistent use. I'm writing an application that consists of a windows service that is in charge of maintaining x number of running instances of ...
-2
votes
2answers
100 views

What is a good name for a class that interacts with a command line tool? [on hold]

I'm writing a program in Java that includes a component that will interact with command line tool. In particular, I want to automatically process some data from an open-source GitHub project, so one ...
0
votes
1answer
39 views

How to design method that returns a compact representation of sourcecode

Let's say we have a class that stores some textlike content like sourcecode as a string. We want the class to be able to not only show the sourcecode itself but also a more compact representation. My ...
0
votes
1answer
136 views

What do you call classes that do arbitrary work in your project? [closed]

I work on a lot of projects with different teams. Every project has its own conventions, including what to call arbitrary classes that don't lend themselves to obvious names. As a counter-example, ...
0
votes
1answer
73 views

Does a create() method exist as part of a pattern? [closed]

Is there something special(i.e. a design pattern being related) to a method named create()? Background The case is, I often make some instances of objects (of the same class/prototype). These ...
0
votes
0answers
40 views

type name for state machine state (as opposed to other state variables)

I need to create a typedef for a state machine state, e.g. enum ToasterStateMachineState { TSM_READY, TSM_TOASTING, TSM_DONE }; But ToasterStateMachineState seems verbose and redundant; is ...
0
votes
1answer
70 views

Inverse property naming (ORM scenario) [closed]

I have a class that represents a process. In this process there are inputs boxes and output boxes. public class Process { public long ProcessId { get; set; } public virtual List<Box> ...
2
votes
4answers
200 views

Is naming a class based on its implementation acceptable?

Is naming a class according to its implementation an acceptable practice? e.g. SortedSet if the class is maintains a sorted list of unique items or TreeSet if it using a binary search tree structure ...
14
votes
10answers
2k views

Why do we use non-descriptive internal codenames? [closed]

I think using codenames are quite widespread. Our company is using them too. But my main concern is these names are usually not documented anywhere. And the meaning is spread by the word of mouth. ...
1
vote
3answers
135 views

negative boolean expressions and eager boolean OR

I come across these kinds of expressions and I have hard time reading it. How do you read it properly to see if it is the right logic when debugging. if (!(userLoggedIn || isAdmin)) { ...
0
votes
2answers
75 views

Should I put the name of the method I'm testing in the Unit Test method's name/assert message?

Given that a method's name might change in time, is it a good idea to specify the name of the method whose return value I am asserting as a part of the Unit Test method's name? What about the message ...
1
vote
2answers
375 views

Naming conventions DAL, BAL, and UI Layer [closed]

I am developing a typical Web Application with the following layers UI Layer (MVC) Business Logic Layer (BAL) Data Access Layer (DAL) Each layer has its own DTO object including the BAL and DAL. ...
1
vote
1answer
110 views

What are classes that produce a result, but are necessarily classes because of the complexity of the task?

What generic name is given to classes that encapsulate a collection of esoteric functions which together perform some larger cohesive but entirely self-contained task useful to the wider application, ...
1
vote
4answers
225 views

Design pattern name for an API wrapper class

I am writing a class that wraps (the parts of) an external API I am using. Let's take the Github API as an example. My imaginary Github class now has a fetchUser() and fetchRepository() method. When ...
0
votes
3answers
175 views

Is there a programming pattern, design pattern, or naming convention for moving data between related schemas? [closed]

I'm working on a web application that is publicly accessible. (Really) Long story short, we have two sets of tables in the database with relatively the same names and relatively the same data. The ...
0
votes
1answer
33 views

Naming schema for config files that generated and not for human editing?

Some configuration files have warning: automatically generated, don't edit! I have one that hold build number and VCS tag (Java .properties file). What name pick for such file? Currently I stuck to ...
-1
votes
1answer
65 views

Naming a recursive association entity [closed]

For my current project, I need to create a database table to store a recursive association. I've done a lot of searching and have read answers on questions, such as Naming convention for associative ...
-3
votes
2answers
104 views

How to name a clamp function that only clamps from one side? [closed]

Clamp() is a function that ensures that provided variable is in provided range. You can find such function in .NET, in Unity, and probably anywhere. While it is useful, I often need to clamp my value ...
0
votes
1answer
156 views

Should I limit my type name suffix vocabulary when using OOP?

My co-workers tend to think that it is better to limit non-domain type suffixes to a small fixed set of OOP-pattern inspired words, e.g.: *Service *Repository *Factory *Manager *Provider I believe ...
2
votes
1answer
286 views

Naming: StartDate or StartDateTime when working with DateTimes [closed]

I am using a lot of DateTimes in my application. Now I usually name it like StartDateTime, EndDateTime, etc, to imply there is also a time involved. I am getting a bit tired of this (it is tiresome ...
0
votes
1answer
421 views

Naming convention: Final fields (not static)

Today I had a discussion with a co-worker about the naming of final fields in Java classes. In his opionion final fields should also be considered constants since their values won't change after the ...
0
votes
3answers
264 views

Does the pattern of passing in one object instead of many parameters to a constructor have a name?

If you have a constructor that takes a lot of parameters, like this: public OrgUnitsHalRepresentation(List<OrgUnitSummaryHalRepresentation> orgUnitSummaryHalRepresentationList, int count, ...
7
votes
4answers
478 views

“Immutable” interfaces

I am confused about the notion of immutability. Consider the following structure of a simplistic calculator: Here are the interfaces: interface IOperationalInterface { int Sum(int a, int b); } ...
2
votes
2answers
196 views

Multiple classes with the same name, but different namespaces?

I've run into some code (C# if it matters) that has classes which have the same name, but differ in their namespaces. They all tend to represent the same logical thing, but often are different "views" ...
3
votes
1answer
469 views

Why are there so many CSS properties which are essentially the same?

This answer really made me wonder. I've written CSS before and (usually) I don't really bother to support browsers other than recent firefox and chrome, but in researching I've noticed that, for the ...
1
vote
1answer
101 views

Several enum classes that declare constants with the same names

I'm working on a Java library for sorts for Magic: the Gathering. Well, without going into a lot of detail, in the game there are five different colors of magic: white, blue, black, red, and green. ...
12
votes
5answers
2k views

Is it a bad practice to give two very different files with the same general purpose the same name?

Is it a bad practice to give two very different files with the same general purpose the same name, separating them into different directories? <script ...
-1
votes
3answers
175 views

What are the bytes between the MSB and LSB named? [closed]

I've searched around and can't find anything on what the middle bytes of a >16-bit integer are called, if anything. Are there standard names for these bytes? E.g. the number 0x0D0C0B0A would have: ...
0
votes
2answers
145 views

function naming: plural form of “if not exists” [closed]

This is a question about function naming. I am writing some code that updates the structure of a database according to a specification. Somewhere in this code I have something like this: void ...
0
votes
2answers
92 views

Should I use check or checked? [closed]

I'm designing a library that binds to html elements on a page. In this particular case the input[type='checkbox'] will be checked if the likeItem property returns true and unchecked if the likeItem ...
2
votes
2answers
336 views

Project based prefix for class names

My project leader uses project based prefixes for class names, lets say projects name ABC, he create User class name as ABCUser. and he says he do this becasuse if he wants to make User.aspx Users get ...
3
votes
3answers
99 views

Is it bad to use the same class or idiom names as in a third-party API that you're using?

FlashPunk is a third-party graphics API for simple game development in AS3, and they take what are effectively sprites or display objects of some sort and refer to them as "Entities". Entity is the ...
4
votes
4answers
308 views

Naming boolean variables: negated or not

A few years ago, I was in a software engineering class and the teacher explained how messages, options, variables, etc. should not be negated to avoid confusion. He gave the example (something like): ...
30
votes
9answers
3k views

How to name a method that both performs a task and returns a boolean as a status?

If there is a method bool DoStuff() { try { // doing stuff... return true; } catch (SomeSpecificException ex) { return false; } } should it rather be called ...
1
vote
1answer
309 views

Naming in Security Protocols: Alice, Bob and Eve

Among computer scientists and programmers, there's the common habit of naming people in the context of security protocols e.g. Alice, Bob or Eve. Descriptions of more elaborate attack vector sometimes ...
20
votes
2answers
2k views

Should one always know what an API is doing just by looking at the code?

Recently I have been developing my own API and with that invested interest in API design I have been keenly interested how I can improve my API design. One aspect that has come up a couple times is ...
0
votes
2answers
168 views

c# naming - What are common conventions for a suffix to distinguish between read-only and writable interfaces [closed]

Assume an interface that allows queries on a spatial tree public ISpatialTree { int FindChildIndex(Vector point); bool IsLeaf { get; } ICollection<ISpatialTree> Children { get; } } ...
1
vote
1answer
118 views

Use Generic of Specific Function names for similar objects

Is there a school of thought on putting focus on using generic names for functions, opposed to naming functions based on the things they do? Example Say we have a Bill / Price Sheet object, that has ...
4
votes
2answers
256 views

Should duck typing affect naming conventions?

I'm a C++/C# developer and recently I've started to learn Python. I think I understand the concept of duck typing right now except for one thing. When I'm coding in C++ or C# I sometimes create ...
1
vote
1answer
137 views

How to name filename parameter to make clear it should contain full path? [closed]

I'm seeking vital naming of string filename parameter in parameter list used in various methods where filename with full path is expected. In many cases also UNC path can be actually supplied as full ...
-1
votes
2answers
58 views

Naming convention for classes that represents different versions of the same thing [closed]

Let's imagine I have an abstract class named ProtocolA that represents the basic operations to work with the protocol A. Such protocol is in version 1, but new revisions are expected in the future. ...
-2
votes
3answers
68 views

Method naming advice required [closed]

My question will be about how do you think it would be fit to name some methods in a fluent interface. Let me try to demonstrate the problem. Consider this relation tree: A person can have dogs ...
0
votes
1answer
153 views

JSON - Ruby objects key naming

Ruby object has method/property: def tentakles_count 8 end JavaScript object has key/property: { justEnough: true } Now, when JavaScript gets serialised ruby object via XHR or WebSocket, ...
1
vote
4answers
140 views

What's in a name? Revision vs Timestamp [closed]

Apparently naming things is one of the hardest things in programming..! I have a synchronisation implementation which uses timestamps (number of seconds since unix epoch) to sync. Currently, the ...
2
votes
3answers
198 views

Using past participle for non-altering functions [closed]

I often have naming problems when I write classes and functions. Generally speaking, I try to follow the following set of rules if I have to deal with a function whose name is a verb: If the ...
-1
votes
3answers
375 views

Should I always use “is” as prefix for boolean variables? [closed]

Should I always use is as prefix for boolean variables? What about booleans that indicate something in past? Should I write isInitialized or wasInitialized? Should I write for properties IsManyMembers ...
6
votes
5answers
367 views

Using π, φ, λ etc. as variable names while programming? [duplicate]

This is a function in the d3.v3.js file (the graph library D3.js): function d3_geo_areaRingStart() { var λ00, φ00, λ0, cosφ0, sinφ0; d3_geo_area.point = function(λ, φ) { ...
0
votes
2answers
115 views

Naming convention for List in xsd schema

What is the best way to name a List in XSD schema? <xs:element name="CurrentEmployee" type="Employee" minOccurs="0" maxOccurs="unbounded" /> Currently I have a list of Current Employees as ...