All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

How to handwrite code in personal handwritten notes?

TL;DR: What is the most readable way to handwrite small amounts of code interspersed with prose in physical notes? Explanation: In a digital document I might write something like this: ...
R u c k s a c k's user avatar
1 vote
1 answer
49 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>} {...
Oktay Yuzcan's user avatar
-4 votes
0 answers
38 views

Architecture for AI-like dictionary definition search in database of dictionary definitions? [closed]

What is the general approach for implementing NLP/AI-like search against a database of dictionary definitions in multiple languages? Say I have 20 languages (from Sanskrit, Chinese, Hebrew, to Turkish,...
Lance's user avatar
  • 2,605
-3 votes
0 answers
41 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: How MAR <- IR (address) & DR <- PC simultaneous occurrence because: As MAR <- ...
Amar Singh Sidhu's user avatar
0 votes
0 answers
44 views

How to handle User across bounded contexts

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 ...
Shadsin's user avatar
0 votes
1 answer
59 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 ...
Sidharth Samant's user avatar
1 vote
5 answers
237 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 ...
user2694186's user avatar
-1 votes
1 answer
75 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 ? '' :...
Oktay Yuzcan's user avatar
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 ...
TheJavaGuy-Ivan Milosavljević's user avatar
0 votes
2 answers
113 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 ...
lucagiuseppe caliò's user avatar
8 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, eg: public static int myFunction(){ try { Thread.sleep(MyClass....
wcminipgasker2023's user avatar
2 votes
7 answers
645 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,...
NimChimpsky's user avatar
  • 4,671
0 votes
1 answer
35 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 ...
poundifdef's user avatar
1 vote
1 answer
169 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 ...
David Cian's user avatar
1 vote
2 answers
120 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 ...
grjj3's user avatar
  • 121
-1 votes
0 answers
51 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 ...
aybe's user avatar
  • 763
0 votes
0 answers
52 views

A Design Pattern for a component which both writes to and reads from an ordered event log

I am searching for a good design for a set of components I am writing for a system. I believe it is very likely there is a Design Pattern, or set of Design Patterns, which could be combined to solve ...
user3728501's user avatar
1 vote
1 answer
81 views

Need help on Clean Architecture with Service/Manager/Controller

I am developing an Android application trying to comply with Uncle Bob's clean architecture. User interface has a text and a button. Button triggers a usecase (TextToSpeechUseCase) from viewmodel. ...
iAmTryingToBeAnAndroidDev's user avatar
0 votes
2 answers
123 views

Is it still "feature envy" if the state to make decision or the action to take after asking the state involves other classes to participate?

According to https://softwareengineering.stackexchange.com/a/212130/432039, if a class asks another class for the state, and then call methods of that class, it is called "feature envy", eg: ...
wcminipgasker2023's user avatar
0 votes
0 answers
50 views

Storing SqlAlchemy models for database with >20 tables

I'm working on a pet project for a web shop that uses SQLAlchemy (SA) and connects to a database with over 25 tables (thus, I have 25+ SA models - one for each table). What would be the best practices ...
Max Azatian's user avatar
1 vote
3 answers
135 views

How to tackle synchronizing large amounts of data across services in an efficient way?

I am working at a retailer with a deep catalog of products and we are taking stock of our architecture. Currently, we use microservices, but all product information goes to a service that is getting ...
SeeIfIDont's user avatar
-3 votes
0 answers
54 views

How to architect/design an "achievement" system in, for example, a web shop [closed]

Imagine you have a webshop page with its own database, but you also want to add the feature that the user gets achievements for certain actions, e.g. first buy, buy 10 items, buy an item in discount, ...
Manuelarte's user avatar
-4 votes
0 answers
23 views

How chromium Site Isolation and process allocation works for Iframe? [closed]

I was with working with a website it contains 6-10 Iframes, Each Iframe contains a web app so obviously there are high chances of that my website get slowed down. So to fix this I tried to understand ...
Karthi Fair Hawn's user avatar
-2 votes
0 answers
39 views

React js POST method to two or more tables [closed]

I'm a newbie to react and PHP and have been trying to learn it by a random car project with crud operations. Right now i'm only using CRUD operations on coches (cars) table and it works just fine. ...
Annie's user avatar
  • 9
1 vote
1 answer
83 views

How to Handle Additional Parameters in State Transition for State Pattern in C++

I'm implementing a state pattern in C++ with a context and several states. Each state implements its transition. Here's a simplified version of what that design could look like: class Context; class ...
Emile Papillon-Corbeil's user avatar
-2 votes
3 answers
90 views

Server-side ad insertion and video downloaders

Video streaming sites like YouTube are experimenting with server-side ad insertion Server-side ad insertion differs from normal YouTube ad insertion techniques primarily in how ads are delivered to ...
dazzleworth's user avatar
15 votes
4 answers
4k views

What side-effects, if any, are okay when importing a python module?

Generally, modules should not have side effects. However, in a lot of cases, the side-effects are hard to avoid or may be desirable. There are also popular packages with on-import side-effects. Which ...
Kaia's user avatar
  • 422
0 votes
3 answers
177 views

Adding a CLI to a Windows service

I have a Windows service that I would like to extend and add a CLI to it similar to docker or Elastic Agent, so I have a question about what kind of approach I should use for the *.exe to communicate ...
t3chb0t's user avatar
  • 2,580
1 vote
0 answers
40 views

BPMN 2.0: Can sub-processes / event sub-processes have a message end event?

boiling it down to the painpoint: I wonder, if sub-processes can end with a message end event. And in addition, does this hold for event sub-processes as well? (I know that event sub-processes are not ...
MaK's user avatar
  • 87
0 votes
1 answer
183 views

Is there a good reason not to use a "super class" (an all-encompassing class) [closed]

I write embedded software and I often find myself structuring my code such that there is one large parent class that contains just about everything. For example, consider you want to model a hardware ...
CHollman82's user avatar
0 votes
3 answers
128 views

.Net 8 XUnit: How to mock MySql in a CQRS API using integration tests?

This is a rewrite of my own .Net 8 XUnit: Should my tests use real data or how to mock MySql with CQRS? in a much more clear way: The reason for rewriting my previous question is because in the ...
Diego Perez's user avatar
0 votes
0 answers
67 views

How to restructure a schema in order to support conditional (one of two tables) relations

I've been stuck on this for a while now so I decided to ask for some help. My SetTemplate needs to EITHER be connected directly to exerciseTemplate OR connected to exerciseTemplate through a ...
Jocko's user avatar
  • 11
3 votes
2 answers
350 views

.Net 8 XUnit: Should my tests use real data or how to mock MySql with CQRS?

I'm creating tests for our .Net 8 API. We use MySql for data storage and CQRS pattern for queries. In my personal opinion, I shouldn't use the real database for testing, because you will use an ...
Diego Perez's user avatar
-2 votes
2 answers
148 views

How do I build my application with high throughput in mind? (Need guidance)

I am building a Spring boot REST API app that is part of a microservice architecture project. What I am planning: My app listens for events from two other services and after some business logic, ...
dk tammy's user avatar
-3 votes
0 answers
58 views

UI development approaches for high frequency data [closed]

I have a HTTP SSE endpoint that will be streaming data at around 1ms frequency. This data is a JSON payload that needs to move dial gauges, plot lines, etc. on a dashboard. Assume close to dozen or so ...
cogitoergosum's user avatar
3 votes
1 answer
184 views

Gradual Upgrade of an Inherited .Net Framework Project

I'm seeking advice on the best approach to upgrade a legacy .Net Framework project to a newer version. The project currently consists of over 80 projects, and a complete rewrite would be a time-...
Asdrubal Hernandez's user avatar
0 votes
0 answers
80 views

Best way in C# to share class implementation patterns between abstract base classes [closed]

I could also ask this question for Java, D or C++. I remember, I found this to be an artificial limitation in Java already 10 years ago. I am currently working with C# and appreciate advices here. It'...
ChrisoLosoph's user avatar
0 votes
0 answers
39 views

Split actor model logic into modules

I'm starting a project using .NET and Microsoft Orleans, running on Kubernetes. The main reason I chose Orleans is that I have a system that deals with accounts. There can be millions of accounts, but ...
Kilian's user avatar
  • 1
2 votes
2 answers
316 views

In unit testing: How to abstract a dependency of subject under test?

Disclaimer: I am learning unit testing. I am also kind of beginner in object-oriented design. Currently, I am involved in the development of an application to manage the finance of a humble food ...
Siva Sankaran's user avatar
6 votes
2 answers
456 views

When the stack frames become computationally expensive

I've been experimenting with different data structures and algorithms in Python, Java and C to see in what circumstances function/method inlining could bring meaningful gains in terms of the execution ...
user1069483's user avatar
0 votes
0 answers
119 views

Global Variables State Management

Background: I am working in a Java environment using Spring Boot, where I often encounter scenarios where global variable state management is critical, especially within singleton services. I have ...
Muhammad Haris's user avatar
3 votes
3 answers
203 views

What is the difference between a key attribute store and a key value store?

Im running through a course on Cloud Academy - now known as QA - and it makes the statement that Azure Table Storage is a "Key/attribute store" and Redis cached is a "Key value store&...
user1605665's user avatar
1 vote
2 answers
82 views

Subscribing to a range of topics per instance of a service [closed]

If I have a system where my distributed service is sending live scores of 1000 s of football games from some hypothetical event to millions of clients. The service subscribes to the games from a ...
Ufder's user avatar
  • 244
9 votes
4 answers
2k views

Is the inability to find code by searching for a class name a reason to avoid using auto in c++ variable declarations?

According to https://softwareengineering.stackexchange.com/a/180616/432039 suggested, I know the answer advised "auto" should be used instead of the actual type when declaring variables. ...
wcminipgasker2023's user avatar
0 votes
3 answers
145 views

Design a test framework for validating static files

I have a task to develop a test framework - or a test suite, if it makes more sense - that aims to validate properties over a large set of XML files. Our codebase is basically like this: JSON input ...
Incognitex's user avatar
1 vote
0 answers
68 views

When taking sections of an existing c# codebase to create a module/package of code for general use, how should we configure the module?

When spinning off sections of a (C#) codebase to create libraries/package for use by other users within a team/organization, what are important considerations in terms of code & package ...
freedomdev's user avatar
0 votes
5 answers
532 views

Naming - Lists - All elements except the last

When it comes to lists there are good, short and nice sounding names for most parts of list Head Tail Last - somewhat commonly used Currently I am doing a lots of TypeScript type manipulation and ...
Jarek's user avatar
  • 249
1 vote
2 answers
136 views

Trade-offs between applying the open-closed principle and type safety

There's lots of questions about the open-closed principle here, but none that I found satisfied this particular problem. At $job, I'm teaching my team Rust, but I believe the nature of this question ...
amateurece's user avatar
1 vote
1 answer
142 views

REST API with swappable backends

What would be the best way to have a single REST API but with multiple "backends" (Not sure if this is the correct terminology)? Currently we have a basket/cart API that handles product ...
gsck's user avatar
  • 137
2 votes
1 answer
147 views

How to design sharing feature properly in DB?

My DB has three tables: CREATE TABLE Users ( id INTEGER PRIMARY KEY, name TEXT NOT NULL ); CREATE TABLE Categories ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, user_id INTEGER ...
Sergey K's user avatar

15 30 50 per page
1
2 3 4 5
1275