All Questions

0
votes
0answers
51 views

Should I repeat unnecessary else condition? [duplicate]

I would like to know what the best way is for dealing with a situation where I repeatedly check a condition within a function using an if-elif-else chain, and if the condition is else, I raise an ...
0
votes
0answers
31 views

DDD: aggregate root and references to child entities

I'm struggling a bit to grasp all DDD concepts and apply them to a real project. Let's say I have the following domain concepts: Car: a vehicle moving inside an area Path: a journey made by a car, ...
-3
votes
1answer
114 views

Is algorithm performance dependent on the programming language used? [on hold]

I have studied complexity of algorithms that how long an algorithm will take to execute completely, then why it is said that certain programming languages are faster than others such as C++ is faster ...
0
votes
1answer
27 views

Removing unused directives from a file which is not related to the pull request [duplicate]

I'm actually working on the web application which was made using technologies such as asp.net core, c#, angular, ef core. For the version control and CD we use Azure DevOps. As a team we try to follow ...
-5
votes
0answers
31 views

Saving a number in p/q form in database C# [on hold]

i want to save the OPD number i.e. Patient's OPD number in the form of 1/100, 2/100 and so on... but in database it saves in the form of floating point i.e. 0.33333 etc.. any help regarding this?
0
votes
1answer
52 views

Writing assertion for unit testing queue data structure

I have data structure queue with 2 operations: typedef struct queue queue void enqueue(queue *q, void *elem); void *dequeue(queue *q); queue *read_from_file(const char *path); I want to write ...
-1
votes
0answers
39 views

RabbitMQ persistence of big messages (2000-3000 lines json) vs RabbitMQ small messages (ID only) + Database (json) [on hold]

I am thinking about using RabbitMQ for transferring relatively big messages (a few thousands lines json object) (with persistence) across the different services and I heard from my colleagues and read ...
0
votes
1answer
53 views

Applying BDD accross multiple microservices

I'm involved in a microservices based application. I'm trying to apply the BDD process for this. I need a recommendation how to apply this process correctly given this type of architecture. It is ...
0
votes
1answer
47 views

How to organize work with a few projects with shared codebase?

We develop two projects (and more in future) with JS, Vue.js, using npm, and we store each project in its own git-repository. We want to place common components (buttons, page-parts and page ...
1
vote
1answer
48 views

Should I place constants related to reading a specific type of file in the FileReader class or in a separate class?

I am writing a class FileFoodReader (in java if that matters) that reads input from a file containing information about foods and their nutritional values. The file has to fulfill some requirements ...
0
votes
2answers
43 views

Should db commit and message-queue produce be one transaction?

I am making a microservice based architecture and I'm actively seeking antipatterns and trying to avoid them. In multiple scenarios, I have a database commit followed by a message that is produced to ...
1
vote
1answer
27 views

Modular Quiz in Swift

I've been working on the architecture of my Apps for a while. In the past I've used a SQLite database which I opened in the AppDelegate (Oh dear), and then created a global variable (really!) to ...
0
votes
1answer
36 views

How to design a high-scale, reliable, distributed and periodic task (cronjob) execution service?

Assume you are tasked with implementing a "cronjob as a service" where you are supposed to be able to run potentially millions of periodical tasks (to simplify, making HTTP requests to URLs) with ...
0
votes
0answers
14 views

Should I have business layer between mobile app and remote database? Is MySQL fast enough for large amount of requests? [on hold]

I need some help with designing a mobile app which customers could use to order food, so the app should have a workflow like this: Login Search for restaurants Choose food (e.g. BigMac) Pay Pick up ...
-2
votes
0answers
20 views

Does macro in Scheme interpreter capture environment?

I'm trying to figure differences between macro and closure in Scheme. When "lambda" special form is processed, a closure is created and the current environment is captured with that closure. What ...
102
votes
5answers
7k views

What's the difference between using dependency injection with a container and using a service locator?

I understand that directly instantiating dependencies inside a class is considered bad practise. This makes sense as doing so tightly couples everything which in turn makes testing very hard. Almost ...
5
votes
1answer
153 views

Why are the instance variables are declared as private in immutable pattern?

As the title says , Why are the instance variables are declared as private in immutable pattern ? I think that the keyword final is enough to avoid any changes that can be done to the value of the ...
1
vote
1answer
85 views

Web API Bad Request design

My organization is developing a Web API server. We will also develop the only clients authorized to access the API. We will follow the usual technique of returning Bad Request (400) errors for data ...
-1
votes
0answers
16 views

Is there a way to run an Ant build in Bamboo without adding build.xml file directly to the project? [on hold]

I am trying to run an Ant/Ivy project in Bamboo with an external build file. I do not want the build file to be directly incorporated in the project. Is there any way to do that in Bamboo?
-3
votes
0answers
44 views

Are DDD Repositories and Factories pure fabrications (in a GRASP sense)? [on hold]

Repositories and Factories have no "real" matching Entities in the domain, whilst Entities and VOs do. Are they considered pure fabrications (pure fabrications in a GRASP sense)?
-1
votes
0answers
35 views

Does replacing Heap Memory access with Distributed In-Memory Cache(Memcache or Redis) scale in Micro-services? [on hold]

One of the reasons why Micro-services are popular is because they are stateless.However an application needs to maintain state obviously . The question comes down to What is the most efficient way ...
0
votes
1answer
61 views

Database schema for products and their packages

The product is water purifier, and we are selling packages included support for changing filters. Serial is a unique number identifying a single produced item and it's only for water purifiers not ...
0
votes
0answers
9 views

Where do JavaFX FXML controllers belong in an ECB architictural design pattern?

I am wondering where does the fxml controller belong in the Entity-Control-Boundary model? When designing a JavaFX application with the help of Scene Builder, Scene Builder generates an fxml file ...
0
votes
1answer
38 views

How to ensure persistence in an event-driven microservice architecture?

Right now we have a set of micro services with a client-facing gateway responsible for authentication and routing. MySQL database and RabbitMQ for the message queue. Internal services may queue up ...
1
vote
1answer
89 views

Domain Driven Design - updating part of aggregate

I'm playing around with DDD in a node.js project and struggling with updates to child entities from the aggregate root. For the sake of example, let's say I have two domain objects where Event is my ...
1
vote
4answers
240 views

What's the purpose of explicit encapsulation?

Assume you have a library in which every function is public. Sooner or later developers who use your library will come up with a stable pattern of usage. In that terms external information of how ...
1
vote
2answers
64 views

What are the benefits of aggregating structure and functions associated with it in one object?

What are the benefits of aggregating a structure and functions associated with it in one object? What are the benefits of explicitly decalring a class. If i write procedural code i already know that ...
-1
votes
1answer
33 views

How to name base classes so that it's most convenient for those extending a framework? [on hold]

I'm designing a game engine that is supposed to be overridden. I have, for example, a class called Character. Should I prefix this with BaseCharacter or should I expect that whoever uses the framework ...
0
votes
1answer
117 views

DDD & composition

I have a project to build, which has the following requirements: topup a wallet by paying money in exchange for credit; this has also the constraint of needing an approval from the finance team, if ...
0
votes
0answers
16 views

Authentication, bussiness logic and several entities in asp.net core

I'm working on an asp.net core application, using Identity as authentication/authorization management. Depending on the role the user can do "some thing", this is the normal way of authorization. But ...
5
votes
1answer
234 views

What is the right way to create a build system?

I'm a student, and I don't have much expirience with the building process. In the last few days i've read something about CMake and others build system generators, but other than that I don't know ...
0
votes
0answers
22 views

How to be more productive with CloudFormation?

When using Terraform instead of Cloudformation on AWS, I usually get immediate feedback on the terminal, which makes the work very productive. With CloudFormation, however, I tend to edit the file in ...
0
votes
0answers
8 views

What layer should resolve pre-existing Hibernate entities?

Imagine an application that consumes an external data stream and creates objects of this type: @Entity public class Event { @OneToOne(cascade = CascadeType.ALL) private EventInfo info; @...
3
votes
5answers
322 views

Why are there so many frameworks for web development? [on hold]

I am currently a Junior back-end developer, I write Java and Scala and I love it. I really want to get into web development, but it seems like every time I look up some guide, it is really just a ...
1
vote
2answers
80 views

Object Oriented Approach to Calculations

I need to determine the average miles per hour for a trip and an object containing a list of trips. I'm thinking of two approaches. First approach, have a MphCalculator class that I would inject into ...
0
votes
1answer
21 views

What are the differences and connections between UML Profile diagram & UML Class diagrams

I am doing research for developing a software platform and I have created some class diagrams for the platform. My supervisor adviced me to use UML profiles as well to describe the platform in a more ...
6
votes
1answer
201 views

Implementing A “Draft” Mode For Posts

My team is debating how to transition a portion of our Rails application to allow "drafts". For simplicities sake, we can think imagine a Post object, and now want to allow a kind of draft mode. Our ...
0
votes
1answer
114 views

What is the best practice for sending a large array of strings to an API

I'm building a simple app that is a client web application and an API behind it. I'm combining two third-party APIs, one needs to be called from my client application (for ease of authentication) and ...
2
votes
1answer
191 views

How to handle database connection password?

I have a question about using databases in my application. I have the User table which stores password for my users. I know how to handle user authentication, but how to handle the password for the ...
0
votes
0answers
22 views

DynamoDB - Event Store on AWS

I'm designing an Event Store on AWS and I chose DynamoDB because it seemed the best option. My design seems to be quite good, but I'm facing some issues that I can't solve. The Design Events Events ...
2
votes
2answers
60 views

How to manage updates after a release?

I wonder how should we manage the commits we make AFTER a version is released, according to SEMVER. For example, I just released 1.0.1, now I have 2 choices: Immediately change version to 1.0.2 and ...
3
votes
1answer
75 views

Design Review Of SOLID Principles For An Autonomous Mobile Robot

I am self-learning robotics, C++ and good object oriented design. I have asked various questions over the past couple of weeks: 1 and 2 that have lead to the following design. The design goal is for ...
1
vote
3answers
148 views

Is it possible to throw compiler error when attempting to use an unimplemented method?

The backstory is long but the general idea is that I'm beginning an iterative refactoring process to replace a poorly designed data access layer with a new one under constraints from above. We can't ...
2
votes
1answer
36 views

Tracking revision history by recording events

I've got a requirement to create a data structure that allows for users to view revision history. Not just the history of a table, but the history of the entire structure at a given point in time. A ...
0
votes
2answers
233 views
+50

Application/Database design where two tables have both 1-to-many and 1-to-1 relationships

I have an application where the requirements are to show a list of (just for example) car manufacturers. When you click on one of the manufacturers, a list of car models show up. You can then click on ...
0
votes
0answers
5 views

Problem to structure code permissions (ACL) [migrated]

I have a problem here to structure the code to validate the permissions. Let's suppose I have three actions: read:own_users, read:my_users, read:all_users. And I have a route get/users. I want this ...
0
votes
2answers
119 views

How do companies store private keys offline but still sign code with them?

I've heard that companies store their private keys offline "in a safe that will never be opened" and stuff like that (the context for this is a console developer like Microsoft keeping the Xbox ...
0
votes
2answers
56 views

Unit tests: tree of dependent tests

I frequently encounter situation where I have very basic tests, and if those fail, it doesn't make sense to run many other tests. Therefore I want to declare a tree of dependencies between my tests, ...
1
vote
1answer
150 views

If we are allowing anonymous users to register inside our web site, how we can prevent hackers from occupying others' email address

I am planning to start a new asp.net core MVC web application. One of the features we are having is that anonymous users can register inside our web application by entering their email addresses. then ...
0
votes
0answers
32 views

Retrieve latest files from a directory using UUID or incrementing integer approach [closed]

I have a download button in the UI, user clicks on it and download 3 files in a zip format. It's not necessary that the files are already there(on the server) when download button is clicked because ...

15 30 50 per page