All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
43 views

Effectively invalidating multiple entries from one composed key

Context I m building a dashboard application gathering data from a Rest API This Rest API can be requested by client applications others than the dashboard to get data That data is then aggregated ...
mfrachet's user avatar
  • 1,541
0 votes
2 answers
121 views

Setting up private properties for unit testing

I'm doing some TDD practice for my own learning. I'm trying to figure out how to transparently set up private properties of an object to support testing. I have a binary tree node: internal class Node ...
mike1952's user avatar
  • 109
0 votes
0 answers
52 views

Multi-tenant (realm based) REST Web API authentication

We're building a multi-tenant setup with a C# Web API and KeyCloak for auth and APISIX as application gateway. APISIX handles the authentication and passes an X-Access-Token to our API when ...
RobIII's user avatar
  • 341
1 vote
3 answers
184 views

What is the standard for heap allocators in bare metal programs?

What is the standard for heap allocation systems in bare metal programs? If there is no standard, what is the most popular one? Is it a free list? If so, are there heuristics that use a hash table of ...
nicholasbelotserkovskiy's user avatar
0 votes
1 answer
33 views

Finding related items in OpenSearch between 2 datasets

I have a scenario where I have 2 sets of data: All possible products Products carried by a store Dataset 2 is a subset of dataset 1. If a user searches for a product that the store doesn't carry, I'...
Steven Evers's user avatar
  • 28.2k
1 vote
5 answers
211 views

Purpose of async/await in web servers when stuck with legacy I/O

A couple days ago I asked about the Purpose of async/await in web servers, and got in-depth answers explaining how in fully asynchronous code, it frees up the CPU completely while also releasing the ...
Medinoc's user avatar
  • 375
2 votes
3 answers
122 views

Explicit business rules vs business rules through events?

I don't know how to look for this so I apologize if this is already answered. I'm wondering how to decide what is best in terms of SRP and explicit business rules. I feel that writing business logic ...
JorgeeFG's user avatar
  • 697
-2 votes
1 answer
114 views

Defining functions inside vs outside a class

Say I have a class with a function do_thing that is comprised of multiple steps, which themselves segregate into functions (first_process and second_process). At what point would this be considered ...
Tim Kirkwood's user avatar
1 vote
4 answers
243 views

Why are there two abstract interfaces in the observer pattern?

I'm reading about design patterns from both "Head First Design Patterns" and the original "Elements of reusable software etc" and I'm finding some confusion right at the start, in ...
Maldus's user avatar
  • 126
2 votes
3 answers
397 views

What is vertically coupled alignment in source code?

Formatting multiline statements is an arcane art that most auto formatters and style guides can't help you with. One habit I picked up is to ensure renaming things wont cause multiple lines to need to ...
candied_orange's user avatar
23 votes
4 answers
8k views

Purpose of async/await in web servers

I don't understand why I keep seeing async/await recommended (or sometimes, even enforced) for ASP.NET Core web applications and APIs. As far as I can tell, every request is already being run on a ...
Medinoc's user avatar
  • 375
1 vote
2 answers
80 views

End2End/integration Testing in Java with Selenium - how to get a good test structure - looking for experiences [closed]

At work I am currently tasked to implement End2End/integration Tests for one application using Selenium. we have an project consisting of a frontend and multiple backends (spring-boot apis). The ...
KilledByCheese's user avatar
0 votes
1 answer
68 views

Application plugin interface design

I build a plugin based Qt application which currently lives entirely in a library. The app as well as the plugins link to the library. The ::main(…) is just a tiny two line bootstrapper calling a ...
ManuelSchneid3r's user avatar
1 vote
3 answers
105 views

Design of ETL system that should receive both files and via api

I am tasked to design a system that should receive data either as files or via an API and perform ETL functions. The end result is put into an RDBMS. For the sake of example, imagine a system that ...
Sharon Ben Asher's user avatar
-1 votes
3 answers
110 views

Finding a good development and review strategy

I will describe two development and code review processes, both describing the upsides and downsides to each version. Ideally we want to have a process that has no downsides and as much upsides as ...
GSerum_'s user avatar
  • 11
0 votes
3 answers
196 views

Architecture to avoid circular imports in Python, specifically a flask server

I have a flask server which uses a controller-service-resource model. For simplification it is like this: Controller(parses requests, dispatches to A or B): ServiceA ServiceB However there are ...
VectorVictor's user avatar
1 vote
4 answers
227 views

How to decide between keeping data within the code or in a database

As an example, we have an entity called Invoice which has bills of purchased services. public class Invoice { private readonly List<Bill> _serviceBills; public string InvoiceId { get; } ...
Critical Failure- Core Dumped's user avatar
4 votes
2 answers
303 views

How should I handle different hashes of identical files in .zip archive with different 'last changed' date?

We store zipped files in the storage of a cloud provider which contain certain fields (metadata). These files are derived from other, larger files. Every time we (re)generate these files, their 'last ...
MPIchael's user avatar
  • 269
13 votes
3 answers
5k views

My use case diagram is a mess. What can I do?

I was asked to build a use case diagram for a case study of a charter boat company. I said that the system will implement a shift away from their use of manual forms into an online booking and payment ...
Ivan's user avatar
  • 239
1 vote
1 answer
143 views

How difficult would it be to extend Rust's compile time checking to dynamic linking?

When compiling Rust, various additional checks are made for correctness. These include bounds checking, borrow checking for multithreading and memory ownership, and the like. Once compiled, these ...
John Moser's user avatar
-4 votes
1 answer
93 views

Refactoring the testing code inside a big switch code block

The main logic of my function is a switch case, with the default case being the abnormal case. function main(input) { let result = process(input) switch (result): { //normal cases case ...
Qiulang 邱朗's user avatar
-1 votes
0 answers
29 views

What approaches from the PNPM package manager are unnecessary to implement for a new programming language from scratch?

I asked this question about PNPM architecture internals a while back, PNPM is the latest rendition of a Node.js package manager which solves a lot of the pain points of Yarn and NPM, but has to hack ...
Lance's user avatar
  • 2,613
0 votes
2 answers
302 views

Where does the practice of naming variables with the prefix "my" come from?

I recognize that there are situations in which "my" is semantically useful, but I have met multiple professional programmers that have a habit of using this everywhere that it's not - "...
timeeeee's user avatar
0 votes
2 answers
195 views

Should Value Objects be used inside the DTO?

After reading about Value Objects, I think they're pretty cool and should be used, but I am not sure if I am doing it the right way. Let's assume that I have a simple DTO to create a user, which ...
Mercury's user avatar
  • 71
-1 votes
2 answers
56 views

Long running process with shared and synced status between multiple browser windows?

is it practical to store the status of a long running process in a redis key to sync the status of process across multiple browser windows of the same page? ( including new browser windows opened when ...
yeln's user avatar
  • 107
-5 votes
2 answers
73 views

In cloud (say AWS), what is the difference b/w golden image and hardened image of OS?

I have tried to search a lot but all I get is their definitions which more or less sound similar. I would like to know if they are same? If not, what are specific differences?
Nikhil Vartak's user avatar
23 votes
5 answers
16k views

Are "factory methods" anti-pattern now?

I consider Joshua Bloch's Effective Java the best book on the language that I read. However, I started to wonder about something One of the things he suggested was to prefer public static factory ...
demavi's user avatar
  • 347
0 votes
1 answer
31 views

Best way to approach connection between game server to client connection with Django web server as middleman

I have a web game design question. I am trying to build a multiplayer web game with non intensive graphics (ex tic tac toe, chess). I am trying to figure out how to take already authenticated users in ...
Mr. Octodood's user avatar
1 vote
3 answers
155 views

Creating Unit and Integration Tests with Database elements

This is something that I've heard a number of opinions and theories about, but I'm still torn on how to go forward. For context, this particular issue deals with the following technologies, in case ...
CrystalBlue's user avatar
0 votes
1 answer
68 views

Confirmation of the request with the client. Use use case diagram or not?

Let's image that I have a requirement from a user about logging. He wants to log and then display to manager every action made by a user in the system. And for specific actions e.g. opening a case he ...
M_Ryan's user avatar
  • 1
0 votes
1 answer
66 views

Concatenating strings given a BNF grammar

<Definition> ::= <Name> <LeftPar> <param> <RightPar> <Name> ::= <Letter><LetterTail> <LetterTail> ::= <Letter><LetterTail> | ‘’ A ...
User's user avatar
  • 11
0 votes
1 answer
112 views

Where to put getOrSave responsibility?

I have many repeated parts of service logic which just fetches object if it exists or returns a newly saved one. I want to move it from service because it just clutters up the logic. But I do not ...
DimitrijeCiric's user avatar
0 votes
3 answers
119 views

Use of environment variable or appsettings as a counter, good or bad practice [closed]

I'm wondering if it's bad practice to have a variable in a webserver which counts the amount of incoming requests and put it in an environment variable. In C# for example you have System.Configuration....
Vincent's user avatar
  • 383
-1 votes
1 answer
37 views

Copy only new files from SFTP to UNC path

I need to copy only new files from SFTP location to a UNC path. To identify new files, I copied the files to a Processed folder in SFTP after copying to UNC path is done. Issue with this approach is ...
Sunny's user avatar
  • 937
-1 votes
4 answers
293 views

Is setting a flag in a loop a code smell?

I have a loop that I am testing a condition in but if the condition is not met then after the loop is complete, I want to execute another code block: Boolean loopConditionNotMetFlag = true; for (List&...
Devlinite's user avatar
3 votes
4 answers
370 views

throwing an exception or returning Optional

In a service daemon coded in Java, we have services for getting various objects. When we use these services forgetting an object, I wonder if the method should return the object and throw an ...
kommradHomer's user avatar
0 votes
0 answers
52 views

Utilising Social Logins via OAuth2 in native mobile apps

This question has been asked over and over again, but I have not yet found a satisfying answer: How to use Social Logins (via OAuth2) to obtain access tokens for your backend if your only clients are ...
rsmidt's user avatar
  • 9
3 votes
4 answers
360 views

Encryption of PII data in database logic in store procedures and desktop application [closed]

I have an old desktop application (Delphi) with logic in stored procedures (Oracle). The application is storing some personal data including salaries. I want to encrypt data so someone with db access ...
cargt3's user avatar
  • 39
-1 votes
2 answers
139 views

Dynamic configuration or static configuration for software not aimed to the general public?

I've been wondering this for a long while now: When you develop a program for someone else should you make it dynamically configurable? For instance, if the program I was asked to develop must ...
iKingNinja's user avatar
0 votes
1 answer
126 views

How to model two bounded contexts with tight coupling between them

Context Hello, at my company we have been working with DDD for some time now. We have a monolith and some services. The bounded contexts in the monolith use HTTP calls to communicate between them or ...
Antonio Gamiz Delgado's user avatar
0 votes
2 answers
106 views

Terminology to indicate that a software component does not seem to belong inside a library

What is the standard or commonly used terminology used in software engineering circles for this scenario that uses "widgets" and "FFT" as a fictitious concrete example: I have a ...
bgoodr's user avatar
  • 119
-1 votes
2 answers
117 views

How to handle complex logic, avoiding recalculation for performance reasons?

let's say we're building an Ecommerce Marketplace. We have Sellers and each Seller has Products. We want to display a list of available Products across all Sellers to Buyers. But, we only need to ...
Staskij's user avatar
  • 21
1 vote
1 answer
201 views

Necessity of one-time codes in 2FA

Why is it that some services, when they conduct 2FA ask you to rewrite a code from an app, even if that app is part of that service's infrastructure? For example, when I log in via the web to ...
Karaal's user avatar
  • 21
2 votes
1 answer
125 views

Refactoring Processor classes

I am writing some python 3 bioinformatics software and was wondering about the best way to write it in an OOP format. I am pretty sure a lot of my classes are violating the SRP principle, but I'm not ...
Tim Kirkwood's user avatar
2 votes
4 answers
258 views

Does changing the default value of a class member violate the Liskov Substitution Principle?

For example, I have a Label class where the default font color is black: public class MyLabel{ protected int r=0; protected int g=0; protected int b=0; public void setRGB(int r,int g,...
wcminipgasker2023's user avatar
0 votes
3 answers
162 views

According to Swanson's maintenance activities, what category does paying down Technical Debt in a Software fall into?

I am trying to understand the categories of maintenance activities described by E.B. Swanson, i.e., Perfective, Adaptive, and Corrective; which category does paying down Technical Debt (TD) fall into? ...
Blaine's user avatar
  • 103
1 vote
2 answers
138 views

Pattern / Architecture to implement State Machine with "steps" between states

I'm looking for some guidance implementing the following problem: We have a set of 'states' which a user can enter into: 1.- Registered: A user registers themselves in the system and can start placing ...
Pablo's user avatar
  • 119
1 vote
1 answer
68 views

How to handle the translation of dynamic nouns? (localization)

I am working on an application, which is available in multiple languages. The user can choose, which terminology should be used throughout the application. E.g. the user can choose, whether it should ...
Marnix.hoh's user avatar
0 votes
2 answers
103 views

Prevent download of static files referenced only from pages a user is not authorized to access

Let's say a user is authenticated to a website and can access a given page only if authorized to access it specifically, e.g. if the website has only these 2 pages https://my-classified-docs.com/page=...
Francesco B.'s user avatar
1 vote
9 answers
3k views

can every program still be written without recursion or cyclic calls?

I'm wondering if it was theoretically possible for a compiler to determine maximum stack depth at compile time if a limitation was placed on the program. The limitation being that you can't use ...
glades's user avatar
  • 419

15 30 50 per page