All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
160 views

Is it secured to accept and execute user provided CURL commands

Assume you have to figure out a dynamic way where the user can provide an API call to hit in the backend for example, user to provide a webhook to call on his end server So, An idea for users to ...
  • 411
0 votes
0 answers
31 views

Structure and usage of complex React components

Let's say I have following footer on my website. Now, I am trying to figure out, how to implement it as React component properly. Note that subcomponents have dynamic content (list of links, partners....
1 vote
1 answer
171 views

Specification pattern and maintaining domain logic inside entity

I would like to know more about the Specification Pattern, as it is described in Eric Evan's book "Domain Driven Design". One of the key points Evans makes is that the domain model contains ...
0 votes
1 answer
107 views

Business Rule Engine - Postgresql [closed]

Our organization is into Health Care RCM business. In that, we use to receive medical records (called as accounts, which is a business phrase) and our staff (Medical coders) use to do medical coding, ...
  • 13
0 votes
1 answer
49 views

Queue for tasks and notifications

I've been a heavy user of "batch jobs" to perform different kinds of logic in systems. Over the last couple of weeks, I've been thinking and reading about other approaches and I wanted to ...
0 votes
2 answers
117 views

Is it code smell to make an abstract child class override a parent method which only calls its own abstract method

Is it code smell to make an abstract child class implement a method, which overrides a parent method, whose only purpose is to call another abstract method? I want to make sure that anyone who ...
0 votes
3 answers
102 views

Using Repository Pattern with .NET Entity Framework with a single Get method with optional parameters for each table include

We have a very messy data repository component, with dozens of methods to interface a DbContext (entire database) in Entity Framework. It was (and is) coded in a way that adds a new repo method for ...
  • 361
0 votes
0 answers
60 views

Unit testing with dependency on Word COM objects: Wrappers & interfaces vs document as an embedded resource

We are developing Word Addins that interact with elements in Word documents. To make it testable, my approach has been to use interfaces and wrappers for UI elements, and then provide mock alternative ...
  • 111
29 votes
7 answers
15k views

How can lossless compression ever exist?

If all data is essentially just a bit string, then all data can be represented as a number. Because a compression algorithm, c(x), must reduce or keep the same length of the input, then the compressed ...
  • 465
0 votes
0 answers
40 views

How can I secure the backend in a meaningful way when users log in via OAuth2 in the frontend?

I'm thinking about a rewrite of a existing application. This legacy application does not separate frontend and backend. It's a single application with server side rendering. I want to rewrite it to a ...
  • 121
1 vote
3 answers
145 views

How to link many large strings in a maintainable way

I'm developing an app that will work as a troubleshooter. In this, I want to ask the customers only relevant questions instead of giving them an exhaustive list. Every option they choose will have to ...
  • 29
0 votes
1 answer
54 views

How to Represent actions in a UML state diagram that may be executed from a base state or as a result of another action from that state

I am creating a UML state diagram to help me plan the card game simulator I'm working on. At the moment I'm stuck on an issue where actions that can be performed from the "Main" state, the ...
0 votes
1 answer
81 views

How to refactor parallel inheritance tree?

I have a (php) program, which must change yearly. This program calculates tax for every year and there are sometime changes in requirements. First, the user fills their incomes, expenses, etc. Then ...
  • 111
1 vote
3 answers
173 views

Is adding functions to a namespace/module after imports an anti-pattern?

In my python codebase I have several open source dependencies, eg. pandas, plotly, etc. Some of these are missing some functions that I'd rather they have. I sometimes add functions to these libraries ...
  • 311
1 vote
1 answer
87 views

How should I approach the development of an app with an parallel independent library?

I'm currently working on an ERP Blazor WebAssembly app that works alongside its base Razor Class libraries. The app could have some custom pages that aren't the same for all the customers and are ...
  • 21
0 votes
0 answers
103 views

Howto design a Rest-Client in c# the right way?

apologies, if my question is to trivial. But i after doing some research i couldn't find an appropriate answer to this seemingly simple question. As a developer with some experience, i know that i ...
2 votes
1 answer
328 views

How to manage immutable objects (specifically Java records)

With Java record being immutable, I don't know how to use them properly in the context of something like a CRUD application. If we take a very simple example of a "Organization" record: ...
  • 133
0 votes
1 answer
61 views

Manage multiple projects in the same DDD subcontext

I'm here for some advice about how to manage the situation where I have a legacy application running locally on an onpremise server with it's own database and I'm about to add an online shop app to it....
  • 111
0 votes
1 answer
119 views

Are there any drawbacks to partial application?

Consider the following Typescript code: function exampleAction(target: Target, options: ExampleActionOptions) { // ... } export function getExampleAction(options: ExampleActionOptions) { return (...
  • 155
-1 votes
1 answer
82 views

Why do we need middleware in FASTapi?

From official documentation: A "middleware" is a function that works with every request before it is processed by any specific path operation. And also with every response before returning ...
0 votes
1 answer
52 views

Generating grid shell coordinates

I need to generate grid shells for a given level. For example, the 2d grid "shell" at level 0 is just the cell (0,0). The level 1 shell would be every cell surrounding (0,0), the level 2 ...
  • 111
-1 votes
1 answer
118 views

Is KAOS goal modeling used in the industry?

KAOS is a goal-modeling strategy that is widely taught in the academia. I have seen that almost no known diagramming software supports it except objectiver, which was developed by the same group that ...
  • 137
2 votes
1 answer
151 views

stress testing an application and failing at database connection

I currently have a nodejs(nestjs) app, and a postgres database. The database has a maximum connections available as 1700, and I'm trying to spike a 1000 request in a single instance of a second. The ...
  • 139
-2 votes
1 answer
166 views

Where do most development teams compile and run their code to test it? [closed]

Context: I'm not employed as a software developer. But I do hobby projects pretty regularly, and I was curious if application dependencies can be super varied during compilation and testing (if all ...
-1 votes
1 answer
76 views

What is the recommended approach for loading a Java Keystore from memory in a SpringBoot application running in a Docker container?

I am looking for a solution to load a Java Keystore dynamically from memory instead of from a file on disk. Can you suggest any libraries or best practices for this scenario in the context of Java, ...
  • 167
0 votes
0 answers
26 views

How to achieve high performance routing to Kinesis streams?

I have consumer pools that consume only events matching a specific attribute (e.g. origin=WINDOWS, the other origin=LINUX). Since ordering is important (ordering is based on instanceId, so this is the ...
  • 157
0 votes
1 answer
48 views

How to seamlessly interact with a message broker when the underlying system (SQS, RabbitMQ) can change depending on the environment?

Having a poor knowledge of the extended features of the available message brokers, I was wondering how to approach this. We have some environments where only RabbitMQ is available, others where ...
  • 111
3 votes
5 answers
289 views

Global objects vs free functions C++?

I have a C++ component that contains important data that needed from various other components in my program. The component might contain its own task or not. But in either case it will also hold the ...
1 vote
2 answers
62 views

Best practice for updating object fields (with values calculated in methods)

What's the cleanest and most coherent way to assign a new value to an object field when the calculation of that value is outsourced to another method? The most obvious way would just be to update the ...
  • 139
0 votes
3 answers
117 views

Is it a bad practice to include fields on DELETE requests that will enforce them, but only in on certain environments? [closed]

I've seen similar questions but in this case the code deployed to all stages (local, dev, staging, prod) will be the same. The idea is to have a special field on one particular request, something like ...
  • 119
2 votes
0 answers
129 views

Speed up implementation of "log transform" on 2D image

I'm working on an implementation of the "log transform" operator on an image for C++, and we currently have it formulated as follows (python code). Note we use log10 instead of the natural ...
  • 129
-1 votes
2 answers
271 views

Is there any advantage of pushing branches to GitHub without an associated PR?

I work with other Software Engineers on a web app product. Also, the source code is hosted on GitHub. There is a behavior pattern that I do not understand. Some co-workers push branches (adding ...
1 vote
1 answer
92 views

Architecture review for desktop application with distributed components

We are planning on building a desktop application with a few web components. I want to know how resilient is this architecture. Essentially the design looks like Mixing web components with desktop ...
2 votes
1 answer
155 views

can partial optimized Bozosort improve speed of sorting?

First of all, I am serious :) You have array of N elements and we can compare them (e.g. operator > works). Let's try to (unstable) sort it using following brand new sorting algorithm. First, ...
  • 295
0 votes
1 answer
80 views

What is the correct way to deal with Pull Request updates concerning an interface with a Continuous Integration script: rebase or merge?

I work with other Software Engineers on a web app product. Also, the source code is hosted on GitHub. Recently, there was an introduction of a Continuous Integration procedure enabled by a script ...
1 vote
1 answer
115 views

Microservices Pattern - Downstream Services Registering Themselves with an Upstream Orchestrator?

I'm looking for some guidance on a design proposition I have to accomplish the following use case: We have several small microservices that each generate a unique set of "analytics" or ...
1 vote
0 answers
106 views

Reuse and sharing with primitives

I am having trouble naming and thus searching for the right keywords for a pattern I am seeing in my web applications and their associated difficulties. Here are some examples of the pattern I mean: ...
0 votes
4 answers
175 views

Dependency injection in legacy code

I have a legacy project with many classes with high coupling, and I have a necessity to test some of them. So, I decided to introduce dependency injection principle but stumbled upon where to create ...
  • 9
0 votes
2 answers
88 views

A feature branch on top of another feature branch (dealing with PRs)

As shown in the following image, I have two different branches with their corresponding PRs (PR1 and PR2). The top arrow is the develop branch. PR2 is build on top of PR1. PR1 is build on top of ...
  • 119
1 vote
4 answers
232 views

Most efficient way to represent a random ordering of the numbers 0-10

I am currently looking for a way to encode a list of random numbers most efficently (as in length). To be specific, I have an array of 11 numbers containing each number from 0 to 10. The order will be ...
  • 29
1 vote
1 answer
62 views

Capture a time-ordered sequence of item-level modifications via events when using Amazon Aurora

I'm designing a small platform based on a series of event-based micro-services. The persistence storage I'm targeting is (the managed) Amazon PostgreSQL (Amazon RDS for PostgreSQL) — although I can go ...
  • 119
-1 votes
3 answers
146 views

Is it better to override methods in classes or make methods general?

I am creating the backend of a microservice that will serve as a tool to see in real time how the company's employees are distributed by projects and what days they have assigned to each one. The ...
  • 1
8 votes
3 answers
205 views

Choosing one of two memory blocks to deallocate: Does age affect fragmentation?

First question here, so preemptive apologies if I've committed some faux-pas. Additionally, I am aware that this question is about possibly the micro-est of micro-optimizations ever, and "micro-...
2 votes
1 answer
223 views

What is the best way to design a heavy lookup web app?

I am facing a bit of a conundrum with how I can structure my application, as I try to balance speed, cost, and efficiency. I currently have a website, algfinder.com, which solves states of rubik's ...
  • 31
0 votes
2 answers
73 views

Message broker design pattern best practice [closed]

I'm designing the architecture of a platform to introduce a message broker in an existing data collection web application. This web application is currently used to upload data from excel files that ...
  • 109
1 vote
2 answers
355 views

Is it okay to extend more than one class if a new type/feature is needed?

I coudn't find a better phrasing for my question and hope it is not too confusing. my question mainly targets the open/closed principle and extensibility of my program. I tried to condense everything ...
0 votes
2 answers
46 views

In which layer request parameter limit should be for an external endpoint?

I have a batch endpoint of the form POST /entities ["id1", "id2", ...] Where the endpoint takes an array of ids and returns a batch response. Now I want to set a maximum value to ...
  • 170
-1 votes
1 answer
34 views

What is the convention for deciding which resource to place an endpoint under? [closed]

I have an endpoint that teachers can use to invite students to a virtual classroom by providing their emails in a list format. Let's call it POST invite-students. I have these four resources: api/v1/...
  • 101
0 votes
1 answer
79 views

Trie data for searches in time ranges

I am developing an API responsible for returning the distinct searches made on a service given a date prefix. Example data: 2015-08-01 00:00:18 %22http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%...
  • 101
-3 votes
1 answer
74 views

How can a third-party site know your identity on other sites (e.g. Off-Facebook Activity)? [closed]

I'm a software engineer by trade, yet I am shocked and fascinated by something I learned just recently. For example, I found out Facebook has businesses and sites share information about my activity ...
  • 95

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