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
0answers
12 views

Naming convention for class for combining function parameters

we sometimes have functions with more than 3 parameters. As we've read that is good practice, we then combine these parameters in a class. But then we wonder what name to use. It is not a business ...
-7
votes
3answers
110 views

Why different languages have different syntax? [duplicate]

Different programming language always/most of the time use different syntax. For example take PHP, Java and Python. In Php & Java semicolons are compulsory at the end of the line, yet Python ...
-1
votes
0answers
18 views

Naming: how to call a list of specific styles [on hold]

I have a list of projects I work on. Next I have a compiler that can compile in a few ways, let's say A, B, A and B and C (e.g. compiler arguments that should be used). There has to be a map that ...
0
votes
0answers
43 views

Naming a class: Shadowing or Mirroring or something else?

The following class basically seeks to maintain a copy of the contents of a JMS Topic. The method onMessage() is called whenever a Messages arrived on a JMS Topic. public class TopicListener { ...
1
vote
2answers
89 views

Naming convention for getting the primitive backing a type?

I have a class that is backed by a double value, and I am wondering about accessor method names that preserve abstraction. Based on my experience in Java, there seems to be at least two precedents: ...
1
vote
2answers
57 views

Use of “this” in Golang

On the closest thing Golang has to a style guide found here, under Receiver Names this is written: The name of a method's receiver should be a reflection of its identity; often a one or two letter ...
-1
votes
1answer
66 views

How to name methods where one takes a single object as input and one takes multiple? [closed]

I have two methods in my class: public String widgetToHtml(Widget widget){...} and public String widgetsToHtml(List <Widget> widgets){ for(Widget widget : widgets){ ...
0
votes
1answer
25 views

Name pattern for quickly find descendents with SQL (PATH column with [TopId]…[DirectAncestorId].[OwnId]) NO nested sets

I read a long time ago about a pattern/technique for easily querying for all "descendants" of a record (no need to use CONNECT TO, which is not standard and not available with JPA). I remembered the ...
15
votes
4answers
464 views

Semantically more appropriate package name than `util` for the following things?

As a strawman consider the package java.util it is a dumping ground for various classes that in most cases do not share anything in common other than the person that put them there was lazy or ...
3
votes
4answers
1k views

What do you call an iterator that returns the current, previous and next siblings of each node of a list? [closed]

What do you call an iterator that given a list [a, b, c], returns an object of the form { prev, curr, next } for each iteration? e.g, (? === undefined) { prev: ?, curr: a, next: b } { prev: a, curr: ...
1
vote
1answer
89 views

Client/Server naming convention [closed]

I have a class that is a implements an API of a server component but get its input from another server, making it effectively both server and client. Assuming that the server interface is called ...
15
votes
7answers
1k views

What's the idea behind naming classes with “Info” suffix, for example: “SomeClass” and “SomeClassInfo”?

I'm working in a project which deals with physical devices, and I've been confused as how to properly name some classes in this project. Considering the actual devices (sensors and receivers) are one ...
1
vote
4answers
201 views

Is there a name for refactoring technique that turns hardcoded values into configurable parameters?

What is that technique called when you take values in the code that are hardcoded and make them variable, possibly constructing elaborate OO constructs to make that variable properly configurable? ...
1
vote
2answers
105 views

Should method names getX and setX only be used for fields and have no other effects? [duplicate]

Should I avoid using getX() and setX() as names for methods that aren't "traditional" getters or setters? (Let's define traditional as it only gets/sets the field and has no other effects.) I guess ...
1
vote
1answer
74 views

How to name complex DAL/repository methods? [closed]

I'm beginning working with repository pattern. When it comes to simple queries I don't have problems with names. GetById GetByDay UpdateById If a method retrieves data filtered by two values also ...
2
votes
1answer
91 views

Ambiguity of seemingly clear method names in APIs

(The question is language-agnostic, but to illustrate the point, I wrote the examples in C#.) Say I'm trying to model the behavior of "components" that communicate via "ports". I might model this ...
3
votes
2answers
90 views

How to deal with libraries that use different naming conventions?

I'm working on a personal project that uses a few different libraries, such as GLFW, glm and Bullet. How are different naming conventions usually dealt with in this context? Working with C++ I always ...
0
votes
1answer
67 views

Vector API, naming for element-wise multiply [closed]

I'm helping develop a 3D Vector class, which has common operations such as: v = v1.cross(v2) v = v1 * v2 - infix multiply for dot product. v = v1 + v2 - infix addition. v = v1.slerp(v2) - spherical ...
3
votes
0answers
67 views

Is there an industry standard term for a build which uses the production API, but is specifically for internal testing? [closed]

I'm working on clearing up our build processes of a PhoneGap app we're developing for iOS and Android, and I want to develop a concise naming scheme for our different build types. Here's what I'm ...
2
votes
2answers
131 views

Immutable vs Read-only vs Unmodifiable naming difference

So, I've looked at some similar questions asked here in regards to how these three should be used in naming. Usually, the answer is something along the lines of "it's conventional" and "just be ...
1
vote
2answers
82 views

How to organize code which converts from one type to another

If I have a DateRange class, and I want to translate a DateRange into SQL (e.g. some_col >= '2015-3-5' AND some_col <= '2015-3-5'), where should I put the method that does the translating? ...
0
votes
2answers
125 views

What naming convention should you use for data objects solely meant for parameters

This is my pseudocode for DAL: CusOrderDTO GetCustomerOrder(DateTime OrderDate, string customerCode) CusOrderDTO orderSet = new CusOrderDTO() * query data from database, populate CusOrderDTO ...
1
vote
1answer
113 views

How to name a function that makes sure an element exists and returns it?

function getOrInsertEmptyElemById(id){ var elem = $(id) || document.body.insert('<div id="'+id+'"></div>'); return elem; } I find myself using functions like the above quite ...
0
votes
0answers
17 views

two types of backend user and admin panels

Backend consists of two parts: implementing website logic (user-facing-backend) implementing admin panel (administration-backend) Is there a name for these parts? I want to create a tickt asking to ...
2
votes
1answer
102 views

How to deal with server-side and client-side naming conventions that clash? [closed]

I have a project that uses the underscore naming convention for the MySQL database and PHP scripts but uses camelCase for the javascript application (a common scenario I'm sure). However, once JSON ...
0
votes
5answers
194 views

Is it bad form to use the same variable name in different scopes?

Say you have some basic code where similar operations will take place in nearby lexical scopes. Take for example some simple pseudo code: variable = "foo" # Do something with variable if (True) { ...
2
votes
3answers
148 views

8085 assembly question. Why flag stacks named d0-d7?

I'm trying to make my C programming exciting by learning assembly programming. I've encountered an image of flag registers in 8085 assembly programming. In that image blocks are named from ...
2
votes
2answers
162 views

Should naming conventions be consistent or not across multiple programming languages in one project? [duplicate]

I saw this question on SO: here; the question is kind of old and not many viewed, so I want to ask it again. I currently work on a project using C++, C# and Actionscript-3, the conventions of C++ and ...
0
votes
1answer
54 views

Naming Active-Low Outputs [closed]

I'm writing some software for an embedded system. I am trying to think of clear names for my single pin output functions. Normally, when I'm working with active-high outputs (ON = 1, OFF = 0), I am ...
4
votes
1answer
84 views

Should enumerated types by pluralized? [closed]

I'm trying to decide how to name my enums. First I tried plural: private enum Positions { LEFT, RIGHT, UP, DOWN } private Positions pos; // ... public void setPosition(Positions newPosition) { pos = ...
3
votes
2answers
79 views

How to use scala case classes when delegation is needed

Let's assume in our application we want to model cars. We also want to model a car repository where we store some registered cars. How should that be modeled in scala? Here comes my approach: First, ...
1
vote
0answers
41 views

Naming Question: How to call a class that uses many Adapters ?

I have an application with many Value Objects. In many cases I want a convert from an Entity to a Value Object. Usually I have an Adapter for each scenario for example LanguageEntity to Locale and ...
2
votes
3answers
297 views

Object creation: when should I expose a factory vs wrapping class?

I am having some problems trying to figure out when to use a factory or to wrapper class. This question is slightly geared towards C# I guess, so I'm not sure if this is the correct place to ask. Say ...
0
votes
1answer
122 views

Term to describe pre-canned objects for use in testing

I have forgotten the term for a class that provides pre-canned objects for use as test data. e.g. If I'm testing a payment module and I need credit card objects of different types, I might have a ...
0
votes
1answer
85 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
153 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
81 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 ...
1
vote
0answers
63 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
104 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
204 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
1answer
202 views

Human names in programming examples [duplicate]

In small programming examples, it is established that one will probably use foo, bar, and/or baz as variable/function names. Are there accepted human names one can use? For example, if a program is ...
1
vote
3answers
141 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
83 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 ...
3
votes
2answers
3k 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
111 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
466 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 ...
1
vote
3answers
232 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
35 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
104 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 ...