All Questions

2
votes
1answer
42 views

Architecture design for Linux administrative interface

I've developed an IoT device utilising OpenWrt so my design needs run a on a shoe-string budget of resources. I need to be able to push small amounts of data, up to 300bytes to my app on a very ...
1
vote
2answers
162 views

Clean Architecture: Is the Input Boundary necessary?

In Clean Architecture boundaries are interfaces, which I model in Python with abstract classes. The input boundary, which is between the controller and the interactor/use case does not need an ...
3
votes
2answers
196 views

Are there any languages that let you specify that a function can only be called from a single call site? [on hold]

Out of curiosity, are there any languages that let you tag a function with an attribute that indicates that it may only be called from a single call-site, such that if any code tries to call the ...
-3
votes
2answers
37 views

Single micro-service for event-based & time-based notification scheduling [on hold]

We need to send emails and SMS to users which will be triggered by an event like a value change in the database or insertion of a row into the database. Sometimes its time-based trigger like sending ...
2
votes
5answers
262 views

Is it a good practice to use method names that flow properly when spoken? [on hold]

For example, suppose if I had a Character class and an inventory, before taking out a weapon to use it, it's probably a good idea to check if that weapon exists first, so I might have a method called ...
0
votes
2answers
149 views

Should execution continue if array is empty?

Just a general programming best practices question. If I have a function like that takes in an array of items and the function then calls a series of other functions which filter and act on the items ...
6
votes
0answers
187 views

Securely sandboxing user scripts in a C++ program

I've been working on a personal project in C# whose purpose is more or less to allow the user to execute scripts written by other users and restrict the permissions of that script. My program compiles ...
1
vote
1answer
42 views

code for a try_run() invocation - where do I place it?

I'm working on a CMake module which, at some point, invokes try_run(). The file I'm compiling is not really part of the project's sources - it's not used anywhere. It's only ever useful for CMake, to ...
0
votes
0answers
32 views

Which OAuth2 Flow?

I'm just getting into OAuth2 and I'm a tad confused (you've probably heard that before)! I am writing a small independent service which will expose a basic REST API enabling client applications to ...
1
vote
2answers
88 views

Real Time Web Sockets Architecture

I am confused here on how real time analytics is accomplished with web sockets when data is inserted into the system via a REST API. In my (admitted immature) understanding of web sockets, you have ...
2
votes
3answers
139 views

C# Pattern for Creating/Hiding Object Graph Creation

I'd like to get some advice on what would be a good approach at hiding the creation of an object graph. In the code below I would like SomeClass to not be directly responsible for the creation of the ...
1
vote
1answer
106 views

Should a function implementer or function caller handle immutability

I know there is no right and wrong answer here, I'm just looking for other opinions on who should handle immutability, dependency inversion and decoupling. Example 1: Here each function caller has ...
4
votes
1answer
105 views

What would be the pros and cons of requiring major versions to be forward compatible? [closed]

So I was learning about forward compatibility, and I was wondering if you could warn a "dependent" that a dependency is backward compatible, but not forward compatible, and vice-versa. The SemVer ...
9
votes
7answers
471 views

Are end-to-end and integration tests worth it for non-mission critical stuff?

It's well known that end-to-end and integration tests are costly. Of course if we develop applications where people might die if things go wrong it's a worthwhile investment. However in applications ...
4
votes
2answers
225 views

Doesn't repository pattern in clean architecture violate Dependency inversion principle?

From what I have read and seen clean architecture assumes that you have some entities which know nothing about persistence though at the same layer as they reside there might be an interface which has ...
0
votes
0answers
25 views

System design for scalable SNMP trap processor [closed]

We are working with Network Management System(NMS) and Fault Management is one of the feature supported by this system. We have a datacenter in which the switches and routers are there. These devices ...
0
votes
0answers
20 views

Creating the perfect self populating CDN, serving static optimized content from cookieless domain

I am building my own CDN in PHP and I am thinking that having Apache serving static files must be the optimal strategy, so a well crafted .htaccess file handling all headers correctly sounds like the ...
0
votes
0answers
27 views

How to isolate seperate organizations data using databases [on hold]

A new project I am about to begin will require isolated data for each organization that registers. Ideally, each would be accessible with unique credentials. I want to use either Firebase or AWS for ...
1
vote
0answers
37 views

Third-party API wrapper in Java: how to design

Suppose, there's a site that provides an API, such as this: Users post questions, answers on that site You can make GET and POST calls There are two types of authentication: weak (only gives read ...
1
vote
4answers
313 views

Is dependency injection always a best practice?

Recently I started working on a rather large monolithic system. The solution has web, app and api parts and in general just a lot of stuff. It relies heavily on dependency injection and I noticed ...
2
votes
0answers
48 views

How should domain model entities expose information about the current state of their properties?

I'm new to DDD, so please bear with me. I am trying to design a domain model around an extremely large and complex existing system, where most of the current "domain" logic is either in the UI or in ...
1
vote
0answers
10 views

different data connectors for different objects and users

I have an application which needs to store different objects in different data stores based on the user's authorization credentials. I.E. the user may need to save object 1 to their BI postgres ...
1
vote
0answers
52 views

How do I best document a codebase that someone else will soon inherit? [closed]

I will be changing jobs soon, and I would like to make life as easy as possible for whoever inherits the codebases in the future. There is unlikely to be overlap time where a new hire could ramp up ...
1
vote
1answer
36 views

How to deduplicate messages coming from having multiple instances of the same observer

I have a web application that is currently of some different services, one instance each. My current goal is to scale some of my services to ensure fail over. One big problem I foresee is that a ...
2
votes
0answers
26 views

Can the read api receive events that the write api does not receive or raise?

Say I have a read API and a write API: MyApp.Write.api MyApp.Read.api Both API's handle integration events from other apis/microservices. Say I had certain integration events that only need to be ...
2
votes
1answer
78 views

How to design document exchange system

I am trying to come up with a design of document exchange system. System should be for business-to-business communication. Description: There will be possibly 100+ clients(consumers) - they will have ...
2
votes
1answer
81 views

Trying to figure out how to make the syntaxes of 2 different API's the same

I'm doing research to a problem occurred in our company. We have a front-end web portal which communicates by API with a back-end in a same syntax, for example: "www.123.com/api/v1/getCustomers". ...
2
votes
1answer
113 views

Approach for implementing Device and Protocol layers in C++?

I'm writing a program that will interface with an external device. It will support numerous devices that may use different communication interfaces like USB, serial, etc. This is what I have so far: ...
1
vote
1answer
67 views

Clean Architecture: Calling a Usecase from the Controller

In the context of Clean Architecture, is the following execution path right? The controller sends a request model (input) to an interactor. The interactor executes a use case dependent on the request ...
48
votes
10answers
11k views

Does splitting a potentially monolithic application into several smaller ones help prevent bugs? [closed]

Another way of asking this is; why do programs tend to be monolithic? I am thinking of something like an animation package like Maya, which people use for various different workflows. If the ...
2
votes
2answers
197 views

Java 8 - When should I use java.util.Stream instead of java.util.Collection?

I started studying functional programming with JavaScript. After this, I started to study it with Java 8 (streams, lambdas and method reference) and I realised that I tend to use streams as much as ...
2
votes
1answer
60 views

Angular class design dilemma

I'm trying to set up a good class diagram for my Angular application, however I have a problem figuring out how to solve the following situation: I created a base Link class that can be used anywhere ...
-2
votes
3answers
106 views

What you can prove when making native HTTP calls from browser

From here it was advised: Formal verification needs to have a goal: what precisely do you want to prove? This is a good question. I am very intrigued by the idea of doing formal proofs in web ...
0
votes
2answers
66 views

Does the Scrum Guide Specify How Often to Release QA/Test Builds?

See https://www.scrumguides.org/scrum-guide.html I've read through this several times and can't find anything about how often to do QA/Test builds during a sprint. There is a section called increment....
-2
votes
0answers
29 views

How can I replace the bootstrap to achieve the same purpose? [closed]

I got some help from someone and they used Bootstrap which the teacher did not allow. The bootstrap makes the words not compressed against each other. What can I do to achieve the same purpose without ...
30
votes
8answers
7k views

Does “variables should live in the smallest scope as possible” include the case “variables should not exist if possible”?

According to the accepted answer on "Rationale to prefer local variables over instance variables?", variables should live in the smallest scope possible. Simplify the problem into my interpretation, ...
1
vote
1answer
140 views

Why did Java and C sharply dip in popularity around 2017 in the TIOBE index? [closed]

The TIOBE Programming Community Index shows Java and C dramatically falling in popularity between late 2016 and mid 2017 before rebounding by mid 2018. What is the cause of the volatility? Source: ...
1
vote
0answers
76 views

Migrating desktop application to backend/frontend [on hold]

I work on a large old (15+ years) Windows desktop application. The applcation is a Frankenstein of legacy technologies: (ATL and ADO for db, .NET and COM with some legacy VB6 for business logic, ...
0
votes
1answer
30 views

Problems handling stackholder with DB Migration for a Strangler Migration [on hold]

Background of the project We are responsible for the migration of a legacy system (an ERP) that is over 10 years old. The reason for the migration, is mainly, related to business needs and ...
3
votes
4answers
205 views

How to get a decoupled design without injecting repositories inside entities

I am facing the following situation: I have to develop a system that has to calculate the price of a car so i need to calculate the prices of all the Pieces that make up the car and then total them. ...
1
vote
1answer
20 views

Organizing and Creating a Custom Qt Widget

I am looking to create a digital Rolodex to keep track of contacts in Qt 5.9 and am uncertain how to efficiently create custom widgets. Examples online like the classic clock example show to ...
1
vote
1answer
83 views

UML - Identifying use cases and actors

I'm currently learning object-oriented programming and we have moved on to UML. We are learning about use cases and actors currently and we need to create a list of actors and use cases initiated by ...
1
vote
5answers
78 views

For BDD, should the step to wait be explicit in the feature file or just implemented in the step?

I'm using BDD and I'm writing Gherkin feature files. Is it good practice to add a step in a Scenario to wait for a while? Something like: Waits for 2 seconds after all the operations complete or ...
2
votes
1answer
55 views

Keep Hitting 3rd party API or Store Commonly Queried Data In DB?

Colleague and I have begun a long (and hopefully fruitful) project. I've been building and have come to my first crux, and now I ask the experts of the Stack Exchange for their guidance. I'll keep ...
0
votes
2answers
165 views

Java Constructor Syntax and Design [closed]

With regards to object-oriented Java constructor syntax and design, specifically parameterized or specific constructors, it is the accepted process, as describe in books, to build a parameterized ...
1
vote
0answers
79 views

Can one copy their own code from a different company? [duplicate]

Lets say someone has written code for multiple companies that have then copyrighted you work. Another company gives them a similar project to one they have worked on previously. Would it be legal for ...
2
votes
3answers
3k views

Find longest word in a string: are any of these algorithms good? [closed]

I'm trying to find the longest word in a given text, but it has to be done "old school": without using split, enumerate, etc. (I'm using Python but what I'm looking for is more of a pseudocode or a ...
7
votes
5answers
455 views

Best Practice - Wrapping if around function call vs Adding early exit if guard in function

I know this can be very use-case specific, but I find myself wondering this far too often. Is there a generally preferred syntax. I'm not asking what is the best approach when in a function, I am ...
3
votes
4answers
208 views

Is a cookie hash that matches with file hash safe?

I've made a simple login form. It's made very generic to be used for any project. Now I wonder if the security is good enough and if my approach is safe. On success When successfully logged in I do ...
2
votes
1answer
129 views

Clean Architecture: May the Controller talk to the Presenter directly?

From what I understand from the 'Clean Architecture', the controller determines which usecase to execute dependent on the input of the user. If the input from the CLI for example is invalid, the ...

15 30 50 per page