All Questions

Filter by
Sorted by
Tagged with
3
votes
2answers
124 views

Composing and Inheriting from the Same Type

To start off with an example: I have a read-only Repository used for getting arbitrary values. This behavior can be implemented multiple ways. I also want to allow opt-in mutation of the repository's ...
-3
votes
2answers
51 views

What pattern for different data descriptions

We need to call a webservice which registers a shipment with either UPS or TNT. You fill in some details, call the function to register and pass json for details. Pretty basic stuff. Shipment shipment ...
-1
votes
3answers
87 views

Should methods with business logic be made private? [duplicate]

So I am writing a project using Spring Boot. All of my logic resides in @Service classes. I have separated each service class based on entity. For example - If I have two independent entities A and B, ...
1
vote
2answers
59 views

Can I state a use case as a precondition for another?

I have a use case describing the following: The actor can view the table of listings. and I want to create another use case where the actor can delete a listing. I consider viewing the table of ...
-1
votes
0answers
43 views

Prove that the time complexity of a function is O(n^3) [duplicate]

public void function2(long input) { long s = 0; for (long i = 1; i < input * input; i++){ for(long j = 1; j < i * i; j++){ s++; } } } l'm pretty ...
0
votes
0answers
13 views

Django: organization of project with dynamic database

Full-stack development is not new to me (1 year of professional NodeJS experience), however, I have not previously worked with Django. Therefore I could use some advice on what would be the proper way ...
1
vote
2answers
150 views

How to avoid cascading dynamic casts?

So, in general casting and dynamic_cast in particular are to be avoided. But I don't see a proper alternative for this: List<DerivedA*> ListA; List<DerivedB*> ListB; Bool Add(Base* obj) { ...
0
votes
0answers
65 views

value-based function dispatch

Problem to solve I have a method parse_doc that should dynamically determine a parsing function to parse document_id based on the value of the document_id string: # list of files that may have ...
-1
votes
1answer
63 views

Setter dependency injection or locator pattern

Let's say that I have the following class. class Application { protected $dependency; public function setDependency($type) { $this->dependency = ServiceLocator->...
-3
votes
2answers
81 views

What Design Patterns for encouraging component reuse?

One of the major issues that I am facing as a Website and App developer, is that certain components / features have to be redeveloped over and over again with a new project. For instance login, signup,...
8
votes
4answers
327 views

DDD in microservices - where to draw the line of responsibility of a microservice?

TLDR: If microservice A needs to combine data from services B & C (that are not aware of one another), should B (or C) do the data merging for service A, or it will be up to service A? In Details ...
1
vote
0answers
38 views

Golang / React Webapp Architecture

A project is structured as so: A build server listens to changes in two repositories: a frontend and backend repo. When it picks up a change it builds, tests, and deploys the updates to a production ...
2
votes
3answers
141 views

Entities vs. Services in domain driven design (DDD)

I wanted to get some feedback on the design of a chat application I recently developed. The application is written in PHP, but the language probably isn't important here. The main components are User, ...
-1
votes
2answers
46 views

iOS App Private Distribution

I have been confused about the best process for private distribution in iOS - imagine we are a company like Just Eat, where venues can sign up with us and take orders from customers via a customer app....
-1
votes
0answers
64 views

design pattern to simplify nested if statements

I'm implementing a search functionality and based on the query parameter i use a different class to search. I will only illustrate one SearchStrategy which is the SearchThreads, just to make the ...
-4
votes
0answers
26 views

Developing with an application using oauth (bypass in dev environment)

I guess the answer to this is more of a personal opinion than anything but I am using Azure active directory to validate users in my web application. This obviously can be a pain as I have to log in ...
1
vote
1answer
52 views

How do these two ways of enforcing alignment work together?

In Computer Systems: a Programmer's Perspective, Alignment is enforced by making sure that every data type is organized and allocated in such a way that every object within the type satisfies its ...
-2
votes
1answer
45 views

Does this alignment of structure objects apply only to structure objects being used as elements of an array?

In Computer Systems: a Programmer's Perspective, In addition, the compiler may need to add padding to the end of the structure so that each element in an array of structures will satisfy its ...
0
votes
2answers
49 views

How to name an association table connecting two tables having common name

I have two tables products and product_tags in my database having a many-to-many relationship. But I am having a hard time coming up with a practical name. So I was wondering if there is a standard ...
0
votes
2answers
57 views

What’s the difference between incremental and throw-away prototyping?

As far as I know, throw-away prototyping involves creation of prototypes in iterations where each prototype is discarded after one iteration. For incremental prototyping, the resources I referred to ...
0
votes
4answers
161 views

Prevent developer errors / debugging help

How much should I factor in potential future developer error when writing code? This works better with a few examples: switch(something) case 1: return good; case 2: return fine; case 3: return ...
1
vote
0answers
31 views

How do you design a micro-app Blazor project?

I have been tasked with creating a unified UI for my current company for our Blazor Apps. We have 15 or so apps and we need to add more. Our current requirements are: UI appears the same The Menu ...
3
votes
3answers
224 views

Is my understanding of SOLID principles correct regarding my concrete implementation?

I read everything and its opposite about how to organize its code. Of course, I try to follow the SOLID principles, but since I consider myself quite a beginner, I would need some outside advice on ...
1
vote
1answer
70 views

Unclear as to the informal definition of foldr

I've encountered the infomral definition of foldr in a couple of books. I've attached an image from Bird and Wadler's "Introduction to Functional Programming" (1988), but I've seen the same ...
-4
votes
0answers
26 views

What are Ionic Angular's advantages over Angular with plain HTML+CSS?

I'm part of a team that has just started using Ionic and I'm wondering, what advantages does it bring to the table? Personally, so far all the development I've done with Angular was using HTML + SCSS ...
2
votes
4answers
291 views

Isn't refactor on an existing and fairly new module a normal practice in software product development?

Currently when working in a scrum team in a software service company, who has a clean business domain. I am working on adding new features to an existing module. As the existing module is legacy, and ...
-2
votes
3answers
187 views

What to do when your client keeps jacking with the system you developed for them

What to do when your client keeps jacking with the system you developed for them I've had a client in the real estate training business for six years now. We have an ongoing weekly minimum time ...
0
votes
3answers
132 views

Specialization and LSP violation?

I have Document and ExternalDocument classes in my system, where ExternalDocument extends Document. The main distinction is that ExternalDocument holds onto externalDocumentId and externalEventId data ...
4
votes
1answer
143 views

How to separate “unmanaged” and “managed” code in my C++/CLI project

I am developing a project using C++/CLI and WinForms. It is a geometry project, which is why I have to use C++/CLI, because of the C++ geometry library CGAL. I chose to use WinForms for the UI because ...
-1
votes
0answers
33 views

Algorithm for rejecting old messages

I have a message queue where messages contain snapshots of Datasets. These datasets can arrive in any order unrelated to the order they are produced. (No influence on that point). The datasets have a ...
1
vote
3answers
100 views

DDD - How to validate an entity is valid when said entity is a different domain which i dont have access to

I am wondering how I would validate some actions in my domain when a parameter of an action needs to be validated, but that parameter's entity is actually in a different domain so I can't retrieve it. ...
-4
votes
1answer
48 views

Changing databases in general repository methods when using Dapper [closed]

I'm developing a multi-database application. There is one admin database and many customer databases which are identical in structure. I also have a generic RepositoryBase which looks like the ...
0
votes
1answer
48 views

How to build a data pipeline through several microservices

We are building a microservice architecture. We have one service which imports a set of data (usually, ca. 10MB). Another service should do some analysing and manipulation stuff on these data. A third ...
0
votes
2answers
67 views

Relation many-to-one between objects in Python

I'm doing scientific computations using Python. So far I have a module core and a class Simulation inside. There are many instances of Simulation at the runtime but all of them must share the same &...
0
votes
0answers
12 views

Passing an OAuth Token between services with Zero Trust and audience checks

Let's say, we're using an OAuth / OpenID Connect (OIDC) flow (in a Zero-Trust situation) to secure two APIs: ServiceA and ServiceB. To implement some of the functionality of ServiceA, it depends on ...
1
vote
2answers
79 views

How to write a container that deals with a supertype but also the subtypes?

My situation is that i am trying to model an inventory system in a game, In the game there are items that can be placed and retrieved from the players inventory. For example; player inserts a sword ...
0
votes
0answers
18 views

Kibana Elasticsearch query autocomplete outside Kibana

Background: I've started dumping several hunderds of GBs to Elastic Search in an attempt to make my query faster through denormalization. They are faster indeed! At this point I would like to exposed ...
-3
votes
1answer
33 views

Testing a React component which receives a function as a prop

Suppose there's a root <App /> which houses multiple components, one of them being, say <SearchBox />. App component houses the app state (such as searchResults array) and iterates the ...
-4
votes
1answer
58 views

How to combine a web application with a desktop application to make a single one? [duplicate]

I need to seek opinionated suggestions from the experts. I have a very large application which provides a wide range of functionalities. I have another desktop application which runs in the system and ...
1
vote
1answer
157 views

Which statements can be considered as exit points?

There are many discussions related to whether it is better to have only one or multiple exit points per function, but it is not clear to me which statements can be considered as exit points: only ...
0
votes
1answer
62 views

Mark exception as handled, rethrow, display

Inside my business logic, I have something like a pipeline with multiple actions. Each action wrapped into try/catch and can handle exceptions by himself (logging, saving state for retry ex). And I ...
2
votes
2answers
84 views

Is it right way to make Window to Singleton and call Visibility and Shutdown() methods directly in WPF?

There is a parent window that is the basis of the program, and there are several sub windows under it. Editor is one of the sub window and I'm making it. The code is as follows: // This is Code-Behind ...
0
votes
1answer
70 views

Where to chain multiple applications developed by several feature teams

I am looking how agile methods can be applied for setting up a chained-application (made of several services for example) developed by several teams. In particular, I think the common sources about ...
12
votes
4answers
894 views

What is the meaning of the quote: “A bug in the code is worth two in the documentation.”?

As I boot up Eclipse for C++ with the "Darkest Dark Theme with DevStyle" installed, it spits out quotes--one per day. Yesterday's was: A bug in the code is worth two in the documentation. ...
1
vote
1answer
132 views

Using lambdas to decouple the client code

The ISP says that the client should not depend on things what are not needed. As a solution small focusing interfaces (contracts) can be used: interface RegisterUser { User register(String username);...
-2
votes
1answer
66 views

Handling Legacy Database with Spring Boot Java

We are given a task to create an Web Service API for a mobile application. The problem is we have to use a legacy database that is not normalized and its very tedious to work with. We are accustomed ...
3
votes
2answers
215 views

What design pattern best describes COM's queryInterface pattern?

In COM programming, each COM object exposes a queryInterface method. You provide it a type that you want to "cast" the COM object as, and if it supports it it'll return you a reference to ...
-3
votes
0answers
20 views

Use Associations for Classes and Attributes for DataTypes?

I am learning about UML and OO Design. I came across this statement "Use Associations for Classes and Attributes for DataTypes" From taking a look at the example UML diagrams it's not ...
0
votes
0answers
51 views

Is gRPC a good choice for my scenario?

Im starting to develop a visually-simple but infrastructural-ly robust real time multiplayer game to show off my backend skills and hopefully get a job at Blizzard or something like that. The game is ...
0
votes
0answers
22 views

Offline app with syncing features with React Native

I am currently building an ordering application where users can send orders for available items. It must have the functionality to work offline as well. After user is online, the user has the sync ...

15 30 50 per page
1
3 4
5
6 7
1156