Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Search
This is a good question. It depends on how much this site is about getting language X to do Y versus the higher level concepts of software design and computer science that should largely transcend...
Since the Vector3 constructor accepts separate X, Y and Z coordinates, if you want to randomise each one individually, you would need to call the Random.Range for each coordinate, e.g. Vector3 spa...
Unless there are reasons for keeping the "check for unintended consequences" and "perform the action" in the same endpoint, I would split them into two parts: GET /api/v1/action-can-charge-the...
What (if anything) does the C standard have to say about linking objects? My guess is that, because C only defines language->behavior rules, it completely ignores any potential intermediate form...
I have an array that I need to clone in Angular / Typescript. That is, any change done on an element from the cloned array should not affect the content of the initial array. How can I achieve thi...
This is based on a code review discussion that I had with a colleague about the way I have designed the resources paths for an ASP.NET Core controller that is currently consumed only internally (by...
Object and Class aren't necessarily the same thing. Back in the 1980's when object oriented programming started to be talked about by practicing software engineers writing real production code, th...
I doubt that there is an actual standard HTTP response code to indicate exactly what you're looking for. 202 (Accepted) is close, but doesn't really seem to me to be about a situation where the cli...
Suppose I am using a Java API from Kotlin and I want to call a function that takes a FloatArray (represented as float[] in Java), and I have an Iterable<Float> as my input data type. To be mo...
The question How to efficiently remove every occurrence of one string inside another and discussions in the comments there got me thinking about the best way to ask about algorithmic problems. In p...
The point of VCL is to allow you to work with SIMD operations explicitly. OpenMP simd is more or less just a way to provide hints to the auto-vectorization the compiler is doing, so to some degree ...
We use Jenkins Pipeline to build and test some C++ software. The pipeline script runs the tests on 10 different nodes in a parallel way in order to save time. All of these nodes are real (not virtu...
Let's say I have some collection of data. My goal is to provide different kind of view of ItemsControl depending on user`s preference. For simplicity, we can assume that user can select only betwe...
It depends on why you have a large switch statement. I'm going to assume it's because you have a large enum. If not, then you probably have some complicated logic, and you should endeavor to break ...
I have an Angular application. The frontend has a mechanism that periodically fetches some information like this: ngOnInit(): void { setInterval( () => { this.http.get(... ).sub...
I have this bootstrap code (grid) <div class="container p-3 center"> <div class="row"> <div class="bg-light border-bottom border-secondary border-top col-6 te...
Switching from HTML to Markdown to minimize risk of HTML injection doesn't make a lot of sense to me, since most Markdown implementations support a subset of HTML inline anyway. The better ones con...
Simply opening a file for writing (using fopen) will clear it (‘truncate to zero length’, per the standard). Only opening a file in read or append mode will preserve its contents. See section 7.21...
Issue I have recently discussed with a friend a performance issue he and his colleagues have encountered in an ASP.NET Core 5 application (a checkout app, microservices architecture). The problem...
How does storing replaced strings in the node variable makes a change in the text appearing to the end user? In your case, you're changing the textContent property. When accessed, it returns t...
One of the recent business requirements is to be able to search through a list of entities using a bunch of filters. Most of these filters allow multiple values and the user might theoretically pro...
Note: This answer was written for a version of the question that focused on getting rid of the if-else, rather than on an explanation of the workings of the recursive tree-traversal. One way of ge...
Whether null pointer checking should be the caller's responsibility or the callee is debatable and probably a matter of opinion, local convention, sometimes logical choices but in all cases should ...
any DOM "tree" node is actually a "branch" Not exactly. Document Object Model and Nodes According to the MDN documentation, the DOM (Document Object Model) is "the data representation of the...
Does a for...of loop must contain a variable without assignment sign (=) Yes. and why? Because that's the syntax defined by the language specification. The people who defined it decided ...