All Questions

Filter by
Sorted by
Tagged with
8
votes
5answers
1k views

How to mitigate scenario where user goes to pay but price is changed mid-request?

This is kind of similar to the Two Generals problem but not quite. I think there is a name for it but I just can't remember it right now. I am working on my website's payment flow. Scenario Alice ...
6
votes
2answers
4k views

Is it bad practice to store a user's email address in a JWT?

I'm using JWTs for user auth in a web application. I have a user db where each user's unique ID is their email address. To identify the subject of the JWT, I currently have a claim which stores the ...
0
votes
2answers
31 views

Moving single tenant application with queue to multi tenants web application

I need to move a single-tenant web application to a multi-tenant (about 100 tenants) web application. Tenants are going to share the same application but each tenant is going to have its own database (...
0
votes
0answers
34 views

Time complexity of an algorithm whose output does not scale linearly with the size of the input

Suppose I have a function CalculateOutput(n) which creates an array of size n and repeatedly modifies this array by iterating through every element from 0 to n - 1 (say this is done in linear time). ...
0
votes
3answers
44 views

Rabbitmq and multiple subscribers

Is it possible for a queue to have multiple consumers? I am working on a system where a single queue needs to be accessed by multiple consumers for different micro-services. Is it possible for the ...
3
votes
2answers
82 views

How to design microservices with large number of joint entities outside of the domain border?

I'm working on breaking down a monolith application in smaller applications or microservices. Like always, sometimes it's easy and sometimes it's harder to identify domains and split those into ...
0
votes
0answers
16 views

Populate values in a map from a series of function calls

I have the following common pattern that I need to use in an application: Given a list of keys, call a function with a parameter to find values for the keys. The function may return null for a given ...
2
votes
2answers
156 views

How to manage chaotic code explosion in React application

So we decided to redo UI of our web application in React. Six months down the lane and we have a complete mess of components and reducers and thunks and actions and god knows what not. We have ...
0
votes
0answers
6 views

How to show relationships of the component containing the interface definition when using ball/socket notation in a UML Component Diagram?

I recently found out that I have probably been using ball/socket notation in a wrong way all the time. Now I am confused by the different ways of drawing interface relationships in two regards (I ...
13
votes
6answers
2k views

Dealing with not knowing parameter names of a function when you're calling it

Here's a programming/language problem I'd like to hear your thoughts on. We have developed conventions that most programmers (should) follow that aren't a part of the languages syntax but serve to ...
-3
votes
0answers
29 views

Use prepositions in naming verb-phrase functions/methods?

When writing a library, designing a class or extending some existing API, we often need to express actions or relations involving noun entities: "Place the ball in the bin" "Obtain the coat for the ...
3
votes
6answers
3k views

How does authentication Server work on Single Sign on?

I am trying to implement Single Sign On feature(SSO). I have for now three systems that needs this feature. This SSO is relatively new to me, I have done SSO where the domain is same. There browser is ...
42
votes
7answers
35k views

Is it a bad practice to have an interface to define constants?

I am writing a set of junit test classes in Java. There are several constants, for example strings that I will need in different test classes. I am thinking about an interface that defines them and ...
0
votes
1answer
33 views

If you use Spring dependency injection does the unit test require some Spring stuff?

I completely understand, I think, how injecting a dependency of a class allows that dependency to be mocked and the class to be tested with the mocked version. What I am not sure about is if you use @...
14
votes
3answers
4k views

Unit testing behaviours without coupling to implementation details

In his talk TDD, where did it all go wrong, Ian Cooper pushes Kent Beck's original intention behind unit testing in TDD (to test behaviours, not methods of classes specifically) and argues for ...
7
votes
3answers
3k views

How does encapsulation actually work?

I made the following diagram to show a typical separation of concerns as typically taught - Here ClassA indirectly uses ClassB via the ISomeInterface, of course ensuring it doesn't know ClassB exists,...
-1
votes
2answers
79 views

Python function name convention for “convert foo to bar”, e.g., foo_to_bar, foo2bar

I have a function that converts args given by argparse to a filename: def args2filename(args, prefix): filename = prefix kwargs = vars(args) for key, value in sorted(kwargs.items()): ...
2
votes
3answers
79 views

In a Conceptual class diagram, should Abstract Classes and arrowed lines be utilised?

Since we are just describing the problem domain rather than showing how the actual software will be designed, does that mean that we should not need abstract classes to show inheritance and arrowed ...
2
votes
2answers
179 views
+50

Allow users upload CSV files, and embed the data for a simple API

Looking for the correct architecture, that should take into consideration - future edge-cases, bugs and pitfalls, performance, cloud pricing, ease of building and maintaining and security. I have a ...
0
votes
2answers
140 views

Simple Poker Simulation - How to design it well

I trying to create a little poker Texas Holdem simulator .. In my solution have some class : Premise : I know about Fisher Yates algorithm. I will implement it later Keep in mind that the next ...
0
votes
0answers
15 views

Chaining openID token

I'm working in microservices environment, where each service authenticates using OpenID Connect to an authentication service (local IdP), based on Users I keep locally on my Database. Now, I want ...
17
votes
6answers
2k views

Splitting units tests by requirement or method

I have a method that I want to write unit tests for. I'm going to keep it fairly generic as I don't want to discuss the implementation of the method, just the testing of it. The method is: public ...
-2
votes
0answers
18 views

Which property and value are used to have mirror image of orignal image? [closed]

I have set image in my project but i want to flip my image i.e mirror image of original image.I have used rotated property but no working
1
vote
1answer
131 views

Which class of problems is this?

I’m working on a problem which I will try my best to describe: You have a stack of 5 blocks: labelled A, B, C, D and E. You also have a set of rules giving points if certain conditions are met, for ...
4
votes
4answers
1k views

Third and fourth items of the Manifesto for Agile Software Development

The third and fourth items of the Manifesto for Agile Software Development Customer collaboration over contract negotiation Responding to change over following a plan What's the difference ...
-4
votes
0answers
45 views

What is best practice of designing an audit framework [closed]

What is best practice of designing an audit framework, what tables and fields can I use for the framework. Am currently using the below tables:
0
votes
1answer
92 views

Identifying Bounded Context in Task Management

I am currently trying out DDD with a sample application "Task Management System". This is not related to any specific domain as such, it will be generic application which can be used in any domain. ...
0
votes
2answers
240 views

“Base Python” vs “System Python”

I've been using this term with a loose understanding as heard in the phrases "uses base python", "built on base python" that basically suggests a python project that only depends externally on Python ...
0
votes
0answers
25 views

Implementing RESTful API in front of Event based microservices

I'm working on a system that implements multiple microservices which communicate via a RabbitMQ messaging bus. These microservices are created using python with the pika library (to publish messages ...
-1
votes
0answers
64 views

Application Design For Given Scenario

Given the below scenario, how should you architect this application to take advantage of modern standards/technology? You are tasked to build out an application where users can login to view data ...
4
votes
4answers
245 views

Grouping of methods

We have multiple pages searching for users, each site having different search parameters. Sometimes, we have 2 parameters, sometimes 4 and most of these parameters overlap. So we have kind of (...
0
votes
3answers
169 views

How to inherit a static function in a class?

Probably the answer is you can't. However, I would like to have a work-around to solve my problem. Objective I am trying to create a program in which I try to avoid nulls as much as possible. ...
-1
votes
2answers
29 views

How to add business customer customization in our API and

We sell a fleet management solution: it includes a mobile application, a web application and a set of APIs. Technically the APIs and the web application are developed in C # .net (asp.net mvc and asp....
-2
votes
0answers
14 views

Is it possible to install and work with Hyperledger explorer from Fabric client node?

Is it possible to install fabric client node? I am working with Amazon managed block chain and I don`t see a way to use or have ready Hyperledger explorer on AWS managed block chain. Is it possible to ...
-2
votes
0answers
44 views

Main app that holds other apps

I was thinking of creating a hub-like app that would hold my other smaller projects. As in it would be a something like mothership app that user could log in to and then gain access to other ...
0
votes
0answers
45 views

Tomcat redirect HTTPS to HTTP

Made system update to temporarily disable HTTPS in our Tomcat server. Previous users are still using Https:// URL to access system and receive error message because it's disabled. Would like to ...
14
votes
7answers
7k views

Can the Strategy pattern be implemented without significant branching?

The Strategy pattern works well to avoid huge if...else constructs and make it easier to add or replace functionality. However, it still leaves one flaw in my opinion. It seems like in every ...
-2
votes
0answers
34 views

Change of frontend technology from JSF to Angular

Here is the situation. There is a new project approaching, It will be a sequel of present project. The development of JSF takes too long. The plan is to change frontend technology from JSF to Angular ...
12
votes
12answers
15k views

What is an algorithm?

What exactly is an algorithm, as in what does Algorithm mean? The little I understand the word, is that it's not specific to a particular language, or design pattern, rather it's one the most basic ...
3
votes
1answer
122 views

Git structure for multi platform projects

Currently I use SVN for my project and the structure looks like this: trunk/SharedLibrary/ trunk/platform/wordpress/ <- platform base directory trunk/platform/wordpress/SharedLibrary <- ...
14
votes
9answers
6k views

Why can't there be any implicit conversions?

As I understand it, implicit conversions can cause errors. But that doesn't make sense -- shouldn't normal conversions also cause errors, then? Why not have len(100) work by the language ...
-4
votes
0answers
75 views

Return result at the same line, without defining intermediate variable, pattern or anti-pattern? [duplicate]

I haven't found discussion on this topic. If there's an old discussion here where this issue has been discussed please link it, and I'll close my question. Two examples: function random(number) { ...
1
vote
3answers
87 views

Multiple functions assuming value or check value in each function

Let's say I have an object A with a public method bool Foo(arg). Foo is potentially a complex algorithm with nested rules (if's). I don't want Foo to have all the code, I want several intermediate ...
2
votes
1answer
132 views

Correct approach to DDD?

I'm wondering if I'm using the correct architecture in my application. After calling an endpoint in my API, I'm currently going through the following flow: Api.EmployeeController.Update(Api....
4
votes
2answers
376 views

Domain vs Entities model? Domain-Driven-Design (DDD)?

In this github, https://github.com/johnph/simple-transaction, under the Transaction.Framework project, there are entities (located at Data/Entities) AccountSummaryEntity.cs AccountTransactionEntity ...
48
votes
5answers
14k views

Can too much abstraction be bad?

As programmers I feel that our goal is to provide good abstractions on the given domain model and business logic. But where should this abstraction stop? How to make the trade-off between abstraction ...
1
vote
0answers
26 views

Data change event publishing by microservice vs separate application - best practice

Suppose there is a microservice that has an restful HTTP API for CRUD operations on a database - nothing fancy, but there is a journal table of all changes recorded for audit purposes. Suppose also ...
1
vote
1answer
32 views

Load for Date dimension table of a warehouse

I have a general question about loading data into a data warehouse (DW). This is basically a followup to an older question of mine. I have a general understanding problem about fill the [Date] ...
47
votes
1answer
29k views

Is FormsAuthentication obsolete? [closed]

I am creating a website using ASP.NET MVC 5. Has Microsoft release any technology to replace FormsAuthentication or do they still recommended authenticating the user using FormsAuthentication for MVC ...
0
votes
0answers
46 views

How to host a web app/site/service on AWS in China? [closed]

I just learned that AWS has data centers in China (while Google Cloud does not). I also learned that you need either a Chinese owned business, or a Chinese-Foreign Joint Venture, each with a bit of ...

15 30 50 per page