All Questions

5
votes
1answer
241 views

Is it better to use lambda functions or boolean variables to record state

I have heard some people claiming that boolean state variables are generally bad and should be avoided when possible. Apparently in many cases it is possible to put state into lambda functions, ...
2
votes
1answer
61 views

How to implement acquaintance and aggregate as described by the Gang of Four

Is the following implementation in PHP correct? I focused on what they say about the lifetime of dependencies: “Aggregation implies that an aggregate object and its owner have identical lifetimes.“ ...
0
votes
2answers
125 views

Is using HTTPS for web service calls secure enough?

I'm developing software that calls a SOAP web service I've created. My questions are about security: Is it "enough" (about securing web service) to have my web site secured with HTTPS, and to call ...
0
votes
2answers
167 views

JSON without quotes for keys

I need a textual human readable format which is reasonably compact and version-control friendly to serialize a persistent memory heap. My Bismon system (GPLv3) has such a format (it is textual, human-...
2
votes
1answer
112 views

Law of Demeter helper utilities

Do helper utilities like the one below violate the spirit of the Law of Demeter? It doesn't technically violate the law, since the doOperate method doesn't invoke C's methods itself. If so is there a ...
2
votes
2answers
193 views

Java: Is reflection bad for AOP situations?

Imagine the following situation: 1. Consume a 3rd party WSDL, out comes thousands of classes. 2. There's an opportunity to optimize performance by using a custom paralleled implementation. 3. Wsdl ...
-1
votes
2answers
146 views

When to use Quicksort instead of MergeSort? [closed]

I have the following homework question: You develop a video surveillance software that must run on real-time data. In one of the steps of the algorithm executed with each image captured by the camera, ...
1
vote
0answers
55 views

Running medium duration critical distributed jobs every minute

I have the following requirement: There are about a 100 recurring jobs that needs to run every one minute. This job has an IO intensive phase, followed by a CPU intensive phase, followed again by ...
1
vote
1answer
99 views

Are the Stack and Heap hardware, OS, or language-specific concepts?

In languages such as C or Java we have the concepts of the Stack and the Heap. Are these abstractions the particular language runtime/compiler creates over the plain-old RAM? Or are these concepts ...
2
votes
1answer
63 views

different collision geometries in a component based game engine

I'm writing a simple game engine and after a lot of rethinking/refactoring I settled with sort of a component based architecture (not strictly ECS, but it isn't inheritance based anymore either). So ...
14
votes
4answers
2k views

Why not use SQL instead of GraphQL?

Recently I learned about GraphQL which claims to be superior to RESTful. However, I started wondering why don't we simply put SQL statements into an HTTP GET request. For example, in GraphQL I would ...
2
votes
0answers
66 views

Handling multiple pull requests from a branch

Our current workflow is that we create a Sprint branch and then developers create Feature branches having the user story number. Once the story is complete this Feature branch is merged to Sprint ...
5
votes
2answers
189 views

How do microservices and 12-factor app principles come together?

I'm wondering how service oriented architectures can follow the 12-factor principles. Designing an architecture as microservices means (to me) that you separate the features in services. This means ...
0
votes
1answer
53 views

Integrate react app with php app

I have an old php web application, with very bad code. While a lot of it just has html and ajax calls in the, the wrapper is still php. I want to develop the new modules in react, and slowly replace ...
1
vote
4answers
117 views

Should supporting algorithms be in their own class?

My Widget class has a method called loadWidget. This method needs to shuffle an array to work properly, among other things. In Widget, I could implement a Fisher-Yates shuffle as its own static method ...
3
votes
1answer
91 views

Automated Testing: where do I put Selenium?

I'm working on a Java application, it's a middleware between two ticketing webapps. I want to write end2end tests using Selenium to test functionality. Let's say my testing process goes like this: I ...
2
votes
1answer
43 views

Versioning an Application VS Versioning an Executable/Library

I'm trying to pass a point to my team whereas there are two different kind of "programs" we can serve : applications and executables/librairies. An application in this sense is dependent on other ...
1
vote
2answers
129 views

Is “Dynamic Link Library” an actor?

I have a Software. User will use software to process file, But my software will use a other software or "Dynamic Link Library" of 3rd party. Is "Dynamic Link Library" of 3rd party an actor?
1
vote
2answers
46 views

API Microservices bundle multiple services as one deployment Vs separate deployable for each service

So I am going to be developing atleast 5-6 Res end points . ( all distinct and stateless ) Now I am debating on the following: Should they be combined as single war / ear or deploy each service ...
1
vote
1answer
310 views

Why is this valid boolean b = new A() {} instanceof A; if A is an abstract class? [closed]

I have trouble understanding why this boolean b = new A() {} instanceof A; is a valid statement and not boolean b = new A() instanceof A; and why the former is true knowing that A is an abstract class....
0
votes
3answers
171 views

Getting random yet consistent data for testing

I have a big codebase yet to be covered with tests and rather limited access to the real data. The code that needs to be covered is very data dependent. And the data is anything but shallow and ...
1
vote
1answer
87 views

How should I integrate routine history tracking feature with the routine itself

Let's say I am writing code to run a machine similar to a 3D printer and I have a routine like: machine.moveTo(x1, y1); machine.alignByCamera(); machine.heatUp(); machine.extrude(amount1); machine....
2
votes
6answers
180 views

The ID of an object is null at start. Does that make the object state invalid and violate encapsulation?

This question is related to How should an `Employee` class be designed? In the above question, to uniquely identify an employee, each Employee object has an id field as shown below class Employee { ...
0
votes
2answers
117 views

How to describe an API-like request that is browser-to-browser?

I'm building a web application that has a feature which allows visitors to directly access resources using URL patterns, for example: www.site.com/client/[clientID]/orders www.site.com/client/[...
1
vote
0answers
36 views

Wordpress and git, (using WPE), how do you incorporate database changes into the workflow?

We use WordPressEngine and want to have multiple developers and multiple branches using git. One challenge is how do we incorporate the database into the workflow? Should we take a sql dump and ...
3
votes
2answers
56 views

Integration with multiple SSO's

Currently, we had a web app that integrated with SSO through Open-Id protocol Then we got another client that had it's own SSO and need us to integrate with their SSO through SAML protocol so their ...
1
vote
1answer
23 views

Formal way to list use cases by groups or sets

Just looking for some advice. I have to write a Software Analysis Document for a new application, which basically is to write and describe all use cases. First, I have to list all use cases of that ...
1
vote
1answer
76 views

How to work with multiple databases efficiently (Development, Testing & Production)

Brief background I'm currently designing a COM DLL in .NET for use in MS Access by a few other developers. The Access application is hooked up to a SQL-Server & is supposed to just act as a front-...
1
vote
0answers
23 views

OCL - how to explicitly model if a property can or can not be null?

I'm thinking about defensive programming here, through model driven design. I would insert null guards where a property must not be null, but would use a Maybe struct in the cases where it's ...
1
vote
2answers
139 views

What are the bottlenecks for the Java build speed?

Which underlying system parameters have most influence on how fast a typical Java project (say dozens of classes and dependencies) builds? There is a lot information on JIT (bytecode to CPU ...
1
vote
2answers
37 views

JDBC Connection Url Logging - Security Risk

In one of the existing batch process codebase, I can see a practice of JDBC Connection String is getting logged and also persisted. Logging or Persisting a JDBC Connection String alone may not be a ...
1
vote
2answers
151 views

How to distribute code reviews workload in a small team?

I have a small team where I'm largely the only person who reviews what goes into production and makes sure that the code introduced doesn't contradict business logic, no bugs etc.. I know a lot of ...
-1
votes
2answers
47 views

Implementing http patch using less number of possible cases

Maybe this is stupid question but if I implement http patch, is there no good way to reduce the number of possible cases without exploding into a large number (2^n) of different cases depending on ...
2
votes
2answers
132 views

How to create useful error messages in a JSON REST API without leaking implementation details across layers?

We're implementing a REST service with three main layers: Controller, Domain, Repository. The REST API is supposed to respond to error conditions with meaningful error messages. Suppose the general ...
4
votes
3answers
100 views

What are the key benefits of COCOMO and NASA datasets in software effort estimation? [closed]

The COCOMO and NASA datasets are widely used in most of the systematic literature review about software efforts estimations and I want to know the reason for it? I have read many papers which used ...
3
votes
3answers
104 views

Approach to designing maintainable, yet informative, user notification messages

I am facing a design problem related to the design of the user notification messages to be used in a web application. Just for the record, I am working in a JS environment and use a json structure to ...
0
votes
1answer
18 views

Why do we need to validate the SAML Response that came from IdP? (unless you are using http)

I came across several cases where people are validating the saml response (verifying the signatures in the xml using the IdP's public key). But, Why do we need to do that? (unless http is being used) ...
0
votes
2answers
125 views

Can I build a fully open source app with .Net Core [closed]

I am thinking about starting an open source project and right now I am deciding what technology stack to use. At the moment, my main coding experience is using C# and I am wondering if I can build a ...
0
votes
1answer
109 views

Is a Factory calling a Factory an anti-pattern or an extension of the Single Responsibility Principle?

I'm busy playing around with some training material to help teach some of the juniors the factory pattern. Whilst writing the example, I can't help but think this might be an anti-pattern. Lets say ...
0
votes
2answers
88 views

Is this OOP class structure for an RPG good enough?

So I have built a Telegram bot where you can play a rpg. This is the class structure. Creature MobType <-- Creature Mob <-- MobType <-- Creature Mob1 <-- Mob <-- MobType <-- ...
-4
votes
2answers
37 views

Observer pattern IS-A Command pattern?

This is Observer Pattern This is Command Pattern, with a highlight to make it similar to Observer Pattern The only differences are: Receiver IS-A Invoker in Observer Pattern Observer Pattern knows ...
1
vote
1answer
28 views

track user actions on UI and store them in the database

I have the web application that provides user with the interface to edit its character. When user makes some changes and saves them, I store it as delta in MongoDB. UI and backend communicate via REST....
1
vote
1answer
28 views

Silent login in external application

We have a web application and our partners ask us to login silently from their web applications allow their users to make a single login on their sites without login twice to access our application. ...
1
vote
4answers
191 views

Should I always use iterators when working with strings?

Here is the known old way to iterate over the string: for (int i = 0; i < str.length(); i++) { char c = str[i]; } However recently I have also seen in multiple places the usage of ...
1
vote
1answer
25 views

What is the difference between a Page Table Entry and a Memory Descriptor List?

The definition of a MDL from Microsoft is: The operating system uses a memory descriptor list (MDL) to describe the physical page layout for a virtual memory buffer. The definition of a Page ...
1
vote
1answer
36 views

HashMap versus Object ? Which one is better to finally generate JSON output with KEY and VALUE

I do have this use case. callers(APIs in same microservice or different microservices) wants to report different KEYS and VALUES as an audit as part of their methods. There is a high possibilities ...
1
vote
0answers
21 views

OAuth2 - client_credentials

I am in the process of building out a private REST API. This API is intended for machine to machine communication. In short someone else's server will kick off a job via CRON that pulls information ...
1
vote
0answers
32 views

How to manage cart details across various devices

Recently I was asked in a interview to implement to e-commerce site . One of the requirement was to maintain cart details across various devices .(i.e) if user adds a book from his iPhone , and when ...
1
vote
2answers
164 views

How to shuffle a large data set without touching every row?

Let’s say I have two larges arrays of users with equals number of rows and I want to match them randomly and one to one(one from the first array,one from the second), I will first need to shuffle one ...
2
votes
4answers
120 views

Is Entity Framework Core slower than using ADO .NET and stored procedures?

I'm looking at designing some new software for work, and I have been using EF Core quite a bit in my personal projects. In my mind, EF Core generates queries for the underlying data provider which ...

15 30 50 per page