All Questions

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

Different input param for the same logic flow

I'm trying to find the best design approach to handle a design change in a new project I'm working on. At the moment, the flow runs and makes some calculations based on a parameter which is used. ...
-2
votes
1answer
56 views

In a tennis scoring program, what would be a good approach for storing and presenting both standard games and tiebreaks?

In a tennis match, each game has the possible scores of Love, 15, 30, 40, or Advantage. This could be modeled as a dictionary [0: "Love", 1: "15", 2: "30", 3: "40", 4: "Advantage"] or enumerated type ...
3
votes
1answer
51 views

Managing multi-server monthly transaction aggregations

Context: A system tracks some sort of transactions (e.g. money flow) for it's whole user base. At the end of the month each entity capable of receiving transactions has to be sent exactly one bill ...
2
votes
2answers
56 views

Organization of C++ source code for reusable components

I'm implementing a custom templated container as part of a learning project in C++. The container makes use of different components like serialization, memory management, iterators. I am wondering ...
1
vote
3answers
49 views

What http error to return in case of validation and business rules in a domain driven design api

I have a .net core api trying to implement it according to domain drive design principles. In the domain layer there is a public Create method that contains all validation and business rules. If one ...
4
votes
4answers
245 views

How to ensure that developers see only the project modules they are working on?

This is my first time PM experience. I have created a developer team and we want to work on an Angular-NodeJS project. I have defined some tasks and divided the project into the different modules/...
-3
votes
1answer
64 views

What exactly is HTTP/2 protocol

Saw below definition on https://http2.github.io/: What is HTTP/2? HTTP/2 is a replacement for how HTTP is expressed “on the wire.” It is not a ground-up rewrite of the protocol; HTTP methods, ...
-5
votes
0answers
24 views

What device(s) can connect a USB printer to the network for connecting to it via TCP/IP? [closed]

I am a mobile app developer, and I have a point of sale app for iPads that at the time of making a sale, the app prints a ticket. Previously I used to use the Apple AirPort Express to connect a USB ...
0
votes
2answers
99 views

How to speed up my software development workflow? I'm using Visual Studio 2019 to build, compile, run tests for dotnet, C#, Docker containers, etc

I am primarily working with C#, dotnet and Visual Studio 2019 with extensions like Resharper enabled. Visual Studio with Resharper is a memory hog. I currently have the following PC at home where I ...
1
vote
0answers
28 views

Memory management in node.js

I'm writing a web server as a test project in node.js Whats really bothering me so far is the lack of control or even awareness of memory usage. Naturally I want to cache some stuff in RAM for faster ...
1
vote
5answers
86 views

Succinct and explicative way to name “cooldown” variables

I am struggling with naming 3 variables defining the following concept: An action, after being performed, is not available for an amount of time and then is available again. The concept comprises 3 ...
-4
votes
1answer
27 views

TestCaseSource in NUnit 3.12.0

I have this unit test: [Test] [AutoMoqData] [TestCaseSource(typeof(PhoneNumberTestCases))] public void PopulatesPhoneProperty( string inputValue, string ...
1
vote
2answers
148 views

How to avoid type checking with Java/OOP in this situation?

I have a collection of animals (interface) which contains birds and cats (both also interfaces). I want to print out all the cats to the console and I am forbidden to use instanceof (I did not make up ...
2
votes
4answers
211 views

How do you assess the damage in a system that has been using floats or doubles for money?

I've been assigned to a code base responsible for millions of dollars of transactions, per quarter, and has been in use for over a decade. Sifting through the solution, I see doubles used everywhere ...
-2
votes
1answer
94 views

Why would you make a struct without typedef?

Since I cut my teeth on code with OO, I’m biased toward using structs as classes without methods. However, there’s probably a good reason that typedef isn’t the default behavior of struct. What is it?
-2
votes
1answer
48 views

How can I get back to having only the master bookmark in Mercurial?

I am very confused in what I did with this mercurial repository ... I reversed a commit and after that I was never able to have a "unique" structure in my repository again. Can someone help me? > ...
4
votes
3answers
128 views

Where to convert primitive types in meaningful types in Clean Architecture / Onion Architecture

The book "Implementing Domain Driven Design" (page 361) suggests to use special types to distinguish several kinds of IDs, e. g. using BookId(1) instead of just 1 of type Int or Long. In my Clean ...
2
votes
2answers
136 views

Builder Pattern: Is it acceptable to use “passing-by-reference” on Director methods?

For teaching purposes, I am trying to create a PHP implementation of a conceptual example of Builder Pattern: First of all, some products: class Product1 { private string $attribute1; ...
4
votes
1answer
41 views

Error handling in Nest service layer

I would like to create a REST API with NestJs. But I want to add GraphQL as another top level layer later on. So for the start I have the basic layers controller, service and TypeORM repository. Let's ...
-1
votes
1answer
45 views

Data sharing on a multi-instance application

I would like to know which architecture is more suitable when considering data sharing between tenants: a Multi-instance (Single-tenant) or Multi-tenant architecture with a database by tenant. ...
1
vote
1answer
35 views

RESTful API design using HATEOAS - Decision on Structure

We're designing and developing an enterprise application using Spring Boot for REST APIs and Angular 8 as the web client. It's been an year since we started. When I started, I read multiple articles ...
-2
votes
0answers
16 views

Azure web service api usage per user insights

We have a API (written in .NET Core 3.1), published to Azure Web Services. This API talks to a database for authentication. After a succesfull authentication, the API connects to other databases, ...
0
votes
0answers
26 views

Optimizing Phi Instruction Placement after changes in CFG

I am unable to find an algorithm for optimizing or eliminating Phi instructions after some Control Flow Graph modifications. I have found algorithms for destructing and constructing the SSA form, and ...
3
votes
3answers
151 views

How to clone an object graph and keep relationships of objects intact?

In my ASP.net core application with Angular 2+ client, I work with a complicated object graph. In the object graph I have some objects with references to each other. I have a simplification included ...
-1
votes
2answers
52 views

SyML/UML Activity diagram: how to model an OR gate

In a SyML/UML activity diagram, how do you implement an OR gate ? There immediately came to mind to use a merge node. But does a merge node always have to come after a decision node? Also, I have ...
0
votes
0answers
17 views

Deployment best practices for GAE Microservices

We are building some microservices that we will likely be deploying using GAE and I am fairly new to GAE. I’ve done a lot of other development in my day, but this paradigm is a little different. I’m ...
0
votes
0answers
23 views

How do I properly secure a Spring Boot app serving server-side rendered pages and API?

I'm wondering how do I properly secure this example app (https://github.com/brunodrugowick/spring-thymeleaf-vue-crud-example). The app is: A Spring (Boot) app with server-rendered pages via ...
-2
votes
0answers
27 views

Is there a benefit incorporating TLS 1.3 into OPC-UA [closed]

TLS 1.3 seems to have a strong benefit of ephemeral keys which adds a measure of security. Does anyone know if there are plans to incorporate it into a future spec of OPC-UA? Would it make sense to ...
1
vote
1answer
16 views

Identity Server 4 Authentication - Security questions around using the same API for internal application and third parties

So, I have an API that authenticates with Identity Server OAuth2 and gives our user a JWT token when logging in through a front end application, this is a token that has access to everything. The API ...
1
vote
2answers
64 views

Separate database in microservice architecture

I'm trying to create project siteWeb and mobile app with clean Architecture and Microservices. create identity service with separate database A and make another api service with other database B. for ...
1
vote
1answer
40 views

Tips for module naming and criteria for grouping files in a directory

It appeared, that I have in my pet project two abstractions: asset loaders and drawing tasks. For each abstraction I have some classes representing them (currently a single class for drawing task ...
3
votes
0answers
89 views

Windows c++ (piracy): strategies for preventing multiple binaries from being cracked by a single patcher [duplicate]

I am developing a piece of commercial software for Windows, that requires users to obtain a license key in order to use it. It is run locally by clients with the assumption that their machine may not ...
1
vote
2answers
93 views

How to name two versions of the same object, where one has a smaller amount of data and one is the “complete” object

What is the best way to name two classes that describe the same object, but where one of those classes does not hold the complete information? And should I make one of the classes inherit from the ...
1
vote
1answer
61 views

Should we keep very similar files with slight feature differences under different names?

In my team, we use git branching to keep different features separate (of course). However, one co-worker insists on keeping these features in different files as well to avoid merge conflicts. For ...
-2
votes
0answers
30 views

How to document complex software projects? [closed]

I want to learn how to document complex libraries or software products. My goal is that the clients, the requirement team and the developers understand what the product does. I want this document to ...
2
votes
3answers
101 views

How should an API handle timezone related data?

I have data in my database in UTC time format in this format (pseudo): [ { "date": "Date: 2020-02-12T08:00:00+0000" "productsSold": { 0: 122, 1: 130, 2: 90, ......
0
votes
0answers
28 views

What to Use In Abstract Factory Producer to Choose Concrete Factory? [duplicate]

So to create a concrete factory that extends from an abstract factory class, I usually create a 'producer' class to determine what abstract factory to use. For example: public abstract class ...
2
votes
2answers
88 views

DB design while designing the system

Recently we had a discussion if rough DB schema (high level tables and columns) design should be part of system design phase or not. We have two confronting approaches in the company. Let's assume ...
1
vote
1answer
88 views

Calling a private method in a setter to update object at every change of the property

Code below shows setting a value of an object's property and calling a private method in a setter to update the status of the object. Is this call a good practice or setter at most should only ...
3
votes
4answers
105 views

Factories and static methods

So almost every post I read about oop by purists, they keep stressing about how using static methods is anti pattern and breaks the testability of the code. On the other hand every time I look for ...
3
votes
3answers
181 views

How to use strategy pattern more effectively?

The problem is the following: I have to download a set of JSON files and convert them to a certain format. There are 5 output formats (Let's call them A, B, C, D, E) and all of the downloaded json ...
0
votes
1answer
18 views

Non regression test for small set of data data driven from database, how to handle future data

While writing this question I found out that I'm faced with 2 problems: a testing one and a production one but I hope that resolving the situation can solve both issues. Now the question: I have a ...
1
vote
1answer
36 views

Finding Event-Oriented Patterns in temporal sequence

I have a 24 hour "sliding window" sequence of "start" and "stop" events in memory comming from an iOT device. I'm only interrested in finding "stop" events followed by "start" events in order to ...
-1
votes
1answer
61 views

How to keep components modular/independent in a layered architecture? [closed]

Lets say we have a layered architecture where A->B->C are three different layers. Function calls are passed from A to C and data is passed up from C to A. I think in this case A will have a reference ...
0
votes
3answers
144 views

Should I make the class static or non-static for the following case?

I have a class which has the purpose of providing file operations i.e. providing functionality to create the file, read, write and rewrite to the file. So, the main constituent of the class is ...
-2
votes
1answer
82 views

Thoughts of Google Cloud App Engine Reliability

I have been developing an app that will require a cron task every minute. We are handling our cron tasks with Spring Boot Scheduling. Although, I am a little worried about the following question: ...
7
votes
1answer
253 views

Why is Assembly Language called “Assembly”?

Why is assembly language called "assembly"? I was just watching the 1st video in the "Crockford on JavaScript" series. In it, Douglas says, ". . . the first program to make programming easier was ...
2
votes
2answers
221 views

Loop complexity in C Vs Python

Just now I was reading a Python question on stack overflow, about clamping a list/array of results to be within a certain range. Once of the more simple answers suggested something like: ...
0
votes
1answer
82 views

REST - PUT or PATCH when updating all properties of an entity

In a REST API, when I want to update all the properties of an entity, what is better to use in terms of good practices? PUT or PATCH? If it is better to use PATCH, why is PUT necessary? What would be ...
1
vote
3answers
229 views

Feature toggle: How to toggle without spreading same toggle all over the code?

Considering a feature needs changes at many places in different modules of the software: UI, business logic, backend, etc. What is a good approach to do so? We are using dependency injection and ...

15 30 50 per page