Skip to main content

Questions tagged [programming-practices]

Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.

0votes
4answers
224views

Use-cases for Expression<TDelegate> except translating to another language?

So I just learned about Expression<TDelegate>. As a library author this really intrigued me; my libraries make extensive use of source generators to generate both high-performance code and code ...
Charanor's user avatar
-2votes
1answer
163views

Best Practices for Managing Multiple Entity Types in ASP.NET Core

I'm working on an ASP.NET Core application that requires handling multiple types of a single entity. Each type has its own properties and validation rules, which has led to confusion and complexity in ...
Marko Sami's user avatar
-1votes
1answer
158views

Testability when API contract is fixed

Recently, I spoke to an Engineering Manager about some work I've done: I had to implement a micro-service to a third party API contract (that they will call). Part of the requirement is to ...
Ahmed Tawfik's user avatar
0votes
0answers
62views

Web application having database with OPC client

I'm designing a browser-based application that will display real-time data collected from OPC server. I have decided to use Angular framework for the browser application development. The browser ...
Kamrul A's user avatar
0votes
3answers
230views

Use of environment variable or appsettings as a counter, good or bad practice [closed]

I'm wondering if it's bad practice to have a variable in a webserver which counts the amount of incoming requests and put it in an environment variable. In C# for example you have System.Configuration....
Vincent's user avatar
0votes
1answer
119views

Best practices for minor changes to packages that are no longer maintained?

I'm writing a python package that depends on a relatively old library that breaks in a very specific case: when running a container in read-only mode, a .wh..wh..opq file is added to a directory where ...
Will G's user avatar
-2votes
1answer
460views

Are there good practices or even conventions to store LLM prompts I use while coding?

I sometimes use some language model assistance (e.g., GPT-4o) while coding. I'd like to save somewhere the prompts and language model versions I used. Are there good practices or even conventions to ...
Franck Dernoncourt's user avatar
10votes
4answers
5kviews

Is there something between Debug and Release build?

Specifically with CMake builds, if you don't specify a build type explicitly, the build will use neither Debug nor Release compilation flags. I was writing my own Makefile for a simple program and ...
Reverent Lapwing's user avatar
-3votes
2answers
698views

Is throwing an error in programming is good Idea at all? [duplicate]

I am wondering if throwing an error in programming is good Idea at all ? While programming we throw error when something unexpected or invalid has occurred. But if we have thrown exception and it is ...
FaisalAhmed's user avatar
1vote
2answers
155views

how best to take a vertical slice of something already trivial?

Lets say I have a project which is something relatively simple like a copy checker for legal text files stored in git, that multiple people contribute to via pull requests that must be reviewed before ...
A G's user avatar
  • 135
0votes
1answer
239views

Is immutable objects over POJO in general?

Lombok is used in the legacy project where I am currently working for since last year. The project is legacy with 10+ years, and POJO/JavaBeans, i.e. @Data annotated classes, have been widely used for ...
Rui's user avatar
  • 1,925
0votes
4answers
199views

How to eliminate repetition in three subclasses: each defines an identical method that does almost the same thing, but with a different return type

TLDR: I have three subclasses, each inherits from the same parent class, each defines an identical method that does almost the same thing, except that each of these methods has a different return type....
thatUserHOverThere's user avatar
2votes
2answers
587views

Is trunk-based development viable for SDK development?

Is trunk-based development (TBD) viable for development of software where versioning, compatibility, long term support and service level agreements (SLA) play a big role for business (e.g. libraries, ...
Tomasz Bąk's user avatar
-1votes
1answer
100views

Is there any benefit/viability to sharing models across API versions that have differing schemas

I have been asked to get involved with a Team that is currently having delivery issues for various reasons. During my review I came across an acceptance criteria on a user story; If you call v1 of ...
Kinexus's user avatar
5votes
5answers
950views

Is it bad practice to use nullptr in ternary operation?

I've set up a ternary operator in place of a pile of if-else's, the final expression being nullptr in order to finish the loop, like so: int menuSelect; std::string operation=""; (...
Hench's user avatar

153050per page
close