Newest Questions

3 votes
1 answer
199 views

How to manage working directory in interactive development environments like Jupyter Notebook?

I'm having trouble with managing the working directory in Jupyter Notebook. For example, I have a .py script that requires me to change the working directory to its directory to run it properly. I've ...
newbie's user avatar
  • 47
6 votes
5 answers
488 views

Separate packages for mocks?

Say I have a package which handles sending emails over SMTP. Many of the apps I build use it. For unit testing purposes, I create a mock of the email service from that package which logs raw mail ...
Greendrake's user avatar
5 votes
3 answers
358 views

When is multiple validation layers of protection necessary?

I'm having a hard time of understanding at what point is multiple layers of validation protection necessary rather than a single point of failure and if the performance hit is a concern Lets say you ...
Observable Stone's user avatar
3 votes
2 answers
145 views

How to segregate and name application services in DDD?

Below is an example scenario that can be used to illustrate your answer. Let's say there is a CoffeeMachine aggregate with a set of methods similar to the following: Methods used by admins. ...
EMN's user avatar
  • 407
3 votes
2 answers
228 views

Why do I need an authorisation server if my micro services can validate JWTs directly?

I'm working on a Spring-based micro service project and considering different approaches for handling authentication and authorisation. Instead of setting up a dedicated authorisation server, I’m ...
GeekChap's user avatar
3 votes
1 answer
103 views

How does one concisely differentiate between a DNS-to-IP lookup and reverse ordering of TLD > domain > subdomain relationships?

Question, Rationale, and Context Commonly, in AOSP package names, [2] and always, in Flatpak package names [4] (even some WinGet ones, too), [1] DNS is utilised as the naming scheme, yet is reversed ...
RokeJulianLockhart's user avatar
6 votes
7 answers
614 views

Why do "protected variables" tend to violate open closed principle?

According to Why is Clean Code suggesting avoiding protected variables?, I know there are tons of reasons to avoid protected variables. However, there is a reason at the currently highest voted answer ...
wcminipgasker2023's user avatar
0 votes
4 answers
160 views

Should release/deployment builds run tests again?

In many configurations of CI/CD pipelines I encounter, things run somewhat like this: compilation and tests are run on a pull request after merging, the build is triggered on the main branch, which ...
Peter's user avatar
  • 988
5 votes
3 answers
507 views

Reliability vs Fault Tolerance

I am confused with the following terms: Reliability and Fault Tolerance According to Designing Data Intensive Applications book, the definition of Reliability is: The system should continue to work ...
Raghav Goyal's user avatar
8 votes
5 answers
4k views

Is it still a code smell if a class knows all subtypes but not using instanceof and downcasting?

According to Instanceof code smell, I know using "instanceof" is a code smell, so suppose there is a game with some Tools: Tool.java: public interface Tool{ public void printInfo(); } ...
wcminipgasker2023's user avatar
2 votes
1 answer
77 views

how to update the state of many aggregates in event sourcing at once

I have one service that I plan to write using the concept of event sourcing and CQRS. The bottom line is that it has an aggregate, let's say a Person. Person{ ID Name // name of person Surname // ...
vovanchello's user avatar
10 votes
7 answers
3k views

Is it an anti-pattern to support different parameter types when using a dynamically-typed language?

In the Python code base we inherited there are several functions that check parameter types and try to "accommodate" different types. Example: def process_data(arg): json_ = {} if ...
oliver's user avatar
  • 229
1 vote
3 answers
216 views

How does Object-Oriented Design fit into N-Layered Architecture?

Normally an N-Layered application is structured as follows. User Interface layer Business Logic Layer Data Access Layer DAL contains objects (data containers) representing business entities. The BLL ...
EMN's user avatar
  • 407
8 votes
11 answers
3k views

Difficulty understanding benefit of Separation of Concerns

One of the motivations for separation of concerns is so a change in one place does not affect the other. I am going to make an argument with my limited understanding. Here is a scenario where I fail ...
EMN's user avatar
  • 407
3 votes
2 answers
135 views

UML class diagram for RBAC. I don't know if the permissions and roles are properly set

I am trying to create a UML class diagram using RBAC. I am new to this language and trying to make sense of it. I am attempting to showcase permissions to specific roles. I am not sure whether that is ...
Apollo 025's user avatar

15 30 50 per page