All Questions

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

Sharing data through multiple environments (dev/test/stage/prod) for one usecase

I am looking for a concept that handles the needs of some data to be distributed in several environments (lets say we have dev, test, stage and prod). Example: We are setting up planned outages of ...
libik's user avatar
  • 302
1 vote
2 answers
80 views

How to handle errors of pthreads fundamental lock und unlock functions?

I am writing a little C library for the Raspberry Pi for controlling 433MHz transmitters/receivers. While receiving data the whole application would block, so I decided to put this code into a ...
blackdog's user avatar
1 vote
4 answers
111 views

A method for handling many runtime configuration parameters

Suppose I am developing a class which implements some high-level application logic. I want the "configuration"/"attributes" of this logic to be modifiable at run-time (with some ...
Patrick Wright's user avatar
0 votes
3 answers
324 views

Is my git branch strategy best practice?

We are a small software team with 6 members. We are working on different software projects in our company. Before I joined the team no version control system was used. It was/is my task to reorganize ...
Jakob's user avatar
  • 21
1 vote
3 answers
155 views

Merge Sort Concept Understanding

Merge Sort contains basically two important routines: (i) split (ii) merge. I get the general idea. But I dont understand how this is more efficient than some random bad sort algorithm, like selection ...
digoalbuq2's user avatar
-3 votes
1 answer
106 views

Learn a framework on a project, or mix languages between backend services [closed]

I am designing my next project, which will do various domain-specific tasks, but all that will be controlled and used via a generic crud web app. I have been professionally using Java with Spring for ...
rafal.sz's user avatar
2 votes
3 answers
225 views

How to retain the concrete type when writing base-class-oriented code?

A scenario often arises when attempting to make some existing code reusable. I introduce an interface to represent the commonality between some new feature I'm implementing and some existing ...
amarsha4's user avatar
  • 176
20 votes
6 answers
7k views

How would you identify slow queries before reaching production?

Let's say you are running a query on your database. In development and staging, where the amount of data is small, everything looks good. Unit and integration tests are also fine and the logic is ...
riorio's user avatar
  • 489
16 votes
11 answers
15k views

Is it possible to build a system to generate UUIDs where every UUID is guaranteed unique?

Is it possible to design a distributed system to generate unique ids where there is a requirement that every generated id is guaranteed to be unique with no possibility of collision? I didn't think ...
Daniel's user avatar
  • 507
2 votes
3 answers
324 views

Does it make sense for an API with 1 daily job to do to be asynchronous?

This is a conceptual question about whether my specific use-case warrants the use of an asynchronous API. Language: Python 3.11 Framework: FastAPI (ASGI) I believe I am confused about what an ...
nonohat's user avatar
  • 53
2 votes
1 answer
102 views

Is returning Result types the standard way of dealing with errors in Kotlin?

Given that there are no checked exceptions in Kotlin, are Result types the correct way to indicate an exception occurred to the caller? For example, I have the following function in my code: suspend ...
Adam's user avatar
  • 272
6 votes
1 answer
2k views

Why are there two ways to retrieve values from a dictionary in Python?

In Python there are basically two ways to get a value from a dictionary: dictionary["key"] dictionary.get("key") Is there any - maybe historical - reason for this behavior? I ...
Thomas Junk's user avatar
  • 9,533
5 votes
5 answers
2k views

How to think when grouping functionality into modules

What are some commonly used strategies when it comes to divide software into modules, other than there should not be any cyclic dependency between any modules? Some ways I think of Group everything ...
user877329's user avatar
1 vote
3 answers
173 views

Websockets, network delays and messages order

Let's say we have a group chat in a chat app build with websockets. And 3 users (A, B and C) chatting in that group. All 3 users send their message one after another with an interval of 1 second (it ...
forty5's user avatar
  • 39
25 votes
6 answers
10k views

In Scrum, why don't you use aging and guaranteed time slice to prevent outdated tasks in the backlog?

If there are many tasks in the backlog and the product owner keeps adding them, some of the tasks become outdated and in practice they are never implemented by the team. Why don't we borrow some ...
banan3'14's user avatar
  • 365
1 vote
2 answers
70 views

Request validation on API proxy

I am creating an API proxy that acts as a bridge between our frontend application and an AWS opensearch server. This proxy has additional features such as retries and timeouts. One of the features I'm ...
lightning_missile's user avatar
4 votes
1 answer
146 views

Is there a proper term for a "closed class hierarchy?"

What I mean by "closed class hierarchy" is a set of known base/derived classes used only for an implementation of something with no public API, i.e., the classes are not meant to be derived ...
Paul J. Lucas's user avatar
-2 votes
3 answers
258 views

Locally throw exception and handle it

I came across a piece of legacy code, almost on the line of this (sample) int foo() { try { int id = generateID(); if (isIDUsed(id)) throw id; return id; } catch (int ...
Zoso's user avatar
  • 241
2 votes
1 answer
73 views

What is the correct way to configure a testing mode on a class?

I have a repository which reads and writes to Firestore, and some tests to make sure data is sent and comes back in the correct way. In order to test this I added a protected function which returns ...
Adam's user avatar
  • 272
1 vote
1 answer
67 views

UML Statecharts - How to "remember" event parameters?

In UML statecharts, an event may how zero or more "parameters" (i.e., additional data associated with the event). The classic example would be a key press event with a parameter containing ...
Patrick Wright's user avatar
1 vote
1 answer
114 views

Monolithic Database to Microservices, but with Radical Data Model Changes

We are finishing up a long (over 1 year) project to retire our monolith. We have been moving pieces of functionality into microservices guided by domain driven design. So far we have been leaving the ...
sceaj's user avatar
  • 304
2 votes
3 answers
204 views

Displaying a list of similar but different objects without resorting to type checking

I'm creating the UI for a "Point of Sale" type page. You can add orders, grouped orders, and custom items to your transaction, and it should display these in a list so you can see what you ...
Conman_123's user avatar
3 votes
4 answers
1k views

Representing vectors as arrays of points vs. as data structures

I'm writing a program in Java where I need to represent the position, scale, and other 3-dimensional properties of objects in a world using vectors. I can use either of these two approaches: ...
AcinonX's user avatar
  • 459
0 votes
4 answers
189 views

How to handle a scenario where server fails to respond in time with some arbitrary response, but later the transaction is processed?

Client sends request to deduct his account balance for registering with a service. balance=balance-fee Server takes a lot of time to process the request. Since server was taking lot of time, client ...
barnyard9's user avatar
1 vote
4 answers
372 views

What's the alternative to trying to inherit static methods?

I know you can't inherit static methods, and it seems the consensus is that if you feel like you need to, you're doing something wrong. However, I don't know what the alternative is in my case. Please ...
Andrew Dean's user avatar
1 vote
2 answers
156 views

Creating associated resources before creating the main one in a REST setting

I'm not sure how common of a scenario this is, but what are some approaches to creating associated entities before you have the actual main entity they're supposed to be linked to? (basically having ...
string_loginUsername's user avatar
0 votes
4 answers
323 views

Code quality: expressiveness vs. conciseness

I've been wondering about code expressiveness vs. conciseness lately. What I mean by that is that a lot of modern programming languages offer features to express statements in a very short manner, ...
Sir Falk's user avatar
4 votes
3 answers
886 views

Does it make sense to to abstract serialization/deserialization?

Serialization and deserialization in .NET applications can be achieved using several libraries, e.g. Newtonsoft.Json System.Text.Json Assuming I'm developing a new application where I want to use ...
Dario's user avatar
  • 1,015
-2 votes
2 answers
121 views

Microservices - how to implement search combined with security cross cutting concern?

I am trying to design a system and bounded contexts. I have 3 microservices: Security, ProductsCatalog and Customers. Each microservice own its database. Security is a cross cutting concern used in ...
tlzg's user avatar
  • 105
1 vote
1 answer
60 views

Reserving Unique, Sequential Group Numbers in ASP.NET Core with EF Core and GraphQL

I am developing an API backend using ASP.NET Core Minimal API (.NET 7) with Entity Framework Core, HotChocolate (for GraphQL), and a Microsoft SQL Server database. I've encountered a specific ...
bealtis's user avatar
  • 19
1 vote
0 answers
42 views

Package-by-feature within maven multi module package-by-layer project

As a consultant working for multiple companies that are using maven multi modules I have made the same discovery with all of them that I find strange. Lets say they want to build a webapp for a ...
olimtrail's user avatar
-2 votes
2 answers
186 views

Enumeration in every entity?

According to Eric's definition of entities: "An object that is not fundamentally defined by its attributes, but rather by a thread of continuity and identity" Does that mean apart from all ...
Varun Raj's user avatar
  • 115
0 votes
1 answer
59 views

Shopping Cart Design with SRP: Handling Cart Creation and Update Separately

I'm working on designing a shopping cart system that respects the single responsibility principle. However, I'm facing a challenge when it comes to handling cart creation and updating separately. ...
Thiago Dias's user avatar
0 votes
2 answers
291 views

Explain 90th-percentile response time of 2 seconds when handling 200 concurrent connections per second

From Ch 12 (Resiliency) of the book "Building Microservices" In the context of how much resiliency is too much resiliency How long should various operations take? It can be useful to ...
wenn32's user avatar
  • 129
1 vote
2 answers
235 views

How to structure libraries/solution for Onion Architecture with Model View Presenter pattern?

Hobby coder here, so please be gentle! My coding is taking me into the necessary realms of architecture due to increasingly complex apps. I'm wondering how to structure my solutions which will involve ...
stigzler's user avatar
  • 129
0 votes
1 answer
111 views

Functional interfaces or decorator-like implementations [closed]

Consider Chess as an example. Say, we have a lot of domain objects that are alike, in this case chess pieces. I have two proposes to implementing the behaviour of chess pieces. Both uses the following ...
Daniel Birn's user avatar
1 vote
2 answers
130 views

Orchestrator (like Camunda) between frontend and backend?

I have the following use case. We have both a frontend application and a backend application. Earlier, events on the frontend application directly call the backend application. Now we want to ...
Gopikrishna K S's user avatar
2 votes
4 answers
217 views

Watchdog/recovery mechanism for realtime embedded system (using heartbeat, exceptions and Posix signals)?

We have a large(ish) real-time embedded system. It's VxWorks, if that makes any difference. It has some C code in DKMs, but is 95%+ in C++. It has absolutely no exception handling, nor Posix signal ...
Mawg says reinstate Monica's user avatar
-1 votes
2 answers
193 views

Best Practice for Integrating Domain Services with Infrastructure Layer in Clean Architecture [closed]

I'm currently implementing clean architecture in my project. My application includes various types of communication protocols (TCP, HTTPS, etc.) implemented in the infrastructure layer. These ...
Shady Shahin's user avatar
-2 votes
1 answer
218 views

Making objects aware of their (consistent) IDs

Abstracted problem I would like to be able to quickly refer to some (most likely non-hashable) objects. At the same time, I would like them to be aware of their own identity. The 2-way search should ...
Etua's user avatar
  • 7
9 votes
11 answers
7k views

Where to keep the code that I do not want in the main?

I made some changes that, after testing, I decided not to use for now. Thus I don't want them in the main branch. However, I don't want to discard them altogether (maybe I will need them later?) What ...
sds's user avatar
  • 861
35 votes
11 answers
7k views

What do you do with branches you've abandoned?

For instance, I've started working on a new feature and created a featureX branch. Later, we decided that we no longer needed the feature. What should I do with featureX? I see value in keeping the ...
Jamie's user avatar
  • 471
1 vote
1 answer
104 views

Should domain services in a domain-driven design invoke the data warehouse interface?

From what I've read, domain services typically don't import or rely on Repository directly in theory,The responsibilities of domain services focus on handling business logic and coordinating ...
Ares's user avatar
  • 39
0 votes
2 answers
291 views

Should I strictly use both DTOs and models in Angular project in order to follow best practice?

I was reading these best practices for Angular project specifically for understanding models and DTOs. What I have understood in general from different resources and the above one also is that We ...
Pawan Nogariya's user avatar
1 vote
2 answers
94 views

Splitting up large SQLAlchemy model

Anybody have advice on splitting up a large SQLAlchemy model into smaller parts? I have a ~2000 line model called Article that is becoming difficult to manage. We often have to scroll and scroll to ...
caseym's user avatar
  • 119
1 vote
3 answers
155 views

What are the DDD aggregates in package delivery system?

I'm trying to model a specific domain using DDD techniques and have some doubts. To better contextualize, a brief description: It's a domain of deliveries and delivery confirmation. We have two main ...
Eduardo Albuquerque's user avatar
6 votes
2 answers
151 views

Offering multiple versions of artifact heavy package

I am developing a package that requires some very large (>50 Mb in some cases) artifacts to work for some of its features. This makes distributing this package annoying, as if I include these ...
Ahri's user avatar
  • 279
-1 votes
1 answer
142 views

How to make a hierarchical permission architecture work performantly?

I was going through this blog - https://www.notion.so/blog/data-model-behind-notion Which talks about how each page can inherit permission from parent page. we use an “upward pointer” — the parent ...
Shyamal Parikh's user avatar
4 votes
3 answers
492 views

What was the first company to make a drag-and-drop GUI designer like Visual Basic?

When Visual Basic came out, it was revolutionary for its drag-and-drop GUI designer, allowing users to quickly create GUI programs. This video shows Bill Gates introducing it in 1991. Did drag-and-...
Felix An's user avatar
  • 153
0 votes
2 answers
211 views

How do I use camelCase correctly for three or more words e.g. amountOfColors or amountofColors?

I'm a beginner, but competent at code and have some setbacks like this where it doesn't really matter- but I like making it easier and legible to understand my code. Anyways, yeah. I just have ...
mrCalcite's user avatar

15 30 50 per page