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.
Posts by Derek Elkins
I'm pretty sure the answer is "no", especially in some reasonable way. If Result was defined in some object-oriented way, i.e. as an interface with Ok and Error being implementations of that interf...
I would need to check, but I don't think PostgreSQL or most (any?) relational databases have a good way of expressing this "at most 8" constraint. It may be possible to express it in some way but p...
Well, to start, it is not an alternative to pip. It's built on top of pip and exclusively deals with applications. pip is more of a development tool, while pipx is aimed at end-users (who may also ...
One way of specifying what you want is that you want the equivalence classes of the equivalence relation generated by saying that pairs (a, b) and (x, y) are equal when either a = x or b = y. The f...
Nowadays DRY is usually with regards to code, not data. Regardless, even for data, DRY does not outlaw duplication, it just requires a single "authoritative" copy. There are certainly similar ideas...
As the error message indicates, the assignment is to the variable row. The for loop will repeatedly assign to row. But why is there a problem? Because Python's scoping rules are bad/broken. There ...
From simple subtyping concerns, you want the arguments of your methods to be as abstract/imprecise as possible while still allowing you to efficiently accomplish your goals. This allows your method...
I'm not quite sure I see what the issue is. As far as I can tell, you could continue to do exactly what you're doing now, you'd just do the token replacement on the bundle.js when a container is pr...
The answer is indicated on the page for f. Specifically, "[t]he f object is the singleton false value, the only object that is not true." In contrast, t is defined simply as SINGLETON: t where SING...
The Python Global Interpreter Lock (GIL) is a mutex in the primary Python implementation (CPython) that is acquired whenever Python (byte)code is executing. This means within a single (OS) process ...
There are two things going on here. One which technically explains what's going on fully, and another potential misconception you have. For the former, &T implements the Copy trait regardless ...
If you've committed, then the commit is in the git repo regardless. All git reset does is change what commit the HEAD references. If you find the hash corresponding to the commit you'd like HEAD to...
Benchmarking is hard and there are a lot of potential issues with your code. I agree with Olin Lathrop that you want at least a few seconds worth of run time, not just due to the potential for a lo...
This is more or less equivalent to a long used testing technique that I've commonly heard referred to as gold filing. The benefit of it is that it is very cheap to do, and it can catch even minor c...
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 ...
(This answer became more ORM v. "direct" SQL. If you're very narrowly focused on just stored procedures, then it's not super important to me that the logic be packaged up in stored procedures. That...
This is somewhat of a non-answer because I also think the answer is mostly "no". I'll split kinds of triggers into three categories. 1) Those that only touch the affected rows, 2) those that addit...
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 ...
In your situation, the most obvious thing to do is use a for loop over the Iterable or the Iterable.forEach extension method depending on your preference, and directly put floats into the FloatBuff...
The approach I would take given the constraints you've stated is to make much simpler and safer changes to Project A. Namely, 1) provide an API endpoint for fetching a file, and 2) provide an API e...
This is absolutely undefined behavior. The C standard doesn't say anything about stacks or how they should behave or how local variables should be allocated on them. The word "stack" doesn't even ...
There are two issues here. A performance problem and a correctness problem. The approach you suggest seems like it will help mitigate the performance problem while doing nothing for the correctness...
tl;dr Just use a POST. There's likely literally no reason not to in your situation. REST is not a standard. Being RESTful in and of itself is not a virtue. I strongly suspect that your current...
Short answer: No, it's not dangerous. Short of bugs in the implementation or monkey-patching, there's no reason it would or should allow executing of anything other than the JSON parsing code. Thi...
I can't speak for the designers' motivations, but here are some possible reasons: It's simple. Having one tempdb for everything is likely simpler to implement and simpler to configure. It works...