Skip to main content

All Questions

-1 votes
2 answers
125 views

Algorithm for realtime database listener replacement?

I have a time-series database where I put all my data in it in timely-ordered fashion. Unfortunately, the database doesn't have any realtime listener capability built into it, and I need to make an ...
Riki Syahputra's user avatar
2 votes
2 answers
562 views

Is this architecture overkill? What is a good way to architect this software?

I have an algorithm I am trying to implement that has steps 1 to 5. There are several different ways I could implement each step. Each calculation step is essentially just an astronomy calculation, ...
Hunter's user avatar
  • 187
6 votes
7 answers
7k views

How to avoid repeating "a==b" when comparing "condition a" and then "condition b" and then...?

For example, I have an object: public class Obj{ public int a; public float b; public String c; } I need to find best "Obj": largest a and then largest b and then longest c: int ...
wcminipgasker2023's user avatar
0 votes
1 answer
112 views

Multi dimensional lookups

I am looking to see if there is a general design pattern or strategy to handle a use case I see often in our codebases. My best attempt to generalize this use case is "Map permutations of n ...
jason.zissman's user avatar
1 vote
4 answers
332 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 ...
DK13's user avatar
  • 29
0 votes
1 answer
136 views

How to implement converters without needing to implement every permutation

I've got this class: [UsedImplicitly] public class ClassicalKeplerian { public ClassicalKeplerian(Angle argumentOfPeriapsis, Angle inclination, UnitFraction eccentricity, Angle ...
ScottishTapWater's user avatar
2 votes
2 answers
153 views

Calculate operation time and setuptime or costprice based on a variable set of parameters - Design Pattern?

I work in a production company where my colleagues calculate costprices based on 3D models and their respective operations. Apart from workactivities where a user has to insert an operation time and ...
Jannick Breunis's user avatar
0 votes
1 answer
69 views

Design a non replayable endpoint for a service

I am trying something out in Springboot and stuck with a weird issue where I want to send some data from my frontend (react app) to backend (SpringBoot) and make that request non replay able by users (...
Abhijeet Shukla's user avatar
-3 votes
2 answers
133 views

What design pattern / class / interface should I use for encapsulating a program? [closed]

I am building a chess - related application, and I want to use a pre-compiled program called Stockfish as my chess engine. I am wondering what is the best practice to encapsulate the usage of the ...
Aviv Aviv's user avatar
  • 117
1 vote
4 answers
303 views

Software-design for algorithm engineering

I'm currently working on an program that solves a graph optimization problem. I know the "standard" software-design principles like information hiding, modularization, etc. What I'm ...
Moritz Groß's user avatar
1 vote
1 answer
250 views

Versioning of data handling pipeline elements

I have developed a custom-made Python package, which provides 2 classes to play with: Stage and Step. They operate based on a Chain of Responsibility design pattern, and behave in a way where: Both ...
Greem666's user avatar
  • 119
0 votes
1 answer
81 views

Pubsub model - publisher broadcast to remote subscribers

With a single publisher(go-routine) and multiple subscribers(go-routine) on same machine, below message hub help create pubsub model: type PublisherHub struct { subscribers map[*subscribmediator....
overexchange's user avatar
  • 2,305
3 votes
5 answers
682 views

Applying function to file line by line or read entirely into structure first?

I've often found myself with the need to develop tools that process large files over a network and perform an operation to every element in that file. An element may be an individual line or an object ...
pstatix's user avatar
  • 1,047
1 vote
2 answers
391 views

Algorithm for rule-based sorting?

I am trying to plant a garden. Certain plants are good for some plants and bad for others, and I am trying to find the best order of plants: most adjacent friends and no adjacent foes, as defined in ...
Sam's user avatar
  • 119
0 votes
1 answer
92 views

Transitive matching in streaming application

Problem A streaming application should perform matching transitively i.e. if A == B & B == C then A == C Current Implementation Application accepts domain objects in a streaming fashion and ...
Ammar's user avatar
  • 111

15 30 50 per page