Newest Questions
64,339 questions
2
votes
2
answers
59
views
Does (possibly) failable destructor require to change invariant violation error handling?
First, I'd like to highlight my personal premise on error handling approaches in C++ (as it might be the source of confusion in the first place). C++ Standards, 2004 (Sutter, Aleksandrescu), item 68 ...
0
votes
0
answers
13
views
Set-Cookie header is found in Response header but not found in Cookies Storage [migrated]
Context:
Trying to login, the request is working with success login. But for storing refreshToken, the cookie is not being set in Cookies section and not found.
Backend sends set-cookie header with ...
1
vote
1
answer
162
views
How to manage connection strings for CI/CD and local debugging that works for .NET Framework web apps and desktop apps?
We want CI/CD to inject the production connection string into a .NET Framework app.config during deployment.
In source control, we only want test/staging DB connection strings.
Developers should ...
0
votes
1
answer
135
views
Why do database protocols use fixed endianness instead of native server endianness?
Most database wire protocols mandate a specific byte order for multi-byte integers:
PostgreSQL: big-endian (network byte order)
MySQL: little-endian
MongoDB: little-endian (BSON format)
OracleDB: ...
3
votes
2
answers
312
views
Backup for an Android offline password manager
I am building an Android password management app, where passwords are locally kept for security reasons. The network endpoints are only for creating an account, email verifications etc.
I want to ...
1
vote
3
answers
156
views
How can I introduce migration scripts to a team that has stopped using them?
In my working experience, I am into a situation in which the team has stopped using migration scripts for setting up the db. The team is fast paced focusing on business upon a 1-year old startup.
...
1
vote
1
answer
87
views
How Should Services and Presentation Layers Share Data in Web Applications?
Lately, I’ve been studying the fundamentals of Software Architecture for web applications, and I’m a bit unsure about how the data and presentation layers should interact.
From what I understand, the ...
2
votes
2
answers
97
views
How to deal with a poorly documented AWS SQS feed for a security product API?
I’m integrating with the Ajax Enterprise API which exposes an AWS SQS feed for device events and notifications. The API documentation is here: Ajax Enterprise API Docs.
Each SQS message supplies an ...
-2
votes
4
answers
323
views
Terminology for a case where the same algorithm produces different results during tests?
I'm testing writing 10 MB of data to a server.
The expected result echoed back is 10485760 bytes.
160 writes of 65336 bytes.
Approximately 1 of 5 tests I get back 10420224 bytes in the test. 65536 ...
0
votes
0
answers
63
views
Strategies for flexible, maintainable and easy to read data access [closed]
For me the hardest part has always been designing data access layer.
After trying various strategies I started leaning towards many small focused DAOs like in example below.
public class ...
1
vote
2
answers
113
views
Designing persistence guarantees in an ingestion pipeline with a non-customizable intermediary
I’m migrating a large volume of historical RRD data into a VictoriaMetrics cluster.
By design, vminsert buffers and asynchronously forwards data to vmstorage. This makes it unclear when data is ...
3
votes
6
answers
619
views
Can a language be sound if it doesn't promise safety?
It is said that C's type system is unsound, which means that it has "false negatives", it tells the programmer everything is fine, but then the code fails at runtime. for example, "the ...
-4
votes
3
answers
200
views
Optimizing a "Transfer-Encoding: chunked" parser [closed]
I have written a parser for Transfer-Encoding: chunked requests over HTTP/1.1. Now I'm working on optimizing the code. This is the specification 7.1. Chunked Transfer Coding.
The first optimization ...
2
votes
2
answers
149
views
How should multiple ViewModels communicate in a larger WPF MVVM application?
I’m working on a WPF MVVM application that has grown beyond just one or two User Controls. I now have multiple ViewModels that need to react to each other’s actions (e.g., selecting a customer in one ...
-2
votes
2
answers
132
views
Preventing duplicate customers from company entry vs mobile sign-in [closed]
We have a system where customers can be created in two ways:
By a company — the customer belongs to that company and the company can edit their information.
By a mobile user — the customer has a ...
2
votes
1
answer
124
views
Serving several external APIs in Django + Angular application
I'm working on a web-based app that uses Django and Angular. This app uses several external APIs to fetch environmental data from different monitoring networks. We then use these data to perform ...
-4
votes
2
answers
191
views
How to design a Transfer-Encoding: chunked parser of Uint8Array's in JavaScript? [closed]
I'm working on implementing parsing a series of Uint8Arrays that contain Transfer-Encoding: chunked data sent from the client using WHATWG Fetch over a single connection.
For example, writing 1 MB ...
2
votes
2
answers
213
views
Is it a violation of the three-tier architecture if I inject one service into another inside the logic layer?
I am a beginner programmer with little experience in building complex applications. Currently I'm making a messenger using Python's FastAPI for the back-end. The main thing that I am trying to achieve ...
6
votes
6
answers
779
views
Good way to represent connectivity between nodes of tree (outside of tree hierarchy)?
I have a set of data carrier objects represented using vertices in a strict tree hierarchy. I also have the following requirements:
some vertices should be "linked" to other vertices ...
2
votes
2
answers
111
views
When using Clean Code with Ports and Mappers: which layer declares the Entity (Aggregate) factory interface and which one implements it?
So I was reading Eric Evans DDD book and one point that was not clear to me is which Layer (in case of using Clean Code) should be reponsible to:
define the interface contract for an Entity (...
-1
votes
1
answer
102
views
How to organize struct-based "methods" in C similar to object-oriented style? [closed]
So I was coding in C for a while now, getting used to language syntax and different styles.
Implemented a couple of simple data structures, algorithms and tried my skills in making Minesweeper clone.
...
2
votes
7
answers
273
views
I'm looking for a design principle referring to using a system for it's intended purpose
Recently a junior team member was asked to use a survey tool to act as a system by which fuel delivery drivers could submit their Bill of Lading to our dispatch team for record collection after ...
1
vote
3
answers
417
views
Practicing DDD from the biggest modules to the smallest widgets
I have a frontend project using VueJS and TS and I structured it using DDD. So far, I have some modules (bounded contexts, domains - use the term you prefer) which are used in two ways: some modules ...
1
vote
3
answers
99
views
How should we design an IoT platform that handles dynamic device schemas and time-series ingestion at scale (100K writes/min)? [closed]
We’re a small dev team (3 full-stack web devs + 1 mobile dev) working on a B2B IoT monitoring platform for an industrial energy component manufacturer. Think: batteries, inverters, chargers. We have 3 ...
0
votes
1
answer
70
views
Best practices for serving encrypted files in Laravel?
I'm building a Laravel-based web application that functions as a personal online photo archive. Each user uploads and manages their own private collection of images. These images are encrypted at rest ...
2
votes
1
answer
268
views
Visibility between UML packages
I have been reading the book "OCUP 2 Certification Guide : Preparing for the OMG Certified UML 2. 5 Professional 2 Foundation Exam". Where-in I am unconvinced with the answer option provided ...
4
votes
3
answers
229
views
The applicability of functional core - imperative shell to a cli program which contains a wrapper around a binary
Not long ago while I was exploring for solutions to test without mocks I've found out about the functional core, imperative shell architecture. It sounds great, I also think that it would play nicely ...
3
votes
2
answers
275
views
"dimension" vs "extent", "axis" vs "dimension" - when should I use which term?
I'm defining a small API involving both uni-dimensional and multi-dimensional data. In addition to representing the data itself, I also have function/methods/operators for creating a new multi-...
0
votes
6
answers
255
views
Design pattern for exposing different parts of interface to different entities
In a certain program I would like to have three objects, say, a, b, and c, with c being a shared private member (sub-object) of a and b. The data between the three objects shall only go this way:
a &...
1
vote
3
answers
164
views
Ensuring proper initialization order in event-driven C++ applications
I'm working on a C++ system where I have a concept of a "Board" object. Each board can have services attached (e.g. UpdateService, LoggingService, etc.).
I'm trying to design how these ...
17
votes
7
answers
4k
views
Is there a reason "replace conditional with table" isn't a standard refactoring?
I'm preparing a lecture where I will start with a many-branched conditional statement and replace it with a table. For example, I could start with:
function getMonthName(monthNumber) {
if (...
3
votes
5
answers
471
views
Does high quality software really use plain names like `Employee` to describe domain objects?
I am asking because we make games and each domain object most likely has different representations in different layers of the application. You have domain model, you may have some application-level ...
2
votes
3
answers
335
views
Handling authorization and authentication with an API gateway
Recently, I’ve found myself designing a microservices system, and I’m currently facing some challenges with authentication and authorization.
Context
All my microservices will be placed behind an API ...
-1
votes
0
answers
61
views
How can I handle API requests from a website, mobile app, and third-party apps? [duplicate]
I am designing my application to have a separate backend and frontend.
The front ends consist of a website, mobile app, and third-party apps (think Zapier).
The website will have full access to the ...
4
votes
2
answers
265
views
Managing Growth in Microservice Architecture: Is Modular Monolith the Solution?
Our team of 5 members are managing a microservice architecture that currently includes around 200 Java Spring boot microservices, with approximately 50 new services being added each year. We follow ...
2
votes
3
answers
211
views
How should small but highly requested features be prioritized in technically driven B2B products?
In technically driven B2B products — such as hosting panels, billing systems, or extensible CMS platforms — it’s common for users to request small but high-impact features, like:
Custom messages on ...
2
votes
3
answers
241
views
Design Question - Storing timeseries in a key-value store
I'm looking for a sanity check my thinking around the memory layout of a key-value store.
We have a system that periodically polls and monitors on host-level jobs. On every poll, a given job emit can ...
8
votes
4
answers
2k
views
Entity Framework - Is there a safety mechanism to prevent accidentally running Update-Database?
When using Entity Framework and running the Update-Database command, non-updated applications that rely on the database crash due to database context changes.
Usually teams have a production database ...
0
votes
1
answer
156
views
What is the best way to manage git workflows for applications built on top of in progress libraries?
I am doing something I haven't done prior, which is that I built a library (that is still in progress as it is somewhat ambitious), and now I am developing an application on top of the "alpha&...
5
votes
3
answers
562
views
How to get rid of Mappers and make objects build themselves?
I am having a really hard time deciding where to instantiate my entities in the refactoring I am making. The project was built with DDD and it's layered: it has the infra, domain and app layers. In ...
0
votes
0
answers
61
views
Extending a complex codebase without breaking things [duplicate]
I have to extend a complex piece software and I wonder if I should make the changes directly "where they belong", or if I should try to not touch existing stuff and "plug-in" the ...
4
votes
1
answer
957
views
CA-1822: Mark members as static Roslyn recommendation will not unnecessarily increase memory consumption?
My job uses SonarQube as part of the CI/CD quality gate. One of the "Maintainability" issues (severity: medium) raised is the CA-1822: Mark members as static.
The link explains the added ...
2
votes
2
answers
139
views
Test a script reading from external source
I regularly write scripts and small tools that read data from external servers.
I am still not sure what is the most efficient and effective way to test them:
Probably the most effective way would be ...
1
vote
3
answers
206
views
Should HTTP clients be encapsulated in a C#/.NET library?
I have a C# library that contains all the logic to send requests to a remote endpoint, including marshalling/unmarshalling and encrypting/decrypting requests and responses. It contains an HttpClient ...
14
votes
9
answers
4k
views
Is Dependency Injection useful when implementations are never expected to change?
Dependecy Injection makes mostly sense when using interfaces, since one of DI's strengths is to switch out implementations. It also decouples classes, since the consumer of the dependency does not ...
1
vote
4
answers
186
views
A passive LRU cache with locks
Context
I'm working on a client-server-agent application, where server distributes tasks supplied by clients over agents. Server is passive, all communications are initiated by clients and agents.
...
3
votes
3
answers
194
views
Best Practices for Implementing a Heartbeat Feature in a Laravel App to Track Offline Status
I'm trying to implement a heartbeat feature for offline tracking that just sends an offline message to the server once the web browser app (Laravel-based) is offline. Ideally it will ping the app's ...
0
votes
1
answer
133
views
Optimal way to avoid iterating through each row in a dictionary of data/arrays?
I have an excel macro that imports daily share price files, and finds the highest price for a share after a given date.
Each of these daily stock price files has ~1000 rows of data. Currently I have ...
1
vote
1
answer
201
views
Elegant solution to a graph problem
Given a line in a 2d coordinate system, we can create a dependency graph like this:
The black nodes represent a logical graph that is a-cyclic and therefore "stable" in the sense that if we ...
0
votes
2
answers
133
views
What are the trade-offs of recursively invoking an extension method as extension vs static?
When using recursion in an extension method, there are two different ways to invoke the method from within itself.
Option 1: As an extension method
internal static class MyExtension
{
public ...