All Questions

Filter by
Sorted by
Tagged with
-3
votes
1answer
41 views

Inheritance and domain-specific logic loses its independency?

Im sorry in forward, Im sure I wont be able to express myself well. Its a game system: abstract class GameType { private $score; public __constructor($score) { $this->score = $...
-3
votes
0answers
54 views

How can I design my Spring program so that when a user logs in I can tell if they are a Staff member, student or faculty member?

A little more detail. Like I said I'm building this University Management System and it will have user authentication. It will also user authorization for some parts of the web layer, for example only ...
0
votes
3answers
75 views

When to set constants during DI setup and when expect them on the fly as parameters?

Let's assume you have a project (e.g. .NET Core) using dependency injection. A database repository relies on a database connection string. public abstract class BaseRepository { // use this when ...
0
votes
0answers
62 views

Python circular dependency

I have two classes AST and ASTNode for working with some tree-like data. Both these classes have networkx graph as a field and a node id (integer). For AST this id refers to the root of a tree. These ...
-4
votes
0answers
26 views

Solution Structure: Blazor Web Api vs Web Application Web Api

Option 1: In ASP.NET Core Web Application, we can choose API template to create the Web Api project. Option 2: In Blazor App, we can choose Blazor Web Assembly App and enable ASP.NET Core hosted where ...
-4
votes
0answers
46 views

Why the craziness about Android fragments? [closed]

I'm not sure if it's just a personal coincidence, but last years whenever I've been working in developing an Android app in a company, it looked like using fragments was a must (cannot say if it was ...
0
votes
1answer
44 views

Is the TreeSet class in java a Red Black Binary Search Tree?

I simply wanted to know if the internal implementation of the TreeSet class in java is Red Black Binary Search Tree. Ideally, I would think that it is a threaded RB-BST, since it supports iteration ...
0
votes
1answer
80 views

How to maintain SRP with a chain of async functions?

For code maintainability I understand that it is generally better to have code structured like this: void abc() { a(); b(); c(); d(); } Instead of like: void abcd() { a(); bcd(...
-7
votes
0answers
70 views

If you’re not a liar but you tell someone you are a liar is that statement true or false? [closed]

If you’re not a liar but you tell someone you are a liar is that statement true or false? Update with pseudo code: while (person.isAlive) { var lieRatio = person.numberOfStatements/author....
0
votes
1answer
56 views

DDD - confused on how to implement a use case involving 2 aggregate roots

I have two aggregate roots: User and Sketches. In my application, users can clap for a Sketch. In the service layer, it looks as so: class SketchService { constructor ({ SketchRepository }) { ...
1
vote
1answer
79 views

What constitutes “identical” for the purposes of HTTP idempotence?

From RFC 7231 "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content" Section 4.2.2 "Idempotent Methods": A request method is considered "idempotent" if the ...
-2
votes
2answers
176 views

Is looping an array to compare to itself considered O(n^2)? [duplicate]

Often when I'm doing an operation comparing an array to itself, I write code along these lines: function operation (array) { for (let i = 0; i < array.length; i++) { for (let j = i + 1; j <...
6
votes
3answers
159 views

What are the benefits of multiple projects over namespaces in a solution?

I have been tasked to set up a guide for a microservice solution structure and find myself reflecting on why exactly I do things the way I do them. I am struggling to find an answer to the question ...
0
votes
0answers
24 views

Security and cookie practices for an API of a website

I'd like to create a web API. It would be used on my websites and potentially by others as well. I intend to use a single token to authorise users. You see, this API acts as an OAuth2 client (or ...
0
votes
0answers
23 views

Rust/specs – what is the good/idiomatic way of design level walls/static objects handling in an ECS architechture

Warning: long question ahead, don't be afraid, I just tried to be as precise as possible about details for who wants them but many paragraphs are skipables if you already understood what I want ;). ...
-3
votes
4answers
84 views

Negative Naming in Forms

The Main Question Is it ever acceptable to use a negative name for a boolean variable? For example, I have a few user forms that have a checkbox for "N/A" or "Not Assessed". These ...
0
votes
3answers
95 views

Multi-tenant database versus multi-database design for web application

Assuming that I have some sort of enterprise accounting software system(web application). I have many individual companies/customers that use this system. So each company when they use the system. ...
0
votes
0answers
18 views

Managing groups “profiles”

Rights management in our applications is based on the RBAC standard. Groups are stored in our authentication service and transmitted through the jwt token. Each application then has a mapping of these ...
-5
votes
0answers
81 views

How to call a list of REST APIs in huge volume to get optiomal performance? [closed]

I have written a Machine Learning based microservice in Python and using Flask for the REST endpoints. There is a need to pull data by calling around 4 REST APIs. But the call to the 2 APIs is going ...
2
votes
1answer
104 views

What are the pros and cons of adding SQL columns in run time, vs through a different design time architecture?

The company I'm currently working for has a feature in an enterprise app where a user can add columns to a table configuration on a web GUI through fields and a button, and a corresponding SQL table ...
0
votes
1answer
71 views

Architecting multiple codebases calling our public API + private API for first-party applications

Currently, we have the issue where we have two codebases (API & Website) calling the same database (along with some duplicate business logic) and we want to streamline this so all requests are ...
3
votes
1answer
103 views

How to show fluctuating data smoothly and accurately?

I am working on a project in which I have to read data from liquid level sensor installed in tank which measures fluid level and sends output in millivolt. The device has predefined ranges of voltage ...
0
votes
1answer
80 views

Capture by value/reference and early/late binding

Is capture by value (x below) an early binding and capture by reference (y below) a late binding in C++ lambdas, or are they both early bindings—the first by value and the second by reference? #...
0
votes
1answer
35 views

API / System Design [Flexible Authentication / Authorization]?

Background: We're a smaller shop that puts out a number of products that require authentication and authorization. We're currently using a 3rd party service to "spin up new auth APIs" for ...
-4
votes
0answers
26 views

Finding issues reported on a specific version of open source software github vs. Jira(Apache)

I am trying to find issues reported in OpenSource software based on release (Version). I find it really difficult when using github. For example, how to search for Angular 8.2.0 - here: https://github....
0
votes
2answers
66 views

Which approach is better suited for analyzing a basic manual ongoing system? Structured Analysis or Object Oriented Analysis?

My task is to analyze a system used in our office which is based on Excel for storing data. The data is entered manually by a person. So when we need to update or edit the data, we use Excel's ...
-3
votes
0answers
37 views

Single Page Application or an Multi Page Application?

I have a project which consists of a data feed (infinite scroll), the feed can be filtered and gets the data from a JS call - this is acting like a SPA. You can vote on each post in the feed too. Also,...
0
votes
1answer
60 views

Best practice for config files in containerized apps

The suggested file structure for docker container is something like root ├── app/ | ├── ... | └── Dockerfile | ├── db/ | ├── ... | └── Dockerfile ... └── docker-compose.yaml So where ...
1
vote
1answer
66 views

What is the name of this kind of (intra-process, inter-thread, queue-based) event system?

Context Espressif's embedded development libraries for the ESP32 microcontroller contain an event system based on FreeRTOS. The event system handles connectivity, interrupts and other IO activity, but ...
0
votes
2answers
108 views

Is this approach with JWT tokens wrong?

I have .NET Core WebApi application with JWT token for authorization. I also have roles and permissions. To make it more flexible for end user, I decided to make permissions like this: [Authorize(...
0
votes
1answer
77 views

How to design config files for each environment in github?

I have a list of application configs and business configs in a particular root folder inside our git repository. Below is our current structure as of now: We have a root Data folder and inside that ...
-1
votes
0answers
20 views

Patterns for updates for other rows on a create of entity for an user?

Consider an entity that can have multiple rows for each user and it has a property that should be true for only one row for a given user. I am on the NoSQL database (AWS DynamoDB) On my service layer -...
0
votes
1answer
118 views

Why is the UNIX / FP style of smaller function composition not common?

TL;DR Why is the UNIX / functional style of composing and injecting smaller functions so much rarer than the Beck/Fowler/Bob refactor-to-objects style when it comes to writing maintainable, "...
1
vote
1answer
103 views

Event Sourcing/CQRS for Self-Related Entities

I'm building a platform that has an entity named content. There's a clear boundary around what defines content except that it can have relationships with other content entities. Up until now, there's ...
0
votes
2answers
188 views

Anti-pattern in which code blocks are indirectly used as parameters

I was recently trying to explain a particular anti-pattern to some novice programmers and found that it was hard to express without an overly-detailed example. I'm sure it has a name and that someone ...
0
votes
0answers
17 views

Scalable database design review

I'm doing some research on how to scale our current SQL database and need some advice with a possible solution. The goal being able to handle more data and doing it in a way that performs well. We ...
1
vote
2answers
54 views

How to write documentation for CLI app that requires stdin?

I am writing CLI program that can accept very long strings. For this reason I decided to pipe the data into the program as I would hit limitation of the shell / OS. How should these CLI program ...
4
votes
1answer
97 views

Real-world scenarios for protected inheritance

C++ supports protected inheritance: A class can derive from a base class B in a way that the "outside" world doesn't see that class "as a B" but the class itself and it's derived ...
0
votes
0answers
15 views

What is the recommended way to start a long-running containerized analysis in R from NodeJS?

I have a frontend through which users can submit analysis requests, which are inserted into a database. These analysis requests are received in a NodeJS server using Postgres notify/listen. Using ...
0
votes
1answer
128 views

Is it ok to Inject a whole object instead of only the dependencies

I'm working with the Dependency Injection Pattern in Unity3D (an engine which uses MonoBehavior, a class that doesn't have a constructor, as the base class for all of its game components), and I ended ...
5
votes
5answers
285 views

Does software which implements scientific models require unit tests?

I work in a field where lots of code is written, but hardly ever tested. This is because we are foremost scientists who try to solve problems with code. The few coding courses we had, focused on the ...
0
votes
1answer
57 views

How to handle authentication & authorization inside microservices

Example Application I will try to explain my problem by using a familiar application. Lets'say I'm building a Discord / Slack / Microsoft Teams clone; and for simplicity’s sake, it will contain 2 ...
-1
votes
2answers
56 views

DDD, service and localization best practices?

I'm building HTTP API with DDD principles. The end goal is that the server runs on some chosen language X but the clients can use what ever language the software supports. Service has state, but HTTP ...
-1
votes
1answer
24 views

Inserting dissimilar excel files in SQLdatabase

I have a bunch of excel files(Multiple sheets) with some data of similar types, but i'm having troubles when this data has to be inserted in SQL DB. the data in these files are unordered (eg: the ...
-2
votes
1answer
52 views

Unexpected shutdown before a saga completion

Suppose we have some microservices and a saga will run to do a transaction in 6 microservices. What if the whole system dies(unexpected shutdown), on middle of saga process in the step number 4?(...
0
votes
0answers
14 views

Reactjs + nodejs external authentication flow

I am developing a RESTful application with nodejs in the backend with express.js as middleware. I am also developing a client in Reactjs. I want to use an external authentication service (LDAP/AD/ADFS)...
-4
votes
1answer
47 views

How to Handle Out of memory?

We are developing a mobile app where consumers (companies) create AR content for their products. The content ranges from simple pictures to gifs and embedded videos. We already released versions ...
-3
votes
0answers
59 views

Are multiplications in Short type quicker as in int type ( in Java)? [closed]

I have seen on this forum that performing the same operations with long (type of variables) takes more time as they are declared as int. See , for example: https://stackoverflow.com/questions/19844048/...
1
vote
1answer
82 views

How to manage 2 libraries that do mostly the same things in a project?

I am encountering a design problem on a new project. I have chosen the library Luxon (https://moment.github.io/luxon/) because I think it suits this project perfectly. Date-fns (https://date-fns.org/) ...
-3
votes
1answer
38 views

How to store and query multi selection options?

An example would be an Automobile sales application where Autos are stored with their Make and FuelTypes. An application user would save their search criteria in a SearchCriteria table which would be ...

15 30 50 per page