All Questions

0
votes
1answer
72 views

Multithreading - 2 active running threads calling each other without blocking itself

I have an implemented UDP receiver which is continuously receiving DTN packets (UDP encapsulated) and performing some operations on them. This whole process is working on a single main thread. However ...
1
vote
1answer
60 views

Data is in database or get from API, where should API request code goes?

For me, the data I want to retrieve may be in database for which I can use properties of model and also relationships, but if the record is not a property and no relationship exists for that ...
1
vote
1answer
136 views

How to design a reassignable global instance that can be referenced by many other classes

I have a DeviceManager class which can handle different physical devices, and to say there are Classes A,B,C, which require a DeviceManager instance as dependency. They should always use the same ...
0
votes
1answer
45 views

Is it a usecase for a factory pattern when loading configs in a constructor for an API call?

I have a class called GatewayAPI, which has to load configs from a file, when used. I first wanted to put the get_config() method in the constructor, but I don't like this design for testing purposes. ...
2
votes
2answers
114 views

Dealing with data arriving at a different times

I have a load balanced service that needs two data inputs to correctly give a result. One of these inputs comes from a queue, the other comes from user input. Most of the time the data that comes ...
1
vote
1answer
75 views

Ideas for designing a system for processing status updates [on hold]

Given that this question is related to my work, I will simplify what I need to do. The system consists of 4 primary types of statuses (internally, we call them events): Working, not operating ...
1
vote
2answers
51 views

How to deal with delayed updates?

I have a microservice-based system that has a product service and a store service. I'm using eventstore to propagate events between microservices, so for example when a product is created, the store ...
0
votes
1answer
78 views

What is the name of the pattern where the framework owns your event/state object and you don't keep a pointer to it? [on hold]

There's a pattern sometime used that I'd like to know the name for. It's when you have a domain-specific state object that keeps track of progress through some kind of multi-step process which is run ...
1
vote
0answers
25 views

OpenAPI 3.0 Code Generation APIs and Schema Models Best Practices

Me and my team is starting to build a REST API based of Spring Boot and for documentation purposes it’s OpenAPI 3.0 with Yaml files. There was a discussion about generating both APIs and Models(Schema)...
0
votes
3answers
199 views

Side-effect free programming language for reproducible data transformation

Is there a usable programming language that disallows all side effects except for its input stream (aka STDIN) and its output stream (aka STDOUT)? All executable scripts in the language should be ...
2
votes
3answers
112 views

What effects does memory space have on bitwise shifts?

It is true that the bitwise left shift operation (shl) doubles the value of the integer being shifted. However, when constrained to a finite space, such as 8 bits for example, left shift will begin to ...
3
votes
2answers
67 views

Build pipeline, dependency on unreleased package

My team is currently making some changes to our solution structure. Before the change we basically had a single solution file with about 40 different projects. Most of these projects are libraries ...
1
vote
1answer
95 views

What is the best way to handle the scenario in C++ where there are two methods that are identical, except one is const?

I am currently working on a program in which I encountered an issue (not for the first time) where I have two acessor methods for a data structure. The methods are identical, except one is const and ...
104
votes
17answers
18k views

How do you justify more code being written by following clean code practices?

Moderator note This question has already had seventeen answers posted to it. Before you post a new answer, please read the existing answers and make sure your viewpoint isn't already adequately ...
0
votes
0answers
30 views

Hot Partitions in Redis Cache (In memory caching) [on hold]

This question is not specific to any particular caching implementation. Generally when we talk about any nosql database they suffer from hot partition issue. Does the same issue occur in caching as ...
1
vote
2answers
109 views

Multiple use/semantics of the same database fields - is it acceptable practice?

I have ERP database whose good or person entities each have several hundreds of fields. Many of them are used for some subjects only. And hence senior companions (especially from the business division)...
0
votes
1answer
109 views

How to manage context: set as property on class, or pass as parameter with each method?

I am writing a service, which is to be consumed by API and Web controllers. The result of each call depends on a UserContext state. Should I pass this UserContext with each method, which includes a ...
1
vote
1answer
66 views

Conventional layout for using libraries in a C++ project [on hold]

I'm relatively new to programming. I just recently started making "medium-sized" projects, and for the first time I need to include a library. I believe conventions are important; if not universally ...
3
votes
4answers
259 views

Is a constant name related to its current value an anti-pattern? [on hold]

For example, suppose I have a string constant like this: const TITLEBAR_MESSAGE="Welcome back, %USERNAME%!"; I think it is more readable when it is named as const WELCOME_BACK_USERNAME="Welcome ...
0
votes
2answers
58 views

Bounded contexts and departments within company

We are working on several products as the IT department and we try to provide solutions for different departments within the same company. The core of our business is insurance and the main goal is to ...
0
votes
0answers
44 views

How much time is required to make a library's interlibrary loan system online? [on hold]

The Toronto Public Library (TPL) began its project to make Canada-wide interlibrary loans (ILLO) online in Mar. 2016. As of Mar. 18 2019, it's still ongoing and unfinished. I'm skeptical if this ...
1
vote
1answer
37 views

Recommended manner of installation for an open source web application and api?

I'm currently working on my own open source project. There are two parts to it at the moment, a .NET core web API and an Angular client side app. I would like to get your views on installation/setup ...
1
vote
0answers
27 views

is it better to have tracking fields that are maintained separately for arrays? [duplicate]

I wasn't sure exactly how to word this question, but basically, I have a struct stNeuralLayers (for a neural network I'm playing around with) with fields that are matrices (such as a double[,] ...
1
vote
2answers
103 views

Observer reporting to multiple layers up from the bottom of hierarchy

There is a swarm of objects. When a new unit of certain kind appears on the frame, the swarm integrates this object by calling some add_new_unit method. Above the swarm is a controller abstraction, ...
0
votes
0answers
17 views

What expectations are there of support when handing development over to a different contractor after my contract is terminated? [migrated]

This may be a better fit for a different site, but I couldn't really find one that served the intersection of software engineering and business norms. My primary concern here is about something I ...
0
votes
0answers
21 views

Move operator for class that has a member with deleted move operator [migrated]

Class X has a deleted operator= X& operator=(X const&) = delete; Class Y looks like this: class Y { private: X variableX; public: Y(int p) { variableX= X(p); } } I'm ...
1
vote
3answers
90 views

Using extraneous enum members for bounds/validity checking

A coworker of mine insists that this is the right way to write enums in C# public enum ExampleEnum { InvalidItem, Item1, Item2, Item3, MaxItem } We have enums defined like this ...
1
vote
1answer
58 views

ES6 - Where is it better to initialize a member - parent class or derived class?

I am trying to figure out if there is a better practice for initializing class members of derived classes in ES6 - in the child or the parent, and why? For example: Option 1: class AbstractAnimal {...
0
votes
2answers
61 views

How to implement a live purchasing system with remote client applications [on hold]

I am creating a website to allow users to purchase products from their accounts. However every purchase needs to be manually confirmed by a user in a remote location where each purchase can be ...
2
votes
1answer
126 views

How is x86 assembly different from Windows assembly, and does that let me circumvent Windows?

As I can understand, assembly language is just a symbolic representation of hardware instruction opcodes that a hardware manufacturer has offered/documented, based on the way they have designed their ...
5
votes
3answers
267 views

How to model public IDs?

While creating the architecture of a new project I struggle to come up with a good solution to handle public IDs. For example our users will receive a membership card. Each card has the membership ID ...
1
vote
3answers
134 views

Should we have one class for each responsibility?

Consider an Eg. of Library Management System, we can have a design where in a student can search for a book based on it's title from the list of books using a function, something like below (in c++) ...
0
votes
0answers
17 views

Rails Devise & React with Graphsql

I am a low lost as to fix an authorization/authentication strategy for a rails app (5.2). I am migrating the front end w/o an api. I have however connected the back end through a graphql flow. I am ...
1
vote
2answers
93 views

How to get ORM (Ef Core) Entities follow a DDD style . Which is the best approach?

I am considering mutliple options to face a problem. I want to develop software following DDD style. The problem arise when I have to define my entities and I am working with Entity Framework Core, ...
1
vote
1answer
150 views

Which programming pattern is best for checking which partition a number lies in?

I have an interval partitioned into “MECE” subintervals, and I want to check which subinterval a number lies in. (MECE stands for “mutually exclusive & collectively exhaustive”, meaning the ...
0
votes
0answers
36 views

ER diagram - feasibility of a requirement

I need to model the following requirement in an Entity-Relationship diagram. "Customers place orders, which contain a list of products with their quantity and prices. A shipment is made when ...
2
votes
2answers
51 views

Syncing two Notifications and Merging them Into One

I am running into this issue: Suppose that there are two independent services, A and B, and both process messages from C. Suppose that I have a service X that needs to know if a message m from C was ...
1
vote
2answers
71 views

Approaches to dynamically determining if concurrency needed

There is a series of procedures, each of which falls into one of two general categories. Most of these are of category 1: it would be best to execute them one at a time - the overhead associated with ...
-2
votes
1answer
41 views

How do you accomplish continuous delivery as a central services team?

We are a central team, responsible for around 10 services. Other parts of our company depend on these 10 services to write their applications, and we often have to collaborate on new features before ...
-1
votes
0answers
125 views

How to handle interface change between back-end and front-end during development [on hold]

Introduction In our development team, we divide developers into back-end and front-end teams. To develop a feature for a website, the 2 teams have to work in parallel. We starts by analyzing the ...
0
votes
0answers
70 views

Microservice Architecture in Azure - Ideas for improving performance

We are about to develop a microservice architecture with azure functions inside azure. We thought about using interservice communication with durable functions. On app site we want to use an async ...
-2
votes
0answers
45 views

Managing a project in c++. (Data analysis) [closed]

I'm about to take on a project for my bachelor's thesis in physics. I have to write a c++ code that simulates a particle physics experiment. It has to generate the measurements and collect all the ...
-2
votes
1answer
116 views

What is the best way of implement a virtual world like a garden? [closed]

I want to develop a virtual garden with a lot of kind of insects like ants, bees, etc... For example, if I want to create an area of 10x10m². I can implement this with ArrayList<ArrayList<...
2
votes
4answers
131 views

Git branches: Merging issues while having multiple release branches

We have to support multiple releases, so we are following git branching model similar to the above diagram. Now the problem is that we have to do lots of merging here example for fix/011, we are ...
0
votes
1answer
141 views

An approach to writing database applications [on hold]

I'd like to share my approach to writing database applications for small businesses. It's possibly unconventional, but it's something I have been developing for nearly 20 years. The approach I use is ...
1
vote
1answer
36 views

Storing answers of a form builder where question sections may be repeated N times

I built a form builder with which administrators of the system I work on can build forms (or blueprints as we call them). The structure of these blueprints are as follows: blueprint X section 1 ...
-2
votes
0answers
24 views

Extending a data class consumed in various place because one of the consumers requires a new field [closed]

I have a class A that is the return type of a process (let's call it M.getData()) that is consumed by several procedures through the code base (lets call them P1, P2 and P3). This class A is part of a ...
2
votes
4answers
128 views

Valid use-cases for white-box testing? [duplicate]

White-box testing focuses on testing implementation details of a component. Black-box testing sees a component as a black box accessible only via its API. Both Lean and Agile software development ...
3
votes
3answers
72 views

Can there be different use case diagrams of the same system for different stakeholders?

Can there be different use case diagrams for the same system with differing levels of complexity? My question arises due to the fact that use case diagrams can represent a single system in a complex ...
1
vote
1answer
91 views

Are “I'm writing android applications” and “follow open-closed principles” reasons to allow global state?

For example, suppose I have an android application, in simple, there are 3 activities : MainActivity -> Main2Activity -> Main3Activity ,which user can visit them in sequence (eg: by button ...

15 30 50 per page