The tag has no wiki summary.

learn more… | top users | synonyms

-3
votes
0answers
27 views

What should I call the toolset for testing? [on hold]

According to wikipedia: .. test suite, less commonly known as a validation suite, is a collection of test cases .. At work however I see people use the term test-suite when they mean the ...
4
votes
5answers
429 views

Is it okay to go against all-caps naming for enums to make their String representation simpler?

Several times I've seen people use title-case or even all lower-case naming for enum constants, for example: enum Color { red, yellow, green; } This makes working with their string form ...
4
votes
4answers
752 views

Should I edit a codebase's whitespace to conform to a coding style? [duplicate]

We have a large Java project (1m+ SLOC) with mixed whitespace - some files have tabs and some have spaces. It's tricky to make my editor work with whichever file I happen to be editing. We are ...
5
votes
2answers
115 views

What is the correct project file structure for a versioned rest api?

Should I have resource directories inside version directory, like app/ v1/ book/ author/ v2/ author/ or version directories inside resource folder app/ book/ v1/ author/ ...
5
votes
3answers
196 views

Is it conventional to name final/constant local variables in UPPER_SNAKE_CASE?

Pretty simple, I have a method: public final void myMethod(User user, Group group) { final int MAX_USERS_PER_GROUP = group.getMaxUsersPerGroup(); int usersInGroup = 0; // Get users in ...
0
votes
0answers
42 views

Internal class variables convention

When I see some open source projects, specifically classes, I see that its variables starts with a 'm' minuscule. What does it mean? What means the 'm'?
1
vote
3answers
151 views

Are project naming conventions more important than language naming conventions? [closed]

I'm working on a project with a senior developer and he doesn't really abide by the naming conventions of the language that we're using. The project is in Go and he uses underscores for everything. ...
1
vote
0answers
52 views

Code structure with MongoDB in python

I am new to MongoDB and python. I know how to make basic use of pymongo in order to manipulate documents. I am having trouble finding how to create some structure or governance in what gets inside ...
0
votes
2answers
118 views

Origin of naming generic types as T? [closed]

I've noticed that most people use the name T for generic types, instead of any other names. What's the origin of this convention? And.. why T (for type)? why not TYPE or Variable or any other name? ...
0
votes
2answers
63 views

Github convention for putting projects on hold

I have a few github projects on the go at the same time. I am only actively working on one at any one time which can take months. My other projects remain in a semi-completed state. Is there a ...
5
votes
2answers
205 views

How to organize predefined queries with Entity Framework?

I have some queries that I use all the time (like get rows only of some specific type, or count something etc.). I'd like to organize them somehow (better then I currently do). Currently I have them ...
2
votes
2answers
145 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 ...
5
votes
1answer
292 views

Should the expected value be hard-coded into the Assert

My own personal preference would be to use a variable, but maybe there are reasons against this? I haven't been able to find any resources that state the pros or cons of using one of these over the ...
0
votes
3answers
250 views

Convention for logging within nested try catch blocks

I've looked at this question but it doesn't really help solve my dilemma. System 1 calls system 2 within a try catch, the method in system 2 has it's own try catch, which sadly handles an exception ...
3
votes
2answers
196 views

Any reasons why SQL-92 changed *, ? into %, _?

Do you know any reasons why SQL-92 standard has changed glob pattern wildcard characters from * and ? (SQL-89) to % and _? Currently I need to do mask conversions to allow users searching data with * ...
0
votes
1answer
35 views

Where should I put (wrapper) scripts in my source tree?

I have this software package which installs itself to /usr/local/mypackge, with a bunch of subdirs. In bin/ I have linked code, as ELF executables, in /share/doc I have documents, etc. Now suppose ...
-1
votes
1answer
99 views

A convention for naming an executable that runs without a UI [closed]

I often build executables that are designed to run without a window, just like many of the executables you see in task manager. Some of them are services, others are daemons (e.g. the print spooler), ...
0
votes
2answers
49 views

Capitalizing custom methods in a SDK based project [closed]

In projects which need heavy SDK usage, like Android and iOS development, I want the methods/functions I write to be obvious and since the whole framework is written with lower case method names I ...
21
votes
8answers
3k views

Is there a conventional way to combine file path strings?

In an example: var assets = "images/" var sounds = assets+"sounds/" Is it more conventional to put the slash on the back of a file path? var assets = "/images" var sounds = assets+"/sounds" Is ...
-1
votes
2answers
507 views

Initialize in Field, Constructor, or Argument

If I know what a field will be initialized to, should I initialize it in the field, constructor, or receive it as a parameter? I am asking about best practices. All three options effectively provide ...
-4
votes
1answer
69 views

Is it called index or position for a location of an item? [closed]

Now this is a very broad question, but is it called index or position for a location of an item? Index could be argued it should always be zero-based, while position may be "one-based". If one looks ...
1
vote
1answer
70 views

Where to perform datatype.ParseString (MVC)

Using the MVC pattern, asume a simple situation where you want to send a number (for example the number of pages in a book) with a controller to a setter. Now, the set method looks like this public ...
11
votes
1answer
474 views

Naming convention for iOS/OSX open-source projects

Not always but most of the time, you will find iOS or Mac OS X open-source projects with names starting with the initial letters of the author first and last names. If a project were to be authored by ...
0
votes
1answer
59 views

How to format Android view IDs

I struggle with this every time I work on a project. I am not entirely sure what the standard conventions are for creating view ids. I usually use something like view_more_button but then if we ...
3
votes
4answers
407 views

Why is the use of conjunctions in method names a bad naming convention? [closed]

In my team, we work closely with a few software architects. They approve all design decisions of our projects, do some code reviews etc. Our projects consist mainly of backend functionality ...
0
votes
1answer
166 views

Should I continue stressing development standards? [closed]

I've been with my software team for about three years now, and just recently I brought up the concept of variable naming conventions (across all languages, but C#/VB.Net specifically). We really ...
4
votes
2answers
142 views

Strategy to use two different measurement systems in software

I have an application that needs to accept and output values in both US Custom Units and Metric system. Right now the conversion and input and output is a mess. You can only enter in US system, but ...
0
votes
1answer
163 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 ...
-1
votes
3answers
423 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: ...
1
vote
4answers
103 views

What's the proper way of dealing with a global file path?

I don't have compilable code, because the code in question depends on a large function that's irrelevant to the question, but say I have the following scenario: savePath = "C:\\..." changePath1, ...
2
votes
1answer
409 views

Why is mixing plural with singular and camel case with underscores in cake php naming convention better than a simpler convention? [closed]

I have been using cake php for over a year and generally I like it but I struggle to understand the advantages of the complex naming conventions over something simpler. Cake uses plural here and ...
2
votes
3answers
648 views

invoking methods within a conditional expression

In an oft-cited (if dated) reference for C# coding standards (pdf; from Lance Hunt), the statement is made, 33. Avoid invoking methods within a conditional expression. I've not seen this ...
0
votes
1answer
96 views

exception for string literal conventions

If I'm used to use ' for string literals in PHP, would it be better if I'll stick to it in any situation or can there be exceptions when it would increase readability? example: $foo = "bar'baz"; // ...
0
votes
1answer
71 views

How should templates be named? [closed]

In D I can create templates like this: template Foo(A) { A add(A a, A b) { ... } A multiply(A a, A b) { ... } A concatenate(A a, A b) { ... } } What should a template be named ideally? ...
3
votes
4answers
380 views

Lexing: One token per operator, or one universal operator token?

When lexing, what would be the best way to tokenize operators? Would one just create a BinaryOperator token, or a separate token for every single binary operator? Examples: PlusOperator, ...
2
votes
1answer
284 views

Naming test methods in Java [closed]

Over at codereview a comment hinted that using snake_case to name test methods is a good idea. This contradicted my views and I did some research and there seem to be a lot of examples that actually ...
2
votes
1answer
163 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 ...
0
votes
1answer
415 views

How does package naming affects Android application once deployed

Are there conventions to follow when naming an application package for an Android application? I'm coding in Xamarin Studio, using .Net, so I feel far from this "com.myapp.etc" naming convention. Are ...
5
votes
3answers
882 views

Extension method naming convention [closed]

We are using some utility methods in our company to simplify programming. So we have following string extension: public static bool IsNoE(this string s) { return string.IsNullOrEmpty(s); } ...
2
votes
1answer
183 views

How far to go when standardizing code [duplicate]

My small team and I have created a decent sized web application (~50k lines), with a fully featured API, all in Perl. As us perl hackers know.. it is easy to get sloppy. We had to port over a lot of ...
-1
votes
1answer
410 views

Naming convention of getters and setters [closed]

Given a string variable variable, for example, the convention to expose it is: public class SomeClass { public String variable = ""; public String getVariable() {return variable;} public void ...
0
votes
1answer
186 views

What is ServletUtilities?

The answer in this question suggests creating a ServletUtilities class to handle text conversion between Java strings and XML text. Generally when you create a JEE web application you put ...
1
vote
2answers
181 views

Should I Aggregate Web API Errors?

The Situation We are writing a REST API that performs validation up-front. The code is written such that it tries to find as many errors as possible. However, each error might correspond to a ...
4
votes
4answers
336 views

Why is the following naming guideline different between OO and non-OO languages?

I am working with a non-OO language and I'm trying to name my routines consistently. I came acrross the following guideline from Steve McConnell's Code Complete: To name a procedure, use a strong ...
2
votes
4answers
1k views

DTOs matter on ASP.NET MVC JSON Action?

I recently came across an internal project where they were using DTOs throughout the solution, and when I sat down to implement a new MVC controller with a JSON REST endpoint I decided to use an ...
4
votes
4answers
665 views

Using a function's return value as an if condition, good practice?

Do you think it is a good practice to use function return values as if conditions? I'm coding in PHP atm but it holds for many other languages. if(isTheConditionMet($maybeSomeParams)) { } or $res ...
1
vote
3answers
299 views

“state” or “status”? When should a variable name contain the word “state”, and when should a variable name instead contain the word “status”? [closed]

Reading code and discussions pertaining to code, I often see the words "state" and "status" used interchangeably, but the following tendencies seem to exist: When a variable holds a value intended ...
1
vote
5answers
668 views

What is the advantage to using a factor of 1024 instead of 1000 for disk size units?

When considering the disk space of a storage medium, normally the computer or operating system will represent it in terms of powers of 1024 - a kilobyte is 1,024 bytes, a megabyte is 1,048,576 bytes, ...
1
vote
3answers
173 views

Coding convention question about AS3 duplicate variable definition

AS3's got some awkward rules about variable scope, due to its use of hoisting. I don't like pointlessly leaving a bunch of compiler warnings lying around, but it's more important to me for my code to ...
6
votes
2answers
1k views

Java convention for if/else if order

I have an if/else if structure that on some cases does nothing. From the code I have seen in my career, the "empty" case is normally left out. But when I wrote my code, it just doesn't feel right to ...