All Questions
62,271
questions
2
votes
3
answers
212
views
Method that returns an object is it adequate for TDD?
Let's suppose I want to follow TDD (Test driven development) and I want to implement a class that is supposed to return a considerable object.
It starts to get really complex in my opinion and doesn't ...
23
votes
6
answers
6k
views
How important is it to clearly understand requirements and architecture before starting to code? [closed]
Whenever possible I have been requiring an understanding of the requirements and architecture for the next scope of work before starting to code.
Sometimes due to schedule pressure on larger projects ...
0
votes
1
answer
48
views
Including currect user/roles data within object state in .Net applications to control object behavior
I am building a .Net Core Blazor Server application. The application creates records of a Project class which move through a workflow with various phases of review and acceptance/rejection before ...
0
votes
5
answers
234
views
Is there a term that describes the property of being synchronous vs asynchronous?
Is there a term that describes the property of being synchronous vs asynchronous?
The term that most naturally comes to mind is "synchronicity", however I only see this term being use in ...
1
vote
1
answer
101
views
Is it normal to use multiple repositories in one viewmodel?
Does it violating any conventions? Is it acceptable by MVVM? I have to separate the local data repository and online repository, but for login I have to use multiple repositories for getting response ...
3
votes
2
answers
158
views
Is it a good practice to have two unique IDs for an SQL-Database?
Currently I want to create a SQL database effectively and "logically". Lately I read a lot about the issues that it is (mostly) not a good idea to define primary keys that can be seen from &...
-1
votes
1
answer
40
views
Looking for specific paragraph in RFC [closed]
Some decades ago working with IRC, I remember a paragraph of some RFC and now I'm looking for it. I don't remember it by memory, only a concept:
When it comes to communication between two services, ...
-1
votes
0
answers
19
views
How to apply modularity by function in Python web apps?
I've been working on expanding my skillset and teaching myself Python to develop a web app using Flask. The reason Python was chosen was for its viability for machine learning applications. I expect ...
4
votes
3
answers
221
views
Should every service have its staging environment?
I'm trying to break down my dockerized monolith into a few services that can be deployed independently.
Right now, I have a development environment, a staging environment and a production environment. ...
1
vote
3
answers
151
views
What approach should I use for auditing config changes to achieve similar functions as Git blame?
We are storing our configuration files in S3. Each file is a JSON file. When config changes, the old file is backed up and a new file replaces it. These happen behind a service, where it also ...
0
votes
1
answer
105
views
Avoiding "handler creep" in React components?
An issue I find myself having with code layout in my React components is that I end up having to define too many handlers.
I generally write only functional components with hooks, but within the body ...
0
votes
2
answers
175
views
Using GitHub repository as API
I have a set of complex data, which I use on various subdomains of my project. Data are static most of the time, it changes few times per year.
Currently, it's hardcoded in every project which needs ...
0
votes
1
answer
52
views
Determine when distributed and parallel process is completed
In a distributred system that uses parallel processing to complete tasks and I want to determine when all sub tasks have been completed, what design method or principals can i apply ?
I am using ...
1
vote
1
answer
58
views
Client-Server-Architecture: Move computation logic from client to backend - Algorithm needs certain new values while running (User input) and continue
Background: At work I was tasked with developing a new demo web client to replace our Windows Form application in the future. Our back-end is developed in Java and works stateless as REST services. ...
18
votes
8
answers
4k
views
Why assert for null on a object before asserting on some of its internals?
Let's consider the following test.
[Fact]
public void MyTest()
{
// Arrange Code
var sut = new SystemWeTest();
// Act Code
var response = sut.Request();
// Assert
...
0
votes
2
answers
67
views
How to update a child entity of an aggregate root when I modify a property in another aggregate root?
I have one bounded conext, offers, that has Offers as root aggregate and Items as child entity.
I have another bounded context, products, which has Products as root aggregate, Providers as another ...
-3
votes
1
answer
43
views
What other skills combine mathematics and programming besides data science/analysis, machine learning? [closed]
My math skills and my interest in programming led me to search for a field combining the two, and I found data science/analysis, machine learning, but I was surprised that there was almost no demand ...
0
votes
0
answers
94
views
How to design entities to keep up with the depth of JSON objects?
To better context see Rich Authorization Requests for OAuth2
As u can read here there are some common data field types like actions, locations etc.
So I have created C# entity for EF as below:
public ...
39
votes
6
answers
9k
views
What's the correct way to do pair programming?
We've been utilizing pair programming (or something like it) for a few years. As a senior engineer on the team - I find that pairing actually negatively impacts the team's throughput.
The common ...
0
votes
1
answer
102
views
Are there any guidelines for calculating hardware requirements in a containerized environment?
At an architectural section of an interview I was asked to produce hardware requirements for a certain system I designed. It was a microservice-based system which runs in Kubernetes, Openshift or any ...
4
votes
1
answer
145
views
I'm adding Windows Home support to my client application. How can I perform automated testing?
My team and I publish a client app as part of our solution. It includes a CLI but there are other components as well. Currently most of us develop locally on MacOS, and as part of our CI/CD we have a ...
3
votes
2
answers
233
views
Preventing POST requests from being lost when database connection is lost
I am working on a project to stand up a central database to replace a current massive file-sharing/syncing system of physical log files and text configurations for the primary application I work on.
...
9
votes
5
answers
3k
views
Do test-driven and behavior-driven development belong to the "verification" category?
In university, we were introduced to the two terms "verification" and "validation". The definitions can be summarized as follows:
Validation checks that the specifications and ...
3
votes
2
answers
1k
views
Is this approach to website design adequate or am I making a mistake?
I'm not conversant with this topic, and therefore I watched a tutorial about a one-page dynamic PHP website (quite educational in my opinion) in which the creator designed the following pages.
For ...
-1
votes
4
answers
197
views
Does Scrum prescribe work item statuses and their meanings?
At work, we're using Scrum with Azure DevOps (specifically using the Scrum process to manage our items) to run our sprints.
My question is, does the Scrum process within Azure Boards or Scrum in ...
0
votes
1
answer
66
views
Sending and receiving results from microservices
I welcome everyone. I'm trying to understand microservice architecture.
The task such: is 2 services. The first - for example, books rooms in a hotel. The second is something like a console interface ...
1
vote
1
answer
147
views
Storing multiple instances on a Singleton?
RefactoringGuru's example Singleton in Python has an _instances dictionary field
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls....
3
votes
5
answers
696
views
What is the best way to make an if statement condition itself conditional?
Apologies if this is answered elsewhere here but this specific question is somewhat hard to search for as you might see. I'm writing a script currently that essentially has a simple if-then within a ...
-1
votes
1
answer
115
views
When does a REST API stops being one in terms of state management?
As far as I understand, there is no certain boundaries for the RESTness of an API. However, I would like your help to understand how large and long (in terms of running time) a caching or state ...
0
votes
0
answers
26
views
In a layered backend architecture is the repository/manager part still relevant? [duplicate]
We all know that in a layered backend architecture we have the Controller (or view) > Service > Repository (or Manager)
The Repository part is the part that retrieves and updates the DB.
But now ...
1
vote
3
answers
112
views
Selecting a large set of information from a database
So this is a topic I have never really tackled, so bare with me as I try to describe my issue and the scenario.
I have an API endpoint in my service that sends emails to a bunch of users. The set of ...
0
votes
1
answer
155
views
Custom #pragma directives
I'm creating a language parser on a microprocessor in C++. For the tables of keywords and commands, rather than maintaining a single curated file (alphabetically sorted, etc), I'd prefer to declare ...
1
vote
1
answer
94
views
Wrapper class for min/max clamping and validation
I have a lot of classes that have numeric values that are configurable by the customer during runtime and should be clamped between a min and a maximum value. The value changes should also be logged. ...
1
vote
2
answers
107
views
In DDD, is the root aggregate who has to expose the methods to tell if a child entity can be create or update?
Thinking in the classic example of orders and lines.
I would like to use the domain classes in the presentation layer, so as to check if an action or a property is correct, the main code is in the ...
0
votes
0
answers
64
views
"Select All" in Table is now sending too much data to Server via API - Alternative Ways to Send to Server?
Outline of the current architecture of our web app outlining the issue I'm seeing
Client-side app is React, talking to a server running the Play! framework via an API.
On the page is a table that ...
2
votes
1
answer
86
views
Avoiding modification of multiple aggregate roots in one transaction
I'm modelling a scheduling application and wonder how it could be avoided to update multiple aggregate roots (AR) in one transaction. I understand the fundamental problem of changing multiple ARs in ...
-3
votes
2
answers
166
views
How to use Github Copilot for business software evolution (if possible at all)?
Github Copilot got update yesterday (2023 St. Valentine) https://github.blog/2023-02-14-github-copilot-now-has-a-better-ai-model-and-new-capabilities/ but still no information for its use in the ...
3
votes
2
answers
109
views
Arrow head for a reply message in UML Sequence Diagram
In UML sequence diagrams, there is the possibility to specify a synchronous call with a reply message.
Example (taken from https://en.wikipedia.org/wiki/Sequence_diagram)
When modelling that in ...
2
votes
3
answers
279
views
What would be a good metric of quality of a single bug fix?
If you solve a bug in a poor way, it might result in even more bugs in the future, so I need a way to validate if the fix was actually good. Time between the bug assignment and issue closed doesn't ...
1
vote
1
answer
114
views
What is a professional format for blackbox debugging someone else’s app and submitting a report to them?
The idea is that if an app I like periodically has noticeable bugs or issues, and it’s commercial, not open source (in this case, AirBNB, but I feel this way often towards many apps), I would like to ...
2
votes
4
answers
182
views
Should story points be re-estimated when rolling un-finished stories into next sprint?
We plan our sprint capacity in story points - so for example we have 20 points available when planning a sprint.
When we have stories which were not completed in the previous sprint, we generally roll ...
0
votes
1
answer
105
views
Should I use my View Model to Test my Views in SwiftUI?
I was reading a post about testing in SwiftUI and the author said that don't write unit tests for your View Models that tests the UI of your view. The example he gave was a simple counter app.
...
1
vote
1
answer
109
views
Aggregating responses from several services with reversed proxy (API gateway): where to place code?
We have a system with a few microservices and multiple clients (Web, mobile). Currently, only one microservice (let's call it "Master MS") exposes a public API, which is used by all clients. ...
1
vote
1
answer
54
views
How to deal with mixing models between services?
I am working on an API that has a User resource to represent the current user and a User service that handles business logic for representations of this user.
I need to introduce an Organization ...
17
votes
10
answers
6k
views
Should serialization and deserialization be "atomic" transactions?
I am wondering if serialization and deserialization of classes should always be treated as an "atomic transaction?"
What I mean is, if an error were to occur during the process of ...
1
vote
3
answers
173
views
Is in my case role based access better than permissions?
Hello StackExchange community, I'm in a bit of an impasse for my current project.
The software in question is a collaborative program designed to let employees work together on the platform and assign ...
0
votes
1
answer
53
views
How to design a database wherein multiple tags(string) are to be associated with an id per user?
I have a similar situation to the user here How to design a database wherein multiple tags(string) are to be associated with an id?
However I'm designing a system where each association (between ...
0
votes
0
answers
53
views
Refactoring: where should master data reside?
I inherited a backend project and want to refactor the management of master data. The master data consists of a couple of database tables that contain fields like year, rebate_in_percent or category.
...
4
votes
7
answers
399
views
How to apply TDD to very high level functionality?
Another name for this question could be: How to TDD the main function?
My situation: I'm writing a program from scratch that runs a sort of simulation, and I want to apply TDD to the whole development ...
1
vote
1
answer
86
views
Is it an acceptable pattern to put derived classes inside an abstract base class in Java?
Suppose I have some Java code such as the following (in this case, the use of the name "interaction" is referring to interacting with an object in a video game):
public abstract class ...