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 meriton
As Lundin points out, there are quite a few whitespace-sensitive programming languages out there, where automatic wrapping would change the apparent meaning of the code, such as Phython or JavaScri...
The weakness of responding to idle state is that the app might be closed before the idle state is reached, and that a closing app might no longer be able to communicate with the outside world. Savi...
Generally speaking, the frequency of garbage collection is a space / time tradeoff: collection effort live object size GC overhead ~ ----------------- = ---------------- ...
As you know, a max heap is a binary tree such that each parent is greater than its children. The most compact and efficient way to represent such a tree is an array, where each index corresponds t...
Should someone be warned when their question lacks for effort? Actually, we don't know about their effort. Nor do we actually need effort, itself. What we need are particular results of effort...
My first instinct would be to track both identities, using one for access control, and the other for audit purposes. For instance, rather than storing: User createdBy; you'd store User create...
I am interested in a guideline to understand how dependencies are considered when building the healthcheck functionality for an API. Like any functionality, the implementation of this feature sho...
Consider the following code: public class OnlineShoppingService { @Transactional public void cancelOrder(String id) { if (shipmentRepository.findShipmentForOrder(id) != null) { ...
I suspect this is an outdated practice: Prior to npm 3, npm did not keep track of resolved dependencies, and npm install would try to reconcile the existing with the declared dependencies. Since no...
The best way to estimate this is to measure it, for instance by importing a backup of the production database into a new instance and run your scripts there. Short of that, you could consult the ex...
The question https://software.codidact.com/posts/281517 is currently voted at -3. I wrote several comments to explain why, so the author can hopefully ask better questions in the future. This morn...
questions asking for implementing a certain feature (or homework). You should include your (partially working) trials in the post asking to explain what a certain code does. A great many questi...
I think the best solution is to have specific canned close reasons, with vetted messages clearly communicating what was bad, why that is bad, and specific tips for improving it. Here are some attem...
There are quite a few bugs there :-) Let's start with with the big one: In Angular (and most client side web frameworks) requests to the server happen asynchronously. That is, when a method does ...
It's worth noting that logging out a user goes way beyond not fetching a token, because your UI needs to inform the user he is about to be (or has been) logged out. And if your UI closes or locks i...
As a baseline, here's what we did in my last company: For tests, we used an in-memory database, whose schema was initialized by our object-relational mapper, with initial data loaded either from...
Advantages of Mandatory Braces When in Rome, do as the Romans do. Since every popular coding standard for java mandates the use of braces, and every popular code style checking tool enforces their...
A login page is but the tip of the iceberg. For a login page to function, you need a way to store users and their passwords, verify passwords in a safe way, prevent the login form from being bypass...
Actually, TypeScript is perfectly able to type check the code you posted. Here's what the compiler thinks: const functionName = disable ? "disable" : "enable"; // inferred type: "disable" | "enabl...
Do you need to write this yourself? That is, are you sure there is no library that could do this for you? After all, the angular services generated by the typescript-angular language binding of the...
Generally speaking, switching data access technologies to avoid a naming conflict seems overkill. Doing that will increase the set of technologies contributors must be familiar with, and impede cod...
Having had the dubious honor of experiencing the closing process from the perspective of a question author, it seems to me that closing does not adequately communicate why the question was closed, ...
How much research effort is expected from the asker by the community? The kinds of research I expect varies with the question type. Before asking us ... about concepts or the meaning of wor...
Seconded. This looks accidental, since the height is set to 20em, but the line-height is set to 1.5em, resulting in 20/1.5 = 13 lines being displayed. I wonder what that line-height is for? I know ...
The manual writes: In contrast to CHAR, VARCHAR values are stored as a 1-byte or 2-byte length prefix plus data. The length prefix indicates the number of bytes in the value. A column uses one len...
- ← Previous
- 1
- 2
- 3
- Next →