All Questions
63,718
questions
0
votes
1
answer
30
views
Mapping complex objects to other similar complex objects
I am working on two applications that serve the same purpose. The first application is more feature rich and its types are more complex, but uses old technologies and will be retired. It will ...
1
vote
3
answers
164
views
Does ReactJS Compound Pattern violate the DRY principle?
Let's say we have this component:
const Card = ({ title, description, price, tag, category }) => {
return (
<div>
{title && <h5>{title}</h5>}
{...
-4
votes
0
answers
53
views
Confusion regarding content in pictures for branching micro-operation [closed]
Picture 1
About branching micro-operation.
Picture 2
Reference architecture for micro-operations.
Confusion:
MAR <- IR (address) & DR <- PC (Both micro-operations can be performed in ...
1
vote
0
answers
83
views
How Should Bounded Contexts Interact with a Central Tenant Context in DDD?
I have a question regarding bounded contexts in DDD terms.
Let's assume that I have bounded context called Tenant (With Tenant Admin who can create Tenant Member), Library (With Reader, who can just ...
0
votes
1
answer
72
views
Designing a Kafka consumer that gets a high throughput of "redundant" events
Context:
We have 2 services - a user-facing API server and a background processing Kafka worker.
Both of these are hosted on AWS EKS, and we use AWS MSK for Kafka.
The job of the API server is to ...
1
vote
4
answers
297
views
Empirical software engineering case on approaches to handling multiple versions, one file with ifs or several versions of program
I face the situation of having programs doing sets of requirements where this is substantial overlap. The obvious example, is a software firm supporting multiple customers that have similar but ...
-1
votes
1
answer
79
views
ReactJS hook vs utility function
Should we use utility functions in react or should everything be components and hooks?
I had this scenario:
Utility function for formatting money.
const formatMoney = (value) => value == null ? '' :...
5
votes
4
answers
2k
views
If class B extends A, can we say that B depends on A?
Let's say we have 2 (Java) classes:
class A {}
class B extends A {}
To me, saying B extends A and B is dependent on A are both true (but not equivalent) in this situation. My colleague, OTOH, says ...
0
votes
2
answers
122
views
Problem with use case diagram
I am realising a project only I do not understand whether the diagram is correct or not.
I've used a generalization for merging two CRUD operations. Is this correct?
Is the use case login correct if ...
9
votes
7
answers
3k
views
If the sleep time of a function at first time differs from the second time, but the output is the same, is it still a idempotent function?
For example, if the sleep time of a function would change after first execution but the output remains unchanged, e.g.:
public static int myFunction(){
try {
Thread.sleep(MyClass....
2
votes
8
answers
773
views
Fail fast is brittle
I am creating a CSV consumer (with Java). There is one field / column that should contain one of the values "Rename" or "Move".
I implemented this by allowing mixed case of letters,...
0
votes
1
answer
37
views
How to rebalance data across nodes?
I am implementing a message queue where messages are distributed across nodes in a cluster. The goal is to design a system to be able to auto-scale without needing to keep a global map of each message ...
1
vote
1
answer
185
views
Why do most package managers not keep a single reusable library with different versions of each package?
When you use a Python virtual environment, you can activate it for different projects. Whatever packages are in it will be used by the project code. When you use npm, there will be a node_modules ...
2
votes
2
answers
189
views
Optimal way to share data between different classes
I have a C++ code that performs simulation of a physical system which deals with motion of objects. It has the following classes:
Class Main, containing all the main calculation methods and the data ...
-1
votes
0
answers
59
views
How to become better at predicting refactoring outcome? [closed]
Seems like even after years programming, one may occasionally fall on seemingly simple code which in reality is tricky code that isn't as easily refactorable as it seems in first instance...
Here's an ...