All Questions
61,153
questions
0
votes
0
answers
4
views
How to design multi module spring boot application
i'm developing a multi-module spring boot application, the basic idea would be to have an application divided into several modules, where there is a common module that imports one module or another ...
0
votes
0
answers
11
views
Observing changes in repository
I am developing a messaging application for iOS (although my question is not iOS related).
I am using offline-first approach and I am adhering to the clean architecture design pattern.
I currently ...
0
votes
0
answers
13
views
Design a Program which Forwards Work Pieces to Corresponding Modules
I am working on a program that will listen to a queue of incoming message and will process each message differently depending on the metadata of that message. The messages must be processed in order ...
0
votes
0
answers
12
views
How can I refactor monkey-patched calls to numpy.reshape in an ML library?
I'm working on an ML library built by my research group. The library has expanded to the point where it has a lot of implicit expectations for data shape that vary by use case. A typical numpy array ...
-1
votes
1
answer
24
views
Is saving multiple image sizes for each image format (web and jpg) reasonable? [closed]
I am currently facing the problem of how dealing with images in a image-heavy web-app.
Seems to be a good practice saving multiple image sizes for an uploaded image, but, what about when we also ...
0
votes
1
answer
21
views
Should I "modularize" my configuration file into different files?
I have a simulation in Python which reads its configuration from a toml file. Since I have tons of parameters, the toml file can grow quite large.
This is an example file, similar in structure to my ...
0
votes
1
answer
45
views
Does every Visited class have to be aware of the Visitor interface?
I'm taking another look at the pros and cons of the Visitor design pattern for a talk.
There's obviously the issue that the Visitor has to be aware of every class it has specific handling for, but ...
0
votes
1
answer
34
views
A service having to have both an API and listen to events - Is this an anti-pattern for microservices?
I have a use case to create a service that consume messages from a message queue, process them, store them in the DB, and expose the processed results via an API. Therefore, the service I'm going to ...
-1
votes
0
answers
50
views
Would there be any concern if I setup automatic git pull/push for non programers in the team?
I'm recently learned git via Learn Git Branching, and would like to apply it to my team's project data system, who are not technical. Would there be any concern if I setup automatic pulls/pushes for ...
-1
votes
1
answer
43
views
How to handle third-party libraries that can potentially throw, without knowing what kind of exceptions they may have?
I'm starting to run into this sort of dilemma while many third-party APIs, but I will use MongoDB for my examples. Consider the following code:
var settings = MongoClientSettings....
-4
votes
0
answers
18
views
Best Practices for mapping complex JSON [closed]
I often find myself having to work with complex JSON payloads. They might have 2-3 levels of nested objects and arrays, making them difficult to keep track of. Typically in java I just map them to a ...
1
vote
3
answers
90
views
Is a method named createOrUpdate() violating the single responsibility principle? Should I split into create() and update()?
I work developing software, and very often I find inconsistency in the company's code. The thing is, there is a method named createOrUpdate(), and this method basically does what its name says, ...
0
votes
0
answers
15
views
Common term for Command key on Apple device or Control key otherwise [closed]
Is there a single common term for the Command key (⌘) if a user is on an Apple device such as a Mac or iPad, that also translates to Control (Ctrl) if other wise (eg using Ubuntu or Windows).
Consider ...
0
votes
2
answers
68
views
How do I distribute a C++ compiler with my application?
I'm developing a commercial closed-source application that will have a user-interface, and the back-end will be generating C++ code that needs to be compiled to produce a final end result.
When I ...
-5
votes
1
answer
79
views
Is it legitimate to track down a library maintainer who has disappeared? [closed]
There's a public FOSS library available online, which has not seen any commits by its author for about 3 years. 2 years ago the maintainer added a README.md comment saying he's sorry for being ...
-4
votes
0
answers
24
views
What are the possible metrics by which I can assess whether a Java library is suitable to use? [closed]
Disclaimer: I am not sure if this question is not proper for this stack-site. If it is not, I would really appreciate if you could please point me to a proper place for such questions or leave a ...
0
votes
0
answers
22
views
Best way to implement a custom session pool in c# (winscp)
I'm currently implementing a session pool for WinScp sessions, which intended purpose is to open multiple sftp sessions concurrently. While my current solution works, I'm not sure if the solution is ...
0
votes
0
answers
53
views
Clean Architecture: How to decouple the Repository from a CommandHandler?
We are just starting with event driven (and clean) architecture.
So far we have two main entrypoints, a consumer (reader from a Redis Stream / Kafka Topic), and an API.
As this is almost a modular ...
-2
votes
0
answers
60
views
When, and why, to pass parameters by value? [closed]
For anything larger than a 64 bit integer, why would I want to pass by value?
[Update] The question was closed, because it was not specific enough. One comment suggested that I specify a language. I ...
0
votes
0
answers
35
views
Is a hexagonal architecture a good choice for a python REST API?
I have a flask backend (REST API) written in python using flask-restx (mainly for automatic swagger docs), marshmellow for serialization and API schema definitions and SQLAlchemy for persistence.
I ...
0
votes
0
answers
33
views
Help required in the right data structure for faster look up of data
I have the below given data model
itemid - name - collectionitemid
example:
itemid |name | collectionItemId
-------------------------------
101 | abc | null
102 | def | 101
103 | ghi | 101
...
-1
votes
0
answers
29
views
Git nested submodules: best practices
I have a project_a (all python) with the following structure:
project_a:
- submodule_2
- submodule_1
-submodule_2
- submodule_4
-submodule_2
- submodule_3
...
-4
votes
0
answers
17
views
Combining PHP and Node.js server
This is my first post on stack overflow
I'm trying to combine php and node.js on the same server. Why ? Because I have everything done in php but I want to implement realtime so I want to use socket....
0
votes
2
answers
111
views
In an "Always On" architecture, how are duplicate concurrent transactions handled?
Imagine a scenario where a gift card has been purchased with cash, the gift card is duplicated, and each card is used to purchase an iPad at a self-service counter at exactly the same time.
What are ...
-1
votes
0
answers
39
views
Linux C: Using mmap and inotify: I think I'm doing something wrong [closed]
Background
I'm making some database software. This database requires several client processes to talk to the database process. This database has a feature to which the client can invoke a function ...
-2
votes
0
answers
49
views
How to design a system that imports data into the system from a large amount of files
A lot of our clients migrate from their existing system to our web application. they bring in approximately 150,000 excel files which I have to first load in my database and then perform some ...
-2
votes
0
answers
36
views
When to save complex html/css/js as an image and load that instead? [closed]
I am working on building a site and have a fairly complex layout consisting of many html elements is inside of one large button. I imagine that I could just save this layout as an image and load the ...
2
votes
2
answers
130
views
How to keep attribution in version control (git) when one author moves another author's code?
Sometimes code will need to be moved. A common example is some logic that exists in a controller needs to get moved to a helper class so it can be called from outside of that controller. So someone ...
0
votes
1
answer
58
views
Are Microservices Architecture and a Single Customer View able to co-exist?
Given the microservices pattern is the decomposition of software by business capability with ownership of state, and a single customer view is an aggregated, central, "single" data store of ...
0
votes
0
answers
20
views
Best Practices to Deploy Docker on DigitalOcean using Terraform
I'm wondering if there are some best practices to deploy Docker images to Digital Ocean using Terraform.
Because I don't expect much load and don't need failover features etc. I'm not aiming to deploy ...
-4
votes
0
answers
27
views
Apply this popup feature for infinite users [closed]
I made a popup feature, which shows the phone number of a user. I was able to apply this feature to one instance. A single user.
Normally, each user has a unique phone number.
But then, I thought, ...
0
votes
0
answers
14
views
When and how can I use an Entity created in a use case X' sequence inside another use case Y' sequence? [closed]
I have a use case X' sequence in which I create an Entity Z.
I have another use case Y' sequence where I want to use the SAME already created Entity Z.
How to do that? Do I have to specify it in some ...
-3
votes
2
answers
71
views
Which HTTP status to return if a downstream service I depend on returned 500 error
My service B is part of a chain of services and calls a downstream service C.
A --> B --> C
Service C is returning HTTP 500 errors for any error it faced, including bad requests or input ...
1
vote
4
answers
207
views
Could a language allow for persistent allocations without heap?
Is it possible in theory to have a programming language that allows for object lifetimes that exist beyond the current scope but without using heap?
As a little background, in embedded development it ...
0
votes
2
answers
128
views
Would Injecting dependencies in C# as default parameters be a bad practice?
Given the (old) debate over whether Singletons are overused/abused/are worth it - would it be a bad idea to inject the dependencies as default parameters? In this way, we could get rid of defining ...
0
votes
1
answer
89
views
Side effect as a common object seems like a bad pattern
Given an auction system, there are several ways to apply a discount to the transaction's final amount, e.g.
Special discount for a given seller
discount for a given buyer
Discount for a specific ...
2
votes
2
answers
116
views
Are there typo-tolerance algorithms (as opposed to string similarity)? [closed]
I want to build a search with basic typo tolerance.
There are quite a few string similarity algorithms (and implementations for almost all languages I guess).
However, humans tend to make some typos ...
-1
votes
0
answers
37
views
Better long-term configuration maintainability [closed]
As an experienced IT professional familiar with systems of different levels of complexity, it is relatively normal to maintain system configurations in configuration files. For installations and ...
0
votes
1
answer
89
views
How to model a ternary relationship in a graph-based paradigm?
Consider a context where we have Users saving Questions and adding personal Tags to them.
In a graph-based paradigm, a first approach could be something like:
(User)-[SAVES {tags}]->(Question)
...
1
vote
0
answers
94
views
Best way to store key-value pairs of different types in c++?
I'm reading values from a (PE) binary file. The values have a known length and position in the file and are stored with no padding (right next to each other). They store various types (int, long, ...
-1
votes
2
answers
55
views
How do I properly write these functions? [duplicate]
So far my weakest side has been proper code structuring and organization. I wanted to know how I can properly apply separation of concerns to the following code to make it more organized.
I have a ...
7
votes
2
answers
2k
views
Why is having bloated interfaces an anti pattern?
[I'm using the term interface here with C#'s interface in mind. I won't tag the question with a C# tag because it really isn't a C# question.]
In my work we do unit and integration tests but we don't ...
-3
votes
1
answer
69
views
Using two different languages where one would suffice for the task (microservices)
I previously asked this on StackOverflow, but doesn't fit there and I was suggested to move it here.
I was thinking about using two seperate backend languages for seperating concerns in a project of ...
-4
votes
0
answers
30
views
Microservices - should we avoid too much dependency between services? [closed]
When should communication between services be used to exchange information between them? Let's say we have a situation where the client sends a request to the api-gateway to create a new project in ...
0
votes
1
answer
86
views
How to establish communication between devices on separate local networks?
There is a number of devices with Internet access but they are on LANs and have no public IPs. As time goes by more devices will be added.
I need to be able to communicate with each device on demand (...
-3
votes
1
answer
85
views
How would a SRP `class Car` look like? [closed]
SRP insists that a class should have only a single a reason to change. Please guide me through the following example.
class Car
{
drive_forward();
embark();
disembark();
fuel_up();
}
...
1
vote
1
answer
60
views
PyPI Package Names Governance
The Python Package Index (PyPI) is a public repository, and it seems that anyone can upload packages to it using a tool like twine. The openness of the system raises some questions:
Say, a person/...
0
votes
2
answers
49
views
Design pattern for persistent data storage - load and save arbitrary file, database, api etc
I have the following problem - I write the code for object data manager, and one of requirements is being able to save/load data into some persistent data storage. I want to make it as the following:
...
-3
votes
0
answers
30
views
Question on Data Structure [closed]
How to construct a Binary Search Tree from an In-order traversal of a Binary tree?
For example the numbers below
2,11,20,24,33,56,80.
My problem is to determine which of the numbers should be the root ...
0
votes
2
answers
113
views
What does "legacy signature" mean?
I see the term legacy signature a lot in the documentation of programming languages. For example in the php documentation :
Passing the separator after the array (i.e. using the legacy signature) ...