4,032 questions
0
votes
1
answer
51
views
Is it a good idea to nest custom exceptions? [closed]
I have a class that can throw a very rare exception that is very particular to that class.
I want to create a custom exception for it, but I ponder about the best location for this class.
The way I ...
2
votes
1
answer
64
views
Did the configuration of naming options get changed in newest revision?
As a standardized convention, I have set up my system to suggest that most private items, including methods, start with an underscore.
The current revision of Visual Studio 2022 seems to have broken ...
1
vote
1
answer
21
views
Should JSON naming standards require renaming everything from database result?
I use camelCase as a JSON naming convention for keys (as do many others e.g. Google). This is fine if I am creating a new object to be send to the client as JSON.
However some data comes from the ...
-3
votes
1
answer
49
views
Do file names have any effect on SEO [closed]
Do the physical filenames have any effect on SEO?
css files
html files
javascript files
image files
folder names
Thanks!
0
votes
0
answers
23
views
C# Selenium naming convention for IWebElement with parameter
Had this come up in a code review and cannot find any good answers on it on the internet. When creating an IWebElement that takes in a parameter, should the parameter be camelCase or PascalCase?
...
2
votes
1
answer
172
views
C# Naming Convention for private properties with backing field
Is there an official naming convention for private properties?
I use them for lazy initialization of expensive fields:
private string _veryExpensive;
private string VeryExpensive => _veryExpensive ?...
0
votes
0
answers
76
views
Struggle with names in DDD ; how to name my services and entities in external layers?
I'm trying to create a clean API project structure relaying on the DDD principles.
So far I have :
Project.Api : REST Endpoints, controllers, and Program.cs for the DI configuration.
Project.Domain : ...
2
votes
1
answer
79
views
Can C#/Visual Studio naming rules be configured to flag single-letter prefixes?
The naming rule violations can be configured in VS via Tools > Options > Text Editor > C# > Code Style > Naming for camelCase and flag locals and parameters with unexpected prefixes ...
0
votes
1
answer
77
views
Repository pattern for external API? Or excel file?
In web applications it is common practice to use repository pattern for data access. Usually this is the way to extract data from a database. For example:
from sqlalchemy.orm import declarative_base
...
1
vote
0
answers
46
views
Naming convention for TypeScript generic → specific → union
export type TypeaheadTransaction<Action> = Transaction & {
getMeta(key: PluginKey<TypeaheadState>): Action;
};
export type AcceptOneWord = TypeaheadTransaction<{
type: '...
0
votes
0
answers
69
views
Alternative naming conventions in clang-tidy
Is there any possibility to use alternatives in readability-identifier-naming rules in clang-tidy? Specifically, I want to use
- { key: readability-identifier-naming.ClassConstantCase, value: ...
0
votes
0
answers
47
views
Laravel naming conventions confusion [duplicate]
As I understand the model attributes should be camelCase and the corresponding DB columns should be snake_case. But when I try
$rank = new Rank;
$rank->fullName = 'major'; //full_name column in DB
$...
1
vote
0
answers
29
views
Naming rule on "Private WithEvents" fields
I have a naming rule that requires private fields to start with an underscrore and have to be in camelCase. This works well except for "Private WithEvents" fields where I get the warning:
...
0
votes
1
answer
443
views
Next.js client/server components naming convention
Sometimes the client-server relationships might be a bit vague with nextjs' app router, with abstracts especially.
What approach do you use to distinguish client and server files/components?
List....
1
vote
3
answers
134
views
Design pattern to manage two functions with the same signature, but different parameter names in C++
My program interfaces with a computer vision library that uses 2D points (row, col) and it also interfaces with... let's say the rest of the world, which uses points (x, y). These points contain the ...
0
votes
0
answers
76
views
C# .editorConfig Local Variable Naming rule not working
I'm working on a .Net FrameWork v4.5.2, Web API Project.
I'm working to apply a rule in project to ensure local variables in the method are in Camel case
editorconfig changes are as follows
# Naming ...
0
votes
1
answer
497
views
Azure keyvault naming convention for using devops pipeline filetransform task
Short story; trying to setup a devops release pipeline which retrieves secrets from an azure keyvault and filetransforms the secrets into our appsettings.json and web.config, but naming conventions in ...
2
votes
1
answer
661
views
What is the naming convention in Python for asynchronous functions?
In python class, when you have to mix synchronous and asynchronous functions, what is the best practice ?
first option:
Class My_Class:
def myfct_sync(...)
async def myfct_async(...)
second ...
1
vote
1
answer
675
views
Why do most Azure naming conventions include the resource type in the name?
Most naming conventions for Azure put resource types and other metadata in the resource name.
For me, this feels like a lot of unnecessary duplication, and leads to hard to read cryptic names full of ...
-1
votes
2
answers
333
views
useReducer naming conventions [closed]
Is there any reliable and readable naming standard as it comes to naming the outputs of the useReducer hook? What are the best practices, that make the further component's logic more understandable?
...
1
vote
0
answers
31
views
Python script won't skip past files that match naming convention set in file renaming program
I have a python program that renames tv show files to match a preferred naming convention I prefer but it only works on episodes that don't match the convention. When it gets to the first of matching ...
0
votes
1
answer
82
views
Issue changing Pylint naming convention in VS Code
I am trying to change the "default" naming convention that Pylint "approves" as not lint. Currently snake-naming is what it looks for and I want to change it to camelCase.
I found ...
2
votes
1
answer
236
views
camelCase naming convention not working while returning response
Is camelCase naming convention failing in returning response, when variable name follows immediate camel casing rule?
example variable names such as, tId, iPhone, bLaBlAbLa, testName.
Steps to ...
1
vote
1
answer
120
views
What does $$[T] mean in method name
I recently came across a odd syntax in Scala that I've never seen before and there seems to be no mention of it anywhere in Scala docs. I have a suspicion that this is just an odd way to name a method,...
0
votes
1
answer
47
views
Power Automate, Attempting to add an action that will paste in and rename an export file according to the previous business day in the MM.DD format
Currently running into an issue where I need to include an action in the automation script that will paste in a variable in the section to rename a file to include the previous business day in the MM....
2
votes
1
answer
120
views
What is the term for a colon before a suite in Python syntax?
I want to know what the technical term for a colon in the context of introducing a suite after a statement is called. I do not mean colons in slices, key-value pairs or type hints, but this kind of ...
1
vote
1
answer
468
views
What is the convention for naming C# files that contain extension methods? [closed]
While creating a library to learn C#, I've realized that there are a lot of conventions on how to name files, variables, parameters, interfaces, etc.
Now, I am making a file that will contain ...
0
votes
1
answer
52
views
How do I reference a lookup table that might not contain the looked up record?
I’ve got a table that is a bit like reference data. But not contain all the reference data. Let’s call the table “labels” containing an id and label column.
Other business model tables can specify ids ...
0
votes
0
answers
64
views
How distinguish stage of infra vs stage of software in naming convention (IaC)
For our Microsoft Azure resources we have a naming convention as follows:
{productName}-{stage}-{azureRegion}-{type}-{resourceType}[-{NN}]
Where:
stage indicates the 'enviroment' or 'stage' of the ...
2
votes
1
answer
318
views
How bad is it to use hyphens in a conan package name?
Suppose I have a librari named foo-bar, and I've written a conanfile.py for it. When running conan create for it, I get the warning:
WARN: Name containing special chars is discouraged 'foo-bar'
right ...
0
votes
1
answer
1k
views
Visual Studio checking naming convention for C++
I'm trying to configure my Visual Studio 022 to check and put warning when my compagny C++ code rules et naming conventions are not respected. The simple example is to prefix boolean with a "b&...
0
votes
1
answer
79
views
Using BEM for large set design
I'm interested in how to solve the problem of names for classes. For example I have 30+ options for the first section (hero). They have different structure and different blocks inside.
On the one hand ...
0
votes
1
answer
40
views
How to name 2 parameters for old and new entity state in an update/creation method?
Our (Java) project deals with multiple entities stored in a relational database. For example, we deal with persons. We have service methods (on singletons) which allow creation or modification of ...
3
votes
1
answer
135
views
How do I name controllers which are related to multiple entities in REST?
I want to rename and re-route controllers to make them more "RESTful", and I encountered a problem. Let's say I have ItemsController, the route is api/items. Then I have VersionsController, ...
0
votes
0
answers
202
views
What is best naming convention to distinguish between store and normal variable in svelte?
I am currently struggling with naming store(writable, readable etc) in svelte.
store.ts
export type CanvasContext = ReturnType<typeof createCanvasStore>
export const createCanvasStore = () =>...
1
vote
2
answers
85
views
Django - confused about naming class and parameters (when to use uppercase / plural form)?
Such confusion reflects unclear understanding about class and framework.
I'm learning database in Django models. I get confused about naming class. When to use uppercase / lowercase, when to use ...
1
vote
1
answer
544
views
Whatsapp media file name convert Android to IOS
If I have my WhatsApp database (msgstore.db) and I want to convert the names of the media files from the way they are called in Android for example
IMG-20201026-WA0000.jpg
To the way they are called ...
0
votes
0
answers
25
views
Use typescript to restrict string literal type [duplicate]
I would like to use typescript to enforce a "t-shirt" naming convention.
Can I for example create a typescript type TShirt which would work something like the following:
const name: TShirt = ...
1
vote
0
answers
76
views
Does naming properties with trailing double underscores have a meaning in C#?
The Thumbnail class of the YouTube v3 API has a member named Default__ member. Its name has a double trailing underscore __ at the end. Is this a naming convention? I haven't found any documentation ...
2
votes
0
answers
30
views
Naming variables with "my" to show they're not a part of a library?
I'm writing helper functions to simplify my use of an existing library. In this particular case, just for examples sake, I'm writing a helper function to get a doc from firestore. I've always named my ...
0
votes
1
answer
53
views
Is there a reason for naming prefix Xl for Enum Classes in Microsoft Libraries?
The enum classes for all Microsoft libraries use the Xl prefix convention in c#
Example:
XlMousePointer
XlColorIndex
XlRgbColor
Is there a reason for this? is this a Microsoft only convention?
1
vote
1
answer
648
views
Choose I use a suffix or prefix when naming variables?
Suppose I should have a foreground and a background image, each with their own variable for width, height, and bits per pixel. Should I define my variables as fg_width, fg_height, fg_bits_per_pixel, ...
0
votes
1
answer
327
views
What is naming convention for a file with Kotlin extensions?
I have generated class MyDto and I want to add couple of new functions
fun MyDto.convert(foo: String): Bar {...
I have no choice - I have to put it to different file but in contrast to java it won't ...
0
votes
1
answer
244
views
Is there a good practice to name kotlin file contains only functions?
For example i have a kotlin file with validation functions. Another example is a file with only one function which gets mobile device data (manufacturer, android version, etc.)
I have some thoughts to ...
0
votes
1
answer
37
views
Having issues with file naming
File name 'c:/Users/Mfoniso/Documents/CODE/NODE/meals-backend/src/models/mealModel.js' differs from already included file name 'c:/Users/Mfoniso/Documents/CODE/NODE/meals-backend/src/models/MealModel....
-1
votes
1
answer
80
views
What is the rationale behind the naming of the squeeze and unsqueeze operations?
I was wondering if there is some (mathematical, historical, etc) reason behind the operations to remove and add singleton dimensions being called squeeze and unsqueeze. I am mainly asking from a torch ...
2
votes
1
answer
3k
views
Naming variables in Ansible roles
In Ansible roles you can define variables in different ways:
in vars/main.yml
in defaults/main.yml
via register in a task
via a set_fact task
in task vars
probably more...
Through this answer I came ...
2
votes
1
answer
843
views
In Visual Studio 2022, how to make auto complete private field as camel case like _fieldName
I have custom naming C# use CamelCase with added underscore in front like fieldName become _fieldName. But the problem is the autocomplete always use fieldName not generate _fieldName.
I already edit ...
2
votes
1
answer
4k
views
ReactJS component file name must start with uppercase letter
I am playing around with the ReactJS and i have noticed that name of file which export components always upper case. For example file that contain Book component ( i'm working with book list) name ...
2
votes
0
answers
136
views
Why ProblemDetails class has additional 's' in its name? [closed]
We have a debate about whether it is appropriate to have s or plural names in a class name. So as a guidance we took a look at ProblemDetails class which has additional s.
According to this msdn docs ...