All Questions

0
votes
1answer
81 views

Re-usability in C++ using Interfaces and External Configuration

I am practicing professional C++ by building a differential drive robot that applies a Go-To-Goal Behavior. What is I have written so far is an Agent that consumes the following interfaces: ...
0
votes
0answers
4 views

Is there a cleaner way to save a copy of an object (with its data) for access throughout the application than making it global? [migrated]

The framework is WordPress. There's a thing such as "filters". Filters are, more or less, global variables but without the stigma, the way they work is: you give the filter a name and what you want to ...
0
votes
0answers
44 views

Passing data into different layers

Background: I am working on an application which needs to read data from different resources and produces a JSON file for each row. There are no user interactions and hence I am designing it like a ...
0
votes
0answers
36 views

Designing database relationships for a voting application

So I designed database relationships for a voting/polling application. I want a user to only be able to pick 1 option on a poll. I want multiple options per poll. So what I have here is this. User ...
-2
votes
2answers
60 views

Question about Restricting Features and Licensing [closed]

We have a product that contains features (Let's say feature A, B and C). We are about to move it to production (a web application) for a certain client. However, as per my boss, we will deploy the ...
1
vote
4answers
116 views

How do you domain model “arithmetic business types”?

What are best practices for modeling "arithmetic business types" like money or time? Is it recommended to make classes with explicit plus/multiply operations? Should there be a class for every ...
0
votes
2answers
71 views

How to separate responsibilities of a shared entity

Suppose I have game achievement class that stores achievement information like name, popup message, etc. class GoldMedal implements GameAchievement { @Override String getName() { ... } @...
4
votes
2answers
85 views

What is the relationship between IV&V professionals, Testers and QA engineers?

In the context of SDLC, I know that Verification and Validation is about verifying the deliverable input from previous phase and validating the output of the current one. And that testing is a phase ...
2
votes
0answers
32 views

How to architect a globally distributed website, from an IP address perspective [migrated]

I would like to have a website that is loaded fast from any point in the world. From my understanding, you need to take advantage of the data center "regions" at places like Google Cloud or AWS. That'...
0
votes
1answer
98 views

How to maintain consistency on write when using Event Sourcing on a Banking System

We have a system that holds credit balances, and we thought event sourcing would be a good fit. Getting the current balance by reading from an eventually consistent projection works. However, I ...
-2
votes
1answer
33 views

How to categorise credit card transactions at scale [closed]

I’m designing an application to categorise my spending rather than going to one of the bigger establishments. The application will receive a CSV or whatever my bank producers as a statement, parse it, ...
0
votes
1answer
41 views

What is the difference in the implementation of a monad in a purely functional language with respect in an imperative language?

For a long time, the use of these Monad structures has been restricted to a very small circle of languages, many of them purely functional (mainly due to problems related to the management of the IO). ...
0
votes
0answers
16 views

Appropriate structure for keeping large number of similar functions

I have a class that gets initialized with an array of lambda functions. These functions then get called in another method: class MyClass def initialize(funcs) @my_funcs = funcs end def ...
0
votes
1answer
35 views

Kafka cluster workflow working?

I have read lot of articles on google how kafka cluster works. Trying to summarizing my understanding here . Please let me know if any point is not correct here? Producer Side Say Kafka cluster ...
0
votes
1answer
45 views

Use-Cases for Two Inherited Actors

We have been developing a requirements model for a travel agency system. There are two kinds of member users: premium and free. Both users are able to cancel their previous reservations. Unlike ...
-2
votes
1answer
48 views

Interface for abstract base class [duplicate]

I'm planning an application in C# which has a feature of sending messages. ATM I'm doing the non-businesslogics and frameworking stuff. The idea was to make an abstract base class which is inherited ...
0
votes
0answers
18 views

JSON-RPC Json Objects Best Practices

I am building a JSON-RPC over UDP socket API in Java. There are 6 objects that will be transmitted in JSON: jsonRequest jsonSuccessResponse jsonError jsonErrorResponse jsonNotification ...
1
vote
2answers
28 views

When to update a database from changes in a “live” HTML form?

I'm working with some software that uses an HTML form for a user interface to change some configuration information. The back end is a database (loosely speaking). The front end has a hierarchy of ...
2
votes
3answers
172 views

Why datatypes are marked as thread-safe instead of procedures?

In Rust, Send (or Sync) marker traits are used to indicate whether a value of a type (or a reference to that) can be worked on within threaded context. However, it is an attribute of a function or a ...
1
vote
1answer
83 views

What is the proper way to change the View from a ViewModel when using the MVVM pattern?

I'm trying to follow the Model–View–ViewModel pattern in a Xamarin application and am wondering how the View should be able to change when a given ViewModel is finished. Below I have listed the ideas ...
0
votes
0answers
21 views

Actor Model In Java Using CompletableFuture and Executors

I am planning to implement an Event Driven system, based on the Actor model using CompletableFutures and individual Thread Pools for each actor. However my tasks are completely sequential in nature ...
0
votes
0answers
42 views

.NET WPF Best way to store a connection credential

I have an application that connects to SQL Server using windows credentials, which works very well for the domain paradigm. The client is now transitioning away from having a domain server, and is ...
2
votes
1answer
139 views

Would de-coupling using interfaces/templates make the system easier to maintain at the cost of over-engineering?

I have been practicing this hybrid approach for dependency injection in the last couple of days and I am wondering if it should also apply to components which are within the same package? For example:...
0
votes
0answers
23 views

Designing the API of a VMF (Variable Message Format) Parser [closed]

Variable Message Format (VMF) is covered by the MIL-STD-2045-47001 and MIL-STD-6017. The tl;dr for these standards and the format is, that it represents a message format, which contains variable ...
12
votes
3answers
2k views

Working through the single responsibility principle (SRP) in Python when calls are expensive

Some base points: Python method calls are "expensive" due to its interpreted nature. In theory, if your code is simple enough, breaking down Python code has negative impact besides readability and ...
1
vote
1answer
86 views

Should I use accessors or public static fields for global constants?

I have to work on some code that was CAST-audited. The report says that it is bad in Java to use public static and that accessors should be preferred. That is also what I was taught at school. The ...
0
votes
1answer
65 views

REST-like HTTP POST request with JSON

I am coding a poof-of-concept throw-away GCC plugin (see this for more context) which would use the HTTP 1.1 protocol to interact with my Bismon (GPLv3+ code on github, but unreleased; draft technical ...
0
votes
2answers
34 views

PHP class inheritance in variable depths across systems

I have a project where I develop a software which consists of a CORE which is in a separate project, developed separately, and a CLIENT which's base is the CORE but adds to the functionality with ...
3
votes
3answers
422 views

Is it bad practice to create an interface only to combine two other interfaces?

I'm working on an infrastructure for inter process communication. I have created two interfaces, one to send data and another one to listen to data being sent: public interface ISender<T> : ...
-2
votes
0answers
22 views

Continuous Integration of dependent Development Artifacts [on hold]

I have transitioned companies, and so I, who have programmed in Python for the last 7 years work now with a Java stack. I wanted to improve the continous integration setup of the project I joined. ...
0
votes
2answers
89 views

Java - difference between constructor and calling the object multiple times [duplicate]

I read through a code example on github and instead of initializing the object using a constructor, they made every setter return the object itself to call it over and over again See, constructors ...
-2
votes
0answers
21 views

How to display dynamic data using models and custom helpers in CodeIgniter? [closed]

I am creating a feature in my application where in I want to dynamically change the text of page headers, page header titles, and breadcrumbs based on the menu id and menu name from the table in my ...
0
votes
0answers
41 views

Do web companies use the master replica in data center nearest to the user to do writes?

I am interested how multi datacenter (multi homing in Google terms) systems handle writes to strongly consistent user data? Is the master replica for each user placed in the same datacenter and writes ...
0
votes
0answers
7 views

Open ID Connect Session Management Access/Refresh Token vs Session iFrame

We have a web app in which we allow users to log into the app using any Open ID provider(e.g. Okta, Google, Facebook etc.). We want to implement the correct Open ID Connect prescribed methodology/...
1
vote
1answer
110 views

How float data type stores number greater than 2^23? As Mantissa is only 23 bits

Can someone explain how floating point numbers are stored in C, as for 32-bit float, 1 bit is parity, 23 bits for mantissa and 8 bits for exponent. So for numbers greater than 2^23(still in the float ...
-2
votes
0answers
26 views

Managing release branches in Git

When learning Git for the first time, I posted Git branching and tagging best practices. I learned a lot from this and have adapted git flow patterns to my personal projects since then. I am now in ...
2
votes
4answers
151 views

Are there advantages to testing accessors separately?

If I were to have a class with a property on it should I be testing the get and set functionalities separately or together? class MyObject { public string Name { get; set; } } [TestClass] class ...
0
votes
1answer
25 views

How to reduce a big ViewModel into small classes

I'm currently developing an android application using the Androidx Lifedata and data binding components to apply the MVVM pattern. In the application we have a MapFragment quite similar to google ...
1
vote
1answer
41 views

Using semantic version with trunk based development for Python package

I am trying to understand trunk based development with semantic versioning for a Python project. Has anyone had any experience of adopting a trunk based development with semantic versioning for ...
0
votes
2answers
58 views

Approach to handling multiple instances of an application that make large database operations simultaneously

So, essentially the flow of my application works like this: A user selects some options to start a process on the server. Once they hit submit, on the server it opens up a console application that ...
0
votes
1answer
29 views

How to approach to ES/CQRS in serverless cloud?

Let's say I want to use CosmosDB for Event Store, where have single collection for all events. Currently it is not horizontally partitioned, but it is a possibility for future. Now, I need to ...
29
votes
5answers
5k views

What is the most efficient way to store a numeric range?

This question is about how many bits are required to store a range. Or put another way, for a given number of bits, what is the maximum range that can be stored and how? Imagine we want to store a ...
0
votes
2answers
133 views

What is the difference between singleton pattern using inner static “Holder” class and “Instance” variable

I have encountered two patterns to make a singleton class Holder class public class Singleton { private static final class Holder { private static final Singleton INSTANCE = new Singleton(...
-2
votes
2answers
112 views

Which code to unit-test? [closed]

It is widely accepted, that UT's are necessary for any large project with automated testing. However, it is rarely the case, that 100% of the production code is covered by UT's. There are of course, ...
1
vote
1answer
75 views

DDD / Onion architecture in JavaScript

One reason I like .NET is because the 'solutions' and 'projects' lends themselves to good architecture. Good architecture makes it easy to follow the happy path of Domain-Driven Design. I've fallen ...
3
votes
5answers
368 views

Problem understanding the Single Responsibility Principle

The SRP seens fairly reasonable when you first look at it. Every class should have one reason to change. Every class should take care of one thing. Right. But let's see this class: Employee { ...
0
votes
1answer
60 views

Multiple stored procedures or 1 with parameter

I need some advice... I started working at a financial business world recently. Looks like the DB architect uses auto generate function to create stored procs. At the end, we have way too many procs ...
2
votes
3answers
255 views

How to manage a global source code style change?

We have a large Git repo. The files are a mix of styles: tabs vs spaces, unix vs windows line ending, JSON formatting styles, etc. We'd like to change every file to be consistent. However, if I ...
-2
votes
1answer
72 views

Is it possible to disable all pull request merges into a particular branch while a build is running for that branch?

We are using GitHub and CircleCI. I know that pull request mergeability can be made to be dependent on the most recent commit, using status checks. Is there any way to make it depend on whether or not ...
2
votes
1answer
71 views

How to create a recommendation algorithm (“If you like X and Y, you might like Z”)? [closed]

How to create a recommendation algorithm ("If you like X and Y, you might like Z")? I want to create an algorithm which recommends "You might also like" items from an itemlist, based on user's ...

15 30 50 per page